PyMol Practical
PyMol Practical
Tutorials: Below, you will find a series of tutorials, which will teach you the skills needed to
accomplish your task. They give example commands and walk you through the process. Pymol is
installed in the Linux partition.
, You will need to boot into linux to complete these tutorials.
Task: You will be given a PDB code. The structure can be found in the Protein Data Bank
(www.pdb.org). Your main task for this practical will be to produce 35 high quality images that
highlight the important structural features of the associated protein. You should be prepared to
present your images tomorrow morning in the lecture room.
, When trying to answer the questions, use the following approach think, google, ask
Tutorials
These tutorials provide an introduction to the basic elements of protein structure through the
visualization of proteins in PyMOL (http://www.pymol.org/). An online help manual is available,
in the form of the PyMOL wiki: http://pymolwiki.org/. You will first learn how to obtain protein
structure files for viewing, and then carry out exercises in manipulating, analysing, and comparing
protein structures.
High resolution X-ray diffraction studies of proteins also reveal which regions of a protein are
most highly ordered and which are less highly ordered. This information is stored alongside the
coordinates in the PDB file as the temperature factors or B factors. A high B factor for a given
region is indicative of a greater degree of disorder for that region within the crystal. B-factors also
increase at lower resolution, as the data becomes less precise.
The occupancy of an atom describes how often it is found in that position. For example, if a
residue has 2 different conformations in the crystal in equal proportions, there may be 2 different
sets of coordinates listed, each with an occupancy of 0.5.
Scroll down to the end of the ATOM records. You will find some HETATM records labelled as
NAG. This is a ligand (N-acetyl-D-glucosamine). After this are more HETATM records of type
HOH. This is a list of all the water molecules observed in the structure. Sadly there is no consensus
about how these are listed in PDB files they are not always chain Z in fact some pdb files do
not list a chain at all! Dont worry about this for now, we will not need to view the waters in this
tutorial. It just raises an important point:
PDB FILES ARE NOT CONSISTENT!
Its getting better but be warned if you ever need to parse them automatically!
2
We will be examining Hen Egg White Lysozyme (pdb code 2VB1). It is generally considered to
be the easiest protein to crystallise for X-ray structure determination. 2VB1 has been solved at
very high resolution, 0.65
A.
, Download and save the pdb file for 2VB1.
Launching PyMol
, Start PyMOL by typing pymol in a terminal, and load your PDB file: (File Open).
The PDB file should now be visible as a line model in the main display window. Rotate, translate
and zoom the view by clicking on the left, middle and right mouse buttons respectively and moving
the mouse. Scrolling the middle button gives you different slices through the molecule. This can
be quite useful if you want to look at a slice in the middle of the protein and dont want the other
residues to get in the way - search for clipping planes on the pymol wiki. Clicking the middle
button on a residue brings that residue to the centre of the view.
, In the upper (grey) PyMol panel click on Display and select Sequence. This puts the protein
sequence in the graphics window above the structure.
You can save PyMol sessions i.e. everything you have done up to that point (File save session).
This wont save all the actual commands you have typed, just the results of the commands e.g. if
you have selected a set of residues and called them helix1 it will save the selection helix1 but if
you reload the session it wont give you back the command you typed to make it. To save all your
commands, when you start working in PyMol open a log (File log). This will record everything
you type.
Viewing a structure
The line model displays all the structural information (bonds, amino acid type and orientation) of
the protein. However, it is not the easiest model to interpret by eye.
The main user interface controls for changing the view of the protein can be found in the Names
Panel. Next to each selection, there will be 5 different buttons:
A : Actions - Move the camera, show hydrogens, remove waters, etc
S : Show - Change how to view parts/whole of the protein
H : Hide - Hide parts/whole of the protein
L : Label - Add labels to parts/whole of a protein
C : Colour - Change the colouring of part/whole of a protein
, To highlight the secondary structure present in lysozyme:
Open the show menu by clicking on the S button next to the 2VB1 bar in the Names panel
(righthand side).
Select as cartoon. Helices are now displayed as spirals and beta strands as flattened
arrows.
, Hide the structure by clicking on the H button and selecting everything.
More functions are available by using the S button. Try:
Show as sticks : now the amino acid side chains are shown.
Show as ribbon : now just the backbone of the protein is shown.
Show as surface : a surface representation of the protein is shown.
Show as mesh : a mesh representation of the protein surface is shown.
Note that using the as method of changing the viewing of a protein will replace the current view of
the protein with the new one. Not using as (e.g. show sticks) will add the new representation
on top of any current representations.
Colo(u)ring
Show the structure as a cartoon again and click the C button next to 2VB1. This allows you to
colour your structure in various ways:
C by ss then select whichever colour scheme you prefer. This colours by secondary
structure. You will see that helices and beta strands are coloured differently.
C spectrum rainbow. This will colour the chain from blue at the N-terminus to red at
the C-terminus, making it easier to evaluate the relationship between primary sequence and
tertiary structure.
C red warmpink. This will display the selection in a single colour.
Labelling
The label button (L) next to any selection allows the user to display a range of information about
the residues and atoms it corresponds to. Play about with the different ways of labelling the
selections.
You can add your own text to the label using the command line. Try labelling the sulphur atom
in residue 6:
label resi6_sulphur, "I love PyMOL"
For more information about labelling refer to the PyMOL wiki and/or google.
Saving an image
PyMOL is ultimately a tool for making pretty pictures of molecules. Show the whole molecule in
cartoon representation in a colour of your choice. You can then ray trace the image to give
it shadows and look smoother. To do this type ray into the command line. WAIT
until the process has reached 100%. The image should now look prettier. You can play
about with the shadows by using the Rendering option in the Settings menu. You will need to
redo the ray trace each time you make a change, or move the structure.
To save an image go to: File Save image as.
Exercises
1. Show the sidechains of loop1 as sticks.
2. Show the whole of loop1 as a surface representation. Colour it by element (i.e. by type of
atom). This shows, for example, hydrogens as white, nitrogens as blue, oxygens as red and
sulphurs as yellow. Therefore positive patches are shown in blue and negative patches in red.
3. Show the surface of loop1 as a mesh instead.
4. Colour helix1 by element and show it as sticks. Notice that some side chains have more than
one conformation why is this? What part of the PDB file tells PyMOL this information?
5. Select the backbone and the sidechains of helix1. Display and colour them distinctly. (Hint:
the atoms in the backbone of a protein have names c or ca or n or o. The side chains
are the atoms which are not in the backbone)
6. Select residue 15 and label it with its name and residue id. Change the size of the label font
to 20. (Hint: look up the set command in the wiki)
7. Load the PDB structure 1EA5 and make images of the following views:
a. Detail of an alpha helix. Select an alpha helix and display it as a cartoon with side chains
showing. Colour the backbone green and the side chain atoms by type. Label the terminal
residues of the helix.
b. Detail of 3 strands of a beta sheet. Display as sticks. Colour the backbone by type with
the carbons green, side chain atoms by type with carbons blue. Put labels on the termini
of each strand. Display hydrogen bonds and arrange the view to emphasize hydrogen
bonding.
c. A ligand with protein residues that lie within 10.0 angstroms of the ligand. Display the
ligand as sticks and colour by type, protein displayed as cartoon with side chains showing
and side chains of protein coloured by type. Ligand should be labelled. (Use the online
PyMOL wiki to help you).
Task
You have each been given a pdb code (written on the whiteboards in the middle of the DTC).
Your task is to create 35 high quality images in order to present the structure of the protein.
These images should highlight the secondary and tertiary structure of the molecule and, if present,
show multiple domains and bound ligands. You should also find out which class and fold your
protein belongs to. You may also wish to do a bit of research into your protein so that you know
what it does and if it has any interesting features - this will make it easier to talk about!
If you have time, have a look at http://www-cryst.bioc.cam.ac.uk/members/zbyszek/figures pymol
for some further tricks and settings for producing pretty pictures in Pymol!
Put your images in a slide show (use libre office) and put them on the linux partition on the
computer in the lecture room. Be prepared to talk through your images tomorrow morning.
Happy PyMOL-ing!