torchdrug

torchdrug is a skill for Claude Code, Codex from Kdevos12/ALKYL. It costs 44 tokens per session (885 once invoked), scanned A, original, MIT.

A PyTorch-based toolkit for machine learning on molecules, proteins, and biomedical knowledge graphs. Graph models represent atoms or other entities as connected points and relationships.

In plain words
What is it for?
Use it to predict molecular or protein properties, estimate drug–target binding, reason over biomedical relationships, generate molecules, plan retrosynthesis, and train graph neural networks.
Why use it?
It gives you ready-made datasets, model types, and task interfaces for building and testing drug-discovery models.

Skill for Claude CodeCodex

Part of the alkyl plugin — 27 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/kdevos12/alkyl/torchdrug
Any agent
npx skills add Kdevos12/ALKYL --skill torchdrug
Clone the repo
git clone --depth 1 https://github.com/Kdevos12/ALKYL

Made for: Claude Code, Codex.

Or install alkyl, the plugin that ships this one along with the rest of its 27 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for torchdrug

README.md
[![agentmods](https://agentmods.dev/badge/skills/kdevos12/alkyl/torchdrug.svg)](https://agentmods.dev/skills/kdevos12/alkyl/torchdrug)
Your own site
<a href="https://agentmods.dev/skills/kdevos12/alkyl/torchdrug"><img src="https://agentmods.dev/badge/skills/kdevos12/alkyl/torchdrug.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 885 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00044 $0.00885
Opus 5 $0.00022 $0.00443
Sonnet 5 $0.00009 $0.00177
Haiku 4.5 $0.00004 $0.00089

Measured 4d ago against content hash 73657d7e6ea8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

torchdrug scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/torchdrug/SKILL.md · 94 lines

How it starts

The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TorchDrug

PyTorch toolkit for drug discovery — graph neural networks on molecules, proteins, and biomedical knowledge graphs. 40+ datasets, 20+ model architectures, modular task/model interface.

When to Use This Skill

  • Predicting molecular properties (solubility, toxicity, BBB penetration, quantum chemistry)
  • Protein function/stability/localization/interaction prediction
  • Drug-target binding affinity (PDBBind, BindingDB)
  • Knowledge graph completion and drug repurposing (Hetionet)
  • De novo molecular generation and property optimization (GCPN, flows)
  • Retrosynthesis planning (USPTO-50k, CenterIdentification + SynthonCompletion)
  • Training GNNs (GCN, GAT, GIN, SchNet, GearNet, RGCN) on chemical data
  • Transfer learning with pre-trained protein models (ESM, ProteinBERT)

Quick Start

from torchdrug import datasets, models, tasks
import torch
from torch.utils.data import DataLoader

# 1. Dataset
dataset = datasets.BBBP("~/datasets/")
train_set, valid_set, test_set = dataset.split()

# 2. 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"
)

# 3. Task
task = tasks.PropertyPrediction(
    model, task=dataset.tasks,
    criterion="bce", metric=["auroc", "auprc"]
)

# 4. Train
optimizer = torch.optim.Adam(task.parameters(), lr=1e-3)
for epoch in range(100):
    for batch in DataLoader(train_set, batch_size=32, shuffle=True):
        loss = task(batch)
        optimizer.zero_grad(); loss.backward(); optimizer.step()

Router — What to Read

Task Reference
Data structures (Graph, Molecule, Protein), training loop, task/model interface references/core-data.md
Molecular property prediction: datasets, tasks, model selection, training references/molecular-property.md
Protein modeling: sequence & structure models, datasets, pre-training references/protein-modeling.md
Knowledge graph completion, drug repurposing, Hetionet references/knowledge-graphs.md
Molecular generation: GCPN, flows, property optimization references/molecular-generation.md
Retrosynthesis: CenterIdentification, SynthonCompletion, USPTO-50k references/retrosynthesis.md
Full model catalog: GCN, GAT, GIN, SchNet, GearNet, ESM, TransE, RotatE… references/models-reference.md

Read the full file on GitHub · 94 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 94 lines · 44 tokens per session scan A 73657d7e6ea8

Subscribe to this mod's changes

torchdrug is a skill published in the GitHub repository Kdevos12/ALKYL (6 stars, last pushed 5mo ago), licensed MIT. It adds 44 tokens to every session and 885 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

datamol

Pythonic wrapper around RDKit with simplified interface and sensible defaults. Preferred for standard drug discovery including SMILES parsing, standardization, descriptors, fingerprints, clustering, 3D conformers, parallel processing. Returns native rdkit.Chem.Mol objects. For advanced control or custom parameters…

synthetic-sciences/openscience · 67 tokens

deepchem

Molecular ML with diverse featurizers and pre-built datasets. Use for property prediction (ADMET, toxicity) with traditional ML or GNNs when you want extensive featurization options and MoleculeNet benchmarks. Best for quick experiments with pre-trained models, diverse molecular representations. For graph-first…

synthetic-sciences/openscience · 78 tokens

molecular-optimization

Iterative lead optimization with analyze-reason-generate-verify-evaluate loop. Paper-backed (MT-Mol, DrugR, MultiMol).

synthetic-sciences/openscience · 34 tokens

admet-reasoning

Interpretable ADMET analysis with mechanistic reasoning. Maps liabilities to structural causes and biological pathways. Based on CoTox (Park 2025) and DrugR (Liu 2026).

synthetic-sciences/openscience · 47 tokens

rdkit

Cheminformatics toolkit for fine-grained molecular control. SMILES/SDF parsing, descriptors (MW, LogP, TPSA), fingerprints, substructure search, 2D/3D generation, similarity, reactions. For standard workflows with simpler interface, use datamol (wrapper around RDKit). Use rdkit for advanced control, custom…

synthetic-sciences/openscience · 80 tokens

smiles-validation

Strict SMILES validation, structural comparison, and modification verification. Catches invalid LLM-generated molecules.

synthetic-sciences/openscience · 24 tokens