PyMOL Frequently Asked Questions

NOTE: An additional collection of FAQs can be found on this site, hosted by Kristian Rother.

Publication

Graphics and Rendering

Cartoon Ribbons

Crystallography

User Interface


How does one cite PyMOL?

There are no peer reviewed publications on PyMOL yet. So, if your journal is hip enough to allow URL citations, please cite PyMOL as:

  The PyMOL Molecular Graphics System, Version 1.2r3pre, Schrödinger, LLC.

You get the idea...and please don't forget to send us the reference for your article when it comes out so that I can add it to the list of publications which used PyMOL.

Click to return to top

How do I get a white background?

   set bg_rgb=[1,1,1] # these are [red,blue,green] components

In version 0.61 or later, simply use the bg_color command.

   bg_color white

Usually you're want to turn off depth cueing and fog too

   set depth_cue=0
   set ray_trace_fog=0
Click to return to top

How do I get crisp ray-traced images with a light background?

   set ray_trace_fog = 0

By default, the ray-tracer applies depth-cue fog. This works great for dark backgrounds, but often isn't desirable with light ones.

In v0.61 or later, just disable "Depth Cue & Ray Trace Fog" from the Settings menu in the external GUI.

Click to return to top

How do I crank-up the glossyness of rendered atoms?

   set spec_power = 200  # in range 20 - 250 
   set spec_refl=1.5 # in range 1.0 - 2.0

Note that the shadow options in the Display menu of the external GUI may modify these parameters.

Click to return to top

Why can't I see any cartoons? I used the "cartoon" command!

The cartoon command just changes the type of cartoon, it doesn't make them visible. Try:

   show cartoon
Click to return to top

What is the best way to specific secondary structure?

If you know Molscript, then you probably think in terms of specifying particular stretches of amino acids to be helix, sheet, or coil. PyMOL is slightly different: Secondary structure is considered an atomic property of the alpha carbon. To correctly indicate helices or sheets, you need to insure that these properties are correctly set.

PyMOL will interpret HELIX and SHEET records from PDB files if they are available, but you can specify or override these properties by using alter commands:

   alter A/10:34/, ss='H'
   alter A/35:40/, ss='L'
   alter A/41:60/, ss='S'
   alter A/61/,    ss='L'
   alter A/62:70/, ss='S'
   rebuild
   cartoon automatic
   show cartoon

# is roughly equivalent to the following Molscript input

plot
  ...
  helix from   A10 to A34;
  coil from    A34 to A41;
  strand from A41 to A60;
  coil from    A60 to A62;
  helix from   A62 to A70;
  ...
end_plot

The best PyMOL practice is to start with secondary structure in the PDB as assigned by some reliable program (DSSP, etc.) and then just make minor tweaks using alter. You can try using util.ss but it is wrong quite often, so you'll need to do a lot of proofreading of its assignments.

Note that if you only use the cartoon command to explicitly define shapes over a particular region, then your results will be sub-optimal because PyMOL will not be able to properly prepare the geometry of the backbone trace for the corresponding secondary structure.

Click to return to top

How do I color secondary structure elements?

Use the "ss" atom selection operator (example below requires PyMOL 0.65+).

   color red, ss h
   color yellow, ss s
   color green, ss l+''
Click to return to top

How do I convert CCP4 maps to X-PLOR format for use in PyMOL?

This is no longer necessary since PyMOL now reads and normalizes CCP4 maps on the fly!

For older versions, use CCP4's interactive xdlmapman utility, or for command line convenience, use mapman in the RAVE package from Gerard Kleywegt at the Uppsula Software Factory.

Click to return to top

Why does the mouse seem "sticky" on SGI's when SHIFT or CTRL are held down?
Why is it hard to "pick" atoms on an SGI?

The GLUT library does not work quite right on certain combinations of IRIX and SGI hardware, but you can work around this problem. I can't fix GLUT because it is not modifiable, redistributable open-source software.

Adopt the following technique when picking and/or dragging atoms on a SGI:

  1. Move the mouse pointer over the appropriate atom or bond.
  2. Press the SHIFT or CTRL key, without moving the mouse.
  3. Press the appropriate mouse button, again without moving the mouse.
  4. Immediately release the modifier keys before moving the mouse.
  5. Drag the mouse with just the button held down (if you are moving or rotating atoms).
  6. Finally, release the mouse button.

With practice, this will become automatic. The trick is to learn a fluid motion of pressing the modifier keys, pressing the mouse button, releasing the keys, dragging, and then releasing the button. If you remember not to move the mouse with SHIFT or CONTROL pressed on an SGI, then you'll be fine working with PyMOL on an uncooperative SGI.

Click to return to top

How do I use PyMOL as a builder?

PyMOL isn't yet suitable for building new main-chain coordinates for proteins, but that functionality is planned. Nevertheless, some people are already using PyMOL instead of "O" for limited model-building tasks. For example, modifying the conformations of existing side chains is simply a matter of switching the mouse into editing mode, picking the bond you wish to adjust, and then dragging the atoms around. Moving waters and ligands is also trivial. Just remember to set mouse into editing mode first!.

If you want to use PyMOL for crystallography right now, then my advice is:

  1. Master atom selections, the basic display functions, PDB I/O, and labels.
  2. Learn the isomesh and symexp commands.
  3. Understand how picked atoms and bonds can be used to subdivide molecules into various selections on-the-fly.
  4. Teach yourself all of the mouse-driven conformational editing features, as well as CTRL-Z (undo) and CTRL-A (redo). The current mouse/keyboard combinations are shown in the lower right-hand corner.
  5. Learn to apply the "Mutagenesis" wizard.
  6. Practice using create and remove to compose and divide objects. ("remove (hydro)" will be useful).
  7. Learn to use protect/unprotect and mask/unmask to control what moves and what you can pick with the mouse.
  8. Use the alter command to adjust atomic properties for selections of atoms. Don't forget to sort afterwards!
  9. Finally, you should build short PyMOL or Python scripts which automate all of the tedious stuff, such as:
    • Converting maps from CCP4 format
    • Loading updated maps and coordinates
    • Coloring things the way you like them
    • Displaying electron density about the selected atom (pk1)
    Any action taken inside of PyMOL can be bound to a function key using the cmd.set_key command, and thus you can fully customize PyMOL so that all your important tasks are just a key-press away.

Click to return to top

How do I "unpick" the selected atom?

CTRL-middle-click in the viewer window away from any atom.

In versions 0.60 or later, click the "unpick" button in the external GUI.


Click to return to top

How do I turn off the internal gui temporarily (i.e. for full-screen rendering)?

   set internal_gui=0 # off (NOTE: versions 0.58+ only).
   set internal_gui=1 # on.
Click to return to top

How do I change the font in the Tck/Tk external GUI window?

  1. Open pymol/modules/pmg_tk/PMGApp.py in a text editor
  2. Search for "my_fw_font". You'll find a section like this...
          if sys.platform[:5]=='linux':
             self.my_fw_font=('lucida console',7)
          elif sys.platform[:3]=='win':
             self.my_fw_font=('lucida console',8) # Courier 9
          else:
             self.my_fw_font=('lucida console',10)
  3. Change the font size for your operating system.
Click to return to top
Hosted at: Back