Pymol logo

Pymol

Organization
ai4protein
pymol

Headless PyMOL rendering of protein structures (PNG + PSE session) and structural superposition with RMSD. Use to produce static publication-style images, color a structure by pLDDT/B-factor/chain/secondary-structure, or compare two structures by cealign. Do NOT use for interactive 3D exploration (use MolstarViewer in the frontend), docking, MD simulation, or sequence-only analysis.

Overview

Publisherai4protein
RepositoryVenusFactory2
Skill namepymol
Stars
255
Forks
37
Bundled files
2
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ai4protein on GitHub. Read the source before you install it.

Installation

Install the Pymol AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ai4protein/VenusFactory2/tree/main/src/agent/skills/pymol
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ai4protein/VenusFactory2.git /tmp/VenusFactory2
mkdir -p .claude/skills
cp -r /tmp/VenusFactory2/src/agent/skills/pymol .claude/skills/pymol
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pymol in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Pymol on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Pymol is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

PyMOL Headless Rendering

Overview

Two exposed agent tools drive an OSMesa-rendered PyMOL subprocess — no GPU, no X server. Each call writes a PNG image and a .pse session file to disk; the agent only sees {file_path, metadata} in the response, never raw image bytes.

This skill complements VenusFactory's interactive MolstarViewer in the frontend: use Molstar when the user is exploring a structure live, use PyMOL when you need a reproducible static image for a report.

Prerequisites

PyMOL must be on the host's PATH. Verify with pymol -V. If missing, install via:

  • conda (preferred): conda install -n venus -c conda-forge pymol-open-source
  • pip: pip install pymol-open-source-whl (requires Python 3.10 ≤ x < 3.13)

When PyMOL is missing, the tools return {status: "error", error: {type: "DependencyMissing", message: "<install hint>"}} — surface the install command to the user instead of trying anything else.

Project Tools (VenusFactory2)

ToolArgsReturnsDescription
render_protein_structurepdb_path (required), out_dir (required), color_by (default "plddt"; one of plddt | bfactor | chain | ss), width (default 1200), height (default 900), dpi (default 150), timeout_secs (default 300)JSON: {status, file_info {file_path -> <stem>_<color>.png}, content_preview (pymol stdout), biological_metadata {input_structure, color_by, png_path, pse_path, image_dimensions}}Cartoon-render a single structure with one of four coloring strategies.
superpose_two_structurespdb_a (mobile, required), pdb_b (reference, required), out_dir (required), width/height/dpi/timeout_secs (same defaults)JSON: {status, file_info {file_path -> superpose_<a>_to_<b>.png}, biological_metadata {mobile, reference, rmsd_angstroms, aligned_residues, png_path, pse_path}}Align pdb_a onto pdb_b via cealign (auto-fallback to align), render the superposition, report RMSD.

Coloring Strategies

color_byUse for
plddt (default)AlphaFold predictions — B-factor column = pLDDT, spectrum red↔blue at 50-100
bfactorExperimental structures — generic B-factor coloring
chainMulti-chain complexes — one color per chain
ssHighlight helix (green) / sheet (yellow) / loop (gray)

When to Use This Skill

  • User asks "show me the structure", "render it", "make an image", "compare these two structures"
  • Building a report or visualization that needs a static image
  • After running an AlphaFold prediction or downloading a PDB, you want to visualize the result
  • Comparing predicted vs. experimental structure → superpose_two_structures

When NOT to Use

  • User wants to spin / zoom / click on the structure → use the frontend MolstarViewer instead
  • Docking / molecular dynamics → out of scope, recommend other tools
  • Sequence-only operation → use sequence skills (uniprot, ncbi_sequence_fetch, etc.)
  • Animated movies → not exposed; the underlying PyMOL supports it but no agent tool surfaces it

Output Files

Each run produces two files in out_dir:

  • *.png — the static image (returned in file_info.file_path).
  • *.pse — a PyMOL session file. Tell the user they can open it locally in PyMOL to continue exploring.

Rate / Cost

PyMOL runs locally; no network. Typical render is 5-30 seconds per structure. Default timeout is 5 min — increase timeout_secs for very large complexes or surfaces.

Common Mistakes

  • Passing a sequence instead of a structure file → ValidationError: empty pdb_path or NotFound. Download the structure first (e.g., download_alphafold_structure_by_uniprot_id or download_rcsb_structure_by_pdb_id).
  • Invalid color_by → ValidationError listing the four allowed values.
  • PyMOL not installed → DependencyMissing with the install command. Show the user — don't silently fall back.
  • Trying to render very large complexes (>1 M atoms) with surface at high DPI → can time out. Drop dpi to 100 or increase timeout_secs.

References

  • references/PYMOL_REFERENCE.md — selection syntax, common commands, gotchas (copied verbatim from google-deepmind/science-skills).
  • references/RECIPES.md — 15+ copy-paste PyMOL recipes for advanced visualizations beyond what the two exposed tools cover. Useful when the user wants something custom — produce a one-off script via the lower-level run_pymol_script (in src/tools/visualize/pymol/pymol_runner.py) and run it from the agent's code-execution tool.
  • PyMOL open-source homepage / PyMOL wiki

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Pymol AI skill do?

Headless PyMOL rendering of protein structures (PNG + PSE session) and structural superposition with RMSD. Use to produce static publication-style images, color a structure by pLDDT/B-factor/chain/secondary-structure, or compare two structures by cealign. Do NOT use for interactive 3D exploration (use MolstarViewer in the frontend), docking, MD simulation, or sequence-only analysis.

Why use Pymol on TypingMind?

Because you install it once and use it with any model. Pymol is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Pymol in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ai4protein/VenusFactory2/tree/main/src/agent/skills/pymol. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Pymol?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Pymol?

As many as you like. As long as a model supports skills, you can use Pymol with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Pymol AI skill free?

It is published on GitHub by ai4protein. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