Member Site › Forums › PyRosetta › PyRosetta – General › non canonical aa mutations/force fields/pyrosetta
- This topic has 12 replies, 3 voices, and was last updated 11 years, 5 months ago by Anonymous.
-
AuthorPosts
-
-
June 19, 2013 at 8:51 am #1616Anonymous
Hi all,
I’m new to PyRosetta and just had a quick question !
I have a protein and need to compute the energy, then to acetylate certain Lys, repack after the replacement and recompute the energy. I am wondering how is the score function name (is it mm_std?) and also where can i find non canonical aa codes. THANKS! -
June 19, 2013 at 3:16 pm #8918Anonymous
Hi,
The scorefunction would be mm_std or score12prime with fa_pair (statistical electrostatic) term changed to 0 weight and hack_elec (coulombic electrostatic term) changed to .49 weight (essentially replacing fa_pair with the same weight.You can use this GUI: http://www.pyrosetta.org/documentation#TOC-1.-The-PyRosetta-Toolkit
to do the mutation, repacking, and recomputing the energy, as well as find any non-canonical aa codes. If you, instead, want to do this within python code, it will be something like this (variant for acetylation is “ACETYLATION”). The code read by Rosetta for Lys acetylation is ALY:
add_variant_type_to_pose_residue(pose, variant, resnum)
task = TaskFactory.create_packer_task(pose)
task.temporarily_fix_everything()
task.restrict_to_repacking()
task.temporarily_set_pack_residue(resnum, True)
pack_mover = PackRotamersMover(scorefxn, task)
print self.score_class.score(self.pose)
pack_mover.apply(self.pose)
print self.score_class.score(self.pose)print “Variant type added + Packed”
-Jared
-
June 19, 2013 at 3:17 pm #8919Anonymous
In code, you will also need to import the function into PyRosetta, as I don’t believe it’s exposed:
from rosetta.core.pose import add_variant_type_to_pose_residue
-
June 20, 2013 at 1:09 pm #8921Anonymous
Hi Jared! Thanks so much!!
I am afraid i have to ask more
I attached the script, that i guess is completely wrong, could you please look at it and tell me:
my_scorefxn(prot) gives me 0 if i use mm_std and 94.01 if i use score12prime, i guess mm_std is not loading correctly? but no errors appear.
somehow i have the following error, when i try to mutate LYS to ALY:
In [190]: add_variant_type_to_pose_residue(prot, ‘ALY’, 16)ERROR: unable to find desired variant residue: LYS LYS ALY
ERROR:: Exit from: src/core/chemical/ResidueTypeSet.cc line: 527and finally :
In [195]: print self.score_class.score(self.pose)
NameError Traceback (most recent call last)
in ()
—-> 1 print self.score_class.score(self.pose)NameError: name ‘self’ is not defined
Sorry for being so long, but you are my hope
Thanks a lot,
Anouk -
June 20, 2013 at 4:09 pm #8924Anonymous
Hi Jared,
Thank you!!!
Now the last (hopefully
I have probs at:
______________________________________________________________________________________________
In [364]: task.restrict_to_repacking()
Out[364]:______________________________________________________________________________________________
and at:
In [368]: print score_class.score(pose)
NameError Traceback (most recent call last)
in ()
—-> 1 print score_class.score(pose)NameError: name ‘score_class’ is not defined
In [369]: pack_mover.apply(pose)
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 193 rotamers at 1 positions.
core.pack.pack_rotamers: IG: 1560 bytesIn [370]: print score_class.score(pose)
NameError Traceback (most recent call last)
in ()
—-> 1 print score_class.score(pose)NameError: name ‘score_class’ is not defined
However it seems like the energy is calculated (coz at least it’s different before and after acetylation)…
Similarly, for the 3Methylation, which is the syntax?
Best regards and thanks a lot!
Anouk
-
June 20, 2013 at 10:40 pm #8932Anonymous
H Jared and rmoretti !
Jared! I am running Pyrosetta on Mac.Thanks a lot for the help!!!
rmoretti! i am really desperate in finding some info from the documentation,- i get lost in it without actually any success Thanks for the tips!
Best,
Anouk -
June 20, 2013 at 2:37 pm #8922Anonymous
Hi Anouk: Instead of ‘ALY’, you will need to provide ‘ACETYLATION’.
I don’t know why mm_std is giving 0. I’ll see if I can find something. For now, using score12prime with hack_elec should be fine.
As for the ‘self’ keyword, you can take them off. They are for python classes. The code I pasted was from a class in the GUI (I tried to remove all of the ‘self’ references, but I guess I forgot one.)Hope this helps
-J
-
June 20, 2013 at 6:02 pm #8927Anonymous
Hi Anouk,
Some how the forum ate my comment. For score_class, replace any of them with scorefxn. Sorry for this, I must have copied the code from the GUI hastily.
To mutate to tri methylation state, the variant name is ‘TRIMETHYLATION’
You can find more information on patches and NCAA either through the GUI or in the directory pyrosetta/rosetta_database/chemical/residue_type_sets/fa_standard
Have you been through the PyRosetta tutorials?
Are you running on windows platform or linux/mac?-Jared
-
June 20, 2013 at 6:20 pm #8929Anonymous
I believe that “score_class” should be the scorefunction object you wish to use. (So it would be “print scorefxn.score(pose)” instead). Those print lines aren’t really necessary to get the protocol to run, though, and are just there to give you information on how the pose is scoring before and after packing.
Regarding lysine trimethylation, the variant type is “TRIMETHYLATION” instead of “ACETYLATION”. (Likewise DIMETHYLATION and METHYLATION for single and dimethylated lysine. – If you can deal with the poorly documented syntax, the relevant files defining the residue modifications are found in rosetta_database/chemical/residue_type_sets/fa_standard/patches/ )
-
June 20, 2013 at 7:10 pm #8930Anonymous
?
-
June 20, 2013 at 8:45 pm #8931Anonymous
I believe the answer to your “?” is that I started composing my response before you submitted yours.
-
June 21, 2013 at 2:18 pm #8935Anonymous
Haha, I see. Thanks Rocco!
-
June 21, 2013 at 2:27 pm #8936Anonymous
Anouk,
Since your on Mac, the GUI will work. (The current mac/linux PyRosetta versions are newer than the current windows version). One of the things it does is parse all of the fa_standard files to make it easier to explore. Its in pyrosetta/GUIs/pyrosetta_toolkit with documentation here: http://graylab.jhu.edu/pyrosetta/downloads/documentation/pyrosetta_toolkit/pyrosetta_toolkit.html
Did the mutation/packing work now?
-
-
AuthorPosts
- You must be logged in to reply to this topic.