Publication-quality molecular visualization. 2D structure drawings (PNG/SVG), molecule grids with property annotations, scaffold highlighting, protein-ligand interaction diagrams, and interactive 3D views.
66
83%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Generate publication-quality molecular images for drug discovery, medicinal chemistry, and computational chemistry workflows. This skill provides a comprehensive suite of tools for rendering 2D structural drawings, annotated molecule grids, scaffold decomposition views, protein-ligand interaction diagrams, and interactive 3D molecular viewers.
All scripts require Python 3.8+ and the following packages:
# Core (required for all scripts)
pip install rdkit-pypi pillow matplotlib
# For protein-ligand interaction diagrams
pip install biopython
# For 3D interactive views
pip install py3Dmol
# Full installation
pip install rdkit-pypi pillow matplotlib biopython py3Dmolscripts/draw_2d.py)Render a single molecule as a high-quality PNG or SVG image.
# Basic usage
python scripts/draw_2d.py --smiles "c1ccccc1" --output benzene.png
# With atom highlighting and title
python scripts/draw_2d.py \
--smiles "CC(=O)Oc1ccccc1C(=O)O" \
--output aspirin.svg \
--title "Aspirin" \
--highlight-atoms 0,1,2,3 \
--highlight-color "#4A90D9"
# Show atom indices for reference
python scripts/draw_2d.py \
--smiles "c1ccc(NC(=O)c2ccccc2)cc1" \
--output benzanilide.png \
--show-atom-indices \
--size 600x400scripts/draw_grid.py)Compare multiple molecules in a grid layout with optional property annotations.
# From CSV file
python scripts/draw_grid.py \
--input compounds.csv \
--output grid.png \
--cols 4 \
--properties "qed,mw,logp"
# From comma-separated SMILES
python scripts/draw_grid.py \
--input "c1ccccc1,c1ccncc1,c1ccoc1" \
--output ring_comparison.png \
--title "Aromatic Ring Comparison"scripts/draw_scaffold.py)Decompose molecules into scaffolds and R-groups for SAR analysis.
# Manual scaffold specification
python scripts/draw_scaffold.py \
--smiles "c1ccc(NC(=O)c2ccccc2Cl)cc1" \
--scaffold "c1ccc(NC(=O)c2ccccc2)cc1" \
--output scaffold.png
# Automatic Murcko scaffold detection
python scripts/draw_scaffold.py \
--smiles "CC(=O)Oc1ccccc1C(=O)O" \
--scaffold auto \
--output murcko.png
# R-group decomposition across analogs
python scripts/draw_scaffold.py \
--smiles "c1ccc(NC(=O)c2ccccc2)cc1" \
--scaffold "c1ccc(NC(=O)c2ccccc2)cc1" \
--analogs analogs.csv \
--output rgroup_table.pngscripts/draw_interactions.py)Generate 2D interaction diagrams from protein-ligand complexes.
python scripts/draw_interactions.py \
--protein receptor.pdb \
--ligand ligand.sdf \
--output interactions.png \
--distance-cutoff 4.0scripts/render_3d.py)Create self-contained HTML files with interactive 3D molecular viewers.
# Protein with cartoon representation
python scripts/render_3d.py \
--input protein.pdb \
--output view.html \
--style cartoon \
--color chain
# Protein-ligand complex
python scripts/render_3d.py \
--input protein.pdb \
--ligand ligand.sdf \
--output complex.html \
--style cartoonscripts/render_3d.py --mode pockets)Visualize detected binding pockets as colored spheres on the protein surface. Sphere color indicates druggability: green (>0.7), orange (0.4-0.7), red (<0.4). Sphere size is proportional to pocket volume.
# After pocket-detection/detect.py or druggability.py
python scripts/render_3d.py \
--input protein.pdb \
--pockets druggability.json \
--mode pockets \
--output pocket_view.html
# With specific residues highlighted
python scripts/render_3d.py \
--input protein.pdb \
--pockets pockets.json \
--mode pockets \
--highlight-residues "189,195,57" \
--output pocket_view.htmlscripts/render_3d.py --mode docking-results)Overlay top docked poses on the protein, colored by rank (green = best, red = worst). The top-ranked pose gets a translucent surface highlight.
# After molecular-docking/dock.py
python scripts/render_3d.py \
--input protein.pdb \
--poses dock_results/poses.sdf \
--mode docking-results \
--top-n 5 \
--output docking_results.html| Script | Purpose | Key Inputs |
|---|---|---|
draw_2d.py | Single molecule 2D drawing | SMILES, output path |
draw_grid.py | Multi-molecule grid | CSV or SMILES list, output path |
draw_scaffold.py | Scaffold and R-group analysis | SMILES, scaffold, output path |
draw_interactions.py | Protein-ligand interactions | PDB, SDF, output path |
render_3d.py | Interactive 3D viewer | PDB/SDF/SMILES, output HTML |
See references/style_guide.md for detailed guidance on:
synthetic-sciences/openscience
6a85742
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.