You are on page 1of 24

PyMOL Manual 1.

0



Joshua D Brown







2
Table of Contents

Interface……………………………………………………….3
Mouse Controls……………………………………….…….5
Visible Slab……………………………………………………8
Selecting……………………………………………………...10
Commands…………………………………………………..11
Enabling/Disabling………………………………………13
Show/Hide…………………………………………………..14
View……………………………………………………………15
Drag…………………………………………………………….16
Builder………………………………………………………...17
Chemical Display……...………………………………….18
Protein Display…………………..……………………….20
Sculpting……………………………………………………..23












3
Interface
 Viewer
o Displays all 3D graphics and location of direct user interaction
with 3D model
o Also contains a command line
 Internal GUI
o Contains list of “Objects” load, mouse button configuration matrix,
and movie controls
 External GUI
o Contains Command Input Field

4
Interface with Labeled controls



Command Line – area where the user can enter commands which PyMOL will
carry out

Names Panel – Lists all of the objects and selection-names currently loaded in
PyMOL

Mouse Matrix – Shows all commands for Mouse Controls and shows what mode
the mouse is currently in







5
Movement and View Manipulation

There are two modes for Mouse Control: Viewing and Editing. To toggle between
these two modes, click on the Mouse Matrix Controls in the bottom of the
Internal GUI.
Make sure when operating PyMOL that you are in the correct Mouse Mode.


Mouse Controls Viewing Mode

Keyboard
Modifier
Left Click Middle Click Right Click Wheel Scroll
None Rotate Camera
Move Camera
XY Plane
Move
Camera Z
Plane
(Zoom)
Adjust width
of visible slab
Shift Key Select Box Deselect Box
Move
Clipping
Planes
Move visible
Slab
Control Key
Select

Pick multiple
atoms (can
select up to 4)
Pick one
atom (can
select only
one at a
time)
Zoom in
Control + Shift
Key
Select
(one selection
at a time)
Set origin of
rotation
Move
Clipping
Planes
Move Camera
Z Plane
(Zoom)
Single Click
Select

Center view on
atom
Menu -
Double Click Menu -
Pick
multiple
atoms (can
select up to
4)
-


6
Mouse Controls Editing Mode

Keyboard
Modifier
Left Click Middle Click Right Click Wheel Scroll
None Rotate Camera
Move Camera
XY Plane
Move
Camera Z
Plane
(Zoom)
Adjust width
of visible slab
Shift Key Rotate Object
Move Object
XY Plane
Move
Object in Z
Plane
Move visible
Slab
Control Key
Move an atom

Select

Select a
bond for
Rotation
Zoom in
Control + Shift
Key
Move an atom
in the Z plane
Set origin of
rotation
Move
Clipping
Planes
Move Camera
Z Plane
(Zoom)
Single Click
Pick multiple
atoms (can
select up to 4)
Center view on
atom
Menu -
Double Click Move an atom
Activate
Dragging-
Select a
bond for
Rotation
-


To Practice open a pdb file. This can be done by typing in the Command Input Field:

Syntax
fetch file_name
Example
fetch 2jpr

A PyMOL file containing the N-terminal domain of the HIV capsid protein should
open.


7
Mouse Control Descriptions

Rotate Camera



The rotation control works as if there is an invisible ball at the origin of rotation.
If you click on the ball and drag, it is as if you put your finger on the sphere and
rotate it in the same manner
If you click outside the sphere the rotation will only be about the Z-axis.
So, if you want to rotate the view “clockwise” or “counter-clockwise” than click
near the edges of the screen and adjust.
Use practice to become familiar where the edges of the “invisible” track ball are.










8
Visible Slab

PyMOL is a three dimensional program and the Visible Slab is a feature that
makes only a certain layer visible, so that the user may focus on the internal
aspects of the model.

Example:
Here is a long chain molecule viewed from the side and the front.











Looking from the front view the whole molecule is visible, therefore the Visible
Slab encompasses the whole molecule.

The Visible Slab can be adjusted so that only a “slice” of the molecule is visible.

Here is the same molecule with a thinner Visible
Slab.

The Bottom picture shows the same molecule and
shows the location of the Visible Slab from the
side view.
Everything outside of the Visible Slab is invisible.






