PyMol tips: batch mode

I personally think  that the most efficient way to do large amounts of high quality and processor demanding renderings with PyMol is to do it in batch mode.

With batch mode you can log in to other computers or CPU clusters that you may have at your disposal and initiate as many PyMol jobs you need/want, from within a single terminal .

Basically all you have to do is define the view you want together with all the settings (which molecules are visible, colors, style, ray trace settings etc.) you want in a .pml script. Then from the terminal you can run the command “PyMol  -cq Your_Script_Here.pml”. This command will perform a quiet launch of PyMol (that’s the -q flag) with no GUI (thats the -c flag) and then proceed to load and execute the specified .pml script.

However the batch mode rendering is not worth anything if you don’t remember to save the figure that PyMol just rendered for you. This is done by simply adding the command “png figure_name_here.png, dpi=300” at the end of your .pml script. This tells pymol to save the view as a publication quality png file. Alternatively you can use the mpng command if you are making a movie. But that’s a different post.


Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/molecularart.dk/public_html/wp-includes/class-wp-comment-query.php on line 405

Leave a Reply

Your email address will not be published. Required fields are marked *