From BILS Wiki
Jump to: navigation, search

N.b., this page is not finished yet.

Visualizing the 3D structure of a protein system may seem trivial, but it is important nonetheless. Firstly, one must decide what to draw and how to render it and finally there are many settings to produce an appealing image, or a movie, to present to others.

There are many programs that can be used for rendering high-quality images of a molecular system or visualizing a trajectory. VMD and PyMOL are two of the most commonly used, freely available, programs for the purpose.

All examples use the FKBP/L12 complex available for download at


VMD (Visual Molecular Dynamics) is a powerful program that can read and write many molecular file formats. The built-in Tachyon renderer can produce great images and it is easy to specify what to show and how to represent it. VMD also comes with a large number of extensions that can be useful in the MD workflow.

Rendering images

VMD can use a number of rendering methods, ranging from a simple snapshot of the window to powerful ray tracers such as POV-Ray and Tachyon. For all high-quality images it is recommended to use Tachyon, which also supports ambient occlusion. Ambient occlusion is lighting technique that gives a diffuse light, which can enhance the perception of shape and depth.

Example workflow:

  1. Use 'Graphical Representations' in the 'Graphics' menu to clearly show what is important:
    • Draw protein (backbone) as 'NewCartoon'.
    • Draw important protein side chains as 'Licorice', 'CPK', or 'VDW'.
    • Draw, e.g., ligands and important ions as 'Licorice' or 'VDW'.
  2. Resize the window to the required output by executing display resize <X size> <Y size> from the Tk Console (in the 'Extensions' menu). For publication quality images it can be good to make the displayed window larger than the screen.
  3. Change the background color to white from 'Colors' in the 'Graphics' menu. (This step is not necessary.)
  4. Turn off the coordinate axes from the 'Display' menu.
  5. Enable Shadows and Amb. Occl. in 'Display Settings'. DoF (Depth of Field) can be useful too to give a more photography-like impression.
  6. In 'Graphical Representations' choose one of the AO materials for each of the displayed representations.
  7. From 'Render' (in the 'File' menu) choose one of the Tachyon options (GPU accelerated if possible).
  8. Specify a file name of the image.
    • If Depth of Field is enabled it is good to choose the interactive Tachyon renderer.
    • Adjust the image in the interactive window. Adjust the focus using the keypad ('up' - increase the focus distance, 'down' - decrease the focus distance, 'right' - increase the depth of the focus, 'left' - decrease the depth of the focus).
  9. Close the render window to save the image (first close the interactive window if if was used).


PyMOL is available in two versions, a free open source version and an incentive version with a license cost. While it is possible to generate images directly from the current view by typing 'png <filename>' in the python terminal it is recommended always first use the 'ray [width, height]' command to generate a proper ray traced image, followed by 'png <filename>' to save the image.

See also [1].