Loading...
Loading...
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.
npx skill4agent add google-deepmind/science-skills pymoluvuvuvuvuvuv runpymol-open-source-whlcmd.png()cmd.draw()cmd.ray()PYOPENGL_PLATFORM=osmesa.psecmd.quit()from pymol import cmdfinish_launching()cmd.load()cmd.count_atoms("all")cmd.quit()render.pyuv runbash uv run render.pyrender.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().pseoutput/.pse.pse.pse--max_output_mb--max_output_mb=1000