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.

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-rdkit&locale=en&source=copy

RDKit - Python Cheminformatics Toolkit

Skill Overview


RDKit is an open-source cheminformatics toolkit that provides a Python API for molecule structure parsing, descriptor calculation, molecular fingerprint generation, substructure search, chemical reaction prediction, and 2D/3D molecular visualization. It is suitable for drug discovery, computational chemistry, and cheminformatics research.

Use Cases

1. Drug Discovery and Virtual Screening


During drug development, RDKit can handle large-scale compound libraries by computing molecular descriptors (e.g., molecular weight, LogP, TPSA), performing drug-likeness analysis (Lipinski’s Rule of Five), conducting fingerprint similarity screening, and filtering substructures. This helps researchers quickly identify potential drug candidate molecules.

2. Chemical Data Mining and Analysis


For cheminformatics research, RDKit offers SMILES/SDF molecular formula parsing, batch molecular data processing, molecular clustering, and diversity analysis. It supports extracting structural information from chemical databases, analyzing structure–activity relationships (SAR), and building predictive models for chemical features.

3. Advanced Molecular Modeling and Reaction Prediction


When you need fine-grained control over the molecular processing workflow, RDKit provides advanced capabilities such as custom molecule standardization, specific substructure matching, chemical reaction SMARTS definitions, 3D conformation generation, and pharmacophore feature recognition. These features are useful for complex cheminformatics research and professional algorithm development.

Core Features

1. Molecular I/O and Structure Parsing


RDKit supports reading and writing multiple chemical formats, including SMILES strings, SDF (structure data files), MOL files, and standard formats such as InChI. It provides both single-molecule and batch-molecule processing, enabling automatic molecule validation and aromaticity perception. It also supports multithreaded reading of gzip-compressed files.

2. Molecular Descriptors and Fingerprints


The toolkit includes 200+ molecular descriptor calculation functions, covering physicochemical properties (molecular weight, LogP, TPSA, hydrogen-bond donor/acceptor counts), topological descriptors, and fingerprint generation (Morgan/ECFP, RDKit topological fingerprints, MACCS keys, atom-pair fingerprints, etc.). It supports molecular similarity calculations (Tanimoto, Dice, cosine similarity) and fingerprint-based molecular clustering.

3. Substructure Search and Chemical Reactions


RDKit provides SMARTS pattern matching, supporting complex substructure queries (such as functional group recognition, ring system detection, and macrocycle compound screening). It also supports chemical reaction prediction: reaction SMARTS can define chemical transformation rules, which can be applied to metabolism prediction, reaction product inference, and reaction library screening.

4. 2D/3D Molecular Generation and Visualization


It supports 2D coordinate calculation (for molecular structure visualization), 3D conformation generation (ETKDG algorithm), conformation optimization (UFF/MMFF force fields), and molecular alignment. It offers multiple visualization options (highlighted substructures, custom drawing parameters, Jupyter Notebook integration), making it suitable for visualizing molecular similarity maps and structure–activity relationships.

Common Questions

How should I choose between RDKit and datamol?


RDKit is suitable for scenarios that require fine control and advanced algorithms, such as custom molecule standardization workflows, specific substructure matching logic, or specialized chemical reaction prediction. datamol is a simplified wrapper built on RDKit, offering a more user-friendly API and standard workflows. It is well suited for routine molecular processing tasks and rapid prototyping. If your task involves developing complex cheminformatics algorithms or requires low-level control, it is recommended to use RDKit directly.

How do I install and configure RDKit?


It is recommended to install using uv pip install rdkit into your existing Python environment, or create a separate environment with conda-forge: conda create -c conda-forge -n my-rdkit-env rdkit. Example code is compatible with RDKit 2026.03.x. Avoid installing both conda and PyPI rdkit packages in the same environment to prevent binary extension conflicts. For cross-platform support, the PyPI rdkit package provides precompiled wheels; rdkit-pypi is the older package name, only used for maintaining legacy environments.

What molecular file formats does RDKit support for batch processing?


RDKit supports batch read/write using the Supplier/Writer pattern, including SDF, SMILES (.smi), MOL, and gzip-compressed files. For large-scale datasets, it provides high-performance tools such as ForwardSDMolSupplier (streaming read to avoid memory overflow), MultithreadedSDMolSupplier (multithreaded parallel processing), and SDWriter (batch writing). All MolFrom* functions return None when parsing fails, so you should validate before use.