Control PyMOL with plain English using Claude AI.
fetch 1hsg and show the protein as cartoon, color by chain, and show the ligand as sticks
- PyMOL (conda, official installer, or Schrödinger)
- An Anthropic API key — get one at console.anthropic.com (pay-per-use, no subscription required)
1. Download pymol_claude_plugin.py from this repository.
2. Install the plugin via the PyMOL Plugin Manager:
Plugin > Plugin Manager > Install New Plugin > Choose file…
Select pymol_claude_plugin.py, accept the suggested directory, and click OK.
3. Restart PyMOL.
The plugin will automatically install its dependencies on first launch.
4. Open the chat window — type claude_chat in the PyMOL command line or press F2.
5. Enter your API key when prompted. It will be saved and never asked again.
If your PyMOL doesn't have a Plugin menu, copy the file manually via terminal:
Mac / Linux:
mkdir -p ~/.pymol/startup/
cp pymol_claude_plugin.py ~/.pymol/startup/Then restart PyMOL.
Open the chat window:
claude_chat
Or press F2. Type your request and press Enter — Claude figures out the PyMOL commands, runs them, and reports what it did. The window stays open for follow-up questions.
fetch 1abc and show it as cartoon colored by chaincolor all residues within 5 angstroms of the ligand as red sticksalign my two structures and tell me the RMSDselect all lysine residues and show them as sphereswhat secondary structure elements does this protein have?save a PNG screenshot to my Desktop
| PyMOL command | What it does |
|---|---|
claude_chat |
Open the persistent chat window |
claude_stop |
Cancel a running query |
claude_reset |
Clear conversation history (start fresh) |
claude_save |
Save the chat log as an HTML file |
- Claude remembers the conversation within a session — say "now color the ligand yellow" without repeating context.
- Type
claude_resetto start a new topic from scratch.