mol-blender
https://github.com/user-attachments/assets/5ff92e61-912d-43a7-a87a-27d307a7ba9a
If you're tired of seeing AI slop proteins on social media, with branching chains
and loopy salad wrapped around them, start with an actual structure and give it a
look you like.
mol-blender turns your protein, DNA or RNA structure into polished images and
animations using Blender and Molecular Nodes. The molecular geometry comes from
your structure file, while you choose the colors, materials, lighting and camera.
Use the render as a finished figure, or bring it into the AI image generator of
your choice to make an illustration you love, starting from your actual protein
structure. To preserve the protein's geometry, keep the rendered protein intact
and let AI build the scene around it. If the generator redraws the protein, check
it against the original render.
Start with one of the 17 built-in presets, from soft pastel
ribbons to frosted surfaces and vivid binding-site views. If you have a PNG with a
style you love, the recreate-render-preset skill can use it
as a visual reference, refine the look through local previews and save a reusable
preset for your structures. Made a preset you love? Share it with the community
by opening a pull request!
Work from PyMOL or the command line, or ask Claude Code or Codex to run the same
local tools for you. Export a transparent PNG for a slide or paper, save an editable
Blender scene, or use molblender-studio's six animation recipes to rotate your
structure, reveal a binding site or play through supplied molecular states.
Optional local MCP tools connect compatible assistants to the renderer. An
optional shared cluster server lets users submit from
PyMOL to Slurm and Apptainer using the same renderer and uv-managed runtime.
Installation does not start or deploy a server.
See the documentation index for installation routes, user guides,
advanced setup and developer reference.
Install and configure
Want your AI agent to handle installation? Give it this repository and ask it to
follow the setup instructions in AGENTS.md.
Tell it whether you want co-PyMOL to control a live
PyMOL session or molblender-studio in Claude for the
Claude plugin. For example:
Follow AGENTS.md to install co-PyMOL for Codex and verify the connection.
If your lab already has a renderer, point your agent to the
cluster connection instructions.
Use Python 3.11 (matching Blender's Python ABI):
uv sync --locked --extra dev --extra mcp
source .venv/bin/activate
Omit mcp if you only need the CLI/PyMOL bridge. Rendering requires the versions in
mol_blender/runtime.lock.json: Blender 5.0.1, Molecular Nodes 4.5.10, NumPy
1.26.4 and Biotite 1.6.0, plus the pinned CCD database. PyMOL file import uses a
separate interpreter with pymol2; an existing PyMOL environment is suitable.
For isolated Studio environments and a Linux rebuild from the same pins, see
runtime setup. Installations are explicit and
never triggered by viewing a structure.
To install the pinned Blender runtime into user-owned storage on Apple Silicon
macOS or Linux x86_64 (downloads Blender and Python dependencies):
mol-blender setup --install-runtime --pymol-python /path/to/pymol/python
To keep Blender, its dependencies and configuration inside this checkout, set the
configuration root before running setup:
export MOL_BLENDER_HOME="$PWD/.runtime"
mol-blender setup --install-runtime --pymol-python /path/to/pymol/python
That installs Blender at .runtime/runtime/Blender.app on Apple Silicon macOS.
Keep MOL_BLENDER_HOME set when rendering or starting MCP so the same local
configuration is used. .runtime/ is excluded from Git.
Or configure an existing runtime without installing anything:
mol-blender setup \
--blender /path/to/blender \
--pymol-python /path/to/pymol/python \
--runtime-path /path/to/python3.11/site-packages \
--runtime-path /path/to/extensions/blender_org \
--ccd /path/to/biotite/structure/info/components.bcif
mol-blender doctor
Each --runtime-path must be an existing directory supplying the pinned rendering
dependencies. If using a Molecular Nodes extension with bundled wheels, add
--runtime-wheels /path/to/molecularnodes/wheels; these are extracted into each
isolated render environment. The dependency directories must include jsonschema.
setup saves configuration; doctor is read-only. A successful render verifies
source hashes, runtime versions and the CCD digest before reporting completion.
Configuration lives in ~/.config/mol-blender/config.json; set
MOL_BLENDER_HOME to use a separate configuration directory.
Render locally