Pymol Tutorial
Pymol Tutorial
PyMol contains many features but we will only cover the most basic ones. For a more
advanced tutorial, see the PyMol documentation at:
http://pymol.sourceforge.net/newman/user/toc.html
Parts 1-3 of this tutorial are planned for the first recitation, while parts 4-7 are planned
for the second one.
1. Run PyMol
3. Identify the different parts of the screen. There are two windows – the external
GUI window and the internal GUI window. The internal window contains the
viewer, which displays the molecule, and the command line.
4. Manipulate the view with the mouse. Dragging with the left button rotates the
molecule. Dragging with the right button zooms in and out. Dragging with the
middle button moves the molecule.
5. You can manipulate objects in the internal GUI. There are currently two objects –
“all” – which contains all the viewed molecules (currently there is only one
molecule) and “1BL8” which contains the molecule loaded from the file
“1BL8.pdb”.
To manipulate an object, we use the letter icons near its name (A – Action, S –
Show, H – Hide, L – Label, C – Color).
Change the representation of the object to “Cartoon” using Show->As->Cartoon
6. Notice that when you rotate the molecule, it rotates around some atom, called the
center atom. You can change the center atom by clicking on an atom with the
middle mouse button.
7. If you want to investigate the area of the center atom, sometimes the rest of the
molecule gets in the way. You can darken everything around the center atom
using the mouse wheel.
Now is a good time to get comfortable with using PyMol. Try playing with the
controls a little, and view the molecule from several angles and in different
representations. Try to play with the molecule until you get it to look like this:
1. The easiest way of selecting specific parts of the molecule is by using the
sequence. Choose Display->Sequence in the external GUI menu.
You can now see the amino acid sequence on the top of the viewer:
2. You can select specific amino acids by clicking on them. You can also select a
range in the sequence by clicking the first residue, and then shift+click on the last
residue. Your selection will be indicated on the structure (in pink dots).
Try selecting the first chain of the molecule:
3. Notice in the object list that a new object “(sele)” was added. This object
represents your current selection (the first chain). You can manipulate it with the
buttons next to the object. For example, change its representation to sticks (S ->
As -> Sticks)
6. Now give names to all the other chains (“chain2”, “chain3”, “chain4”).
7. Also select the 3 potassium atoms (K) and give the selection a name
(“potassium”)
You should end up with 7 different objects (including “all” and “1BL8”):
You can enable and disable each selection by clicking on the object name (and see
where it is located on the structure in the viewer)
8. You can color an object using the “Color” menu. Try coloring the first chain in
blue:
Do the same for the rest of the chains, coloring them red, green, and yellow.
9. Show the potassium ions in sphere representation, to see the ions traveling
through the channel:
Molecular visualization programs such as PyMol are often used to make high-quality
photos for use in publications.
1. Change the background color to white, with Display -> Background -> White on
the external GUI menu:
3. Finally, to create the image file, choose File -> Save Image in the external GUI
menu.
Part 4: Coloring objects
1. For this part of the tutorial, run PyMol again, then download and load
“1X1R.pdb”
3. PyMol has some useful color commands. First try “Color by chain” which colors
each chain in a different color. This view usually helps identify the interaction
between the different subunits. However, this protein contains only one subunit,
colored green. (The cyan molecule is the bound GDP ligand).
4. Try “Color by element” which colors each element in a different color. This view
helps us identify chemical interactions.
7. Try “Color by ss”. This shows us the topology of the protein (division to
secondary structure).
Part 5: Examining the beta-sheet
1. As can easily be seen using the cartoon representation with “Color by ss”, the
structure contains a 6-strand β-sheet. Select the β-sheet, and name your selection
“sheet”.
(Select the sheet using the sequence display. It should be easy because the
sequence is colored the same as the structure, so just select all the yellow
residues).
Notice that the β-sheet is mostly parallel, except for the first strand. Also notice
that it is twisted into half a barrel (β-sheets are usually twisted this way).
3. Use (sheet) Action->Orient, to zoom and orient the view near the beta sheet.
4. We can use PyMol for finding polar contacts in the molecule. As an example, let’s
examine the polar contacts between the strands of the β-sheet. Use:
(sheet) Action -> Find -> Polar Contacts -> Just intra main chain
This adds a new object called “sheet_polar_conts” and shows the polar contacts in
yellow. It’s pretty hard to see them with this color, so paint the contacts in red:
(sheet)Show->As->Sticks
(sheet)Hide->Side Chain
(sheet)Color->By Element
And now we can clearly see the web of polar contacts stabilizing the β-sheet.
Select one strand of the beta-sheet, and name it “strand”. Show only the main
chain in ball-and-stick representation using the following commands:
(strand)Action->Orient
(all)Hide->Everything
(strand)Action->Preset->ball and stick
(strand)Hide->Side chain
Measurements are done using the “Measurement Wizard”. To access it, use
Wizard->Measurement in the external GUI menu. This will open the measurement
box in the internal GUI:
After it opens, click on two consecutive C α atoms to measure the distance between
them.
The rise changes a little from case to case, but it should always be around 3.5Å.
7. Next, we measure the dihedral angles between two residues in the sheet (Φ and Ψ)
To measure the angles, click on “Distances” in the Measurement box and change
it to “Dihedrals”.
Dihedral angles are defined for 4 atoms, so you are expected to choose the 4
atoms for measuring the angle. To measure the Ψ angle, you need to click:
The angles you receive should be around the usual values for a β-strand, which are
Φ=-125° Ψ=+125°
1. Reset the view for the molecule (either exit PyMol and then run it again, or use
File->Reinitialize in the external GUI menu)
3. To examine the binding site for magnesium, we can find the residues that are
close to the ion using the following command:
You should type the command in the command line on the bottom of the view
window:
This creates a new object called “near_mg” which contains all the residues which
are within a 5Å radius to the magnesium ion.
4. Get a good view of the magnesium ion and the residues surrounding it:
(1X1R)Hide->Everything
(mg)Show->As->Spheres
(mg)Color->Magentas->Purple
(near_mg)Show->As->Sticks
(near_mg)Action->Orient
5. There are also water molecules around the ion, but they can’t be seen in the sticks
representations. To show the water molecules, use:
(near_mg)Show->nb_spheres
This will show the oxygen atoms of the water molecules as small red spheres
(near_mg)Label->residues
This adds a text label for each residue in the object. To be able to see the labels
better, type in the command line:
The B-factor of an atom is an experimental value that reflects its fluctuation in the
crystal. In other words, it reflects how flexible this atom is in the crystal structure, and
probably also in the biological structure.
In this view, the thicker the backbone is, the more flexible it is. As can be expected,
the loop areas that point toward the aqueous environment are the most flexible.