23
Course in Applied Structural Bioinformatics: PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scientific LLC September 7, 2010 http://www.bccs.uni.no/ http://www.bioinfo.no/

Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

Embed Size (px)

Citation preview

Page 1: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

Course in Applied Structural Bioinformatics:

PyMOL Tutorial

Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scientific LLC

September 7, 2010

http://www.bccs.uni.no/http://www.bioinfo.no/

Page 2: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

Contents

1 Copyright 1

2 Introduction 1

3 Basic Visualization 23.1 Built-In Demonstration Wizard . . . . . . . . . . . . . . . . . . . . . . . . . 23.2 Open the PDB file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23.3 Basic Mouse Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33.4 Clipping and Centering with the Scroll Wheel . . . . . . . . . . . . . . . . . 33.5 Visualization Presets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33.6 Representations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53.7 Making selections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3.7.1 Mouse Modes and Selection Modes . . . . . . . . . . . . . . . . . . . 73.7.2 Using Selections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83.7.3 Selecting using Commands . . . . . . . . . . . . . . . . . . . . . . . 83.7.4 Atom Selection Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3.8 Sequence viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.9 Raytracing for Better Quality . . . . . . . . . . . . . . . . . . . . . . . . . . 113.10 Controlling Image Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . 113.11 Saving and Restoring Sessions . . . . . . . . . . . . . . . . . . . . . . . . . . 12

4 Investigating HNE and PR3 124.1 Overview of HNE (2z7f) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124.2 Inhibitor binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.3 Working with Multiple Objects . . . . . . . . . . . . . . . . . . . . . . . . . 16

4.3.1 Structural alignment . . . . . . . . . . . . . . . . . . . . . . . . . . . 174.4 Surface properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Page 3: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

1 Copyright

This tutorial is a joint effort between DeLano Scientific LLC (Section 2 and parts of Section3) and Computational Biology Unit at the University of Bergen, Norway.

2 Introduction

This tutorial introduces you to the basics of using PyMOL with coverage of the Windows,Linux, and Macintosh versions. It also covers aspects of the program likely to be of use inmedicinal chemistry, such as visualizing protein-ligand interactions, working with preparedsession files, and creating figures.

Though PyMOL can be quite effective for certain visualization tasks, it has a lot of”rough edges” and will frustrate you at times with its limitations and complexity. Thefollowing summary should help you understand the strengths and weaknesses of the packageand help you set some realistic expectations for its use:

What is currently good about PyMOL?

• Powerful and interactive molecular visualization.

• Publication quality image output.

• Session files enable you to share content with others.

• Show files are suitable for meetings and live presentations.

• Scripting enables automation of routine tasks.

• PyMOL can be integrated with in-house information systems.

• The PyMOL open-source project has significant community momentum.

What is currently bad about PyMOL?

• It can be hard to learn.

• It has a primitive and quirky user interface.

• It is unforgiving of mistakes (there is no general ”undo” capability).

• Typed commands are still often required for common tasks.

• Documentation is currently limited and sometimes obsolete.

• The molecular building and modeling tools are incomplete.

1

Page 4: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

3 Basic Visualization

3.1 Built-In Demonstration Wizard

PyMOL contains a small set of demonstrations that can give you a taste of what thesoftware is capable of doing. To launch this demonstration wizard, select “Wizard” fromthe External GUI menu bar, then “Demo” and “Representations”. To view the otherdemonstrations, click on the buttons in the Internal GUI on the right-hand side of thePyMOL Viewer Window.

3.2 Open the PDB file

PyMOL can read/load multiple coordinate file formats. The most widely used format isPDB, but it is worth noting different formats as well (MOL2, PQR, XYZ...). In this partof the tutorial we will focus on the human neutrophil elastase (HNE) which is a serineproteinase. More specifically we will investigate HNE in a complex with a 107-residue longprotease inhibitor (PDB-code: 2Z7F.pdb). You can either download this file to you localmachine and open it in PyMOL:

File → Open → [Choose 2Z7F.pdb]

Or let PyMOL do it for you:

fetch 2z7f

The PyMOL Viewer Window should now display the 3D structure of HNE, and theInternal GUI should hold a ”2z7f” button. We will first explore the basics of PyMOLbefore we go more into this structure.

2

Page 5: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

3.3 Basic Mouse Controls

