Visualization of Protein Models
Roger S. Rowlett
Gordon & Dorothy Kline Professor, Emeritus
Colgate University Department of Chemistry
Gordon & Dorothy Kline Professor, Emeritus
Colgate University Department of Chemistry
Pymol is a molecular rendering program that is capable of producing high-quality, publication image of protein structures from PDB files. Once you have solved an X-ray crystal structure, a rendering program like Pymol is used to create images that allow one to explore a structure in a meaningful way, and to selectively view and communicate the interesting features of your structure to your scientific peers.
An unsupported version of Pymol for Windows XP or 7/8/10 (version 0.99) can be downloaded here. This version is not current and may be missing features in more current versions. Unzip all the the files in a directory, e.g. "Pymol" and double-click on setup.exe. You may need an unzipping program like WinZip to extract the installation files. Follow the appropriate instructions for installation. A current educational version of Pymol for the Mac or Windows can be downloaded directly from Schrodinger if you register. Of course you can always purchase a license for the full version.
Linux
You can install the current version of open-source Pymol in Linux with the command snap install pymol-oss. You may have to install the snap package first.
Windows
Pre-compiled files for installing Pymol in Windows are available from the Gohlke laboratory at the University of California Irvine. You will need to install Python on your local machine and assemble several files:
python pip-19.1.1-py2.py3-none-any.whl/pip install --no-index --find-links="%CD%" pymol_launcher
pip install --upgrade --no-deps pymol-xxx.whl
The following tutorial is a crash course in Pymol. More documentation, tricks, tips, and secrets can be found in the Pymol wiki.
Downloading Protein Data Bank Coordinate Files
The Protein Data Bank is maintained by Rutgers University, and is the official world repository of protein and nucleic acid structures. Most of these structures have been determined by X-ray crystallographic methods. Each protein structure in the data bank has a unique 4-character identifier which is normally cited in scientific publications, For example, the structure of H. influenzae β-carbonic anhydrase complexed with bicarbonate ion, determined in our laboratory at Colgate, bears the identifier 2A8D. To retrieve a coordinate file, enter the PDB identifier in the search box, click on the download PDB icon right next to the identifier name, and save the file in an appropriate folder on your computer.
Alternatively, you can download files directly into pymol using the fetch command. For example, fetch 2A8D would load the PDB file with the identifier 2A8D directly into pymol and display it as lines.
Format of Protein Data Bank coordinate files
The following snippet is taken from the atomic coordinates section of a Protein Data Bank file. You can use Pymol to create selections for display based on this data. Each data line that starts with the text "ATOM" contains identifier information and atomic coordinates for a single atom. Left to right across each life after the "ATOM" identifier are:
ATOM 721 CD1 LEU A 88 -4.217 52.133 39.459 1.00 33.25 C
ATOM 722 CD2 LEU A 88 -5.863 52.571 41.292 1.00 33.79 C
ATOM 723 N LYS A 89 -1.460 53.809 44.308 1.00 34.86 N
ATOM 724 CA LYS A 89 -0.285 53.535 45.133 1.00 35.87 C
ATOM 725 C LYS A 89 0.649 52.506 44.509 1.00 35.39 C
ATOM 726 O LYS A 89 1.290 51.734 45.222 1.00 36.79 O
ATOM 727 CB LYS A 89 -0.714 53.043 46.520 1.00 37.53 C
ATOM 728 CG LYS A 89 -1.526 54.047 47.316 1.00 38.84 C
ATOM 729 CD LYS A 89 -0.693 55.255 47.669 1.00 43.13 C
ATOM 730 CE LYS A 89 -1.462 56.215 48.556 1.00 46.49 C
ATOM 731 NZ LYS A 89 -2.679 56.722 47.869 1.00 49.51 N
ATOM 732 N ILE A 90 0.723 52.479 43.183 1.00 34.33 N
ATOM 733 CA ILE A 90 1.607 51.535 42.505 1.00 32.21 C
Basic Pymol Commands
When Pymol is started, two windows will open. The upper window contains standard graphical pull-down menus that are largely self-explanatory. The lower window contains a viewer window and a selections window that will keep track of various portions of the displayed structure that you have identified. The main power of Pymol arises from its rich command language. Typing commands in either the upper or lower windows can alter the rendering of the molecule being viewed. Examples of commonly used commands are given below.
Mouse actions
You can control the orientation, clipping, and slabbing of the molecule with the mouse:
Selections
Making selections, i.e. identifying specific substructures within the displayed molecule, is key to the operation of Pymol. Simple selections can be made by using the mouse to click on a portion of the structure. The mouse can be configured to select atoms, residues, chains, molecules, by clicking on the "Selecting" box in the Mouse Mode window. "Residues" is the default mouse selection mode. Clicking on a portion of the structure will also give you information about its atom type, residue number, and protein chain in the main (text) window.
In general, you will be able to make more powerful and specific selections by typing selection commands in either of the Pymol GUI windows. The general syntax of command line selections is select somename, selectiontype selecteditems, where
Examples of selection syntax
Study these examples to see how you can use selections to define specific portions of a molecule or molecules described by a PDB file. Please note that Pymol selections are case-sensitive unless you issue the command set ignore_case, on first.
Command - Action
Combining selections
Once selections are defined, you can combine them, e.g., select stuff, mysheet and mainchain and chain a. If mysheet and mainchain have already been defined, the new object stuff will be only mysheet atoms in chain A that also meet the criterion of the mainchain definition. Please note that the and operator is Boolean: that is, the object displayed will include only atoms that meet both criteria surrounding the and operator. The plus sign is the Boolean or, e.g. select stuff, resi 42+44+98+101. In this case, all atoms in residue numbers 42, 44, 98, and 101 will be combined in the selection stuff.
Display
You can change the display characteristics of selections (objects) by either typing commands in either window, or using the (A)ctions (S)how (H)ide (L)abel (C)olor buttons in the selections window. If you leave off the selection in any command, the action will be applied to the entire molecule! If you accidentally create a selection and want to delete it, or you want to rename a selection, use the (A)ctions button in the selections window.
Command -Action
Settings
There are many settings in Pymol that can be used to customize the display. Examples of some commonly used settings are shown below:
Command - Action
Selected Pymol tasks
Altering Van der Waals radii
It is often necessary to alter VDW radii of atoms to account for ionic state or to make pretty ball and stick models. Pymol attaches the atomic radius to elements; ionic radii are considerably different.
Sample Pymol session
The following Pymol session displays a ribbon structure of human carbonic anhydrase II (PDB 1CA2), highlights the active site residues, and displays a partially transparent molecular surface to show the active site cavity. Pymol commands that can be typed in either window are italicized. Other listed tasks are carried out using the top menu or the Pymol GUI menus.
File…Open… choose 1ca2.pdb
hide everything
select protein, polymer
show cartoon, protein
Color protein by ss using (C)olor menu
select zn, resn ZN
show sphere, zn
alter zn, vdw = 0.85
rebuild
select ligand, resi 94+96+119 and not name C+O+N
show sticks, ligand
Color ligand by element using (C)olor menu
show sticks, zn
select hoh, resn HOH and resi 263
show sphere, hoh
alter HOH, vdw=vdw/2
rebuild
show sticks, znoh
select his64, resi 64 and not name C+O+N
show sticks, his64
Color ligand by element using (C)olor menu
select his64, resi 64 and not name C+O+N
show sticks, his64
Color ligand by element using (C)olor menu
Visualizing Electron Density Maps
One way to visualize electron density maps in Pymol is to use electron density map information from CCP4. A common task is producing publication-quality figures of "omit maps" to justify the interpretation of a bound ligand to a protein. Directions for producing such Fo-Fc omit maps are described elsewhere. The following instructions will allow you to read in an electron density map (e.g., 2Fo-Fc or Fo-Fc map) into pymol and display it.
The Pymol Wiki is a comprehensive, user-based resource for all things Pymol. Includes user-installable Pymol extensions as well as a fairly complete description of Pymol settings and commands.
If you use Pymol in your work, you should properly cite it. The following format is suggested:
Preparing data files
Direct visualization in Coot
Note: If you want a traditional display of 2Fo-Fc and Fo-Fc (difference) maps, use the alternate method of map generation described in the next section
Generation of Refmac-style maps for visualization in Coot