pytdc
Therapeutics Data Commons. AI-ready drug discovery datasets (ADME, toxicity, DTI), benchmarks, scaffold splits, molecular oracles, for therapeutic ML and pharmacological prediction.
Install
mkdir -p .claude/skills/pytdc && curl -L -o skill.zip "https://mcp.directory/api/skills/download/1634" && unzip -o skill.zip -d .claude/skills/pytdc && rm skill.zipInstalls to .claude/skills/pytdc
About this skill
PyTDC (Therapeutics Data Commons)
Overview
PyTDC is an open-science platform providing AI-ready datasets and benchmarks for drug discovery and development. Access curated datasets spanning the entire therapeutics pipeline with standardized evaluation metrics and meaningful data splits, organized into three categories: single-instance prediction (molecular/protein properties), multi-instance prediction (drug-target interactions, DDI), and generation (molecule generation, retrosynthesis).
When to Use This Skill
This skill should be used when:
- Working with drug discovery or therapeutic ML datasets
- Benchmarking machine learning models on standardized pharmaceutical tasks
- Predicting molecular properties (ADME, toxicity, bioactivity)
- Predicting drug-target or drug-drug interactions
- Generating novel molecules with desired properties
- Accessing curated datasets with proper train/test splits (scaffold, cold-split)
- Using molecular oracles for property optimization
Installation & Setup
Install PyTDC using pip:
uv pip install PyTDC
To upgrade to the latest version:
uv pip install PyTDC --upgrade
Core dependencies (automatically installed):
- numpy, pandas, tqdm, seaborn, scikit_learn, fuzzywuzzy
Additional packages are installed automatically as needed for specific features.
Quick Start
The basic pattern for accessing any TDC dataset follows this structure:
from tdc.<problem> import <Task>
data = <Task>(name='<Dataset>')
split = data.get_split(method='scaffold', seed=1, frac=[0.7, 0.1, 0.2])
df = data.get_data(format='df')
Where:
<problem>: One ofsingle_pred,multi_pred, orgeneration<Task>: Specific task category (e.g., ADME, DTI, MolGen)<Dataset>: Dataset name within that task
Example - Loading ADME data:
from tdc.single_pred import ADME
data = ADME(name='Caco2_Wang')
split = data.get_split(method='scaffold')
# Returns dict with 'train', 'valid', 'test' DataFrames
Single-Instance Prediction Tasks
Single-instance prediction involves forecasting properties of individual biomedical entities (molecules, proteins, etc.).
Available Task Categories
1. ADME (Absorption, Distribution, Metabolism, Excretion)
Predict pharmacokinetic properties of drug molecules.
from tdc.single_pred import ADME
data = ADME(name='Caco2_Wang') # Intestinal permeability
# Other datasets: HIA_Hou, Bioavailability_Ma, Lipophilicity_AstraZeneca, etc.
Common ADME datasets:
- Caco2 - Intestinal permeability
- HIA - Human intestinal absorption
- Bioavailability - Oral bioavailability
- Lipophilicity - Octanol-water partition coefficient
- Solubility - Aqueous solubility
- BBB - Blood-brain barrier penetration
- CYP - Cytochrome P450 metabolism
2. Toxicity (Tox)
Predict toxicity and adverse effects of compounds.
from tdc.single_pred import Tox
data = Tox(name='hERG') # Cardiotoxicity
# Other datasets: AMES, DILI, Carcinogens_Lagunin, etc.
Common toxicity datasets:
- hERG - Cardiac toxicity
- AMES - Mutagenicity
- DILI - Drug-induced liver injury
- Carcinogens - Carcinogenicity
- ClinTox - Clinical trial toxicity
3. HTS (High-Throughput Screening)
Bioactivity predictions from screening data.
from tdc.single_pred import HTS
data = HTS(name='SARSCoV2_Vitro_Touret')
4. QM (Quantum Mechanics)
Quantum mechanical properties of molecules.
from tdc.single_pred import QM
data = QM(name='QM7')
5. Other Single Prediction Tasks
- Yields: Chemical reaction yield prediction
- Epitope: Epitope prediction for biologics
- Develop: Development-stage predictions
- CRISPROutcome: Gene editing outcome prediction
Data Format
Single prediction datasets typically return DataFrames with columns:
Drug_IDorCompound_ID: Unique identifierDrugorX: SMILES string or molecular representationY: Target label (continuous or binary)
Multi-Instance Prediction Tasks
Multi-instance prediction involves forecasting properties of interactions between multiple biomedical entities.
Available Task Categories
1. DTI (Drug-Target Interaction)
Predict binding affinity between drugs and protein targets.
from tdc.multi_pred import DTI
data = DTI(name='BindingDB_Kd')
split = data.get_split()
Available datasets:
- BindingDB_Kd - Dissociation constant (52,284 pairs)
- BindingDB_IC50 - Half-maximal inhibitory concentration (991,486 pairs)
- BindingDB_Ki - Inhibition constant (375,032 pairs)
- DAVIS, KIBA - Kinase binding datasets
Data format: Drug_ID, Target_ID, Drug (SMILES), Target (sequence), Y (binding affinity)
2. DDI (Drug-Drug Interaction)
Predict interactions between drug pairs.
from tdc.multi_pred import DDI
data = DDI(name='DrugBank')
split = data.get_split()
Multi-class classification task predicting interaction types. Dataset contains 191,808 DDI pairs with 1,706 drugs.
3. PPI (Protein-Protein Interaction)
Predict protein-protein interactions.
from tdc.multi_pred import PPI
data = PPI(name='HuRI')
4. Other Multi-Prediction Tasks
- GDA: Gene-disease associations
- DrugRes: Drug resistance prediction
- DrugSyn: Drug synergy prediction
- PeptideMHC: Peptide-MHC binding
- AntibodyAff: Antibody affinity prediction
- MTI: miRNA-target interactions
- Catalyst: Catalyst prediction
- TrialOutcome: Clinical trial outcome prediction
Generation Tasks
Generation tasks involve creating novel biomedical entities with desired properties.
1. Molecular Generation (MolGen)
Generate diverse, novel molecules with desirable chemical properties.
from tdc.generation import MolGen
data = MolGen(name='ChEMBL_V29')
split = data.get_split()
Use with oracles to optimize for specific properties:
from tdc import Oracle
oracle = Oracle(name='GSK3B')
score = oracle('CC(C)Cc1ccc(cc1)C(C)C(O)=O') # Evaluate SMILES
See references/oracles.md for all available oracle functions.
2. Retrosynthesis (RetroSyn)
Predict reactants needed to synthesize a target molecule.
from tdc.generation import RetroSyn
data = RetroSyn(name='USPTO')
split = data.get_split()
Dataset contains 1,939,253 reactions from USPTO database.
3. Paired Molecule Generation
Generate molecule pairs (e.g., prodrug-drug pairs).
from tdc.generation import PairMolGen
data = PairMolGen(name='Prodrug')
For detailed oracle documentation and molecular generation workflows, refer to references/oracles.md and scripts/molecular_generation.py.
Benchmark Groups
Benchmark groups provide curated collections of related datasets for systematic model evaluation.
ADMET Benchmark Group
from tdc.benchmark_group import admet_group
group = admet_group(path='data/')
# Get benchmark datasets
benchmark = group.get('Caco2_Wang')
predictions = {}
for seed in [1, 2, 3, 4, 5]:
train, valid = benchmark['train'], benchmark['valid']
# Train model here
predictions[seed] = model.predict(benchmark['test'])
# Evaluate with required 5 seeds
results = group.evaluate(predictions)
ADMET Group includes 22 datasets covering absorption, distribution, metabolism, excretion, and toxicity.
Other Benchmark Groups
Available benchmark groups include collections for:
- ADMET properties
- Drug-target interactions
- Drug combination prediction
- And more specialized therapeutic tasks
For benchmark evaluation workflows, see scripts/benchmark_evaluation.py.
Data Functions
TDC provides comprehensive data processing utilities organized into four categories.
1. Dataset Splits
Retrieve train/validation/test partitions with various strategies:
# Scaffold split (default for most tasks)
split = data.get_split(method='scaffold', seed=1, frac=[0.7, 0.1, 0.2])
# Random split
split = data.get_split(method='random', seed=42, frac=[0.8, 0.1, 0.1])
# Cold split (for DTI/DDI tasks)
split = data.get_split(method='cold_drug', seed=1) # Unseen drugs in test
split = data.get_split(method='cold_target', seed=1) # Unseen targets in test
Available split strategies:
random: Random shufflingscaffold: Scaffold-based (for chemical diversity)cold_drug,cold_target,cold_drug_target: For DTI taskstemporal: Time-based splits for temporal datasets
2. Model Evaluation
Use standardized metrics for evaluation:
from tdc import Evaluator
# For binary classification
evaluator = Evaluator(name='ROC-AUC')
score = evaluator(y_true, y_pred)
# For regression
evaluator = Evaluator(name='RMSE')
score = evaluator(y_true, y_pred)
Available metrics: ROC-AUC, PR-AUC, F1, Accuracy, RMSE, MAE, R2, Spearman, Pearson, and more.
3. Data Processing
TDC provides 11 key processing utilities:
from tdc.chem_utils import MolConvert
# Molecule format conversion
converter = MolConvert(src='SMILES', dst='PyG')
pyg_graph = converter('CC(C)Cc1ccc(cc1)C(C)C(O)=O')
Processing utilities include:
- Molecule format conversion (SMILES, SELFIES, PyG, DGL, ECFP, etc.)
- Molecule filters (PAINS, drug-likeness)
- Label binarization and unit conversion
- Data balancing (over/under-sampling)
- Negative sampling for pair data
- Graph transformation
- Entity retrieval (CID to SMILES, UniProt to sequence)
For comprehensive utilities documentation, see references/utilities.md.
4. Molecule Generation Oracles
TDC provides 17+ oracle functions for molecular optimization:
from tdc import Oracle
# Single oracle
oracle = Oracle(name='DRD2')
score = oracle('CC(C)Cc1ccc(cc1)C(C)C(O)=O')
# Multiple oracles
oracle = Oracle(name='JNK3')
scores = oracle(['SMILES1', 'SMILES2', 'SMILES3'])
For complete oracle documentation, see references/oracles.md.
Advanced Features
Retrieve Available Datasets
from tdc.utils imp
---
*Content truncated.*
More by davila7
View all skills by davila7 →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
pdf-to-markdown
aliceisjustplaying
Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions "load the whole PDF", "bring the PDF into context", "read the entire PDF", or when partial extraction/grepping would miss important context. This is the preferred method for PDF text extraction over page-by-page or grep approaches.
Related MCP Servers
Browse all serversAccess FDA drug info, faers data, and adverse event reports with OpenFDA’s robust tools for faers, vaers, and NDC valida
Easily convert markdown to PDF using Markitdown MCP server. Supports HTTP, STDIO, and SSE for fast converting markdown t
Unlock AI-ready web data with Firecrawl: scrape any website, handle dynamic content, and automate web scraping for resea
Build persistent semantic networks for enterprise & engineering data management. Enable data persistence and memory acro
Browser Use lets LLMs and agents access and scrape any website in real time, making web scraping and web page scraping e
Extend your developer tools with GitHub MCP Server for advanced automation, supporting GitHub Student and student packag
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.