You are here

Minimization Toolkit W/GUI

7 posts / 0 new
Last post
Minimization Toolkit W/GUI

jadolfbr, 2013 - Please do not use this GUI. It was a beta version of an expanded PyRosetta Toolkit GUI which should be released in Rosetta Version 3.5.

Hi All. Just wanted to share part of an application that I've been working on. It is a Tkinter application for use with Minimization of Proteins and Loops.
It uses the Rosetta Classic Relax, Fast Relax, dfpMin Minimization, and Sidechain movers.
Run it using "python" (All files need to be in the same directory, and the extensions changed to .py)

At any point, if you specify the directory and filename, you can output your pose. It is useful for quick minimization of a whole protein or region, and as a sample basis for writing GUI applications using python and pyrosetta.

Make sure to click the 'Load File' button after choosing your file.

Clicking the 'Show in Pymol' button will use the PyMOL observer feature of PyRosetta to output your pose in PyMol. To use this, if you have not looked into it yet: in PyMol cd into the pyrosetta DIR. Type "run" and you will be ready to go. If you check the 'PyMol Observer' checkbox you can watch rosetta do the relax/backrub/min/sc optimize, and see your pose at all times. Some basic analysis options are provided too. loop rmsd, basic rama output, and FA energy output.

Hope this helps in showing what can be done with PyRosetta, Python, and Tkinter. Enjoy.


Information is displayed in the terminal. Make sure to specify a loop if your doing a loop minimization, a file if your loading a file, etc.
Note that if you have PyMol observer turned on, the calculations can take longer, so be careful. Especially when using relax and backrub, as these already take longer to do.
No folder names with spaces are permitted by rosetta at the moment, even using the escape.

Post Situation: 
Sat, 2011-03-12 15:58

Hi Jared,

thank you for this nice add-on for PyRosetta, I just used it for my proteins and works pretty well. I have a few comments/suggestions though:

1. There is no global definition of EntOutname variable, so I added this "EntOutname=StringVar()" at the global variable definition section. However the GUI is not able to read the text inside EntOutname entry, thus it writes out all the files without the user defined prefix, e.g. "_1.pdb".

2. The GUI would be even more practical if the user could minimize multiple loops at once.

3. One step further the GUI could optionally allow the user to impose distance constraints using the ConstraintSet object which is available as a new feature in the PyRosetta v2.0b.

4. You could also work on improving the performance of the application by designing it to count the available cores on the local machine, e.g. "multiprocessing.cpu_count()", and spawn a job for each new decoy. I think this feature is also available in the new PyRosetta. Have a look at this post for a potential pitfall:


Mon, 2011-03-14 04:27

Hi Thomas,
Thanks for trying it! Your suggestions are great. I fixed the EntOutname error, and uploaded the fixed version. Thanks for letting me know. I've been planning to add multiple loops, and it shouldn't be too difficult. An 'add loop' button would be cool. I've been looking into threading as well so that you can kill the process without killing the program if you start something you don't want to do.

Suggestion 4 would be useful too. The main program I'm using in our lab has decoy output, but I took it out of this to make it simpler...but your right it would be more practical to be able to do this.

I also want to add in a tolerance slider for minimization, a choose folder option so you can do a minimization on all the proteins you have in a select folder, a back button, so if you don't like what it did, you can go back to the pose before, and an entry for the cut point. Right now, it makes the cut in the middle of the loop.
I have yet to use the ConstraintSet, but I'll try to add that too.
Thanks again for checking it out. Really made my day.

Take care.

Tue, 2011-03-15 23:00


may I ask as a favor to upload the files when you add the "multiple loops" feature? I have some protein cases at the moment where I need to minimize a few adjacent loops. Thus I must do them all in a single run, and your GUI could save me some precious time (I am rushing to meet a deadline by the end of this month).


Fri, 2011-03-18 18:32

dfpMin Control
Multiple Loops
rmsd fix

Hope this helps Thomas. You can manually set the max rounds by editing the main file, line 159, where it says this: self.SliHigh=Scale(self.main, orient=HORIZONTAL, to=100, resolution=1) by changing the 'to'. Later I can do options and all that fun stuff. :)

Decoy of 0 will return your pose. More then that return the last pose from the job distributor after outputting your decoys.
Loops have to be added in order, N-term to C-term and in the order the chains are seen by rosetta (beginning to end of pdb file) for now. Clear the loops to reset. Cheers.


Mon, 2011-03-21 16:30

Hi Jared,

Many thanks for your prompt response. I tried the new GUI and I have some more comments/questions:

1. Loops at the N- and C-term cannot be relaxed, perhaps because PyRosetta introduces a cut point and tries to join the two ends as in the internal loops (see attached files Nterm_relax.txt and Cterm_relax.txt). Is there any workaround for this?

2. I selected to optimize the rotamers of two internal loops which I modeled with MODELLER, but instead the program also optimized rotamers far from the selected loops.

3. Upon optimization I tried to relax the two loops by setting the minimization slide-bar to 1 and dfpTolerance to 0.50. I created 10 decoys. All of them were "broken" at the cut point of loop2 and only one had an intact loop1. What am I missing here?

4. Could you please explain the difference between Relaxation and Minimization, cause it seems I have confused these two terms. I had the notion that the latter allows more drastic changes to the structure.

5. Which parameter of Rosetta does dfpTolerance refer to (minimize_set_tolerance, stringent_relax, use_abs_tolerance) ? What does the "Minimization" slide-bar control?

I'm sorry for asking so many questions, I don't mean to waste your time. Some short answers and pointers to the documentation would be much appreciated!

thanks in advance,

PS: I'm leaving for a workshop on Monday, so I might be slow in my responses.

Fri, 2011-03-25 08:35

Thomas, Sorry for the bugs. It's just me testing everything when I have some extra time. N-Term and C-Term ends use a different fold-tree then the one that is setup in the program for loops. This can be changed. Its code is in the InitializeLoops definition in file LoopClassAB.txt. The tutorial for PyRosetta talks about the fold tree. I would program in the option if I had more time at the moment. Do you know Python?

Bug 2 is fixed. Bug 3 I noticed when using my main program to do modeling of a missing stretch from a protein last week too. In the previous version, i would CCD the loop, but it looks like the loop not breaking would use ccd to completely mess the whole structure up. So I have to put in a conditional CCD for if the loop gets broken during the step. I think I saw a check somewhere in the bound classes to check for a broken loop, but I'll have to find it.

Relaxation is the Classic Relax or Fast Relax of Rosetta (This is the standard rosetta refinement protocol) (Bradley, Misura, Baker 2005); while Minimization, as I used it, is the MinMover from PyRosetta. The MinMover makes slight tweaks to the backbone. From the tutorial: The MinMover carries out a gradient-based minimization to find the nearest local minimum in the energy function, such as that used in one step of the Monte-Carlo-plus-Minimization algorithm of Li & Scheraga. Both do Minimization.

dfpTolerance refers to the Tolerance setting of the MinMover, probably minimize_set_tolerance, but im not 100 percent sure.
Sorry that there were some issues. Hope this helped. My email is if you want to contact me directly.


Mon, 2011-03-28 18:54