datamol

Pythonic wrapper around RDKit with simplified interface and sensible defaults. Preferred for standard drug discovery including SMILES parsing, standardization, descriptors, fingerprints, clustering, 3D conformers, parallel processing. Returns native rdkit.Chem.Mol objects. For advanced control or custom parameters, use rdkit directly.

Install

Hot:12

Download and extract to your skills directory

Copy command and send to AI Agent for auto-install:

Download and install this skill https://openskills.cc/api/download?slug=k-dense-ai-skills-datamol&locale=en&source=copy

Datamol – Python Cheminformatics Toolkit

Skill Overview


Datamol is a lightweight Python wrapper around RDKit that provides concise APIs and sensible defaults for drug discovery and cheminformatics tasks. It returns native rdkit.Chem.Mol objects, ensuring full compatibility with the RDKit ecosystem.

Use Cases


  • Virtual Screening and Compound Library Analysis: Load compound libraries from SDF, SMILES, CSV, or Excel files, calculate molecular descriptors, filter compounds using Lipinski’s rules, identify potentially active compounds through molecular fingerprint similarity, and support parallel processing of large-scale datasets.
  • SAR Analysis and Scaffold Decomposition: Extract Murcko scaffolds for compound series analysis, group compounds by scaffold and visualize activity differences, or split training and test sets based on scaffolds to ensure the generalization capability of machine learning models.
  • 3D Conformer Generation and Molecular Visualization: Generate low-energy 3D conformers, calculate solvent-accessible surface area (SAS), align molecules based on the maximum common substructure (MCS), and export publication-quality molecular images.
  • Core Features


  • Molecular Format Conversion and Standardization: Parse SMILES/SELFIES/InChI, standardize molecular structures (disconnect metals, add explicit hydrogens, and reionize), and convert them into canonical formats. It is recommended to always use standardize_mol() or standardize_smiles() for user-provided molecules.
  • Descriptors, Fingerprints, and Similarity: Batch-calculate descriptors such as molecular weight, LogP, hydrogen-bond donors/acceptors, and TPSA; generate ECFP/MACCS/topological fingerprints; calculate Tanimoto similarity matrices; and support parallel acceleration with n_jobs=-1.
  • Clustering and Diversity Selection: Use Butina clustering to group compounds by structural similarity (suitable for approximately 1,000 molecules), or use pick_diverse() and pick_centroids() to select diverse subsets from large libraries.
  • Frequently Asked Questions

    What is the difference between Datamol and RDKit?


    Datamol is a Pythonic wrapper layer around RDKit that provides simpler APIs, built-in parallel processing by default, and modernized I/O capabilities. All molecular objects are native rdkit.Chem.Mol instances and can be used seamlessly with other RDKit functionality. For standard drug discovery tasks (SMILES parsing, descriptors, fingerprints, clustering, and conformer generation), Datamol is preferred; for advanced control or custom parameters, RDKit can be called directly.

    What types of molecular fingerprints does Datamol support?


    Datamol supports multiple fingerprint types, including ECFP (ECFP6 by default; specify radius=2 to obtain ECFP4), MACCS, topological fingerprints, atom-pair fingerprints, and RDKit fingerprints. Use dm.to_fp(mol, fp_type='ecfp', radius=2, n_bits=2048) to generate a fingerprint.

    How should large-scale compound datasets be handled?


    Use the built-in parallel processing to accelerate batch operations: dm.descriptors.batch_compute_many_descriptors(mols, n_jobs=-1, progress=True), dm.cluster_mols(mols, n_jobs=-1), and dm.read_sdf('file.sdf', n_jobs=-1). For clustering more than 1,000 molecules, it is recommended to use dm.pick_diverse() instead of full Butina clustering to avoid memory issues when constructing the distance matrix.