pymol▌
google-deepmind/science-skills · updated Jun 4, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
### Pymol
- ›name: "pymol"
- ›description: "Visualize, analyze, and render protein and molecular structures using PyMOL. Use when the user wants to create images of protein structures, perform structural alignments or superposition, measure dis..."
| name | pymol |
| description | > Visualize, analyze, and render protein and molecular structures using PyMOL. Use when the user wants to create images of protein structures, perform structural alignments or superposition, measure distances or contacts, highlight binding sites or active site residues, color by B-factor/pLDDT, or analyze protein-ligand interactions. Do not use for docking, molecular dynamics, or sequence-only analysis. |
PyMOL
Prerequisites
uv: Read theuvskill and follow its Setup instructions to ensureuvis installed and on PATH.- User Notification: If LICENSE_NOTIFICATION.txt does not already exist in this skill directory then (1) prominently notify the user to check the license at https://www.pymol.org/, then (2) create the file recording the notification text and timestamp.
Overview
All PyMOL commands run on the host via uv with OSMesa software rendering — no
GPU, display, or X server is needed. Structure files must be downloaded to the
host before running PyMOL.
Do NOT use when:
- The user wants to run AlphaFold predictions.
- The user wants docking or molecular dynamics simulations.
- The user only has a sequence and no structure file — fetch the structure first. Check if any other installed skills can retrieve structures from the PDB or AlphaFold Database before proceeding.
Setup (Agent Instructions)
Ensure that uv is installed on the host system. The PyMOL scripts use PEP 0723
headers to declare their dependencies, and uv run will automatically handle
installing them (including pymol-open-source-whl) when the script is executed.
Core Rules
- Output paths must be absolute or relative to the user's project root. Always run PyMOL scripts from the user's project directory.
- Software rendering only. Use
cmd.png()for output. Never usecmd.draw()orcmd.ray()with hardware acceleration — OSMesa does not support it. Set environment variablePYOPENGL_PLATFORM=osmesafor headless rendering. - Always save a
.psesession file alongside any PNG output. This lets the user open the session in their local PyMOL for further inspection. - Always call
cmd.quit()at the end of every PyMOL script. Omitting it causes the process to stop responding. - Init boilerplate is mandatory. Every PyMOL script must begin with the
initialization sequence.
from pymol import cmdmust come afterfinish_launching(), not before. - See references/PYMOL_REFERENCE.md for selection syntax, common commands, and gotchas.
- Pre-Flight File Check: Before writing the PyMOL script or running it, you MUST verify that the requested structure file actually exists on the host machine.
- Verify Structure Load: After loading a structure with
cmd.load(), always verify it succeeded by checkingcmd.count_atoms("all"). If the result is 0, print an error to stdout and callcmd.quit()immediately. - Notification: If this skill is used, ensure this is mentioned in the output.
Quick Start
- Ensure structure files are downloaded to a directory in the user's project.
- Write a PyMOL Python script (e.g.,
render.py) with the required init boilerplate and PEP 0723 header. - Run it via
uv run:bash uv run render.py
Minimal example script (render.py)
# /// script
# requires-python = ">=3.10, <3.13"
# dependencies = [
# "pymol-open-source-whl",
# ]
# ///
import os
import sys
# Set environment variable for headless rendering
os.environ["PYOPENGL_PLATFORM"] = "osmesa"
import pymol # pytype: disable=import-error
pymol.pymol_argv = ["pymol", "-cq"]
pymol.finish_launching()
from pymol import cmd # pytype: disable=import-error
cmd.load("AF-P00520-F1-model_v4.cif", "structure")
cmd.show("cartoon")
cmd.color("green", "ss h")
cmd.color("yellow", "ss s")
cmd.color("gray", "ss l+''")
cmd.orient()
cmd.set("ray_opaque_background", 1)
cmd.png("output/render.png", width=1200, height=900, dpi=150)
cmd.save("output/session.pse")
cmd.quit()
Common Recipes
See references/RECIPES.md for complete, copy-paste ready recipes. Available recipes:
- Cartoon with secondary structure coloring — basic helix/sheet/loop coloring
- B-factor (pLDDT) coloring — continuous spectrum coloring by B-factor
- AlphaFold pLDDT coloring — canonical threshold-based confidence colors
- Highlight specific residues — show active site or key residues as sticks
- Surface rendering — transparent surface over cartoon
- Electrostatic surface rendering — vacuum electrostatics (qualitative)
- Multi-chain complex colors — automatic per-chain coloring
- B-factor putty analysis — tube width proportional to flexibility
- Cavity and pocket visualization — surface cavity detection with ligand focus
- Multi-structure batch rendering — render a directory of structures
- Measure distance between residues — CA–CA distance with labels
- Zoom into binding pocket — simple pocket focus
- Protein-ligand interaction — ligand isolation, styled rendering, polar contacts
- Two-structure superposition with RMSD — align/cealign with auto-fallback
- In silico mutagenesis — mutate residues with the mutagenesis wizard
- Load and modify an existing session — re-open a
.psefile
Interpreting Output
- The
output/directory contains PNG images and a.psesession file. - Any measurements or metrics (distances, RMSD, atom counts) are printed to stdout by the PyMOL script. Report these values to the user.
- Present PNG images to the user and describe the visualization.
- Tell the user they can open the
.psefile in their local PyMOL to further explore, rotate, or modify the visualization. - If the user wants modifications, load the saved
.psein a new script and re-run. - Large sessions with surfaces can exceed the
--max_output_mblimit (default 500 MB). Increase it with--max_output_mb=1000if needed.
How to use pymol on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add pymol
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches pymol from GitHub repository google-deepmind/science-skills and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate pymol. Access the skill through slash commands (e.g., /pymol) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Installation Steps
- 1.Install skill using provided installation command
- 2.Test with simple use case relevant to your work
- 3.Evaluate output quality and relevance
- 4.Iterate on prompts to improve results
- 5.Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices▌
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This▌
✓ Use When
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid When
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path▌
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.7★★★★★57 reviews- ★★★★★Daniel Malhotra· Dec 24, 2024
Useful defaults in pymol — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Amelia Khan· Dec 20, 2024
Keeps context tight: pymol is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Alexander Ghosh· Dec 20, 2024
pymol reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Camila Gupta· Dec 16, 2024
We added pymol from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Dev Thomas· Dec 12, 2024
Solid pick for teams standardizing on skills: pymol is focused, and the summary matches what you get after install.
- ★★★★★Pratham Ware· Dec 4, 2024
pymol is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Amelia Farah· Dec 4, 2024
pymol has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Sakshi Patil· Nov 23, 2024
Keeps context tight: pymol is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Mateo Gupta· Nov 23, 2024
pymol reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Mateo Jain· Nov 15, 2024
I recommend pymol for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
showing 1-10 of 57