Many different tasks are performed using the mouse in PyMOL. Of course, that meansthere is a lot to learn and remember, so here is a gentle introduction to controlling PyMOLusing the mouse. Note that a three-button ”wheel” mouse is required.

Assuming that you have loaded “2z7f.pdb” into PyMOL, please take a moment tofamiliarize yourself with the behavior of the three mouse buttons by separately pressingand holding each button down in the graphics area and then dragging the mouse.

If you get lost, simply click the ”Reset” button in the External GUI.Note that with a “wheel” mouse, the act of pushing down on the wheel is distinct from

that of rolling the wheel. For now, please simply treat the wheel like a middle button bypressing down on it (into the table) and dragging the mouse.

Did pink dots or a white globe appear? If you click-and-release the left button quicklywithout dragging the Basic Mouse Controls 4 mouse, then some pink selection dots or awhite globe may appear on the screen. To get rid of them, just click and release the mouseon a blank portion of the graphics area away from any atoms. We’ll discuss what thesemean later on.

Is “Caps Lock” down? It shouldn’t be. When Caps Lock is enabled on your keyboard,PyMOL’s mouse controls will not work properly. If the mouse is not behaving as describedhere, please check to make sure that the Caps Lock key is not pressed.

3.4 Clipping and Centering with the Scroll Wheel

Please click the “Reset” button in the External GUI to restore the original view of yourmolecule. (If you are using Linux or Windows, please reactivate the viewer window byclicking on the “PyMOL Viewer” title bar). Now try rolling the mouse scroll wheel back-wards, towards you. What happens? Various portions of the molecule should disappearfrom both the front and the back of the molecule. Now roll the scroll wheel in the reversedirection, forwards, away from you. Portions of the molecule that previously disappearedshould now reappear. You have now learned the simplest way to control “clipping” inPyMOL, which gives you the ability to focus in on interesting areas of your molecule whilehiding everything else from view (Figure 1).

3.5 Visualization Presets

For most common PDB files, PyMOL can provide you with a set of built-in “preset” views.These are accessed via the Actions (“A”) pop-up menu in the Internal GUI.

Assuming that you have loaded a PDB such as “2z7f.pdb”, click on the “A” next to thename of the object and follow the cascading menus to the “preset” sub-menu and then the“simple” item (Figures 2-3). Once you select this preset, PyMOL will apply a treatmentto the molecule that should result in a simplified view of the protein structure with ligandsdisplayed (if any are present).

3

Page 6: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

Figure 1: PyMOL Clipping

Figure 2: Action menu

For example, applying the “simple” preset to “2z7”” should make it possible for youto spot the two ligands present in the structure. You can then use your mouse skills tozoom in on it for a closer look as shown below. You may also have noticed that a part ofthe structure is colored blue. This is the inhibitor protein which is shown to bind to HNE.You can get rid of the red dots (or crosses) around the protein structure (which are watermolecules) by using “simple (no solvent)” instead.

PyMOL contains a number of presets that can be of immediate use to you in visualizingprotein / ligand complexes as well as in preparation of several common types of figures.For example, the “ligands” preset enables you to visualize the polar contacts made betweenthe protein and the ligand.

Once you have applied the “ligands” preset, you can toggle the display of polar contactsby clicking on the “2z7f-pol-conts” name. With polar contacts enabled, you can also displaythe distance values by clicking on the Show (“S”) pop-up menu next to “2z7f-pol-conts”and selecting “labels”. Likewise, click on the Hide (“H”) pop-up menu and select ”labels”to hide the distance values. Other presets worth trying at this point include: “technical”,“ligand sites” → “transparent surface”, and “publication”.

Play around with the different presets PyMOL provides. Table 1 displays some of

4

Page 7: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

Figure 3: Choose “preset” and “simple”.

these presets and a short explanation to them. Please restore the “default” preset beforecontinuing on to the next section.

3.6 Representations

PyMOL’s presets automatically provide a few common views of a molecule, but it is oftennecessary for the user to take greater control over the molecular representation process inorder to achieve desired visualizations. Representations can be controlled using the Show(“S”), Hide (“H”), Label (“L”), and Color (“C”) pop-up menus.

5

Page 8: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

Table 1: PyMOL presets

Preset Description Example

simplea simple ribbon representation with lig-ands highlighted as sticks

b factor puttya sausage representation highlightingareas with high temperature factors

liganddetailed view of the ligands and its po-lar contacts to the protein

