
Rdkit
Give your coding agent accurate RDKit Python API patterns when parsing SMILES, SMARTS, MOL/PDB files, or computing molecular descriptors in cheminformatics workflows.
Overview
RDKit is an agent skill for the Build phase that supplies a structured Python API reference for molecule parsing, serialization, and core rdkit.Chem operations in cheminformatics backends.
Install
npx skills add https://github.com/k-dense-ai/scientific-agent-skills --skill rdkitWhat is this skill?
- Documents core rdkit.Chem molecule I/O: MolFromSmiles, MolFromSmarts, MolFromMolFile, PDB/InChI, and symmetric MolTo* wr
- Covers parsing MOL blocks, MOL2, PDB blocks, and peptide sequences via MolFromSequence
- Organized API reference by functionality for agents implementing structure-based workflows
- SMILES/SMARTS canonical and isomeric export options for downstream tooling
- Sanitize and removeHs flags called out consistently across readers
Adoption & trust: 513 installs on skills.sh; 27.6k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You are building a chemistry or bioinformatics feature and need correct RDKit function names and I/O options without guessing from outdated blog snippets.
Who is it for?
Indie builders wiring RDKit into Python agents, batch CLIs, or FastAPI services that ingest chemical structures from files or strings.
Skip if: Teams that only need high-level drug-discovery strategy, non-Python stacks, or production ML deployment runbooks without touching molecular graphs.
When should I use this skill?
Implementing Python cheminformatics code that reads or writes molecular structures with RDKit.
What do I get? / Deliverables
Your agent emits valid RDKit Chem calls for SMILES/SMARTS/MOL/PDB/InChI workflows aligned with the documented sanitize and stereochemistry parameters.
- Correct RDKit Chem API usage in Python modules or notebooks
- Consistent molecule I/O (SMILES, SMARTS, MOL, PDB, InChI) in agent-generated code
Recommended Skills
Journey fit
Cheminformatics implementation—reading/writing molecules and running Chem APIs—happens while building scientific or drug-discovery backends and data pipelines. Backend is the canonical shelf because the skill is a Python API reference for molecule I/O and Chem module operations, not frontend or launch work.
How it compares
Use as a procedural API crib sheet inside the agent—not as a hosted cheminformatics MCP server or a one-click molecule viewer integration.
Common Questions / FAQ
Who is rdkit for?
Solo and small-team developers building scientific agents, chemistry data pipelines, or research tooling in Python who need reliable RDKit Chem API usage.
When should I use rdkit?
During Build backend work when implementing SMILES/SMARTS parsing, structure file I/O, or molecule object handling before descriptors, docking prep, or ML featurization.
Is rdkit safe to install?
Review the Security Audits panel on this Prism skill page and inspect the skill package in your repo before granting agent filesystem or shell access.
SKILL.md
READMESKILL.md - Rdkit
# RDKit API Reference This document provides a comprehensive reference for RDKit's Python API, organized by functionality. ## Core Module: rdkit.Chem The fundamental module for working with molecules. ### Molecule I/O **Reading Molecules:** - `Chem.MolFromSmiles(smiles, sanitize=True)` - Parse SMILES string - `Chem.MolFromSmarts(smarts)` - Parse SMARTS pattern - `Chem.MolFromMolFile(filename, sanitize=True, removeHs=True)` - Read MOL file - `Chem.MolFromMolBlock(molblock, sanitize=True, removeHs=True)` - Parse MOL block string - `Chem.MolFromMol2File(filename, sanitize=True, removeHs=True)` - Read MOL2 file - `Chem.MolFromMol2Block(molblock, sanitize=True, removeHs=True)` - Parse MOL2 block - `Chem.MolFromPDBFile(filename, sanitize=True, removeHs=True)` - Read PDB file - `Chem.MolFromPDBBlock(pdbblock, sanitize=True, removeHs=True)` - Parse PDB block - `Chem.MolFromInchi(inchi, sanitize=True, removeHs=True)` - Parse InChI string - `Chem.MolFromSequence(seq, sanitize=True)` - Create molecule from peptide sequence **Writing Molecules:** - `Chem.MolToSmiles(mol, isomericSmiles=True, canonical=True)` - Convert to SMILES - `Chem.MolToSmarts(mol, isomericSmarts=False)` - Convert to SMARTS - `Chem.MolToMolBlock(mol, includeStereo=True, confId=-1)` - Convert to MOL block - `Chem.MolToMolFile(mol, filename, includeStereo=True, confId=-1)` - Write MOL file - `Chem.MolToPDBBlock(mol, confId=-1)` - Convert to PDB block - `Chem.MolToPDBFile(mol, filename, confId=-1)` - Write PDB file - `Chem.MolToInchi(mol, options='')` - Convert to InChI - `Chem.MolToInchiKey(mol, options='')` - Generate InChI key - `Chem.MolToSequence(mol)` - Convert to peptide sequence **Batch I/O:** - `Chem.SDMolSupplier(filename, sanitize=True, removeHs=True)` - SDF file reader - `Chem.ForwardSDMolSupplier(fileobj, sanitize=True, removeHs=True)` - Forward-only SDF reader - `Chem.MultithreadedSDMolSupplier(filename, numWriterThreads=1)` - Parallel SDF reader - `Chem.SmilesMolSupplier(filename, delimiter=' ', titleLine=True)` - SMILES file reader - `Chem.SDWriter(filename)` - SDF file writer - `Chem.SmilesWriter(filename, delimiter=' ', includeHeader=True)` - SMILES file writer ### Molecular Manipulation **Sanitization:** - `Chem.SanitizeMol(mol, sanitizeOps=SANITIZE_ALL, catchErrors=False)` - Sanitize molecule - `Chem.DetectChemistryProblems(mol, sanitizeOps=SANITIZE_ALL)` - Detect sanitization issues - `Chem.AssignStereochemistry(mol, cleanIt=True, force=False)` - Assign stereochemistry - `Chem.FindPotentialStereo(mol)` - Find potential stereocenters - `Chem.AssignStereochemistryFrom3D(mol, confId=-1)` - Assign stereo from 3D coords **Hydrogen Management:** - `Chem.AddHs(mol, explicitOnly=False, addCoords=False)` - Add explicit hydrogens - `Chem.RemoveHs(mol, implicitOnly=False, updateExplicitCount=False)` - Remove hydrogens - `Chem.RemoveAllHs(mol)` - Remove all hydrogens **Aromaticity:** - `Chem.SetAromaticity(mol, model=AROMATICITY_RDKIT)` - Set aromaticity model - `Chem.Kekulize(mol, clearAromaticFlags=False)` - Kekulize aromatic bonds - `Chem.SetConjugation(mol)` - Set conjugation flags **Fragments:** - `Chem.GetMolFrags(mol, asMols=False, sanitizeFrags=True)` - Get disconnected fragments - `Chem.FragmentOnBonds(mol, bondIndices, addDummies=True)` - Fragment on specific bonds - `Chem.ReplaceSubstructs(mol, query, replacement, replaceAll=False)` - Replace substructures - `Chem.DeleteSubstructs(mol, query, onlyFrags=False)` - Delete substructures **Stereochemistry:** - `Chem.FindMolChiralCenters(mol, includeUnassigned=False, useLegacyImplementation=False)` - Find chiral centers - `Chem.FindPotentialStereo(mol, cleanIt=True)` - Find potential stereocenters ### Substructure Searching **Basic Matching:** - `mol.HasSubstructMatch(query, useChirality=False)` - Check for substructure match - `mol.GetSubstructMatch(query, useChirality=False)` - Get first match - `mol.GetSubstructMatches(query, uniquify=True, useChirality=False)` - Get all matches -