deepchem

Molecular ML with diverse featurizers and pre-built datasets. Use for property prediction (ADMET, toxicity) with traditional ML or GNNs when you want extensive featurization options and MoleculeNet benchmarks. Best for quick experiments with pre-trained models, diverse molecular representations. For graph-first PyTorch workflows use torchdrug; for benchmark datasets use pytdc.

Install

Hot:19

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

DeepChem — Deep Learning Library for Molecular Machine Learning and Drug Discovery

Skill Overview


DeepChem is a Python machine learning library specifically designed for chemistry, materials science, and biology. It supports molecular property prediction, drug discovery, materials design, and biomolecular analysis, and provides a rich collection of featurization tools, pretrained models, and MoleculeNet benchmark datasets.

Use Cases

1. Molecular Property Prediction and Drug Discovery


When you need to predict the physicochemical properties of molecules, such as solubility, toxicity, and binding affinity, or their ADMET properties, DeepChem provides a complete modeling workflow. You can load molecular data from SMILES strings or SDF files, convert it into numerical representations suitable for machine learning using various featurization methods, and train and make predictions with traditional machine learning models or graph neural networks. It is particularly well suited for toxicity screening and lead compound optimization in drug development.

2. Molecular Graph Neural Network Research


If you want to apply graph neural networks (GCN, GAT, MPNN, AttentiveFP) to molecular modeling tasks, DeepChem includes complete GNN architectures and molecular graph featurization tools. It supports automatically constructing graph representations from molecular structures and provides more than 30 standard benchmark datasets, including MoleculeNet, for model evaluation. It is suitable for researchers conducting deep learning experiments on custom molecular datasets or standard benchmarks.

3. Few-Shot Transfer Learning and Rapid Prototyping


When your molecular dataset contains relatively few samples (<1,000 molecules) or computational resources are limited, DeepChem provides several models pretrained on large-scale molecular corpora, such as ChemBERTa, GROVER, and MolFormer. Transfer learning can deliver strong predictive performance quickly on small datasets, making it suitable for rapidly validating ideas or developing prototypes.

Core Features

1. Diverse Molecular Featurization Tools


DeepChem provides a wide range of molecular featurization methods, including Circular Fingerprints (ECFP), RDKit descriptors, Mordred descriptors, graph featurization for GNNs, SMILES serialization, and molecular images. Different featurization tools are suited to different modeling requirements: fingerprints or descriptors are recommended for traditional machine learning, graph neural networks require dedicated graph featurizers, and sequence models can use SMILES-to-Seq. The library also includes a featurization selection decision tree to help you choose the most appropriate featurization method based on dataset size and model type.

2. MoleculeNet Benchmark Dataset Integration


DeepChem includes more than 30 curated molecular machine learning benchmark datasets, covering toxicity prediction (Tox21, Clintox), physicochemical properties (Delaney, FreeSolv, Lipo), quantum chemical properties (QM7, QM8, QM9), and materials properties (Perovskite, Bandgap). All datasets are configured with standard training/validation/test splits and use ScaffoldSplitter to prevent similar molecules from leaking between the training and test sets, ensuring reliable model evaluation. One-click dataset loading makes model benchmarking simple and efficient.

3. Comprehensive Model Architecture Ecosystem


DeepChem supports a complete range of models, from traditional machine learning to cutting-edge deep learning. For small datasets, you can use traditional algorithms such as random forests and XGBoost wrapped by SklearnModel; medium-sized datasets are suitable for deep learning models such as MultitaskRegressor; and large-scale datasets are recommended for graph neural networks (GCN, GAT, AttentiveFP, DMPNN). It also integrates HuggingFace-compatible pretrained models (ChemBERTa, GROVER, MolFormer) and specialized crystal materials prediction models (CGCNN, MEGNet) to meet the needs of different research scenarios.

Frequently Asked Questions

Which deep learning frameworks does DeepChem support? How do I install it?


DeepChem uses a layered installation design. The core package (uv pip install deepchem) includes only data loaders, featurization tools, and MoleculeNet, and does not require any deep learning framework. If you want to use graph neural networks or pretrained models, you must first install the corresponding backend (PyTorch, TensorFlow, or JAX), and then install the appropriate extra:

  • uv pip install 'deepchem[torch]' supports GCN, GAT, AttentiveFP, HuggingFaceModel, and GroverModel

  • uv pip install 'deepchem[tensorflow]' supports Keras/TensorFlow models

  • uv pip install 'deepchem[jax]' supports JAX/Haiku models
  • GPU users should note that when installing a deep learning framework, they must select a build compatible with their CUDA version.

    How can I prevent molecular data leakage? Which data splitting method should I use?


    In drug discovery tasks, you must use ScaffoldSplitter rather than RandomSplitter. ScaffoldSplitter partitions molecules according to their scaffold structures, ensuring that similar molecules do not appear in both the training and test sets and preventing artificially inflated model performance caused by data leakage. DeepChem uses scaffold splitting by default for MoleculeNet datasets, and you should follow this best practice for custom datasets as well. DeepChem also provides other splitting methods, including ButinaSplitter (cluster-based), MaxMinSplitter (maximizing diversity), and RandomStratifiedSplitter (preserving class distributions).

    How can I achieve good predictive performance on small datasets?


    For small molecular datasets (<1,000 molecules), DeepChem provides several solutions:

  • Transfer learning: Use pretrained models such as ChemBERTa (pretrained on 77 million molecules), GROVER (pretrained on 10 million molecules), or MolFormer, and fine-tune them to achieve good performance

  • Simple models: Prefer random forest + CircularFingerprint; this combination often outperforms complex deep learning models on small datasets

  • Strong regularization: If using deep learning, increase dropout to 0.5 and use a smaller network

  • Data augmentation: Consider using a balancing transformer to address class imbalance
  • DeepChem’s built-in scripts/transfer_learning.py script provides a complete transfer learning workflow to help you get started quickly.