Skills torchdrug
⚗️

torchdrug

Safe ⚡ Contains scripts⚙️ External commands🌐 Network access

Apply TorchDrug for drug discovery with GNNs

Also available from: davila7

Build and train graph neural networks for drug discovery, protein modeling, and molecular property prediction. This skill provides comprehensive documentation for the TorchDrug library including datasets, model architectures, and workflows.

Supports: Claude Codex Code(CC)
📊 71 Adequate
1

Download the skill ZIP

2

Upload in Claude

Go to Settings → Capabilities → Skills → Upload skill

3

Toggle on and start using

Test it

Using "torchdrug". How do I train a model to predict HIV inhibition?

Expected outcome:

  • Load the HIV dataset from TorchDrug: datasets.HIV()
  • Use a GIN model for molecular graph representation
  • Create a PropertyPrediction task with binary classification
  • Train using BCE loss and evaluate with AUROC

Using "torchdrug". What datasets are available for protein function prediction?

Expected outcome:

  • EnzymeCommission for EC number classification across 7 levels
  • GeneOntology for GO term prediction (BP/MF/CC)
  • BetaLactamase for enzyme activity regression
  • Fluorescence for GFP protein intensity prediction

Using "torchdrug". How can I generate new drug-like molecules?

Expected outcome:

  • Use GCPN model for reinforcement learning-based generation
  • Apply GraphAutoregressiveFlow for conditional generation
  • Set property constraints like logP and synthesizability
  • Validate outputs with RDKit for chemical validity

Security Audit

Safe
v4 • 1/17/2026

All 335 static findings are FALSE POSITIVES. The skill contains only markdown documentation for TorchDrug, a legitimate PyTorch-based ML library for drug discovery. Security patterns detected are misidentified scientific terminology: PyTorch model methods (eval) flagged as code evaluation, markdown code block syntax (backticks) flagged as shell execution, ML loss functions (bce, mse) flagged as cryptographic algorithms, dataset names (SAMPL, ZINC, BindingDB) flagged as C2/SAM infrastructure. No executable code or security risks present.

10
Files scanned
4,856
Lines analyzed
3
findings
4
Total audits
Audited by: claude View Audit History →

Quality Score

45
Architecture
100
Maintainability
85
Content
21
Community
100
Security
91
Spec Compliance

What You Can Build

Predict molecular properties

Predict solubility, toxicity, and binding affinity using GNN architectures like GIN and GAT

Model protein structures

Analyze protein sequences and structures with ESM and GearNet models for function prediction

Plan synthesis routes

Use retrosynthesis planning to design chemical synthesis pathways for target molecules

Try These Prompts

Getting started
How do I install TorchDrug and run a basic example for molecular property prediction?
Dataset selection
Which TorchDrug dataset should I use for training a model to predict blood-brain barrier penetration?
Model architecture
What are the differences between GIN, GAT, and SchNet models in TorchDrug and when should I use each?
Integration guide
How do I integrate TorchDrug with PyTorch Lightning for distributed training of large-scale molecular models?

Best Practices

  • Use scaffold splitting for molecular datasets to avoid data leakage
  • Start with small datasets like BACE or ESOL before scaling to larger ones
  • Combine property prediction with generative models for multi-objective optimization

Avoid

  • Do not use random splits for molecular property prediction - scaffold splits are more realistic
  • Avoid training without proper validation metrics like AUROC and AUPRC for imbalanced datasets
  • Do not skip RDKit validation when generating novel molecules

Frequently Asked Questions

What makes TorchDrug different from DeepChem?
TorchDrug focuses on PyTorch-native implementations and custom model development while DeepChem emphasizes pre-trained models and diverse featurizers.
Which datasets are best for beginners?
Start with BBBP, BACE, or ESOL datasets. They are small, well-documented, and cover common drug discovery tasks.
Can TorchDrug handle protein structure data?
Yes, TorchDrug supports AlphaFold PDB files and ESM embeddings for protein sequence and structure modeling.
How do I generate new drug-like molecules?
Use GCPN or GraphAutoregressiveFlow models with property constraints for guided molecular generation.
What GNN architectures are available?
GIN, GAT, GCN, RGCN, SchNet, GearNet, TransE, RotatE, and ComplEx for different data types and tasks.
Does this skill run actual model training?
No, this skill provides documentation and reference guidance. Actual training requires installing TorchDrug and running Python code.