Datamol

From omar-A-hassan/medsci-agent · View interactive version

Datamol is an AI agent skill from the GitHub repository omar-A-hassan/medsci-agent. Datamol for molecular manipulation, SMILES processing, and cheminformatics

How to use this skill

Skill file

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

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.