Uploaded by Mendy Joel

Pymol document

advertisement
PyMOL Tutorial 1: Introduction and User Interface
PyMOL is a molecular modeling software used for making publication-quality renders of
biochemical structures. Using PyMOL, it is possible to make high quality images such as
the following:
Learning objectives
In this PyMOL tutorial collection, you will learn how to create images like those as above
and become proficient in using the PyMOL interface. This tutorial is also available in a
video format. This tutorial will cover:
1. Installation: How to install a licensed version of PyMOL for PC/Mac/Linux
2. User Interface (UI): Explanation of the basic UI, a guide to reference as PyMOL is used
3. Creating a Visualization: Getting Started - how to open a PDB file, operate using the
mouse controls, navigate some of the UI, and create a simple visualization of a protein
Installation
The installation steps may vary depending on your institution. This written tutorial is
designed for Virginia Tech faculty, staff, and students, and the following installation
instructions cover the steps for their installation process:
1. Log in using 2-factor authentication onto Software Service Center . This download
location is ONLY for current Virginia Tech faculty, staff, and students.
2. From there softwares available to you should be listed (This may vary depending on
your status as a faculty or student). Click on PyMOL Software, then on the PyMOL
installation corresponding to your operating system shown in the red box below:
3. After the version of PyMOL is clicked a screen will appear prompting you to agree to
the terms and conditions before continuing. Check the box and click Accept Agreement
4. You should now see options to download and license PyMOL. Click the “Download
PyMOL…” blue link to download the installer (Note: this link will be different depending
on your operating system). Then, click the “Product Key(s)” tab and download the
“pymol_license.lic” file. You must download both the software application and the .lic
file. (NOTE: You will need to renew this license every June using the same methods
listed above but with the updated license file)
*Note: You may have to right click the license file and then click “Save as” in order
to download it. In addition, some browsers may try to block multiple file downloads.
Make sure you click the option to allow downloads of multiple files
5. The following installation steps will vary based on the operating system
Mac:
After the dmg installation file is downloaded, click on it to launch the installer. Once it is
finished you will see a window pop up with the pymol application and an arrow to the
“Applications” folder. Drag the PyMOL icon into the folder to complete the installation
Windows:
After the .exe installation file is downloaded, click on it to launch the installer. Once the
installer is launched, click “Next.” Select “Just Me,” then “Next” again. Leave the install in
the default location, unless otherwise needed in a different location, then click “Next.”
Lastly,
6. Now that it is installed, PyMOL must be licensed. The licensing process is identical
across all operating systems. The first time PyMOL is launched, it will prompt you to
license it. Click “Browse for License File” and load the “pymol_license.lic” file downloaded
earlier.
If PyMOL is licensed you will see a screen such as below, with a license detected:
PyMOL should now be licensed and ready to use. If your PyMOL isn’t working properly
or you see a screen such as the one below, it is likely a step was not done correctly or
you have not linked to the .lic licence file downloaded from the VT Software Center (or
your own licensed version). Try the previous steps again or go to the PyMOL support
page.
Chromebook:
First, install miniconda on your computer using these instructions. Once downloaded,
close and reopen the terminal by searching “terminal” in your apps and clicking on the
icon, then type in the following command:
conda install -c schrodinger pymol
After installation, PyMOL should be available as an application to use on your
chromebook.
NOTE: PyMOL is not “officially” supported on chromebook, but this works through
the beta version of running linux apps on ChromeOS
User Interface
Shown below is a freshly opened PyMOL window:
This visual overlay is called a Graphical User Interface (GUI) and houses most of the
tools needed to use PyMOL. We will break down each tool individually by their color
coordinated box on the graphic above. This section is more of a reference than a tutorial,
it is recommended to briefly read through this section and continue on to the rest of the
tutorial.
Click on the following headers to skip to a section below:
●File●
●Edit●
●Display●
●Setting●
●Scene●
●Mouse●
●Wizard●
●File●
Similar to most software, this tab is used for opening, saving and exporting files. When
you click on it, these options appear:
Out of these options here are some of the most pertinent:
● “New PyMOL Window”: Allows you to open a new window, you can have multiple
open at once
● “Open” and “Open Recent…”: Opens either structures to view in PyMOL or entire
PyMOL .pse sessions
● “Get PDB…”: Allows you to fetch a model of a PDB and directly import into the
session
● “Save Session” and “Save Session As…”: Saves the current session as a .pse file.
A .pse file is a PyMOL session file.
● “Export Molecule…”: Allows you to export a model on screen to a file format
(e.g. .pdb)
● “Export Image As”: Exports the current view on screen to an image
● “Export Movie As”: Export the current movie timeline to a video file
● “Reinitialize”: Reruns all the settings and display options currently enabled
●Edit●
This tab allows you to redo or undo things in PyMOL
● Short cuts for the redo and undo settings are shown next to each
● Max atom count can be adjusted for large visuals but is often best left to default
settings
●Display●
This tab houses the options that alter the display in the viewport of PyMOL
Out of these options here are some of the most pertinent:
● “Sequence”: Displays the sequence of amino acids or nucleic acids in a protein or
piece of DNA above the preview
● “Sequence Mode”: Changes what the sequence displays
● “Background”: Option to change the color and type of background visible
● “Color Space”: Houses settings for different color spaces, can allow for different
aesthetic appearances
● “Quality”: Provides options for the level of quality of the visualization shown. This
option is useful for less powerful computers
● “Grid”: Allows the option to display objects in a grid
● “Orthoscopic View”: Toggles the orthoscopic view setting, which slightly distorts
the preview window to enhance depth perception
● “Show Valances”: Toggles the visibility of valences in models
● “Depth Cue (Fogging)”: Toggles fog that helps with depth perception
●Setting●
This tab holds the settings for the representations of structures on screen
● “Edit All…”: This will bring up a menu of all the advanced settings available in
PyMOL, this will be explored further in the advanced tutorial
● “Colors…”: Allows you to change the color of atom types, and of preset colors
available in the menu (ie make all phosphorous green)
● “Label” → “Transparency”: Allows you to tweak settings of visualization, will be
elaborated further in future tutorials
● “Auto-Zoom New Objects”: Will force zoom to objects as they are loaded in
● “Auto-Remove Hydrogens”: Removes hydrogens from objects as they are loaded
in
●Scene●
This allows for the storage of perspectives and visualizations as scenes that can be
retrieved at a later point. This is very useful for moments when multiple representation
types are necessary for a single protein
● “Next”: Switches to the next scene, can be called by using the [PgDn] key
● “Previous”: Switches to the previous scene, can be called by using the [PgUp] key
● “Append”: Makes a new scene from the settings currently present, automatically
assigning the name as a number
● “Insert Before” and “Insert After”: Does the same as Append, but will create the
scene before or after the current scene toggled on
● “Update”: Overwrites the current scene
● “Delete”: Deletes current scene
● “Recall”: Will toggle a scene from a list of F1 to F12. Scenes can also be recalled
by using the buttons at the bottom left of the screen
● “Store”: Allows you to store a scene from F1 to F12
● “Clear”: Clears a scene F1 to F12
●Mouse●
This tab provides the options
● “Selection Mode”: Houses the different selection modes for picking parts of the
model on screen
● “Emulate Maestro”: Sets the mouse control settings to that of Maestro, and allows
the user to select by dragging a box across the screen
●Wizard●
This tab provides special modes that provides useful tools to measure, change
appearance, etc.
● “Appearance”: Allows the user to quickly toggle through showing certain aspects
of the visualization (ie quickly hide and show sticks)
● “Measurement”: One of the most useful, measures the distance between two
objects
● “Mutagenesis”: Allows the user to mutate residues or nucleic acids by rotation,
substitution, etc.
● “Label”: Can toggle the labels for certain residues of the visualization
● “Demo”: Allows the user to play around with some demonstrations of what PyMOL
can do, it is highly encouraged that new user experiment with these to see what
PyMOL is capable of
Creating a Visualization
Biomolecules exist as 3-dimensional entities (not just 2D from textbooks!) and are
comprised of building blocks and make up complex subunits. Scientists can use different
techniques to create a model of these 3D structures for use in bioinformatics. A common
format of these structures is the Protein Data Bank (PDB) format. This format contains a
list of atoms that are found in protein residues and assigns an x,y,z coordinate for each.
In these next steps, we will apply some of the tools above to create a visualization of the
PDB structure 1EMA, a green fluorescence protein:
1. Loading in a model: First use the “Get PDB…” feature to fetch 1EMA from RCSB by going to
File → Get PDB. Then enter the 4-letter code “1EMA” in the box and hit “download”, leaving
everything else default. Alternatively, you can always manually download a PDB file and open it
using File → Open, or dragging and dropping into the .pdb file into PyMOL.
2. Mouse controls: Now you should see the protein loaded into the window:
Take a moment to play around with the mouse controls. It is recommended to use a
traditional mouse, a trackpad is equally usable but can be harder to work with:
Left click: Rotates the model, clicking in the center allows free control. Dragging along
the edges will rotate it around the Z – axis.
Right Click: Zooms in and out of the protein
Middle Mouse Button: Clicking will drag the protein around the preview window without
rotating. Scrolling will start to clear away some of the protein and will not be utilized in this
tutorial.
3. Initial Settings: Now that you are acquainted with the mouse controls, the first thing
to do when starting a new PyMOL session is initialize the settings to make the object
more understandable, viewable, and accessible by an audience. This can be done using
the settings in the UI but for the interest of time you can type (or copy and paste) the
following in the prompt above the preview window in the command line:
set bg_rgb, white
set valence, 0
set cartoon_side_chain_helper, 1
remove hydro
Now the preview window should look something like this:
Notice the background is now white, this is done for several reasons. Firstly, the aesthetic
of a white background is preferred over the high contrast of black. Second, if this image
was to be published, it may be printed on paper and white enhances the visibility and
uses less ink. The other commands turn off valence, remove hydrogens as they are not
necessary to view in this case, and sets the side chain helper on which aids in residue
visibility. For more information about these settings, see this guide.
4. Hiding and Showing entries: If you look to the right of the preview window you will
notice a box with different entries, including the PDB name “1EMA.” This is called the
Internal GUI:
If the entry box 1EMA is clicked, it will toggle whether 1EMA is displayed. Likewise, if the
“all” entry box is clicked it will toggle whether all of the entries are displayed or hidden.
There are red dots around the protein, this is part of the solvent (water) that was present
during the crystallization process. Click one of the marks. You will see it is highlighted in
pink, and a new entry box has been created on the right that it called “(sele)”
If you click on any of the white space it will toggle the selection off, and if you click the
entry box it will toggle it back on and off again.
Next to each entry box are these buttons:
Each of these letters corresponds to an option for visualization:
A: Action, allows the user to orient the camera and move the protein around, edit the
structure
S: Show, will show a representation type of the visual, such as cartoon, spheres, sticks
H: Hide, will hide a representation type of the visual
L: Label, allows the labelling of different aspects of the visual
C: Color, will color the visual based on the user selection
Clicking these letters will expand the menu and provide more options. For instance, if we
wanted to hide the selected solvent mark we can click the H → “nonbonded.”
This will make the currently selected water molecule disappear, but the rest still need to
be hidden, as they are not the main focus in this visualization. It would take a while to
click all these atoms, so to save time, we can repeat the process, but instead clicking the
H next to “all.” This tells PyMOL to hide every “nonbonded” representation in all the
entries.
5. Coloring the model: The preview window should now show the protein displayed as
a cartoon (arrows and tubes) and a ligand as sticks in the internal cavity:
Both are colored neon green, which is not the most aesthetica or accessible for coloring
for your viewers. To enhance the viz, we are going to recolor the protein and ligand. First,
we will color the protein. Select the C next to 1EMA. This will bring up a menu with
assorted color options.
First, select the base color you want the protein to be, in this case, select C → blues →
lightblue. This will color the entire model light blue, but we need to make the ligand a
different color that will stand out.
To color the ligand, we will first need to select it in the center (represented by sticks).
Then we will repeat the process done for the protein but with a different color by selecting
C → reds → deepsalmon
This will color the ligand entirely deepsalmon, but it is important to represent all the atom
colors such as nitrogen, oxygen, etc. This can be done by clicking C → by element →
HNOS. As shown below, all the carbons have been colored a base color and the other
elements are colored accordingly.
6. Rendering the model: Now that the aesthetic colors have been selected, it is time to
render the model into an image. First, use the mouse controls to select a pose for the
model. The pose you choose will depend on what you are trying to demonstrate or the
“story” you are trying to tell. For this instance, we are trying to highlight the directionality
of the beta barrel and the placement of the ligand inside. For this reason, the pose below
is selected. Orient the model as close to the position below:
Now to render the image. At the top right of the screen, you will see a button that says
“Draw/Ray.”
For quick images, use the “Draw (fast)” option. This simply takes a screen capture of what
is currently represented. For the best quality, we will use the “Ray (slow)” option. In
addition, ensure that the “transparent background” option is unchecked as shown above.
Once initialized, the ray tracing will likely take a few seconds to a minute to complete.
Once it is finished you will see the option to save the image. Congratulations, you have
rendered your first PyMOL image. To save your session, which saves all of the settings
you have selected, Save Session As. This will save a .pse file, which will open in PyMOL
at the point you saved at after you have closed this session For more tutorials, click here.
Download