generate_nonstandard_residue_set() takes exactly 2 arguments (1given)

2 posts / 0 new
generate_nonstandard_residue_set() takes exactly 2 arguments (1given)
#1

So I'm trying to load this ligand_protein complex PDB into PyRosetta by temporarily creating a ResidueTypeSet

from pyrosetta import *

init()

params_path = Vector1(['cefotaxime.params', 'cefotaxime.params'])

nonstandard_residue_type = generate_nonstandard_residue_set(params_path)

I got this error message:

generate_nonstandard_residue_set() takes exactly 2 arguments (1given)

I'm using this temporary method becuase I followed this procedure step by step to try to permanently modify the chemical database:

I made sure that I BOTH placd the new cefotaxime.params file into the correct directory but also added the path to the cefotaxime.params file to the residue_types.txt file.

But when I loaded the PDB file a pose, pyrosetta still did not recognize the cef (cefotaxime) residue type.

Any help tp solve either issue is really appreciated !!

Category:
Post Situation:
Mon, 2018-01-29 18:59
yanghaobjordan

The behavior of generate_nonstandard_residue_set() has changed slightly between versions. It used to be that it added the non-standard type to the standard, global ResidueTypeSet. This caused problems with data consistency, and polluted the general ResidueTypeSet namespace.

Now, non-standard ResidueTypes are associated with the pose they're used in, rather than just floating around generally. As such, generate_nonstandard_residue_set() now takes a Pose object as part of its code signature (see help(generate_nonstandard_residue_set) for more details.)

What you should do is create an empty pose, add the non-standard ResidueType to it with generate_nonstandard_residue_set(), and then call pose_from_file() on that empty Pose.

from pyrosetta import *
init()

params_path = Vector1(['cefotaxime.params', 'cefotaxime.params'])
pose = Pose()
generate_nonstandard_residue_set(pose, params_path)
pose_from_file(pose, "Cefotaxime.pdb")


generate_nonstandard_residue_set() will still return a ResidueTypeSet object, but it's now one which is associated with the passed Pose.

Tue, 2018-01-30 06:29
rmoretti