Member Site › Forums › PyRosetta › PyRosetta – General › generate_nonstandard_residue_set() takes exactly 2 arguments (1given)
- This topic has 1 reply, 2 voices, and was last updated 6 years, 11 months ago by Anonymous.
-
AuthorPosts
-
-
January 30, 2018 at 2:59 am #2840Anonymous
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()
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:
http://www.pyrosetta.org/obtaining-and-preparing-ligand-pdb-files
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 !!
-
January 30, 2018 at 2:29 pm #14008Anonymous
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()
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.
-
-
AuthorPosts
- You must be logged in to reply to this topic.