py3Dmol
Skill6 starsChanged 9 months agoMITView on GitHub
Use when creating 3D molecular visualizations with py3Dmol (3Dmol.js). Covers PDB/SDF/SMILES loading, cartoon/stick/sphere styles, protein-ligand complexes, docking pose viewers, selection language, PNG/HTML export, and NGLview for MD trajectories.
In this repository27 other files it gives its agents.
- config/CLAUDE.mdCLAUDE.md
- active-learningSkill
- aseSkill
- binding-kineticsSkill
- chem-brainstormSkill
- coarse-grainedSkill
- daylight-theorySkill
- deepchemSkill
- dockingSkill
- fbddSkill
- force-fieldsSkill
- free-energySkill
- generative-designSkill
- homology-modelingSkill
- lit-rescueSkill
- mdanalysisSkill
- mmpaSkill
- nextflowSkill
- openbabelSkill
- organic-mechanismsSkill
- pepflexSkill
- pharmacophoreSkill
- qm-dftSkill
- rdkitSkill
- synkitSkill
- torchdrugSkill
- uncertainty-qsarSkill
The file
Files
py3Dmol — Molecular Visualization
Purpose
Interactive 3D molecular visualization in Jupyter notebooks and scripts. Wraps 3Dmol.js (WebGL). Used for docking pose inspection, protein-ligand complexes, conformer overlays, trajectory snapshots.
When to Use This Skill
- Visualizing docking poses from Vina/Gnina
- Inspecting protein-ligand binding pockets
- Displaying conformer ensembles
- Annotating pharmacophore features on 3D structures
- Quick structure QC after homology modeling or MD prep
Reference Files
| File | Content |
references/basics.md | Installation, view creation, loading PDB/SDF/SMILES, stick/sphere/cartoon/surface basics |
references/protein-ligand.md | Protein+ligand display, binding pocket zoom, dual-structure overlay, docking pose batch |
references/selections-styles.md | Selection language (chain/resi/resn/atom), color schemes, surfaces, labels, transparency |
references/jupyter-patterns.md | Jupyter embed, ipywidgets sliders, NGLview alternative, saving PNG, RDKit interop |
Quick Routing
"Show me a docking pose" → protein-ligand.md
"Show all conformers overlaid" → jupyter-patterns.md (animation loop)
"Highlight binding pocket / surface" → selections-styles.md
"I just need a quick look at a molecule" → basics.md
Minimal Pattern
import py3Dmol
view = py3Dmol.view(width=800, height=500)
view.addModel(open('complex.pdb').read(), 'pdb')
view.setStyle({'cartoon': {'color': 'spectrum'}}) # protein
view.setStyle({'resn': 'LIG'}, {'stick': {'colorscheme': 'greenCarbon'}})
view.zoomTo({'resn': 'LIG'})
view.show()Key Facts
py3Dmolrenders via 3Dmol.js in Jupyter — requires a running notebook kernel- For non-Jupyter contexts: use
view.png()→ base64 PNG, orview.write_html() - NGLview is an alternative with better trajectory support (use for MD)
setStyleis cumulative by default; usesetStyle({}, {})to reset all- Ligand residue name varies: 'LIG', 'UNL', 'MOL' — check with grep before scripting
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