prettycartoon representation colored in arainbow spectrum

Every object has its own set of these pop-up menus, as does each selection that theuser has defined. When you use a Show or Hide menu for an object, all of the atoms withinthat object are affected by that action, and the changes are cumulative. For example ifyou show “sticks”, show “spheres”, and then show “dots”, then all atoms in the object willhave all three representations active at once. If you then hide “spheres” and hide “dots”,

6

Page 9: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

then only the sticks representation would remain visible.The show menu has a special “as” sub-menu which enables you to hide all other rep-

resentations while showing just the representation you indicate. For example, if you show“as”→ “sticks”, and then show “as”→ “dots”, only the dots representation would remainvisible.

Please take a moment now to try using the show and hide pop-up menus. Note that the”surface” and ”mesh” representations will take some time to compute for larger molecules.At the top of the names list, there is the ”all” entry, which enables you to apply actions to allobjects currently loaded into PyMOL. For example, if you wish to hide all representationsof all objects, you can choose ”everything” from the hide (”H”) pop-up menu next to ”all”.

3.7 Making selections

When working with molecular structures, it is often the case that you want to show one partof a structure using one representation, and another part using a different representation.PyMOL’s atom selections make it possible for you to do this by enabling you to applyvarious operations to specific subsets of atoms within one object or even across multipleobjects.

Selections behave simply as lists of atoms and do not have any properties of their own.Named selections appear by name in the Internal GUI enclosed by a set of parentheses“( )” in order to distinguish them from object names. For example, when you begin usingPyMOL, the selection you create using the mouse will have the name “(sele)”.

Atoms contained in the active selection are displayed in the viewing area with littlepink dots or rectangles overlaid right on their atom centers. Only one selection can beactive at a time, and the active selection is highlighted in the names list. Clicking on thename of the active selection will deactivate it and hide the pink dots. Clicking on the nameof an inactive selection will make that selection into the active selection.

3.7.1 Mouse Modes and Selection Modes

In order to create selections using the mouse, the Mouse Mode must be set to ”3-ButtonViewing”, as indicated in the center of the Internal GUI on the right hand side of theviewer window. If this is not the current mouse mode, then you can set it by selecting ”3Button Viewing Mode” from the ”Mouse” menu in the External GUI or by simply clickingonce on the Mouse Mode indicator in the Internal GUI.

By default when in 3-Button Viewing mode, PyMOL will select the complete residueyou click on, or de-select it if it is already in the current selection. The ”Selecting Residues”message in the Internal GUI indicates that selections are currently being made on a per-residue bases. Other possible mouse selection modes include selection of individual atoms,molecules, chains, segments, objects, and C-alphas. To change the current mouse selectionmode, either use the ”Selection Mode” item under the ”Mouse” menu in the External GUI,

7

Page 10: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

or click on the ”Selecting ...” indicator in the Internal GUI.

3.7.2 Using Selections

Once you have created a selection, you can use the menus located next to the selectionname to change its representation. For example, the show ”sticks” action was used on theabove selection to give the result shown below.

Existing selections can be modified in a variety of ways to include additional atomsor to exclude atoms already in the selection. You already know that selections can bemodified by clicking on atoms. Alternatively, one can use the ”modify” sub-menu withinthe Action (”A”) menu for a given selection in order to perform a variety of actions basedon geometric and other criteria. For example, choosing ”modify” → ”expand” → ”by 6 A,residues” in the Action menu for a selection will expand the selection to include all atomsin all residues that exist within 6 Angstroms.

3.7.3 Selecting using Commands

One can also create selections using typed-out commands. For example, to create a selectionnamed mysele covering residues 40 through 45 of chain E (which is the HNE protein), onecould enter the following command:

select my_sele, E/40-45/

3.7.4 Atom Selection Syntax

PyMOL has a powerful atom selection language that is covered in-depth in the PyMOLUsers Manual. There are two different type of syntax for selecting atoms. One which ismore human readable, and one which is a more compact form.

All selections are on the form:

select ([selection_name],) [selection expression]

The compact form come in two flavors: those that begin with a slash and those thatdon’t. The presence or absence of a slash at the beginning of the macro determines how itis interpreted. If the macro begins with a slash, PyMOL expects to find the fields startingfrom the top of the hierarchy: the first field to the right of the slash is interpreted as anobject-name; the second field as an identifier to segi; the third as an identifier to chain,and so on. It may take any of the following forms:

