PyMOL Tips and Tricks

PyMOL Tips and Tricks
PyMOL is a powerful and versatile piece of freely-available software for visualization and analysis
of molecular structure files. This page is intended to provide a few insights to the many useful functions of
PyMOL. For more information, there are many resources available on the internet, including:
PyMOL Website: http://www.pymol.org/
PyMOL Wiki: http://pymolwiki.org/
General Notes:
PyMOL has many functions accessible from the usual drop-down menus (File, Edit, etc.).
However, many more functions can be accessed and modified from the command line. UNIX commands
are available in the command line. It is worth the effort to review the online resources above to see the
range of functions available. Also, PyMOL has good usage documentation available in the software,
accessed by typing ‘help function_name’ in the command line.
Opening Files:
Upon starting PyMOL, two windows should open; the smaller External GUI window, and a larger
PyMOL Viewer window. PyMOL is able to read a multitude of coordinate file formats (PDB, XYZ, MOL2,
CC1, XPLOR, etc.) from the FileÆOpen drop down menu in the command window. Structures are then
visualized in the viewer window as an object to be manipulated.
Manipulating Objects:
Left-click+dragging in the viewer window alters the view orientation of objects loaded. A single
left-click on an object will automatically select residues. Right-clicking on an atom will open a drop-down
menu of functions available. Double-middle-click on an atom will set the view and rotation origin.
Objects can also be altered from the Object Control Panel in the viewer window:
• A-Actions: Rename, duplicate, remove, apply presets (like "ball-and-stick" or "publication"), perform computations .
• S-Show: Change the way things appear, eg change to stick or cartoon view.
• H-Hide: Things that are shown using S accumulate, and don't automatically replace the last view. H is the opposite of S
and hides unwanted representations.
• L-Label: Label atoms, residues, etc.
• C-Color: Change the color of atoms and groups.
Alternatively, the functions enable and disable can be used in the command line to change the
appearance of objects (see help). Should you want to change the appearance of a subset of atoms within
a molecule, the select function is very powerful tool to create new objects for selective manipulation (again,
see help).
PyMOL Output:
Users can start a log (FileÆlog…) of all commands executed in a PyMOL session, to be saved,
and later recreated (FileÆRun…). Your current view, with object settings intact, can also be output
(FileÆSave Session) as a PyMOL session file (.pse) to load later or send to a colleague. One of PyMOL’s
most popular uses is creating images for publications (FileÆSave Image…).
Customizing:
Like programs in UNIX and LINUX, PyMOL can be preconfigured with user specified settings
contained in a runcom (.pymolrc) file located in the program directory. You can create this file with any text
editor, with lines corresponding to commands normally executed in the PyMOL command line. This can be
anything from setting the working directory to startup in(i.e. ‘cd /usr1/people/me/pdbfiles’), to setting the
default display mode for the viewer (i.e. ‘set bg_rgb, white’). Can also be used to define aliases and paths,
or run scripts with additional functions.
v.20100511, LJC