一键导入
publication-figures
Use when creating publication-quality molecular figures with proper styling, ray tracing, and export settings through PyMOL.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when creating publication-quality molecular figures with proper styling, ray tracing, and export settings through PyMOL.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when working with PyMOL for molecular visualization tasks including loading structures, creating representations, coloring, selections, and basic analysis.
Use when connecting Claude to PyMOL, troubleshooting socket errors, or setting up the PyMOL integration for the first time
Use when setting up, configuring, running, or inspecting La-Proteina protein generation tasks including unconditional design and motif scaffolding. Helps build configs and visualize outputs through PyMOL.
Use when setting up, configuring, running, or inspecting Proteina-Complexa protein binder design, ligand binder design, AME motif scaffolding, or monomer motif scaffolding. Helps build configs, select targets, and visualize outputs through PyMOL.
Use when validating protein designs with AlphaFold2/AlphaFold3/ESMFold predictions, coloring by pLDDT or pAE, computing self-consistency RMSD, or screening design candidates through PyMOL.
Use when comparing multiple protein designs, ranking design candidates, tracking design iterations, overlaying before/after structures, or performing batch visual QC through PyMOL.
| name | publication-figures |
| description | Use when creating publication-quality molecular figures with proper styling, ray tracing, and export settings through PyMOL. |
| version | 0.1.0 |
Settings and workflows for creating journal-quality molecular visualizations.
Send all
cmd.*code via:~/.pymol-agent-bridge/bin/pymol-agent-bridge exec "..."(or heredoc for multi-line). See @pymol-fundamentals for details.
cmd.bg_color("white")
cmd.set("ray_opaque_background", 1)
cmd.set("ray_opaque_background", 0)
cmd.bg_color("white") # For preview
# PNG will have transparent background
cmd.set("antialias", 2) # 0=off, 1=fast, 2=quality
# Clean, even lighting
cmd.set("direct", 0.5) # Direct light intensity
cmd.set("spec_reflect", 0.5) # Specular reflection
cmd.set("ambient", 0.4) # Ambient light
# For clean diagrams (no shadows)
cmd.set("ray_shadows", 0)
cmd.set("depth_cue", 0)
# For 3D effect (with shadows)
cmd.set("ray_shadows", 1)
cmd.set("ray_shadow_decay_factor", 0.1)
cmd.set("depth_cue", 1)
cmd.set("cartoon_fancy_helices", 1)
cmd.set("cartoon_smooth_loops", 1)
cmd.set("cartoon_flat_sheets", 1)
cmd.set("cartoon_cylindrical_helices", 1)
cmd.set("cartoon_tube_radius", 0.3)
cmd.set("cartoon_loop_radius", 0.3)
cmd.set("stick_radius", 0.15)
cmd.set("stick_ball", 1)
cmd.set("stick_ball_ratio", 1.5)
cmd.set("surface_quality", 1) # Higher = smoother
cmd.set("transparency", 0.5)
cmd.set("surface_color", "white")
cmd.viewport(1200, 900) # 4:3 aspect
cmd.viewport(1600, 900) # 16:9 aspect
| Use Case | Resolution | DPI |
|---|---|---|
| Web/slides | 1200x900 | 72-150 |
| Journal (1 col) | 1200x1200 | 300 |
| Journal (2 col) | 2400x1200 | 300 |
| Poster | 3000x2000 | 300 |
cmd.draw(1200, 900) # OpenGL render, fast
cmd.ray(1200, 900) # High quality, slower
cmd.set("ray_trace_mode", 1) # 0=normal, 1=color-only, 3=quantized
cmd.set("ray_trace_gain", 0.1) # Edge detection
# After ray tracing
cmd.ray(1200, 900)
cmd.png("/path/to/image.png", dpi=300)
# Without ray (faster, lower quality)
cmd.draw(1200, 900)
cmd.png("/path/to/image.png", dpi=150)
# Ray trace then save
cmd.ray(2400, 1800)
cmd.png("/path/to/figure.png", dpi=300)
cmd.scene("panel_A", "store", message="Overview")
cmd.scene("panel_B", "store", message="Active site")
cmd.scene("panel_C", "store", message="Close-up")
for panel in ["panel_A", "panel_B", "panel_C"]:
cmd.scene(panel, "recall")
cmd.ray(1200, 900)
cmd.png("/path/to/" + panel + ".png", dpi=300)
# 1. Load and style
cmd.fetch("1ubq")
cmd.show("cartoon")
cmd.hide("lines")
cmd.dss()
cmd.color("green", "ss h")
cmd.color("yellow", "ss s")
cmd.color("cyan", "ss l+")
# 2. Publication settings
cmd.bg_color("white")
cmd.set("ray_opaque_background", 1)
cmd.set("antialias", 2)
cmd.set("cartoon_fancy_helices", 1)
cmd.set("ray_shadows", 0)
cmd.set("depth_cue", 0)
# 3. View
cmd.orient()
cmd.zoom("all", 2)
# 4. Export
cmd.ray(2400, 1800)
cmd.png("/path/to/figure.png", dpi=300)
# Set up views
cmd.orient()
cmd.scene("overview", "store")
cmd.zoom("resi 45-50", 5)
cmd.scene("detail", "store")
# Export each
import os
output_dir = os.path.expanduser("~/Desktop")
for scene in ["overview", "detail"]:
cmd.scene(scene, "recall")
cmd.ray(1200, 900)
cmd.png(output_dir + "/" + scene + ".png", dpi=300)
# Blue/Orange (safe)
cmd.color("marine", "chain A")
cmd.color("orange", "chain B")
# Teal/Coral
cmd.color("teal", "chain A")
cmd.color("salmon", "chain B")
# Secondary structure
cmd.color("red", "ss h") # Helices
cmd.color("yellow", "ss s") # Sheets
cmd.color("green", "ss l+") # Loops
# By chain
cmd.do("util.cbc")
draw for previewscmd.remove("solvent") before making figures (removes water clutter)cmd.ray(w, h) then cmd.png(path) — never pass dimensions to cmd.png() (causes view corruption)cmd.set("specular", 0.2) for subtle shine without glare