datamol
Skill54 starsChanged 3 months agoMITView on GitHub
Pythonic wrapper around RDKit with a simplified interface and sensible defaults. Preferred for standard drug discovery work — SMILES/SELFIES/InChI conversion, molecule standardization and sanitization, descriptors, ECFP and other fingerprints, Tanimoto distance matrices, Butina clustering and diverse subset picking, Bemis-Murcko scaffolds and scaffold splits, BRICS/RECAP fragmentation, 3D conformer generation, SDF/CSV/Excel and cloud I/O, and parallel processing via n_jobs. Returns native rdkit.Chem.Mol objects, so it composes with RDKit throughout. Also trigger on datamol, `import datamol as dm`, dm.to_mol, dm.standardize_mol, dm.cluster_mols, or dm.pick_diverse. For advanced control or custom parameters, use the rdkit skill directly.
- Installs packages
11 other projects use a version of this, 11 of them edited.
Adopted by
Most recently taken up by
- BrightGold70/skillsedited, first seen Nov 8, 2026
- MarieLynneBlock/arcanum-artifexedited, first seen Nov 1, 2026
- davidanthonyn/claude-skillsedited, first seen Oct 20, 2026
- patoangolano/bio-stackedited, first seen Oct 15, 2026
- Luooops/skillsedited, first seen Oct 13, 2026
- garri333/Skillsedited, first seen Oct 11, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 11
- wu-yc/LabClaw★ 1.1k22% same
- LeonChaoX/qinyan-academic-skills★ 91023% same
- qinyan-ai/qinyan-academic-skills★ 8023% same
- MarieLynneBlock/arcanum-artifex★ 422% same
- BrightGold70/skills★ 122% same
- garri333/Skills★ 122% same
- Luooops/skills★ 181% same
- uppifyagency/boilerplate-saas-2026★ 123% same
- yf8578/claude-skills-collection★ 122% same
- davidanthonyn/claude-skills★ 023% same
1 more not listed
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository36 other files it gives its agents.
- adaptyvSkill
- admet-predictionSkill
- antibody-engineeringSkill
- autodock-vinaSkill
- binding-site-analysisSkill
- boltzSkill
- chemblSkill
- chemical-spaceSkill
- clinicaltrialsSkill
- deepchemSkill
- degradersSkill
- depmapSkill
- diffdockSkill
- esmSkill
- free-energy-perturbationSkill
- generative-designSkill
- glycoengineeringSkill
- immunogenicitySkill
- medchemSkill
- molecular-dynamicsSkill
- molfeatSkill
- ncats-araxSkill
- oligonucleotidesSkill
- openfdaSkill
- open-targetsSkill
- patent-landscapeSkill
- pkpd-translationSkill
- primekgSkill
- protein-binder-designSkill
- pytdcSkill
- rdkitSkill
- retrosynthesisSkill
- rowanSkill
- tamarindSkill
- target-safetySkill
- uniprot-rcsbSkill
The file
We split this skill into the rules it gives an agent
5 rules. 3 are common, 0 are distinctive, and 2 are very specific to this project.
3
Common
Most of the 11 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 108
Check for None values: after molecule parsing:
- Common: line 135
Scaffold splitting for ML: Ensure proper train/test separation by scaffold
- Common: line 137
Align molecules: when visualizing SAR series
- Very specific: line 187
Solution: Use dm.standardize_smiles() first or try dm.fix_mol()
- Very specific: line 190
Solution: Use dm.pick_diverse() instead of full clustering for large sets
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Datamol Cheminformatics Skill
Overview
Datamol is a Python library that provides a lightweight, Pythonic abstraction layer over RDKit for molecular cheminformatics. Simplify complex molecular operations with sensible defaults, efficient parallelization, and modern I/O capabilities. All molecular objects are native rdkit.Chem.Mol instances, ensuring full compatibility with the RDKit ecosystem.
Checked against: datamol 0.12.5 (PyPI stable, released 2024-06-10; still the current
release as of August 2026). Examples target datamol 0.12.x. Since 0.10.0, modules are lazy-loaded by default (set DATAMOL_DISABLE_LAZY_LOADING=1 to disable). Since 0.12.2, RDKit is a direct PyPI dependency of datamol. Fingerprints use RDKit's rdFingerprintGenerator API (0.12.5+).
Key capabilities:
- Molecular format conversion (SMILES, SELFIES, InChI)
- Structure standardization and sanitization
- Molecular descriptors and fingerprints
- 3D conformer generation and analysis
- Clustering and diversity selection
- Scaffold and fragment analysis
- Chemical reaction application
- Visualization and alignment
- Batch processing with parallelization
- Cloud storage support via fsspec
Installation and Setup
Guide users to install datamol:
uv pip install datamolRDKit is installed automatically with datamol. For remote file paths (S3, GCS, HTTP), install the matching fsspec backend:
uv pip install s3fs # AWS S3
uv pip install gcsfs # Google Cloud StorageImport convention:
import datamol as dmCore Workflows
Ten workflow areas, each with worked code, are documented in references/core_workflows.md:
| # | Area | Covers |
| 1 | Basic molecule handling | to_mol, batch conversion, error handling, canonical and isomeric SMILES, sanitization and full standardization |
| 2 | Reading and writing files | SDF, SMILES, CSV, Excel with rendered structures, the universal reader/writer, and cloud or HTTPS paths |
| 3 | Descriptors and properties | the standard descriptor set, parallel computation, aromaticity, stereochemistry, flexibility, and filtering |
| 4 | Fingerprints and similarity | ECFP4 and other types, pairwise and cross-set distances, nearest-neighbour lookup (Tanimoto distance = 1 − similarity) |
| 5 | Clustering and diversity | similarity clustering, diverse subset picking, and cluster centroids |
| 6 | Scaffold analysis | Bemis-Murcko scaffolds, grouping and counting, and scaffold-disjoint train/test splits |
| 7 | Fragmentation | fragmenting molecules, finding common fragments across a library, and fragment-based scoring |
| 8 | 3D conformers | generation, access, RMSD clustering, representative selection, and SASA |
| 9 | Visualization | grids, files, publication SVG, substructure alignment, atom and bond highlighting, conformer display |
| 10 | Chemical reactions | reaction SMARTS, applying to a molecule or a whole library |
Three end-to-end pipelines — load/filter/analyze, SAR by scaffold series, and virtual screening — are in references/workflow_patterns.md.
Parallelization
Datamol includes built-in parallelization for many operations. Use n_jobs parameter:
n_jobs=1: Sequential (no parallelization)n_jobs=-1: Use all available CPU coresn_jobs=4: Use 4 cores
Functions supporting parallelization:
dm.read_sdf(..., n_jobs=-1)dm.descriptors.batch_compute_many_descriptors(..., n_jobs=-1)dm.cluster_mols(..., n_jobs=-1)dm.pdist(..., n_jobs=-1)dm.conformers.sasa(..., n_jobs=-1)
Progress bars: Many batch operations support progress=True parameter.
Reference Documentation
For detailed API documentation, consult these reference files:
references/core_api.md: Core namespace functions (conversions, standardization, fingerprints, clustering)references/io_module.md: File I/O operations (read/write SDF, CSV, Excel, remote files)references/conformers_module.md: 3D conformer generation, clustering, SASA calculationsreferences/descriptors_viz.md: Molecular descriptors and visualization functionsreferences/fragments_scaffolds.md: Scaffold extraction, BRICS/RECAP fragmentationreferences/reactions_data.md: Chemical reactions and toy datasets
Best Practices
- Always standardize molecules from external sources:
mol = dm.standardize_mol(mol, disconnect_metals=True, normalize=True, reionize=True) - Check for None values after molecule parsing:
mol = dm.to_mol(smiles) if mol is None: # Handle invalid SMILES - Use parallel processing for large datasets —
n_jobs/progressare accepted by the batch entry points listed under Parallelization, not by every function:desc_df = dm.descriptors.batch_compute_many_descriptors(mols, n_jobs=-1, progress=True) - Use cloud I/O only when requested — confirm remote write paths; install
s3fs/gcsfsas needed:df = dm.read_sdf("s3://bucket/compounds.sdf") - Use appropriate fingerprints for similarity:
- ECFP (Morgan): General purpose, structural similarity
- MACCS: Fast, smaller feature space
- Atom pairs: Considers atom pairs and distances
- Consider scale limitations:
- Butina clustering: ~1,000 molecules (full distance matrix)
- For larger datasets: Use diversity selection or hierarchical methods
- Scaffold splitting for ML: Ensure proper train/test separation by scaffold
- Align molecules when visualizing SAR series
Error Handling
# Safe molecule creation
def safe_to_mol(smiles):
try:
mol = dm.to_mol(smiles)
if mol is not None:
mol = dm.standardize_mol(mol)
return mol
except Exception as e:
print(f"Failed to process {smiles}: {e}")
return None
# Safe batch processing
valid_mols = []
for smiles in smiles_list:
mol = safe_to_mol(smiles)
if mol is not None:
valid_mols.append(mol)Integration with Machine Learning
Datamol ships with scipy and scikit-learn as dependencies. Import them as normal PyPI packages — they are not scripts bundled in this skill.
import numpy as np
# Feature generation
X = np.array([dm.to_fp(mol) for mol in mols])
# Or descriptors
desc_df = dm.descriptors.batch_compute_many_descriptors(mols, n_jobs=-1)
X = desc_df.values
# Train model (scikit-learn PyPI package)
from sklearn.ensemble import RandomForestRegressor # third-party library
model = RandomForestRegressor()
model.fit(X, y_target)
# Predict
predictions = model.predict(X_test)Troubleshooting
Issue: Molecule parsing fails
- Solution: Use
dm.standardize_smiles()first or trydm.fix_mol()
Issue: Memory errors with clustering
- Solution: Use
dm.pick_diverse()instead of full clustering for large sets
Issue: Slow conformer generation
- Solution: Reduce
n_confsor increaserms_cutoffto generate fewer conformers
Issue: Remote file access fails
- Solution: Install the matching fsspec backend (
uv pip install s3fsorgcsfs) and verify only the provider credentials needed for that backend are set (see Installation and Setup above)
Composing with the rest of the bundle
rdkit→ instead: when you need control datamol does not expose — custom sanitization, partial sanitization, reaction fingerprints, pharmacophore features.medchem→ after: rule-based triage (Lipinski/Veber/CNS, PAINS and NIBR alerts) on the standardized molecules produced here. Same maintainers, sameMolobjects.molfeat→ after: featurization for a model, from ECFP through pretrained ChemBERTa.chembl→ before: measured bioactivity to standardize and cluster.admet-prediction→ after: standardize and desalt here first. ADMET-AI predicts on the SMILES string as given, so a salt or mixture yields a number for the wrong species.chemical-space/generative-design→ after:dm.pick_diverseand scaffold grouping are how you cut a generated or enumerated set down to what is worth making.
Additional Resources
- Datamol Documentation: https://docs.datamol.io/
- RDKit Documentation: https://www.rdkit.org/docs/
- GitHub Repository: https://github.com/datamol-io/datamol
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.

