Member Site › Forums › PyRosetta › PyRosetta – General › Relaxing experimental structure
- This topic has 12 replies, 4 voices, and was last updated 8 years, 3 months ago by Anonymous.
-
AuthorPosts
-
-
September 29, 2016 at 10:46 am #2516Anonymous
I need to measure the Rosetta “energy” of a set of conformations taken from the PDB. Before computing the energy I would like to relax the structures while keeping them as close as possible to the experimental structure. I guess I want something like this. Is that protocal available using PyRosseta? Or I should try to “implement it” my self.
I guess I could do something like:
def relaxation(pose, scorefxn):
movemap = MoveMap()
movemap.set_bb(False)
movemap.set_chi(True)
relax = FastRelax()
relax.constrain_relax_to_native_coords(True)
relax.set_scorefxn(scorefxn)
relax.set_movemap(movemap)
relax.apply(pose)
return scorefxn(pose)But I thing the “Relax With All-Heavy-Atom Constraints” is clever than this.
-
September 29, 2016 at 2:31 pm #11878Anonymous
I think that’s substantially similar to what you’d get from the C++ relax application with a similar flag set. You should throw in code to increase the number of rotamers available to packing (whatever the pyrosetta equivalents of -ex1 -ex2 -use_input_sc -extrachi_cutoff 0 is).
-
September 29, 2016 at 3:10 pm #11879Anonymous
You’ve got the jist of it. The relax application is simply nothing more that a commandline wrapper around the protocols.relax.Relax_main() function. That does some setup, if options call for it (adding constraints from constraint files, add electron density, adding symmetry, doing pre-relax superimposition), and then basically runs a default FastRelax on the structures.
The wrinkle with PyRosetta is that a bunch of the settings for FastRelax are set from the commanline options. It might be easiest to set them from the init function, but there are ways around it for certain flags. For example, to do `-relax:ramp_constraints false`, call `relax.read_script_file( “NO CST RAMPING”, 5 )`, where 5 is the default number of repeats. For `-relax:coord_constrain_sidechains` it’s the `relax.coord_constrain_sidechains(True)` call, and for constrain_relax_to_native_coords/constrain_relax_to_start_coords, it’s the respective functions, as you’ve already noticed.
Quick note on constrain_relax_to_native_coords: in order for that to work, you’ll need to set the native structure. How to do that depends on which versions of PyRosetta you have. You either have to set it with -in:file:native, or you have to call protocols::jd2::set_native_in_mover() on the FastRelaxMover. — That might be a little convoluted, so I’d recommend instead just manually adding the coordinate constraints to the pose with protocols.relax.AtomCoordinateCstMover This should allow better control of the coordinate constraints you have. Just call the apply of the AtomCoordinateCstMover prior to calling the apply() of FastRelax. But if your goal is to keep them as close as possible to the input structure, I might recommend using relax.constrain_relax_to_start_coords(True) instead.
Also make sure that the scorefunction you use has the coordinate_constraint scoreterm turned on.
A final note, are you sure you want to turn off backbone movement? The coordinate constraints do a pretty good job of keeping the backbone in place, and much of the energy that you gain from the all-atom constrained relax comes from subtle movements in the backbone atoms. I’d recommend starting with a fully mobile (default) MoveMap, and only restricting degrees of freedom if you see particular problems.
-
September 29, 2016 at 3:50 pm #11880Anonymous
Also, if you want to keep as close as possible to the native structure, just to get the energy into the Rosetta energy function for further experiments, see Lucas and Roccos paper here. Much of this can be done in PyRosetta, but some of it is a bit tricky.
http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0059004
-
October 1, 2016 at 4:21 pm #11902Anonymous
Thanks everyone fot the input! I will try all your suggestions.
-
October 2, 2016 at 10:29 am #11906Anonymous
I am still playing with parameters. And I have one more (related) question.
I wonder if I could turn the rosetta energy I get for each conformation into relative probabilities for those conformations. This should be simply computing the Boltzmann factors given the energy, but I am not sure with kT should I use and also I am not sure if this is a sensible thing to do.
-
October 2, 2016 at 4:51 pm #11907Anonymous
I’ve thought about doing something like this before, and actually wrote a JobInputter to use this info to seed Rosetta. I don’t think this is a bad idea, its just not really done, so its a bit uncharted teratory. Documentation is here if you want to try it. Would be super interested in hearing if you do.
-
October 6, 2016 at 9:59 am #11921Anonymous
Thanks for the answer and sorry for the delay. If I undestood correctly your jobinputter is a way to run ensemble-weighted computations using Rosetta. Is that right? While that seems interesting what I need is something different (or maybe I missunderstood you). I want to turn rosetta energy into weights for further computations outside Rosetta. The main problem for me is that I don’t know the “correct” value kT (or even is that thing exists).
-
October 6, 2016 at 9:59 am #12442Anonymous
Thanks for the answer and sorry for the delay. If I undestood correctly your jobinputter is a way to run ensemble-weighted computations using Rosetta. Is that right? While that seems interesting what I need is something different (or maybe I missunderstood you). I want to turn rosetta energy into weights for further computations outside Rosetta. The main problem for me is that I don’t know the “correct” value kT (or even is that thing exists).
-
October 6, 2016 at 9:59 am #12963Anonymous
Thanks for the answer and sorry for the delay. If I undestood correctly your jobinputter is a way to run ensemble-weighted computations using Rosetta. Is that right? While that seems interesting what I need is something different (or maybe I missunderstood you). I want to turn rosetta energy into weights for further computations outside Rosetta. The main problem for me is that I don’t know the “correct” value kT (or even is that thing exists).
-
October 6, 2016 at 10:29 am #11922Anonymous
I just realize I do not need to know kT, for what I want, just the relative difference bewteen two energies. Sorry for adding noise to the forum. Thanks!
-
October 6, 2016 at 10:29 am #12443Anonymous
I just realize I do not need to know kT, for what I want, just the relative difference bewteen two energies. Sorry for adding noise to the forum. Thanks!
-
October 6, 2016 at 10:29 am #12964Anonymous
I just realize I do not need to know kT, for what I want, just the relative difference bewteen two energies. Sorry for adding noise to the forum. Thanks!
-
-
AuthorPosts
- You must be logged in to reply to this topic.