You are here

Relaxation with PyRosetta

4 posts / 0 new
Last post
Relaxation with PyRosetta


I would like to relax pdb structures with PyRosetta. I use commands

relax = ClassicRelax()

but I have received the information about memory protection violation. Why is it happen and how can I relax my structures?

Problem solved !

Post Situation: 
Sat, 2014-02-15 04:36

There's a number of settings one can apply to various Rosetta movers, and not all of them get default values. You have to manually set the defaults, otherwise you get various errors. (The reason you don't get decent error messages is that in the C++ Rosetta, the interface to ClassicRelax always sets these values, so it's not typically an issue.)

In your case, you haven't set the scorefunction to the ClassicRelax object, and it doesn't assume a default. Either pass a scorefunction to the constructor, or use the .set_scorefxn() method to set the scorefunction.

Mon, 2014-02-17 11:31

Dear rmoretti and peony,


I hope this message reaches you since your discussion is 3 years old. Could you please paste your final relaxtion script after you fixed it? how did you use the .set_scorefxn() or what did you change to make it work?


Thank you



Sat, 2017-06-03 19:26
from rosetta import *
from pyrosetta import *
rel = rosetta.protocols.relax.FastRelax()


(Note that without setting a scorefunction, the current Rosetta default scorefunction will be used.  In terms of PyRosetta/Rosetta, this was Talaris2014 up until this week.  It has just changed to REF2015, which went through a lot of benchmarking before it was decided to be the default.


From there, you can change different settings.  Use ipython or the ipython notebook, or the PyRosetta documentation to change it.  

rel.set_scorefxn() or something similar. 

rel. then hitting tab will give you the list of functions. Doing a ? at the end of the function will give you the info on the function.

This page is usually a good API reference for PyRosetta, but it is currently down.  I've Emailed Sergey to fix it.

Sat, 2017-06-03 20:20