omics.co.in logo omics.co.in

Chapter 2: Molecular Visualization with PyMOL & ChimeraX

Chapter 2: Molecular Visualization with PyMOL & ChimeraX

Visualizing 3D structures is vital for analyzing catalytic active sites, protein-ligand interactions, mutations, and conformational changes. PyMOL and UCSF ChimeraX are the standard visualization and rendering engines used across structural biology.

PyMOL Scripting Philosophy

Never rely solely on mouse clicks for publication figures. Writing reproducible PyMOL command scripts (.pml) guarantees consistent camera angles, color palettes, and surface representations across structures.

1. Production PyMOL Scripting (pml)

# save as render_complex.pml and run via: pymol -c render_complex.pml
reinitialize

# Fetch crystal structure of SARS-CoV-2 main protease bound to nirmatrelvir (PDB: 7VH8)
fetch 7vh8, type=mmtf, async=0

# Clean display
hide everything
bg_color white
set ray_shadows, 0
set antialias, 2

# Show protein cartoon
show cartoon, chain A
color grey85, chain A

# Highlight catalytic dyad residues: Cys145 and His41
select catalytic_dyad, (chain A and resi 41+145)
show sticks, catalytic_dyad
color firebrick, catalytic_dyad

# Show small molecule inhibitor (organic)
select inhibitor, org
show sticks, inhibitor
set stick_radius, 0.25, inhibitor
color marine, inhibitor and elem C

# Find hydrogen bonds between inhibitor and protein active site
distance hbonds, inhibitor, (chain A and not elem C), 3.2, mode=2
color dash, yellow

# Set camera and ray-trace high-resolution figure
orient inhibitor
zoom inhibitor, 6
ray 2400, 1800
png binding_pocket_hires.png, dpi=300

2. UCSF ChimeraX for Cryo-EM & Large Complexes

UCSF ChimeraX provides next-generation GPU rendering, interactive ambient occlusion lighting, and native tools to fit atomic models into cryo-EM electron density volumes.

# ChimeraX command line
open 6zsl
open 11145 from emdb
volume #2 style surface level 0.035 color #80b3ff transparency 0.5
fitmap #1 inMap #2
← Return to Home Hub Scroll to Top ↑