
TorchDrug Molecular Graph Skill
Guides building and debugging TorchDrug 0.2.1 molecular, protein and knowledge-graph machine learning code
- Repository
- K-Dense-AI/scientific-agent-skills
- Stars
- 55,780
- Licence
- MIT
- Files
- 10 files
What it does
When installed, the agent gets a detailed guide for TorchDrug, a PyTorch library for learning from molecules, proteins and knowledge graphs. The agent first checks the Python, PyTorch and TorchDrug versions, then writes or repairs code that loads a dataset, picks a model, wraps it in a task such as property prediction, molecule generation or retrosynthesis, and trains it with the library's Engine. It also knows installation pitfalls for this older version, such as pinned package versions and Apple Silicon build issues.
Great for
- Developers training graph neural networks on molecules, such as toxicity or property prediction
- Researchers reproducing TorchDrug tutorials or self-supervised molecular pretraining
- Students learning drug-discovery machine learning who need a working starting point
Skip it if
- Projects needing current Python or PyTorch versions: the skill states 0.2.1 supports only Python 3.7-3.10 and PyTorch 1.8-2.0, so newer stacks are unverified and may break
- Clinical or safety decisions from model output: the examples were illustrative and not run to convergence, so results are not validated for real use
- Apple Silicon users expecting GPU acceleration: MPS is unsupported and the install requires native source builds
Try asking
- “Set up a TorchDrug 0.2.1 environment for molecular property prediction on Linux with CPU PyTorch 2.0”
- “Write a GIN model that predicts ClinTox toxicity labels with a scaffold split”
- “Debug a TorchDrug error about torch-scatter or torch-cluster wheels not matching my PyTorch version”
- “Build a GraphAF molecule generation script optimizing QED”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 10 original files, the MIT licence and an attribution note.
torchdrug.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip torchdrug.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip torchdrug.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Ask the agent to run the version check commands first so it can confirm your environment matches the supported matrix before writing code
- Specify your platform (Linux, Windows, Apple Silicon) and CUDA status so the install commands are correct
- Use scaffold splits rather than random splits if you need results that generalize to new molecules
What's inside
- references/core_concepts.md
- references/datasets.md
- references/knowledge_graphs.md
- references/models_architectures.md
- references/molecular_generation.md
- references/molecular_property_prediction.md
- references/protein_modeling.md
- references/retrosynthesis.md
- references/review.md
- SKILL.md
Redistributed unmodified from K-Dense-AI/scientific-agent-skills under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.