Molecular 3D Renderer
v1.0.0Generate high-quality 3D ball-and-stick molecular renderings from SMILES strings or PDB structures using POV-Ray ray tracing.
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
The name/description (POV‑Ray molecular renderer) matches the declared binaries (povray, python3), pip deps (rdkit, numpy, optional biopython) and the included scripts. The code implements SMILES→3D and PDB parsing/rendering logic that justifies the dependencies.
Instruction Scope
SKILL.md and the scripts limit actions to parsing SMILES/PDB, optionally downloading PDB files from RCSB (files.rcsb.org), generating POV‑Ray scene files, and invoking povray to render PNGs. There are no instructions to read unrelated config, environment secrets, or to transmit results to any unexpected external endpoint.
Install Mechanism
This is instruction-only (no package download/install spec). SKILL.md suggests pip installs and apt-get for povray, which is a normal, proportional approach. Nothing is pulled from obscure URLs and the included source is plain Python (not obfuscated).
Credentials
The skill declares no required environment variables or credentials. The code does not access environment secrets or unrelated config paths; it uses temporary files and downloads PDBs from the public RCSB site, which is expected for PDB mode.
Persistence & Privilege
always:false and default autonomous invocation are used. The skill does not attempt to modify other skills or system-wide agent configs. It writes temporary files (PDB cache, POV scene, output PNG) which is normal for a renderer.
Assessment
This skill appears to do what it claims: convert SMILES or PDBs into POV‑Ray scenes and render PNGs. Before installing/running: (1) be aware it will invoke the system povray binary and pip packages (rdkit can be nontrivial to install; many environments prefer conda), (2) it will download PDB files from files.rcsb.org when given a PDB ID (network access required), and (3) it will write temp files and spawn subprocesses to run povray. If you are installing this on a sensitive host, run it in an isolated environment (container/VM) and ensure you trust the povray/rdkit packages you install. If you want extra assurance, you can review the full scripts (they are included) or run them on local sample inputs first.Like a lobster shell, security has layers — review code before you run it.
Runtime requirements
🧪 Clawdis
Binspovray, python3
latest
mol-render
Generate high-quality 3D ball-and-stick model PNG images from SMILES strings or PDB structures, rendered with POV-Ray ray tracing.
Dependencies
Required:
- rdkit — SMILES parsing & 3D conformer generation
- numpy — coordinate transforms
- povray — ray tracing renderer
Optional (PDB mode only):
- biopython — PDB file parsing
Install:
pip install rdkit numpy
apt-get install -y povray
# For PDB support:
pip install biopython
Usage
SMILES Mode
python3 scripts/smiles_to_3d.py "SMILES" -o output.png
Arguments:
SMILES— (positional) SMILES string (required)-o,--output— output PNG path (default:molecule.png)--bg— background color:black/white/blue(default:blue)--no-hydrogen— hide hydrogen atoms--kekulize— convert aromatic bonds to alternating single/double bonds
Examples:
# Ethanol
python3 scripts/smiles_to_3d.py "CCO" -o ethanol.png
# Benzene (white background, Kekulé style)
python3 scripts/smiles_to_3d.py "c1ccccc1" -o benzene.png --bg white --kekulize
# Caffeine
python3 scripts/smiles_to_3d.py "CN1C=NC2=C1C(=O)N(C(=O)N2C)C" -o caffeine.png
# Aspirin (no hydrogens)
python3 scripts/smiles_to_3d.py "CC(=O)OC1=CC=CC=C1C(=O)O" -o aspirin.png --no-hydrogen
PDB Mode
python3 scripts/pdb_to_3d.py --pdb <PDB_ID_or_file> -o output.png
Arguments:
--pdb— PDB file path or 4-character PDB ID (auto-downloads from RCSB) (required)-o,--output— output PNG path (default:pdb_molecule.png)--chain— select specific chain (e.g.,A)--residues— residue range (e.g.,1-50or10,20,30-40)--ligand-only— render only ligands (HETATM, excluding water)--no-hydrogen— hide hydrogen atoms--no-water/--keep-water— filter/keep water molecules (default: filter)--bg— background color:black/white/blue(default:blue)--view— viewing angle:auto/side/top/frontorθ,φin degrees (default:auto)--resolution— resolution multiplier, e.g.,0.5for half,2.0for double (default:1.0)--sphere-scale— override sphere scale factor (default: auto)--bond-radius— override bond radius (default: auto)
Examples:
# Download and render G-quadruplex from RCSB
python3 scripts/pdb_to_3d.py --pdb 1KF1 --no-hydrogen -o g4.png
# Side view
python3 scripts/pdb_to_3d.py --pdb 1KF1 --no-hydrogen --view side -o g4_side.png
# Ligands only
python3 scripts/pdb_to_3d.py --pdb 1KF1 --ligand-only -o ligands.png
# Specific chain and residues
python3 scripts/pdb_to_3d.py --pdb 1KF1 --chain A --residues 1-12 -o partial.png
# Local PDB file
python3 scripts/pdb_to_3d.py --pdb structure.pdb -o out.png
# Large protein at lower resolution
python3 scripts/pdb_to_3d.py --pdb 2HYY --no-hydrogen --resolution 0.5 -o protein.png
Output
- 1200×1200 PNG with POV-Ray ray tracing
- CPK color scheme (C=dark gray, O=red, N=blue, H=white, P=orange, S=yellow, K=purple, ...)
- Aromatic bonds rendered as solid + dashed lines (SMILES mode)
- Double bonds rendered as two parallel solid lines
--kekulizeoption converts aromatic bonds to alternating single/double- Metal ions displayed with ionic radius (large spheres), no coordination bonds drawn
- Auto-selects best viewing angle (PCA-based)
- Auto-scales sphere/bond sizes for large molecules
- Water molecules filtered by default (PDB mode)
Known Limitations
- Very large molecules (>2000 atoms) may be slow to render (use
--resolution 0.5) - PDB mode renders all bonds as single bonds (no double/aromatic distinction)
- Metal coordination bonds are not rendered
- POV-Ray must be installed (
which povray) biopythonrequired only for PDB mode (optional dependency)
License
MIT
Comments
Loading comments...