/object-name/segi-identifier/chain-identifier/resi-identifier/name-identifier/object-name/segi-identifier/chain-identifier/resi-identifier/object-name/segi-identifier/chain-identifier/object-name/segi-identifier/object-name

8

Page 11: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

Example:

/2z7f//E/40-45/CA

If the macro does not begin with a slash, it is interpreted differently. In this case,PyMOL expects to find the fields ending with the bottom of the hierarchy. Macros thatdon’t start with a slash may take the following forms:

resi-identifier/name-identifierchain-identifier/resi-identifier/name-identifiersegi-identifier/chain-identifier/resi-identifier/name-identifierobject-name/segi-identifier/chain-identifier/resi-identifier/name-identifier

Example:

E/40-45/CA

Here we provide some simple example selections that you can hopefully adapt for yourneeds. Most examples are here written in both forms.

1. To select a numbered residue in a specific object (e.g. 2z7f):

select my_resid, 2z7f///65/select my_resid, 2z7f and resi 65

2. To select all residues with a given identifier in any object:

select my_resids, 606/select my_resids, resi 606

3. To select specific residues and ranges of residues by identifier:

select my_range, 50-61/select my_range, resi 50-61

select my_resids, 2z7f///50+56+60-68/select my_resids, 2z7f and (resi 50+56+60-68)

4. To select specific residues by residue type:

select my_negative, 2z7f///GLU+ASP/select my_negative, 2z7f and (resn GLU+ASP)

9

Page 12: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

5. To select specific atoms by name:

select my_main_chain_atoms, 2z7f////N+CA+Cselect my_main_chain_atoms, 2z7f and name n+ca+c

6. To select one or more chains:

select my_chain, E+I//select my_chain, chain E+I

select my_chains, 2z7f//E+I//select my_chains, 2z7f and chain (E+I)

7. To select atoms in multiple objects

fetch 1hneselect my_object, 1hne////CA or 2z7f////CAselect my_object, (1hne and name CA) or (2z7f and name CA)

8. To select atoms in secondary structures element (SSE)

select my_sse, ss h+s+l

3.8 Sequence viewer

PyMOL can display residue sequences for molecular objects in the graphics area. Toactivate the sequence viewer, click on the ”S” in the lower right-hand corner of the InternalGUI or select ”Sequence” from the ”Display” menu of the External GUI. If the molecule isa protein, then the one-letter code for the residue type will be used by default. Otherwise,the full residue name will be shown, as is usually the case for ligands.

10

Page 13: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

The sequence viewer provides another means of visualizing and manipulating the ac-tive selection. Selected residues are shown in inverted colors in the sequence viewer, andselections can easily be modified by clicking and dragging on the sequence characters.

Right-clicking directly on the selection in the sequence viewer will bring up a menu ofactions that will be applied directly to that selection. This menu provides an alternativemeans of altering representations for a given selection of atoms. This same context-sensitivemenu can also be obtained by right-clicking on a selected atoms in the 3D graphics area.

If you instead right-click on an unselected atom in the sequence viewer, then a differentmenu will appear. This menu is titled with identifying information for the residue youclicked on and enables you to perform various actions, such as changing colors or alteringrepresentations for the residue. When you right-click on an unselected atom in the 3Dgraphics area, a similar menu will appear, but this menu gives you the additional optionof applying actions to the atom, residue, chain, segment, object, or molecular level.

3.9 Raytracing for Better Quality

PyMOL has a built-in renderer for raytracing that can eliminate rough edges, generatebetter lighting effects, and cast shadows. However, depending upon the complexity ofthe scene, use of this renderer can be rather time consuming, sometimes requiring severalminutes to create a single image.

To render a scene before saving the image, simply click on the ”Ray” button in theexternal GUI before proceeding as described above. A progress indicator should appear.

3.10 Controlling Image Resolution

By default, PyMOL images are saved at screen resolution with a width and height equalto that of the graphics area. To save images of a higher resolution, you must either expandthe size of the viewer window or use the ”draw” or ”ray” commands to explicitly set imageresolution.

For example, to generate a 4 inch by 3 inch image at 300 dots per inch (1200 by 900pixels), one would need to enter one of the following commands into the PyMOL commandline before saving the image:

draw 1200, 900ray 1200, 900

