scientific-skills/Data Analysis/TorchDrug-English/SKILL.md
PyTorch-native Graph Neural Network framework for molecules and proteins. Suitable for building custom GNN architectures for drug discovery, protein modeling, or knowledge graph reasoning. Best for custom model development, protein property prediction, and retrosynthesis. If you need pretrained models and diverse feature extractors, use deepchem; if you need benchmark datasets, use pytdc.
npx skillsauth add aipoch/medical-research-skills TorchDrug (English)Install this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
the documented workflow in this package is the most direct path to complete the request.TorchDrug (English) package behavior rather than a generic answer.references/ for task-specific guidance.Python: 3.10+. Repository baseline for current packaged skills.Third-party packages: not explicitly version-pinned in this skill package. Add pinned versions if this skill needs stricter environment control.Skill directory: 20260316/scientific-skills/Data Analytics/TorchDrug-English
No packaged executable script was detected.
Use the documented workflow in SKILL.md together with the references/assets in this folder.
Example run plan:
See ## Overview above for related details.
SKILL.md.references/ contains supporting rules, prompts, or checklists.TorchDrug is a PyTorch-based comprehensive machine learning toolbox designed for drug discovery and molecular science. It applies graph neural networks, pretrained models, and task definitions to molecules, proteins, and biological knowledge graphs, covering molecular property prediction, protein modeling, knowledge graph reasoning, molecular generation, retrosynthesis planning, and more, including 40+ curated datasets and 20+ model architectures.
Use this skill when dealing with the following:
Data Types:
Tasks:
Libraries and Integration:
pip install torchdrug
pip install torchdrug[full]
from torchdrug import datasets, models, tasks
from torch.utils.data import DataLoader
import torch
# Load molecular dataset
dataset = datasets.BBBP("~/molecule-datasets/")
train_set, valid_set, test_set = dataset.split()
# Define GNN model
model = models.GIN(
input_dim=dataset.node_feature_dim,
hidden_dims=[256, 256, 256],
edge_input_dim=dataset.edge_feature_dim,
batch_norm=True,
readout="mean"
)
# Create property prediction task
task = tasks.PropertyPrediction(
model,
task=dataset.tasks,
criterion="bce",
metric=["auroc", "auprc"]
)
# Train with PyTorch
optimizer = torch.optim.Adam(task.parameters(), lr=1e-3)
train_loader = DataLoader(train_set, batch_size=32, shuffle=True)
for epoch in range(100):
for batch in train_loader:
loss = task(batch)
optimizer.zero_grad()
loss.backward()
optimizer.step()
Predict chemical, physical, and biological properties from molecular structures.
Use Cases:
Core Components:
PropertyPrediction and MultipleBinaryClassification tasksReference: See molecular_property_prediction.md
Process protein sequences, structures, and properties.
Use Cases:
Core Components:
Reference: See protein_modeling.md
Predict missing links and relations in biomedical knowledge graphs.
Use Cases:
Core Components:
KnowledgeGraphCompletion taskReference: See knowledge_graphs.md
Generate novel molecular structures with desired properties.
Use Cases:
Core Components:
GraphAutoregressiveFlowReference: See molecular_generation.md
Predict synthesis routes from target molecules to starting materials.
Use Cases:
Core Components:
CenterIdentification (reaction center prediction)SynthonCompletion (reactant prediction)Reference: See retrosynthesis.md
Comprehensive catalog of GNN architectures for different data types and tasks.
Available Models:
Reference: See models_architectures.md
40+ curated datasets covering chemistry, biology, and knowledge graphs.
Categories:
Reference: See datasets.md
Scenario: Predict blood-brain barrier permeability for drug candidates. Steps:
Navigation: references/molecular_property_prediction.md → Dataset Selection → Model Selection → Training
Scenario: Predict enzyme function from sequence. Steps:
Navigation: references/protein_modeling.md → Model Selection (Sequence vs Structure) → Pretraining Strategies
Scenario: Find new disease treatments in Hetionet. Steps:
Navigation: references/knowledge_graphs.md → Hetionet Dataset → Model Selection → Biomedical Applications
tools
Generates complete conventional oncology bulk-transcriptome biomarker and hub-gene research designs from a user-provided cancer type and study direction. Always use this skill whenever a user wants to design, plan, or build a tumor bioinformatics study centered on differential expression, prognostic filtering or risk modeling, PPI-based hub-gene prioritization, diagnostic/prognostic evaluation, clinical association, immune infiltration context, methylation context, and optional tissue or cell validation. Covers five study patterns (signature-first prognostic workflow, hub-gene-first biomarker workflow, hybrid signature-to-hub workflow, immune-context biomarker workflow, translational validation workflow) and always outputs four workload configs (Lite / Standard / Advanced / Publication+) with recommended primary plan, step-by-step workflow, figure plan, validation strategy, minimal executable version, publication upgrade path...
development
Generates complete conventional non-oncology bioinformatics research designs from a user-provided disease context, process-related gene family or biological theme, and validation direction. Use when a study centers on multi-dataset bulk transcriptome integration, DEG analysis, process-gene intersection, enrichment analysis, GSEA, PPI hub-gene prioritization, TF/miRNA regulatory networks, ROC-based biomarker evaluation, and immune infiltration analysis. Covers five study patterns (process-DEG discovery, enrichment/GSEA interpretation, hub-gene prioritization, regulatory-network and immune interpretation, multi-layer public validation) and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.
tools
Plans confounder control, variable adjustment logic, and bias mitigation strategies at the protocol stage for clinical, epidemiologic, translational, observational, and biomarker studies. Always use this skill when a user needs to identify major confounders, decide which variables should or should not be adjusted for, compare matching/stratification/weighting approaches, anticipate selection or measurement bias, or pressure-test a study design before execution. Focus on bias sensing, causal structure awareness, variable-role classification, and critical design review rather than generic statistical advice.
testing
Generates complete comparative network-toxicology research designs from a user-provided exposure pair, shared toxic phenotype, and validation direction. Use when a study centers on two related exposures under one outcome and needs target collection, shared-vs-specific target decomposition, enrichment, PPI hub prioritization, docking, optional transcriptomic cross-checks, and conservative mechanistic synthesis. Covers five study patterns and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.