You are here

ERROR: Unable to open weights/patch file

5 posts / 0 new
Last post
ERROR: Unable to open weights/patch file
#1

I am trying to use python script under linux in which I import rosetta module('from rosetta import *) and use rosetta methods. But I got this error. What is the reason for that and does anyone know how to fix it?

ERROR: Unable to open weights/patch file. None of (./)standard or (./)standard.wts or /usr/local/share/PyRosetta/rosetta_database/scoring/weights/standard or /usr/local/share/PyRosetta/rosetta_database/scoring/weights/standard.wts exist
ERROR:: Exit from: src/core/scoring/ScoreFunction.cc line: 2967
Traceback (most recent call last):
File "energy_results_domain (1).py", line 116, in
results_all_models(domain_name)
File "energy_results_domain (1).py", line 107, in results_all_models
results = energy_model(norm_filenamein)
File "energy_results_domain (1).py", line 30, in energy_model
scorefxn=create_score_function('standard')

Post Situation: 
Sun, 2013-11-17 02:49
peony

We've recently transitioned what the default recommended scorefunction is. Previously, the recommended scorefunction was score12, which was equivalent to the "standard.wts" scorefunction plus the score12 patch. (Plain "standard.wts" hasn't been the recommended scorefunction in years - since before PyRosetta came out, in fact.) Now we recommend (and have as default) the "talaris2013" scorefunction.

As part of that switchover, we renamed the "standard.wts" scorefunction to "pre_talaris_2013_standard.wts" The reason for this is the confusion that having a "standard" scoring function which isn't standard, isn't default, and isn't recommended.

To get the recommended default score function, just simply omit the name of the scorefunction from the create_score_function() call. With an empty parameters list, it should return the default scorefunction (which for recent versions of PyRosetta will be talaris2013).

As a final note, if for some reason you actually do want to use the "pre_talaris_2013_standard.wts" scorefunction with the more recent versions of PyRosetta, that's not the only thing you need to change. You also have to add the -mistakes:restore_pre_talaris_2013_behavior flag to the general Rosetta options. In addition to the weights changing, there are also a number of internal functional form changes which simply changing the weights file won't alter.

Mon, 2013-11-18 07:52
rmoretti

Thanks for that! It's solved my problem!

Wed, 2013-11-20 12:21
peony

How exactly can I omit the name of the scorefunction from the create_score_function() call. Thanks.

Thu, 2019-06-13 17:01
esozdemir

The create_score_function()  function itself will always require some parameter to tell it which scorefunction it should create.

However, there are additional convenience functions which, when called with no parameters, will simply provide the default scorefunction for the current settings. core::scoring::get_score_function() is one such function.

Tue, 2019-07-09 10:29
rmoretti