The first command renders using OpenGL, which is usually quite fast. The secondcommand uses the raytracer, which can be rather slow, but generates better images.

11

Page 14: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

3.11 Saving and Restoring Sessions

You can save a PyMOL Session File any time while you are using PyMOL. These sessionscontains all of structures you have currently loaded into PyMOL and all of the informationabout how to display them, including the colors, representations, and camera view. Whenyou reopen a session file, you can continue your work right from where you left off. Besure to save the session file again when you are done in order to record any subsequentchanges. To save a PyMOL session, select ”Save Session As...” from the File menu, choosea suitable location and name for the file, and then click ”Save”. PyMOL session files mustbe given a ”.pse” file extension so that PyMOL can recognize them later on.

On Windows and Macintosh computers, you can open session files simply by double-clicking on the session file icon. Or, if PyMOL is already open, then you can use the”Open...” item in the File menu in the External GUI.

4 Investigating HNE and PR3

Having learned the basics of PyMOL, it is now time to use our knowledge to investigateHNE, compare it to PR3, and make nice figures. We will first start by making overviewfigures of the protein, then go into more details in the structure.

If you have not already done so, load in the structure of HNE (PDB-id: 2z7f):

fetch 2z7f

4.1 Overview of HNE (2z7f)

The first overview figure of HNE will highlight the secondary structure elements (SSE’s)and the ligands in the structure. From the menu of ”2z7f” choose ”A” → ”preset” →”publication”. This is more or less what we need for this figure. Although, we could makethe ligands a bit nicer. From the sequence viewer, select the four ligand residues called”NAG” and ”FUC”. ”(sele)” should now appear in the object menu on the right handside.

To be sure you have selected the two ligands, see that there are small pink squares onthe two ligands. This selection can also be performed by the command:

select NAG+FUC/

We will now separate our ligands from the protein object in order to make them easierto work with. In the ”(sele)” Action menu choose ”extract object”. This will make a newobject consisting of the two ligands only. If you prefer the command line:

12

Page 15: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

extract obj01, sele

You should now have the new object called ”obj01” in the object menu.

We will now represent the accessible surface area of our ligands. Simply using the ”S”→”surface” on ”obj01” wont work. This is because our ligand atoms are named ”HETATM”and not ”ATOM” in the pdb structure. Thus, PyMOL wont represent these atoms assurface with the default setting values. We need to modify the ”surfacemode” setting. Youcan do this by choosing ”Setting” → ”Edit all” and scroll down to ”surfacemode” and setthis to ”1”. Or more easily done as the following command:

set surface_mode, 1

Now, represent the ligands (”obj01”) with the ”surface” representation (”S” → ”sur-face” on ”obj01”). We can make these transparent, and color the surface light blue:

set transparency, 0.5, obj01set surface_color, skyblue, obj01

Then we wish to color the sticks a bit differently then the default. Lets color the carbonatoms yellow, and the oxygens red:

select ligand_C, obj01////C*select ligand_O, obj01////O*select ligand_N, obj01////N*color yellow, ligand_Ccolor red, ligand_Ocolor blue, ligand_N

We should also highlight the catalytic triad in our protein. This is residues His57,Asp102, and Ser195. We can select these residues using our selection syntax (rememberthat we only want residues from chain E). Try out selecting these residues using a differentsyntax than below.

select triad, /2z7f//E/57+102+193+195

13

Page 16: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

Try out different representation for the triad residues and find the coloring you prefer.I ended up with choosing ”spheres” (”S” → ”spheres” on ”(triad)”). The spheres lookedkinda big, so I scaled them down a bit:

set sphere_scale, 0.8

Finally, we can make the background white for this figure, find a better angle for viewingit, and ray trace it for higher quality:

bg_color whiteray

4.2 Inhibitor binding

In the next figure we will focus on the interaction between HNE and the inbititor protein(the piece that now should be color redish). In order to work with the two parts we need toseparate them like we did with the ligands above. At this stage in the tutorial you shouldbe familiar with the selection syntax. Go ahead and make two selections called ”HNE”and ”inhibitor”. If you did this correctly, you should see ”(HNE)” and ”(inhibitor)” inthe object menu on the right hand side. Click them and observe the small pink squaresappearing on the protein (recall that these are the selected atoms). These are only selection

14

Page 17: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

of the object called ”2z7f”. However, we want these pieces in separate objects. Continueto make objects of them and rename the objects accordingly.

