Using PyMOL



Getting Software, Data, Other Resources

3D Structure Viewers

We predominantly use PyMOL for our protein 3D structure teaching material as:
It has the disadvantage that it is not browser-based i.e. that it requires users to install the PyMOL software themselves, locally, directly on their own computer - however, for us, the above advantages of using the software outweigh this disadvantage.

Note, however, that there are many other software packages available the specialise in visualising 3D protein (and other biomolecule) structures:
Here are some sites describing more complete lists of 3D structure viewers:

3D Structure Data Formats

Most biological 3D structure viewers can read in data in the PDB format - here is a description of the format.

Most 3D structure viewers are also able to save structural data in a format specific for that software - this typically contains not just the 3D coordiates and other information contained in the initial (typically PDB-format) file, but also the information required to specficy the representation of the protein. In PyMOL, such files are known as "Session Files".

Obtaining 3D Protein Structure Data

PDB format 3D structure files are available from several different internet resources including:

Getting PyMOL

Recently-released version of PyMOL must be bought from DeLano Scientific Limited.

However, the no-longer-supported release 0.99 is free for all to download and use for Windows, Macintosh, and Linux.

Further Information and Tutorials on PyMOL

There are several sources of information on PyMOL on the Internet

Using PyMOL

Note that the instructions and screen-shots shown below are for the Macintosh version 0.99 of PyMOL - they will be similar, with hopefully only slight differences, on the Windows and Linux versions of the software.

To obtain the full functionality of this software, you will need a three-button mouse (e.g. for Macintosh you could be using a "Mighty Mouse").

Loading a Structure into PyMOL

There are several ways to load a structure file into PyMOL


Changing the Viewpoint

To change the viewpoint, simply place the mouse pointer somewhere in the structure viewer window, click and hold down one of the three mouse buttons, and then move the mouse. Depending on which mouse button is held, the viewpoint will either rotate (left button), translate (middle button), or zoom (right button).

It is possible to set up PyMOL so that different mouse buttons (and different combinations of mouse buttons with keys such as shift and control) have different effects on the viewpoint - however we will stick with using the default settings.

Changing the Background Colour

When preparing figures for printing, we usually choose to change the background colour from black to white to save ink/toner in our printers.
To change the background colour, choose Display->Background->White

Filling the Viewer with the Entire Structure

Sometimes we can get in a bit of a mess when changing the viewpoint - for example...

Zooming in so that the structure is so far that we can no longer orient ourselves
pymol - zoomed in too far
(which is based on this PyMOL session file)

Or zooming out so much that we can no longer find the structure within the structure viewing window
PyMOL - lost the structure
(which is based on this PyMOL session file)

To rescue this situation, just click on the "Zoom" button - this should return to a viewpoint where the entire structure more-or-less fills the structure viewing window.

Viewing the Protein Sequence

Once you have loaded a structure file into PyMOL you may want to also see the sequence of any peptides (and information about the names of residues from other non-peptide molecules macromolecules) of the chains included in the structure file.

To do this, you need to switch on the "Sequence On" option, accessed via the "Display" Menu-Bar menu

This will then display the sequence of the chains as shown below - with the sequence residues coloured the same as the corresponding regions of the structure

Selecting Regions of the Structure

To select (and thus highlight/change colour/change representation of) amino acid residues in the sequence, simply select the residues you want to highlight using the left mouse button - or to select several at the same time, just drag along the sequence while holding the left mouse button.

The selected sequence residues will be highlighted in the sequence - at the same time, the regions of the structure corresponding to these residues will also be highlighted by adding purple dots to the selected atoms.

Residues can also be selected by left-clicking on them directly in the stucture viewer window (and, most powerfully, by using the "select" command at the PyMOL prompt - but we won't cover that here.)

Operating on Selections

Once a selection is created, you can change aspects of the way it is displayed, and use it as the basis of a range of different operations e.g. you could use it to create a further selection that contains all atoms/residues within a given distance of the initial selection, you could predict polar contacts within the region, etc.

To operate on the selection using the PyMOL graphical interface, we work with the selection list on the right side of the interface window - for example, in the image shown below, there are four different selections listed, with names:


You'll notice that each selection has a set of 5 buttons associated with it - these are:
A - "action"
S - "show"
H - "hide"
L - "label"
C - "colour"
By clicking on these buttons, menus of actions that can be applied to the selection are shown - a different menu for each of the 5 different buttons. For example, in the image below, the "C" (colour) button has been clicked, producing the colour menu (from which a further "Magenta" menu has been revealed by selecting one of the elements from the colour menu list


"all" and "sele" selections
If there is any data loaded into PyMOL, then there will be at least one selection in the list - the "all" selection. This selection includes all the atoms currently loaded into PyMOL, and allows the user to make changes globally.

If there are any selected residues/atoms etc. within the structure, and the selections have not been deliberately renamed, then there will be a second selection on the list, "sele", which is associated with the currently selected set of atoms/residues etc.
"C" - Changing the Colour of a Selection
To change the colour of the selection, click with the left mouse button over the "C" box associated with the selection

Then choose the colour you want for the selection - below we choose magenta as the new colour

The selected amino-acid residues, both in the sequece viewer, and in the structure, have changed colour to magenta

Alternatively, you can choose to colour different regions of the structure using a set of rules - these include:
"H" - hiding regions of the selection
To make particular features of a structure easier to visualise, we often want to hide parts of the representation - and to do this we use the "H" hide button.

For example, we often begin a session by hiding everything from the "all" selection so that we can build up exactly the representation we require.

In the "H" menu we get the choice to hide:
Changing the Origin of Rotation
Select a region of interest (as described above), right-click on the selection, and choose "Origin" from the menu that appears.

Alternatively, select the residue, and use the "A" (action) menu to choose the selection as the new origin of rotation - select "origin" from the action menu.

Aligning Structures/Selections

To align to structures/regions of structures with each other, left click with the mouse over the "A" ("Action") button for the object or selection you want to align

Here you choose the "Align" action, then usually "to selection" (although try "to molecule" if this option doesn't work), and then select the name of the selection you want to align to

This will carry out a (rather simple and not very accurate) alignment of the structure of the two selections - as seen below

Saving a PyMOL Screenshot/Image

Sometimes you will want to save the image you have obtained in the PyMOL view screen as a separate image file. To do this, use the menu-bar's option

File->Save Image...



Author: Aidan Budd
Back To Gibson Team Training Pages