restricted fast relax changes whole structure?

Member Site Forums PyRosetta PyRosetta – General restricted fast relax changes whole structure?

Viewing 1 reply thread
  • Author
    Posts
    • #3828
      Anonymous

        Hello, 

        i am trying to do a relax of a certain area of my protein, however, it seems as though the entire backbone moves (and the free energy of the entire system drops dramatically, an other indication the entire thing is beeing relaxed). My code is as follows:

        working_pose = pose.clone()

        sfxn = create_score_function(“ref2015_cart”)

        bb_action = pyrosetta.rosetta.core.select.residue_selector.NeighborhoodResidueSelector()

        bb_action.set_focus(str(467))

        bb_action.set_distance(1)

        bb_action.set_include_focus_in_subset(True)

        chi_action = pyrosetta.rosetta.core.select.residue_selector.NeighborhoodResidueSelector()

        chi_action.set_focus_selector(bb_action)

        chi_action.set_distance(0)

        chi_action.set_include_focus_in_subset(True)

        movemap = pyrosetta.rosetta.core.select.movemap.MoveMapFactory()

        movemap.all_jumps(False)

        movemap.add_bb_action(pyrosetta.rosetta.core.select.movemap.mm_enable, bb_action)

        movemap.add_chi_action(pyrosetta.rosetta.core.select.movemap.mm_enable, chi_action)

        movemap.set_cartesian(True)

        tf = TaskFactory()

        tf.push_back(operation.InitializeFromCommandline())

        tf.push_back(operation.RestrictToRepacking())

        prevent_repacking_rlt = operation.PreventRepackingRLT()

        prevent_subset_repacking = operation.OperateOnResidueSubset(prevent_repacking_rlt, chi_action, True)

        tf.push_back(prevent_subset_repacking)

        packer = pyrosetta.rosetta.protocols.minimization_packing.PackRotamersMover()

        packer.score_function(sfxn)

        packer.task_factory(tf)

        fastrelax = pyrosetta.rosetta.protocols.relax.FastRelax()

        fastrelax.set_scorefxn(sfxn)

        fastrelax.cartesian(True)

        fastrelax.set_movemap_factory(movemap)

        fastrelax.set_task_factory(tf)

        fastrelax.apply(working_pose)

         

         

        can anyone tell me if this is supposed to happen? or if my code has an error? thank you

      • #16002
        Anonymous

          Lower Gibbs free energy is good: it is a potential and the lower the protein falls down the funnel the better.

          FastRelax trials alternative angles, which may result in a large cartesian change —a nice example are AlphaFold2 spaghetti loops between domains.

          However, you seem to be complicating things…


          scorefxn = create_score_function("ref2015_cart")

          movemap = pyrosetta.MoveMap()
          movemap.set_bb(allow_bb=bb_vector)
          movemap.set_chi(allow_chi=chi_vector)

          fastrelax = pyrosetta.rosetta.protocols.relax.FastRelax(scorefxn, cycles)
          fastrelax.set_movemap(movemap)
          fastrelax.cartesian(True)
          fastrelax.apply(pose)

          In the MoveMap I feed it a vector, not a selector (vector = selector.apply(pose)) as done with a MoveMapFactory. You aren’t designing so the selection vector should be fine. Jumps are False by default in a blank movemap. print(movemap) will tell me anyway.

          Now, there is a further problem: your selector is weird. It is a neighbour selector. This selects residues with _n_ distance of each others center atom as defined in their topologies (the nbr atom in the params file) not PyMOL style expand command, which is CloseContactSelector —see here for usage. 0 and 1 Å will select only your residue —if that was the plan then just use ResidueIndexSelector(xxx). If you want to see what you have:


          print(pyrosetta.rosetta.core.select.residue_selector.ResidueVector( selector.apply(pose) ) )

          • #16003
            Anonymous

              thank you for the reply. the chi selection is like that on “purpose”. the idea is to allow backbone + chi movement on some residues, and then chi movement on its neighbours.  I set it to 0 for debuging purposes.  

               

              What you said at the beginning is what was the case – angles were allowed to change on non selected residues, i can disable that in the movemap and my backbone stays in place. thanks!

        Viewing 1 reply thread
        • You must be logged in to reply to this topic.