← Browse

@omar-a-hassan/datamol

A

Datamol for molecular manipulation, SMILES processing, and cheminformatics

skillclaude

Install

agr install @omar-a-hassan/datamol --target claude

Writes 1 file into .claude/skills/, pinned to git-e6a48a4f.

  • .claude/skills/datamol/SKILL.md

Document


name: datamol description: Datamol for molecular manipulation, SMILES processing, and cheminformatics

Datamol

Overview

Datamol is a lightweight Python library built on top of RDKit that simplifies molecular manipulation. It provides a clean API for SMILES parsing, standardization, fingerprints, scaffolds, and visualization.

Core Operations

import datamol as dm

# Parse and standardize SMILES
mol = dm.to_mol("CC(=O)Oc1ccccc1C(=O)O")
std_mol = dm.standardize_mol(mol)
smiles = dm.to_smiles(std_mol, canonical=True)

# Fix and sanitize
mol = dm.to_mol("bad_smiles", ordered=True)  # returns None if invalid
fixed = dm.fix_mol(mol)
sanitized = dm.sanitize_mol(fixed)

Descriptors and Fingerprints

# Molecular properties
dm.descriptors.mw(mol)       # molecular weight
dm.descriptors.logp(mol)     # cLogP
dm.descriptors.tpsa(mol)     # topological polar surface area
dm.descriptors.n_hba(mol)    # H-bond acceptors
dm.descriptors.n_hbd(mol)    # H-bond donors

# Fingerprints
fp = dm.to_fp(mol, fp_type="ecfp", n_bits=2048)  # numpy array

Key Details

  • Scaffolds: dm.to_scaffold_murcko(mol), dm.fragment.brics(mol).
  • All functions gracefully handle None inputs (return None).
  • dm.to_smiles returns canonical SMILES by default.
  • Batch: dm.to_mol(["CCO", "c1ccccc1"]) accepts lists.
  • Clustering: dm.cluster.cluster_mols(mols, cutoff=0.7).
  • Install: pip install datamol.

Trustgrade A

  • passBody integrity

    Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.

  • passType matchnot applicable to this artifact type

    Whether the artifact is really the kind of thing its metadata claims it is.

  • passFreshness

    How long since the source repository was last pushed to.

  • passPrompt injection

    Scans the artifact's own text for instructions aimed at your agent rather than at you.

  • passLicense

    Whether the source repository declares an SPDX license permissive enough to redistribute.

How the grade is calculated

Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:

  • Aevery check passed
  • Bone warning
  • Ctwo warnings
  • Dprompt injection or body integrity failed, or three warnings
  • Fone of those failed, and something else is wrong

These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.

Versions

  • git-e6a48a4fae592026-07-31