If you managed to make the separate objects, try out different representations of thetwo objects (HNE and inhibitor) to highlight the interaction between them. The figure wewill make shows HNE as cartoon and surface and the inhibitor as cartoon (”S”→ ”surface”on ”HNE”). Your surface should be transparent due to settings we modified earlier. Incase it is not you can modify them now:

set transparency, 0.5, HNEset surface_color, grey70, HNE

Orient your structure in the best way in order to show the inhibitor binding pocket inHNE. Choose different representations of the inhibitor protein. Which one gives the bestvisual impression of the binding? I added ”lines” to the inhibitor to get a better feel of theinhibitor side chains. My structure(s) ended up like this:

We’ll now move into more detailed analysis of the binding between HNE and the in-hibitor. Add ”lines” to the representation of the inhibitor if you have not already done so.Sadly, at this point we have little idea about which residues of the inhibitor are in contactwith HNE. We’ll use PyMOL’s method to explore polar contacts. (First I had to removethe waters in the structures: ”A” → ”remove waters”). To find the contacts between thetwo proteins use ”A” → ”find” → ”polar contacts” → ”to any atoms” of ”HNE”. Thisshould display a few yellow dashed lines between the two proteins. Sadly it wont automat-ically show the involved residues. We’ll have select them manually. Show ”lines” for also

15

Page 18: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

for the HNE structure. Follow the yellow lines going from the inhibitor to HNE, click theatoms, and write down the residue number that pops up in the External GUI (these areGly193, Ser195, Ser214, Val216-Arg217A). Hide the ”lines” from the HNE structure, anddo the same with the inhibitor (Tyr68, Gln70, Leu72). Select these residues in the twostructures, give them reasonable names, and show ”sticks” for these selections.

Zoom in on the selected residues (”A” → ”zoom”), and label (”L”) the residues inour newest selections. Try different types of labeling, and see if you can adjust the labelfont size and label color (hint: ”Setting” → ”Edit all”). We would also like to show somedistances of these contacts. For this, we can use the ”Wizard” tool in PyMOL: ”Wizard”→ ”Measurement”, and follow the instructions. Measure the distance between all contacts(defined by the yellow lines). See if you can adjust the label sizes for the newly mademeasurements. Adjust the label placement with

set label_position, (0.5, 0.5, 5)

4.3 Working with Multiple Objects

PyMOL can be used to visualize and compare up to several dozen structures simultaneously.We will investigate two HNE structures, and a homologue protein called PR3. Fetch thesePDB structures by the command

fetch 2z7f 1hne 1fuj

You will then see that PyMOL loads these three structures, and their PDB codesappears as objects in the object menu on the right hand side. Zoom out using the mouseto explore these structures. Note that the structures are colored differently and that the

16

Page 19: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

placing of the structures differ. Also, the structure 1FUJ is a tetramer which we need toinvestigate a bit further in order to compare the two HNE structures to PR3.

De-activate 2z7f and 1hne by clicking on their names in the object menu. We arethen left with only the structure of 1fuj which we will need to split before investigatingit any further. The first task will be to identify the four chain identifiers. Go ahead anduse your skills from above to identify these, and make 4 independent monomer objectsof 1fuj with reasonable names (hint: extract selection). Make sure you have made fourindependent objects by de-activating them one by one and observe that this monomerstructure disappears from the screen. When you have made the monomer objects, you canclean up your PyMOL session by deleting the tetramer object (1fuj).

Finally we can proceed to perform a structural comparison of the loaded proteins. We’llconcentrate on 1fuj for now.

4.3.1 Structural alignment

As a first step to perform structural comparisons, it is usually necessary to superimposethe structures onto a common template. PyMOL can perform superpositions based onprotein sequence, based on paired selections, or manually based on clicked atom pairs. Wewill use the ”align” function to superimpose the four monomers of 1fuj onto each other.For this analysis, choose one of the monomers as a template (i.e. ”1fujA”). You can do thealignment by: ”A”→ ”align”→ ”all to this” on the ”1fujA” object. You will then see thatall objects superimposed to this. If you don’t see the structures, press the ”Zoom” button.Likewise, individual proteins can be superimposed via Actions ”align”→ ”to molecule”→followed by the name of the target molecule object (Figure 4).

Choose a cartoon representation for the objects. You can apply representations for allthe objects at once by using the ”all” object in the object menu. Inspect the superpositionof the monomers. Can you identify areas in the structures that do not align well? Whatdo these areas correspond to?

