MolNympheas is a plugin designed to bring mathematically perfect, palettes to your structural biology figures.
Instead of guessing hex codes or using default PyMOL or chimeraX rainbows, this tool uses Matplotlib to let you smoothly slide through perceptually uniform palettes (like Viridis, Turbo, Plasma, etc.) and automatically calculates the highest-contrast complementary colors for your complexes.
PyMol
ChimeraX
- Universal Cross-Compatibility: Export your exact color scheme to a
.jsonfile in PyMOL and load it directly into ChimeraX (and vice versa)! The shared save format makes it effortless to keep your visual identity consistent across different software. - Colorblind Accessibility (CVD Matrix): A dedicated tab calculates the RGB distance matrix between your selected colors, simulating Normal Vision, Protanopia, and Deuteranopia to ensure your figures are universally accessible.
- Convenient Selection: The "Apply to" dropdown automatically detects all loaded objects and models in your session. You can easily pick from the list, type a custom selection on the fly, and use the ↻ refresh button to instantly update the list without restarting the plugin.
- Smart Contrast & Custom Overrides: Click
+ Add Colorto automatically generate perfectly spaced colors from your chosen palette. Use the⚙️button on any generated color to lock in a specific, custom Hex code of your choice. - Massive Library: Comes with the standard BIDS/Google colormaps, plus a button to unlock 80+ additional Matplotlib palettes.
- Pymol
- Download the
MolNympheas.pyfile to your computer. - Open PyMOL.
- In the PyMOL command line, run the script:
run /path/to/MolNympheas.py
-
NOTE : For the first time with PyMol you might need to install matplotlib in PyMol. To do so just type in the excution box at the bottom of the GUI (after "PyMol>")
pip install matplotlib -
ChimeraX
- Download the
MolNympheas.pyfile to your computer. - Open chimeraX
- In the chimeraX command line, run the script:
open /path/to/MolNympheas.py
-
Choose your palette
- Either in the default list
- Or in the 80+ list from matplotlib
- Pick the shade
-
To apply the color
- In the "Apply to" section choose the selection
- Click on the color box of your choice.
- If you make new selection or new object in the "Apply to" section click on the arrow to refresh the list.
The idea came on a way back from Paris, on the train after isiting the Orsay museum. It has been named in honor of Claude Monet's Nymphéas (Water Lilies) and his mastery of visual perception
- Florian Chenavier for the implementation of the colorblind (CVD) simulation matrix, and the scripts unification.
- Gemini, as i'm still a "tanche" in python
- Shyam Saladi, whose original pymol_viridis script (go visit his github) served as the starting inspiration for this project.
Do whatever you want with the scripts and keep in mind that it has been code by a stupid biochemist (for that matter me).