rdkit-chemistry
Molecular chemistry operations via RDKit. Use when: user asks about molecular structures, SMILES, chemical properties, or fingerprints. NOT for: reaction databases or wet lab protocols.
Best use case
rdkit-chemistry is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Molecular chemistry operations via RDKit. Use when: user asks about molecular structures, SMILES, chemical properties, or fingerprints. NOT for: reaction databases or wet lab protocols.
Teams using rdkit-chemistry should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/rdkit-chemistry/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How rdkit-chemistry Compares
| Feature / Agent | rdkit-chemistry | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Molecular chemistry operations via RDKit. Use when: user asks about molecular structures, SMILES, chemical properties, or fingerprints. NOT for: reaction databases or wet lab protocols.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# RDKit Chemistry
Molecular chemistry operations using RDKit.
## When to Use
- Molecular structures, SMILES parsing, or validation
- Molecular properties (MW, logP, TPSA, HBD/HBA)
- Substructure searching or molecular filtering
- Fingerprints (Morgan, MACCS) and similarity calculations
- 2D depiction or molecular image generation
## When NOT to Use
- Reaction databases or retrosynthesis planning
- Wet lab protocols or experimental procedures
- Protein structure analysis (use biopython-bio)
- Quantum chemistry or DFT calculations
## SMILES Parsing and Properties
```python
from rdkit import Chem
from rdkit.Chem import Descriptors, rdMolDescriptors
mol = Chem.MolFromSmiles('CC(=O)Oc1ccccc1C(=O)O') # Aspirin
if mol is None:
print("Invalid SMILES")
canonical = Chem.MolToSmiles(mol) # Canonical SMILES
mw = Descriptors.MolWt(mol) # Molecular weight
logp = Descriptors.MolLogP(mol) # Partition coefficient
tpsa = Descriptors.TPSA(mol) # Topological polar surface area
hbd = rdMolDescriptors.CalcNumHBD(mol) # H-bond donors
hba = rdMolDescriptors.CalcNumHBA(mol) # H-bond acceptors
rotatable = rdMolDescriptors.CalcNumRotatableBonds(mol)
# SMARTS substructure match
pattern = Chem.MolFromSmarts('[OH]')
has_oh = mol.HasSubstructMatch(pattern)
```
## Lipinski Rule of Five
```python
def lipinski(smi):
mol = Chem.MolFromSmiles(smi)
return {
'MW <= 500': Descriptors.MolWt(mol) <= 500,
'LogP <= 5': Descriptors.MolLogP(mol) <= 5,
'HBD <= 5': rdMolDescriptors.CalcNumHBD(mol) <= 5,
'HBA <= 10': rdMolDescriptors.CalcNumHBA(mol) <= 10,
}
```
## Substructure Search
```python
molecules = [Chem.MolFromSmiles(s) for s in ['CCO', 'CC(=O)O', 'c1ccccc1', 'c1ccccc1O']]
pattern = Chem.MolFromSmarts('c1ccccc1') # Benzene ring
hits = [m for m in molecules if m.HasSubstructMatch(pattern)]
```
## Fingerprints and Similarity
```python
from rdkit.Chem import AllChem, MACCSkeys
from rdkit import DataStructs
mol1 = Chem.MolFromSmiles('CC(=O)Oc1ccccc1C(=O)O')
mol2 = Chem.MolFromSmiles('CC(=O)Nc1ccc(O)cc1')
# Morgan (circular) fingerprints — radius 2 ~ ECFP4
fp1 = AllChem.GetMorganFingerprintAsBitVect(mol1, radius=2, nBits=2048)
fp2 = AllChem.GetMorganFingerprintAsBitVect(mol2, radius=2, nBits=2048)
# MACCS keys
mfp1 = MACCSkeys.GenMACCSKeys(mol1)
# Tanimoto / Dice similarity
tanimoto = DataStructs.TanimotoSimilarity(fp1, fp2)
dice = DataStructs.DiceSimilarity(fp1, fp2)
```
## 2D Depiction
```python
from rdkit.Chem import Draw
Draw.MolToFile(mol, 'molecule.png', size=(300, 300))
# Grid of molecules
mols = [Chem.MolFromSmiles(s) for s in ['CCO', 'CC(=O)O', 'c1ccccc1O']]
img = Draw.MolsToGridImage(mols, molsPerRow=3, subImgSize=(300, 300))
img.save('grid.png')
```
## Quick One-liner
```bash
python3 -c "
from rdkit import Chem; from rdkit.Chem import Descriptors
mol = Chem.MolFromSmiles('CCO')
print(f'MW: {Descriptors.MolWt(mol):.2f}, LogP: {Descriptors.MolLogP(mol):.2f}')
"
```
## Best Practices
1. Always check `MolFromSmiles()` return for `None` (invalid SMILES).
2. Use canonical SMILES for consistent comparisons.
3. Morgan radius=2 (ECFP4) is standard for similarity screening.
4. Sanitize molecules before property calculations.
5. Use `Chem.AddHs(mol)` before 3D coordinate generation.Related Skills
rdkit
Cheminformatics toolkit for fine-grained molecular control. SMILES/SDF parsing, descriptors (MW, LogP, TPSA), fingerprints, substructure search, 2D/3D generation, similarity, reactions. For standard workflows with simpler interface, use datamol (wrapper around RDKit). Use rdkit for advanced control, custom sanitization, specialized algorithms.
chemistry
No description provided.
chemistry-tools
Computational chemistry tools including molecular structure, chemical reactions, thermodynamics, spectroscopy analysis, and cheminformatics. Use when user works with chemical formulas, molecular structures, reaction balancing, thermodynamic calculations, or chemical databases (PubChem, ChemSpider). Triggers on "chemical structure", "molecular weight", "balance equation", "reaction", "thermodynamics", "spectroscopy", "SMILES", "PubChem", "chemical formula", "stoichiometry".
xurl
A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
xlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.
writing
No description provided.
world-bank-data
World Bank Open Data API for development indicators. Use when: user asks about GDP, population, poverty, health, or education statistics by country. NOT for: real-time financial data or stock prices.
wikipedia-search
Search and fetch structured content from Wikipedia using the MediaWiki API for reliable, encyclopedic information
wikidata-knowledge
Query Wikidata for structured knowledge using SPARQL and entity search. Use when: (1) finding structured facts about entities (people, places, organizations), (2) querying relationships between entities, (3) cross-referencing external identifiers (Wikipedia, VIAF, GND, ORCID), (4) building knowledge graphs from linked data. NOT for: full-text article content (use Wikipedia API), scientific literature (use semantic-scholar), geospatial data (use OpenStreetMap).
weather
Get current weather and forecasts via wttr.in or Open-Meteo. Use when: user asks about weather, temperature, or forecasts for any location. NOT for: historical weather data, severe weather alerts, or detailed meteorological analysis. No API key needed.
wacli
Send WhatsApp messages to other people or search/sync WhatsApp history via the wacli CLI (not for normal user chats).
voice-call
Start voice calls via the OpenClaw voice-call plugin.