torchdrug

Train PyTorch-native graph neural networks on TorchDrug datasets for molecular and protein tasks.

783|65|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/LeonChaoX/qinyan-academic-skills --skill torchdrug-leonchaox
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: torchdrug
Source: https://github.com/LeonChaoX/qinyan-academic-skills/tree/main/skills/06-%E5%8C%96%E5%AD%A6%E4%BF%A1%E6%81%AF%E4%B8%8E%E8%8D%AF%E7%89%A9%E5%8F%91%E7%8E%B0/torchdrug
Command: npx skills add https://github.com/LeonChaoX/qinyan-academic-skills --skill torchdrug-leonchaox

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

TorchDrug helps you implement and train graph neural network models for drug discovery and molecular/protein science without stitching together many low-level components yourself.

Core Features & Use Cases

  • Molecular property prediction: Predict ADMET, toxicity, quantum/physical properties, and binding-related targets from molecular graphs.
  • Protein modeling: Train models using protein sequences or 3D structure (e.g., residue graphs) for function, stability, and interaction tasks.
  • Knowledge graph reasoning & retrosynthesis: Perform link prediction on biomedical KGs and plan synthetic routes via reaction retrosynthesis components.
  • Use cases: Custom GNN architectures, protein property prediction with structure-aware edges, molecule generation/retrosynthesis pipelines, and benchmark training on curated TorchDrug datasets.

Quick Start

Use the torchdrug skill to train a GNN for molecular property prediction by loading a dataset (like BBBP), selecting a model (like GIN), wrapping it in an appropriate task (like PropertyPrediction), and running a standard PyTorch training loop.

Frequently Asked Questions about torchdrug

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I train a graph neural network for molecular property prediction?

To train a graph neural network for molecular property prediction, load a curated dataset like BBBP, select a GNN architecture such as GIN, wrap it in a PropertyPrediction task, and run a standard PyTorch training loop.

Can I use PyTorch Lightning for training models on biomedical knowledge graphs?

Yes, you can use PyTorch Lightning compatibility for end-to-end workflows, allowing you to perform link prediction and reasoning on biomedical knowledge graphs while leveraging standard PyTorch training loops.

Does this approach support protein modeling with both sequence and 3D structure inputs?

Protein modeling is fully supported by using protein sequences or 3D structure inputs, such as residue graphs, to train models for function, stability, and interaction prediction tasks.

What's the best way to plan synthetic routes using retrosynthesis components?

Plan synthetic routes by utilizing dedicated retrosynthesis components to map reaction pathways, enabling molecule generation and retrosynthesis planning directly through curated dataset representations.

Do I need RDKit or AlphaFold to build molecule and protein GNNs?

RDKit, AlphaFold, and ESM are optional dependencies for end-to-end workflows, allowing you to extend molecule and protein GNNs with additional structural and sequence compatibility.

Why stitch together low-level components for drug discovery instead of using a unified dataset approach?

Using a unified dataset approach prevents stitching low-level components manually, streamlining the implementation of graph neural network models for drug discovery and molecular science tasks.