Personal tools

Introduction to PMV

Document Actions

Note: This is the print view with all the tutorial pages on one page. The paginated version is available here, if you prefer that.

This tutorial introduces PMV and demonstrates its basic features. Note, this tutorial applies to version 1.4.3. There have been quite a few changes in PMV since version 1.4.3.

Before we start

Download and install MGLTools.

First of all, you don't need to know Python in order to use Python Molecular Viewing (PMV). However we do recommend to have PMV installed so that you can follow this step-by-step tutorial. PMV is distributed with MGLTools and we assume that you have downloaded and successfully installed MGLTools. If not, click on the Download tab and follow installation instructions. Once MGLTools is installed, start PMV either by clicking on the PMV icon () or by running the pmv script. The default startup configuration has the Menu, Toolbar and 3D Viewer shown in the screenshot on the left.
Note that PMV opens with a docked 3D Viewer. If you prefer the floated configuration, click on the Float Camera icon on the Toolbar. The rationale behind this is that when the camera is docked, accessing the drop down menus located above a docked Camera, forces a redraw in the Viewer. This can be time consuming if there is a complicated display. On the other hand, if the Camera is floating, the ‘control’ portion may become buried behind other windows.

This tutorial covers most commands in the Menu and Toolbar; click Next to get started.

Getting started

Basic key and mouse bindings.
To get started with PMV, we need molecular data file in PDB or mmCIF format. For example, the screenshot on this page uses one of the smallest molecule in the PDB keratan sulphate (PDB ID: 1KES).
Download 1KES.pdb, click on FileRead Molecule and select 1KES.pdb.
PMV currently supports reading these file formats: pdb, mol2, pdbq, pdbqs, pdbqt, cif, pqr. Click on ‘-‘ in file browser widget to list all supported file extensions.

When molecules are loaded, by default, PMV displays white lines drawn between bonded atoms. You can directly interact with the molecules in the PMV Viewer with your computer’s mouse or touchpad.

  • To move it, click on the right mouse button and move your mouse.
  • To rotate, click and drag middle mouse button.
  • To zoom in or out, click the shift key and use middle mouse buttons.
  • Basic key bindings:

    Press N on the keyboard to bring current object to the center of the screen.
    Press D to toggle depth cueing.
    Press R to reset (i.e. undo all previous transformations).

    Mac users: make sure that middle button is set to "Button 3" in Apple → System Preferences ... → Keyboard & Mouse. You can also emulate three button mouse by going to X11 → Preferences ...

    1KES_lines

    Coloring by atom type

    Adding missing hydrogens.
    To gain a better understanding on the chemical structure of the molecule that we read, lets color this molecule by atom type.
    To that end, click on Colorby Atom Type, check the Checkbutton next to lines and press OK. This colors our molecule using the following palette:

                     Hydrogens (H) - cyan
                     Carbons (C)     - gray
                     Nitrogens (N - blue
                     Oxygens (O)     - red
                     Sulfurs (S)        - yellow
                     Phospors (P)   - magenta
                     All others        - green
    You could change PMV preferences so that all new molecules are colored by atom type. This is done by using FilePreferencesSet Commands to be Applied on Objects, which brings "Cmds called after adding an object" widget. Scroll down the list of "Available commands" and append colorByAtomType to "Commands to be applied" list.
    Since hydrogens are difficult to resolve with X-ray, we are going to add them using EditHydrogensAdd. This brings up the widget shown below.
    add_h
    Click OK to add missing hydrogens.
    1KES_lines_color

    Displaying labels

    by Properties → Atom.name.
    Click on DisplayLabelby Properties. In the widget which opens change the PCOM level to Atom, choose name from the list of properties (press 'n' on keyboard for quck access) and press OK.

    Measure distance

    Shows how to measure distances, angles and torsions.

    Use EditMeasureDistance and Shift-click on any atom of interest. A yellow sphere should appear on underlying atom. Now, Shift-click on another atom to measure the distance between these two atoms. Similarly, you can use EditMeasureAngle or Torsion to measure angles or torsions.


    Display sticks-and-balls

    CPK and molecular surface.

    Click on DisplaySticks and Balls or CPK. Note that these geometries are added to the DejaVu GUI tree (click on ). Use Color commands to color these objects. To generate images shown below, click on Colorby Atom Type menu and select all geometries.

    Finally, click on ComputeMolecular SurfaceCompute Molecular Surface and press OK to display computed molecular surface.

    Changing material properties

    DejaVu GUI.

    Click on button off the Toolbar to open DejaVu GUI. DejaVu uses scene-graph to organize objects in the scene and you can use the GUI to control different properties of the objects. Click on + to navigate object hierarchy and select MSMS-MOL geometry. To change opacity of the surface, click on Front button next to Material. This opens Front Material Editor shown below where you can control opacity by moving Opacity slider. You can also alter front polygon mode by clicking on Front button next  to Polygon mode and selecting one of the options (point, line, outlined, etc. ).

    materialEditor.png
    DejaVuGUI.png
    1kes_msms_trans.png 1kes_msms_trans_line.png 1kes_msms_point.png

    Powered by Plone CMS, the Open Source Content Management System

    This site conforms to the following standards: