non canonical aa mutations/force fields/pyrosetta

Member Site Forums PyRosetta PyRosetta – General non canonical aa mutations/force fields/pyrosetta

Viewing 5 reply threads
  • Author
    Posts
    • #1616
      Anonymous

        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!

      • #8918
        Anonymous

          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

        • #8919
          Anonymous

            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

          • #8921
            Anonymous

              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: 527

              and 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

            • #8924
              Anonymous

                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 bytes

                In [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

              • #8932
                Anonymous

                  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

                • #8922
                  Anonymous

                    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

                  • #8927
                    Anonymous

                      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

                    • #8929
                      Anonymous

                        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/ )

                      • #8930
                        Anonymous

                          ?

                        • #8931
                          Anonymous

                            I believe the answer to your “?” is that I started composing my response before you submitted yours.

                          • #8935
                            Anonymous

                              Haha, I see. Thanks Rocco!

                            • #8936
                              Anonymous

                                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?

                            Viewing 5 reply threads
                            • You must be logged in to reply to this topic.