Side View
Front View
Location of
Visible Slab
9
Visible Slab Manipulation

Wheel scroll + No Keyboard Modifier – adjusts the width of the visible slab

Example:
Scrolling Up increases the width








Scrolling Down decreases the width










Wheel scroll + Shift – moves the Visible Slab




Location of
Visible Slab
Location of
Visible Slab
Location of
Visible Slab
10
Selecting

The selecting features allows objects to be selected for further manipulation
At the bottom of the Internal GUI is the option to what type of objects are
selected.



The options are: Segments, Objects, Molecules, C-alphas, Atoms, Residues, Chains


Left Click + Shift – Select Box
Middle Click + Shift – Deselect Box

This simply creates a box and all objects within the box will be selected and vice
versa for the Deselect Box; everything within the Deselect Box will be deselected.


Picking Atoms
This feature is to select atoms within the molecular graph. This is for
manipulation on a different level than just ordinary selecting. When selecting
atoms within the molecular graph the distances, Hydrogen bonds, and other
characteristics can be displayed.

This picture shows two atoms
(pk1 and pk2) selected with the
distance between the two atoms
displayed in Angstroms.

A maximum amount of 4 atoms
can be selected.
They are termed pk1 through pk4
The amount of ribbons depicts its
label.


11
Commands

PyMOL commands can be typed into the bottom of the Viewer screen or in the
External GUI.
Cut, Copy, and Paste cannot be used in the Viewer Command bar, but can be used
in the External GUI. You must use hotkeys (Control+V, Control+C, Control+X)

Syntax – the form and grammar of the command code. Make sure to pay
attention to commas and spaces

All typed commands will be recorded in the log history in the External GUI.
Press “esc” to view the log command in the Viewer

Loading/Fetch
Loading – you are able to load a pdb file that is saved on your computer by
typing:

Syntax
load directory
Example
load username/desktop/PyMol/practice.pdb This goes to the directory
and opens the designated file
Fetch – this is similar to loading, but instead of the desired file being retrieved
from your computer it is retrieved from the online Protein Data Bank.

Syntax
fetch pdb code
Example
fetch 2jpr Retrieves pdb file from online data bank


Saving
To save simply type the command. Make sure to type .pdb at the end.

Syntax
save namedirectory
Example
save practicename.pdb This will save the PyMOL file in pdb format.
It should be located under the user folder

12
Load a practice model:

Syntax
fetch file_name
Example
fetch 2jpr Retrieves pdb file from online data bank

Selection-Expression
Selection-Expression are ways to describe specific items within PyMOL for
example atoms, residues, molecules, helices, etc.
Example:
resi 4 This selection-expression represents residues 4
resi 4+9 This selection-expression represents residues 4 and 9
resi 1-32 This selection-expression represents residues 1 through 32

A complete list of Selection-Expressions will be provided

Selection-Name
When you select specific molecules in PyMOL, you are able to label the selection
for easy use and reselection. This is called a Selection-Name. The selection-name
can be anything within upper and lower case letters, numbers (0 to 9), and the
underscore character. Avoid anything else. The selection-name is case sensitive.
The use of selection-names will be explained later on.

Note: When a command does not contain a selection-name or expression, the
default is all objects loaded in PyMOL

When an item is selected (highlighted by pink dots) it is automatically defaulted
the Selection-Name “sele” while it is selected.

Syntax
select selection-name, selection-expression
Example
select pocket, resi 5-9 Assigns a selection-name is residues 5 through 9

Object-Name
Object-Names are different from Selection-Names. Object-Names are created
when PyMOL locates data from a loaded data file.
Selection-Names are more of a superficial label, while Object-Names are more
concrete.
When a Selection-Name is deleted the data is still under the Object-Name
When an Object-Name is deleted, the data must reload again.
General Overview
13
Selection-Expression – preprogrammed ways to describe items/atoms/molecules
in PyMOL
Selection-Name – label the user is able to assign to a their choice of items
Object-Name – a more concrete name to the loaded molecules.

In the top of the Internal GUI is a list of all the current Selection-Names and Object-
Names.
Selection-Names are in parenthesis to distinguish from Object-Names

Enabling and Disabling Objects and Selections
Objects:
Enabling and Disabling Objects will affect the objects representation (it will appear
or disappear)

