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.
76
71%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./scientific-skills/Data Analysis/TorchDrug-English/SKILL.mdthe 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 torchdrugpip 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
8277276
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.