Table of Contents

Volume Visualization in PyMOL

Quick Notes

Screencasts

Notes

1.7.2 Updates

Pre-Integrated Rendering

Pre-integrated volume rendering is the new default in Incentive PyMOL 1.7.2. It reduces layering artefacts significantly which are often seen on steep color gradients and/or a low number of volume_layers. It comes at a slightly higher computation cost.

Rainbow colored volume with volume_layers=100
volume_mode=0 volume_mode=1
post-classified pre-integrated

Scripting Volume Color Ramps

It's now possible to put custom color ramps into a script or your pymolrc to be used as a named coloring preset. Example:

# example data
fetch 1ubq, type=2fofc, async=0

# register a new ramp named "blue1yellow2"
volume_ramp_new blue1yellow2, \
    1.0 blue 0.3 \
    2.0 yellow 0.2

# use the ramp with the "volume" command
volume myvol, 1ubq_2fofc, blue1yellow2

The named color ramp will also show up in the “Action > volume > …” menu of map objects, and in the “Color > …” menu of volume objects.

Adjusting volume colors is easiest done with the interactive volume panel (“Color > panel” in the menu of volume objects). After fine-tuning, you can get the color ramp script with the volume_color command, for re-use like in the example above:

PyMOL>volume_color myvol
### cut below here and paste into script ###
cmd.volume_ramp_new('ramp863', [\
    1.00, 0.00, 0.00, 1.00, 0.30, \
    2.00, 1.00, 1.00, 0.00, 0.20, \
    3.31, 1.00, 0.15, 0.98, 0.00, \
  ])
### cut above here and paste into script ###

The script dump will assign a random name (“ramp863” in the example above).