Syntax
enable object-name
Example
enable 2jpr The Object, 2jpr, will be enabled (appear)

Syntax
disable object-name
Example
disable 2jpr The Object, 2jpr, will be disabled (disappear)

Selections:
Enabling and Disabling Selections will only select or deselect the items (the pink
dots will appear or disappear)

Syntax
enable selection-name
Example
enable pocket the selection-name, pocket, will be selected
(pink dots will appear)

Syntax
disable selection-name
Example
disable pocket The selection-name, pocket, will be deselected
(pink dots will disappear)

Mouse Control Alternative:
You are also able to click on the object-name/selection-name in the control
panel at the top of the Internal GUI to trigger the items enabled or disabled.
14

Show/Hide Representations
The model/atoms can be shown in a variety of representation. The choices are:
lines, spheres, mesh, ribbon, cartoon, sticks, dots, and surface. To change the
representation type:

Syntax
show representation
Example
show sticks The object is represented as sticks

When you choose to show an object in a certain representation, the last
representation will still be present, so you must get rid of the first one

Syntax
hide representation
Example
hide lines The lines representation disappears. You will not
be able to see this because the stick
representation overlaps the lines.


Color

Syntax
color color-name, selection-expression or selection-name
Example
color brown, pocket the residues previously labeled under the
selection-name, pocket, are changed to
the color brown.
color brown If no selection-name or selection-
expression is provided then by default all
atoms loaded in PyMOL will be colored
brown



15
Changing View
Along with mouse controls, commands can be used to change the point of view

Zoom
Zoom brings an object or selection close up to the center of the field of view or
zooms out to include it.

Syntax
zoom selection-expression
Example
zoom pocket The view will change to zoom in/out on pocket


Orient
This is similar to zoom, but PyMOL will change the angle to align the object or
selection so its largest dimension is shown horizontally and its second largest
dimension is shown vertically.

Syntax
orient selection-expression
Example
orient pocket The view is changed for maximum visibility of the selection


View
PyMOL is also able to save views for recall later. This only saves the viewpoint not
the representation. You must also give the saved view a “key” or name.

Syntax
view key, action The two actions are store or recall
Example
view frontpocket, store The current view is labeled “frontpocket”
and stored.
view frontpocket, recall The stored view, “frontpocket,” is recalled

view frontpocket recall is the default option so this will
also recall the stored view, “frontpocket.”


16
Drag
Drag is the feature to move objects or molecules in PyMOL
First you must activate drag on the desired object

Syntax
drag selection-name
Example
drag pocket The item named under “pocket” is not activated
for dragging.



A menu will appear at the bottom of the
Internal GUI for dragging.

It contains options for undo, redo and indicate.

Undo and redo only affect object movements.

Indicate simply selects the object that is
activated for dragging





Dragging Controls
Keyboard
Modifier
Left Click Middle Click Right Click
Shift Rotate Object
Move Object
XY Plane
Move
Object in Z
Plane
Note: Shift must be held down

When dragging is complete you may hit done in the Dragging Menu at the
bottom of the Internal GUI or left click on empty space or another object.



17
Builder
PyMOL contains a Builder feature in which the user can build molecules. To open
this Builder feature you must rename MacPyMOL 2 to PyMOLX11Hybrid.

When you open PyMOL this way it will change the External GUI to a more user
friendly version for the Builder feature. The External GUI will also be in a
separate window.


This is what the External GUI should look like
Click on the Builder Button and the Builder Menu should open


Builder Menu

The Builder Menu comes with many options to choose from.
There are two main displays: Chemical and Protein






18
Chemical Display

The chemical display is for building molecules of your choice from scratch.
It has a few options of pre-built molecules that you can start from such as the cyclic
compounds and commonly found bonds shown.

To begin, click on the option where you would like to start.

Example: Click on “CH4”
No molecule will show up yet. In the top left corner of the Viewer it will give you the
option to pick the location to attach the methyl.

You can attach the methyl to an existing
object










If you starting from scratch you must
click on “Create As New Object” in the
bottom of the Internal GUI

19

To add additional methyl groups:
Mouse Mode Viewing – Control + Middle click on the Hydrogen Atom
Mouse Mode Editing – Left Click on the Hydrogen Atom

