Making Pretty Pictures in PyMOL v2

Throughout my PhD I’ve needed nice PyMOL visualizations, but struggled to quickly and easily make the pictures I wanted. I’ve used Claire Marks‘ blopig post, Making Pretty Pictures in PyMOL, many times and wanted to expand it with what I’ve learned to make satisfying visualizations quickly!

Use scripts

The most helpful thing I’ve learned is to use a script to define functions that change settings to a preset you’re happy with. You can find my script here.

To load it into your current PyMOL session:

run <path_to_pymol_style.py>

Preset workspace setting

First thing I like to do in a new session is to first load my pymol_style.py and then perform:

setPretty

Default PyMOL style:

After setPretty:

def setPretty():
    # Workspace settings
    cmd.bg_color("white")
    cmd.set("ray_opaque_background", "off")
    cmd.set("orthoscopic", 0)
    cmd.set("transparency", 0.5)
    cmd.set("dash_gap", 0)
    cmd.set("ray_trace_mode", 1) # normal color + black outline
    cmd.set("antialias", 3)
    cmd.set("ambient", 0.5)
    cmd.set("spec_count", 5)
    cmd.set("shininess", 50)
    cmd.set("specular", 1)
    cmd.set("reflect", 0.1)
    cmd.space("cmyk")

Transparency

Increasing the transparency of non-important features helps what you’d like the reader to focus on stand out. For example in this binding site, using a higher transparency of the cartoon versus the binding site residues helps them stick out.

# define ligand, binding site residues, and chain
select ligand, resn LIG and chain B # change to whatever chain you are working in
select binding, br. (ligand around 4) # bonds within 4 angstroms of ligand 
select chainB, chain B
hide everything, not binding
show sticks, binding
show sticks, ligand
show cartoon, chainB

set cartoon_transparency, 0.0

set cartoon_transparency, 0.6

Also use transparency to show binding site residues underneath a surface.

hide (hydro and not (elem N+O+S) and binding) # hide non-polar hydrogens
show surface, chainB
color gray80, chainB and not ligand

set transparency, 0.2

set transparency, 0.4

Ball and stick

I personally like the ball and stick representation of small molecules, and I’ve defined it in my script going off of Rob Paton’s pymol_style.py, where I use the same BallnStick command! I’ve defined another BallnStickThick command along with some other fun colors.

BallnStick ligand

BallnStickThick ligand, marine

BallnStickThick ligand, purpleblue

BallnStickThick ligand, orangecream

Lighting

Another cool thing you can do is use preset Lighting Settings located in the Plugin bar.

Rubber setting (and increased ambient value)

X-Ray setting with reflect = 1 and light_count = 1

Focal blur

The next thing I found was a focal blur script which has a fun blurring effect.

# https://pymolwiki.org/index.php/FocalBlur and get script!
run ~/pymol_focal_blur.py
FocalBlur

FocalBlur samples=20, aperture=2.0

FocalBlur samples=20, aperture=4.0

Resources

Happy PyMOL-ing 🙂

Author