PyMeraX is a small PyMOL script that makes PyMOL rendering look closer to ChimeraX by applying improved lighting, softer shadows, ambient occlusion, and cleaner cartoon/surface presets.
Can be use in parralell with MolNympheas (https://github.com/JMB-Scripts/MolNympheas)
- Improved global lighting
- Softer shadows with better depth perception
- Ambient occlusion for enhanced volume
- ChimeraX-like surface rendering
- Cleaner cartoon representation
- Publication-ready rendering presets
- Ligand-focused visualization mode
- Save the script as:
pymerax.py- Load it inside PyMOL:
run pymerax.pyOr from command line:
pymol pymerax.pyAvailable commands:
pymerax()
pymerax("cartoon")
pymerax("surface")
pymerax("publication")
pymerax("ligand")
pymerax_help()Default mode:
pymerax()Equivalent to:
pymerax("cartoon")Best for proteins, domains, and structural overviews.
pymerax("cartoon")
Features:
- Smooth helices
- Rounded ribbons
- Better depth
- Soft AO shading
Best for molecular surfaces and cryo-EM-like visualization.
pymerax("surface")Features:
- Improved grazing-angle lighting
- Stronger shadowing
- Enhanced surface curvature perception
- Better cavity visibility
Clean white background for figures.
pymerax("publication")Features:
- White background
- Balanced contrast
- High-quality ray tracing
Optimized for protein–ligand complexes.
pymerax("ligand")Features:
- Improved stick rendering
- Better specular highlights
- Enhanced ligand visibility
PyMeraX modifies PyMOL settings globally using:
cmd.reinitialize("settings")This resets rendering settings before applying a preset.
Tested with:
- PyMOL 3.x+
- Open-source PyMOL
- Incentive PyMOL (partial AO support depending on version)
Ambient occlusion parameters may be ignored in older PyMOL builds.
Do whatever you want with the scripts and keep in mind that it has been code by a stupid biochemist (for that matter me).