You can continue this to make the hydrocarbon chain as long as you wish.
You can also switch to a different functional group and repeat the same process.

Elements:
You can click on one of the elements in the top row and you are able to replace
any atom in the molecule with that element.
Make sure to click on the actual atom you wish to substitute, not where you want
the new element to be attached to.


20
Protein Display


This menu is useful for building long chain of amino acid so that you do not have
to produce them from scratch

You click on the first amino of choice and click “Create As
New Object.”
An atom on the newly create amino acid will be selected.
This is just to show where the next amino acid will be
attached to.


You can continue to click on the next amino acid of your
choice and PyMOL will continue to add the amino acids
to the chain.




Other Options

There is another menu below the Chemical/Protein Display. It has a variety of
options to modify the molecules being built

Charge [+1, 0, -1]
You may assign a formal charge to any atom in the molecule.
Simply click on the desired charge and than select the atom
Mouse Mode Viewing – Control + Middle click on the atom
Mouse Mode Editing – Left Click on the atom



21
Bonds
The sub-options under Bonds are to the right of it.
Create, Delete, Cycle, I, II, III, Arom
Create
This option is to create a bond. When it is clicked it will give you the
option to click on two atoms and it will than create a bond between
those atoms. This option is useful for making cyclic compounds.
Mouse Mode Viewing – Control + Middle click on the atom
Mouse Mode Editing – Left Click on the atom
Delete
This option is simply to delete bonds. Click on delete and than on the
bond you wish to delete
Cycle, I, II, III, Arom
This option allows you to change the characteristics of a bond. You
make it single, double, or triple. The cycle options simply toggles
through all of the choices, including Aromatic.

Fix H - Used to fix Hydrogens in their position
Add H - Used to add Hydrogens to an atom
Delete – Deletes atoms. It will also delete any hydrogens attached to that atom.
Clear – deletes everything load in PyMOL.

Invert - Used to change to the stereochemistry of a chiral center.
After activating this feature you must select three atoms
1
st
Atom – Origin atom for Inversion (Chiral Center)
2
nd
Atom – First stationary atom
3
rd
Atom – 2
nd
Stationary Atom

For the 2
nd
and 3
rd
atom you basically pick the two atoms attached to the 1
st

atom (origin/chiral atom) that will not invert. There will only be two atoms that
are not selected and these two atoms will switch places
Example:
If we wanted to invert the orientation of this molecule by switching the position
of the light blue and purple atom, the 3
rd
atom we would select would be the red
atom.


Origin Atom
2nd Atom
3rd Atom
After Inversion
22
Clean – clean changes the conformation of the molecule so that torsional strain
and Van der Waals forces are minimized.
This feature should be used when you done building your molecule or amino
acid sequence.

23
Sculpting

Sculpting is a feature in PyMOL in which is induces changes in the conformation
of molecules due to spatial volume, torsional strain and Van der Waal’s forces. It
does not take into consideration energy minimization or thermodynamics.

To activated go to the top Menu Bar > Wizard > Sculpting

Once activated a Sculpting Menu will appear in the bottom of the Internal GUI
and in the top left corner of the Viewer it will ask you to pick a center atom.

The Center atom is the center of the sculpting

Residue Shells: option on what is
to be sculpted. It can be toggled to
One Residue. Residue Shells
means multiple residues within
proximity of the center atom will
be sculpted.

Radius: area of affected sculpting
Cushion: fixed area around
sculpting area

Toggle Sculpting: to deactivate or activated sculpting
Toggle Bumps: to show or hide Van der Waal’s bumps
Relocate: to relocate center atom

Once you left click on an atom to designate it as the center atom, sculpting will
begin based on the settings chosen. Click done to end sculpting.
The green colored
molecules are is the area
that is being sculpted
The blue colored area are
the fixed molecules
The gray molecules are not
apart of the sculpting
process
The green dots represent
the Van der Waal’s forces.
They can be in red when
the forces are large



24
Movie
Step by step for sculpting
List of commands
Distance


Notes:

 Selection-Expressions
o ss h – helices
o ss s – beta sheets
o ss 1+ - loop and unassigned residues
o distance
 mode=2
o count_atoms