0% found this document useful (0 votes)
220 views7 pages

PyMol Practical

This document provides tutorials for using the molecular visualization software PyMOL. It begins with tutorials on obtaining protein structure files from the Protein Data Bank and interpreting the information contained in PDB files. Subsequent tutorials cover basic functions in the PyMOL user interface for viewing and manipulating protein structures, including changing representations, making selections of parts of structures, and using the command line. The overall goal of the tutorials is to teach users how to produce high quality images of important structural features of a given protein from its PDB file.

Uploaded by

Tom Fleming
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
220 views7 pages

PyMol Practical

This document provides tutorials for using the molecular visualization software PyMOL. It begins with tutorials on obtaining protein structure files from the Protein Data Bank and interpreting the information contained in PDB files. Subsequent tutorials cover basic functions in the PyMOL user interface for viewing and manipulating protein structures, including changing representations, making selections of parts of structures, and using the command line. The overall goal of the tutorials is to teach users how to produce high quality images of important structural features of a given protein from its PDB file.

Uploaded by

Tom Fleming
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Molecular Graphics with PyMOL

31st October 2013

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.

Tutorial 1: PDB files


Open the Protein Data Bank (PDB) web page http://www.rcsb.org/pdb/. Each Protein Structure
is referenced by a four letter code - find the search tool at the top of the page that says PDB
ID or keyword, type in the pdb code 1EA5 then click the SEARCH button. The Summary
Information page appears. At the right side of the page, click Download Files PDB File
(text). Save your file (1EA5.pdb) somewhere where you can find it.
Now open 1EA5.pdb in a text editor e.g. gedit, vim. The first part of the file is effectively
comments about the structure, starting with some information about the name of the protein
etc.

Answer the following questions:


1. What is the name of this protein?
2. How many chains does it have? (A chain is one connected amino acid polymer.)
3. Which organism is it from?
4. When was the structure deposited in the PDB?
5. What method was used to solve the structure (NMR or X-ray diffraction)?
6. What resolution is the structure? Is this resolution better or worse than a structure
with resolution 3.1
A?
Remark records have different number codes e.g. REMARK 200 records give details about the
quality of the data and refinement of the structure. REMARK 465 records show which residues
could not be seen when the structure was built, so there are no coordinates for them in the PDB
file (but remember, they are there somewhere, we just couldnt see them!).
, Which residues were not seen in 1EA5? Why could they not be seen? (HINT: disorder)
SEQRES records list the amino acid sequence of the protein; notice that the residues not seen in
the structure are included here so the sequence may differ to that in the ATOM records.
There is secondary structure information in the HELIX and SHEET records, and information
about disulfide bonds in the SSBOND records.
You then finally reach the ATOM records. These are what are actually read by programs like
PyMOL when you view the structure in 3D:

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

Tutorial 2: The PyMOL user interface

Figure 1: The PyMOL interface.

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.

Making selections and using the command line


You can select part of the molecule using the interface by either:
Clicking and dragging the mouse over the sequence shown above the structure.
Clicking on parts of the structure.
and deselect by clicking elsewhere on the graphics window.
, Select residues 16(Gly) to 23(Tyr). This is the loop connecting the first and second helices. A
button called sele will appear in the names panel. Rename this to be loop1 by clicking on the
A button next to it and selecting rename selection. Type in the new name and press return. You
will also notice that loop1 has its own S, H and C buttons. Use these to control the appearence of
loop1.
PyMOL can also be controlled using the command line (see figure 1). To make the same selection
as above and give it a name requires a single command. Type:
select loop1, 2VB1 and resi 16:23
where the syntax for the selection is select name_for_new_selection, atom_selection.
, resi stands for residue index (or number). What do the following stand for in PyMOL selection
algebra: name, resn and chain (Hint: Search for Property Selectors in the PyMOL wiki ).
, Use the command line to select:
(Hint: The examples from http://www.pymolwiki.org/index.php/Selection Algebra may be useful)
the first helix in the protein (residues 4 to 15). Name this selection helix1.
the sulphur atom (name is sg) in residue 6. Name this selection resi6_sulphur.
the OE2 atom in residue 7. Name this selection resi7_OE2
We can also use the command line to show and to colour structures (as well as much much more!):
show surface, loop1. Shows surface representation for loop1.
as sticks, helix1. Shows helix1 in stick representation only.
color hotpink, loop1. Colours loop1 hotpink.
Measuring distances and showing hydrogen bonds
You may want to display the distance between two atoms in a protein. e.g. to show the difference
between the open and closed states of a pore. To do this you can either use the Measurement
Wizard or the command line.
, Open the Measurement Wizard by clicking on the Wizard menu and selecting Measurement.
Click on the first atom and then the second. Finally click on done in the Wizard. What is the
distance between the sulphur atom in residue 6 and the OE2 atom in residue 7? What units is the
distance measured in?
The same measurement can be done using the command:
distance dist_example, resi6_sulphur, resi7_OE2
where the syntax for the command is distance name_for_distance, atom1, atom2.
Hide everything using the H button next to all. Now show helix1 as a cartoon and colour it blue.
Show the hydrogen bonds in helix1 by:
clicking on the A button next to helix1
selecting Find polar contacts within selection
What atoms are the hydrogen bonds between?
5

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!

You might also like