torchdrug
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.
Download the skill ZIP
Upload in Claude
Go to Settings → Capabilities → Skills → Upload skill
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
SafeAll 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.
Risk Factors
⚡ Contains scripts (1)
⚙️ External commands (9)
🌐 Network access (2)
Quality Score
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
How do I install TorchDrug and run a basic example for molecular property prediction?
Which TorchDrug dataset should I use for training a model to predict blood-brain barrier penetration?
What are the differences between GIN, GAT, and SchNet models in TorchDrug and when should I use each?
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?
Which datasets are best for beginners?
Can TorchDrug handle protein structure data?
How do I generate new drug-like molecules?
What GNN architectures are available?
Does this skill run actual model training?
Developer Details
Author
K-Dense-AILicense
Apache-2.0 license
Repository
https://github.com/K-Dense-AI/claude-scientific-skills/tree/main/scientific-skills/torchdrugRef
main