Let’s see if we can make a nice figure of the superposed structures which highlights thestructurally diverse regions. I would like one of the structures to be colored red, while therest light gray and transparent (see result in Figure 5):

set cartoon_color, tv_red, 1fujAset cartoon_color, grey60, 1fujBset cartoon_color, grey60, 1fujCset cartoon_color, grey60, 1fujD

set cartoon_transparency, 0.5, 1fujBset cartoon_transparency, 0.5, 1fujCset cartoon_transparency, 0.5, 1fujD

17

Page 20: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

Figure 4: Aligning all molecules to this one.

We will now extend our structural investigation to include the two HNE structures we’vealso loaded (1hne and 2z7f). Activate these structures by pressing their object names inthe object menu on the right hand side of the screen. They should appear as aligned to”1fujA” since we earlier chose ”align all to this”. We found earlier that the PR3 structures(1fuj) were quite similar, so we’re happy using only one of these monomers. Thus, you cango ahead and de-active 1fujB-D. Also, I found it useful to assign secondary structures overagain before comparing them (”A” → ”assign sec. struc.” on each of the objects).

Use some time to find a suiting representation and coloring of the different structuresso you can more easily compare them. Investigate the inhibitor binding site. How does theinhibitor in 2z7f relate to the binding of peptide bound to 1hne (in terms of position)?

Greatest control over alignment can be exercised by entering an ”align” command viathe command line. Thus, if we want to superimpose onto just a few residues we can dothis by the commands:

align /2z7f//E/57+102+195/CA, /1fujA///57+102+195/CAalign /1hne//E/57+102+195/CA, /1fujA///57+102+195/CA

Note that we have to align two times; first we align 2z7f to 1fujA, then 1hne to 1fujA.Select the residues in question (recall that this is the catalytic triad):

select triad, (57+102+195/ or /1hne//I/ALM/) and !/2z7f//I

18

Page 21: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

Figure 5: Result of aligning the four subunits of 1fuj.

show sticks, triadzoom triad

Use some time to investigate this area. What do you observe when comparing thebinding of peptide in the 1hne structure vs inhibitor binding of 2z7f? Can you make a nicefigure of what you see? (I had a somewhat unsuccessful attempt in Figure 6).

4.4 Surface properties

Identifying potential binding pockets on the surface of proteins are potentially importantwhen probing potential protein-ligand or protein-protein interactions (e.g. drug discovery).PyMOL can be used to explore and visualize cavities and pockets in the structures and onthe surface.

We will move our attention back to 2z7f in order to investigate the surface propertiesof it. Start a new session, and fetch 2z7f again. Select chain I (”select I//”) and extract it(”A” → ”extract object” on ”(sele)”) so that we can investigate the HNE surface withoutthe inhibitor protein (click the new object ”obj01” to de-activate it).

The ”surface” representation in PyMOL will show by default the protein/solvent con-

19

Page 22: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

Figure 6: Alignment of the catalytic triad.

tact surface. PyMOL can also show the solvent accessible surface area (SASA) which isusually defined as the surface traced out by the center of a water sphere, having a radiusof about 1.4 angstroms, rolled over the protein atoms. Apply the ”surface” representationfor 2z7f and investigate briefly the surface of it. Compare this to the SASA (”Setting” →”Surface” → ”Solvent Accessible”).

PyMOL has built in scripts which can be used in order to highlight cavities and pocketsin protein structures. Activate this representation by clicking ”Setting” → ”Surface” →”Cavities and pockets (culled)”. How many pockets did you find? Zoom into the largestpocket you find, and explore the contents of it. What do you find?

Figure 7: Pocket of water molecules.

20

Page 23: Course in Applied Structural Bioinformatics: PyMOL Tutorialslars/bioinfocourse/PDFs/pymol_tutorial.pdf · PyMOL Tutorial Lars Skjaerven, Yvan Strahm, Kjell Petersen, and DeLano Scienti

Pockets and cavities are however not a well defined entitiy. By adjusting the detectionsettings you might be able to reveal other potentially important pockets. Play with the set-tings for cavity detection radius and cutoff (”Setting”→ ”Surface”→ ”Cavity Detection”).Are PyMOL able to detect the binding site of the inhibitor protein?

Figure 8: Inhibitor binding site.

21