Skip to content

JMB-Scripts/PyMeraX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

PyMeraX

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)


Features

  • 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

Installation

  1. Save the script as:
pymerax.py
  1. Load it inside PyMOL:
run pymerax.py

Or from command line:

pymol pymerax.py

Usage

Available commands:

pymerax()
pymerax("cartoon")
pymerax("surface")
pymerax("publication")
pymerax("ligand")
pymerax_help()

Default mode:

pymerax()

Equivalent to:

pymerax("cartoon")

Rendering Modes

Cartoon

Best for proteins, domains, and structural overviews.

pymerax("cartoon")

Without PyMeraX

image

With PyMeraX

image

Features:

  • Smooth helices
  • Rounded ribbons
  • Better depth
  • Soft AO shading

Surface

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

Without PyMeraX

image

With PyMeraX

image

Publication

Clean white background for figures.

pymerax("publication")

Features:

  • White background
  • Balanced contrast
  • High-quality ray tracing

Ligand

Optimized for protein–ligand complexes.

pymerax("ligand")

Features:

  • Improved stick rendering
  • Better specular highlights
  • Enhanced ligand visibility

Notes

PyMeraX modifies PyMOL settings globally using:

cmd.reinitialize("settings")

This resets rendering settings before applying a preset.


Compatibility

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.


License

Do whatever you want with the scripts and keep in mind that it has been code by a stupid biochemist (for that matter me).

About

PyMOL tuning to soften molecular rendering

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages