torchdrug
Skill by K-Dense-AI
Builds and troubleshoots TorchDrug 0.2.1 workflows for molecular graphs, protein models and knowledge graph reasoning. Built for developers who write or debug code that imports torchdrug.
Install torchdrug
Built from the published package, never by AI.
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/scientific-agent-skills/skills/torchdrug ~/.claude/skills/torchdrugRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/scientific-agent-skills/skills/torchdrug ~/.gemini/antigravity-cli/skills/torchdrugAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
TorchDrug is a modular PyTorch graph-learning stack, and this skill guides its use. The workflow loads a datasets.* dataset, chooses a models.* representation model, wraps it in a tasks.* objective, and trains and evaluates it with core.Engine. The skill covers molecular property prediction, self-supervised pretraining, molecule generation, retrosynthesis, protein representation learning, and knowledge graph reasoning, targeting TorchDrug 0.2.1.
Written from the project's SKILL.md and checked against it.
What it can do
- Property predictionShows a ClinTox to GIN to PropertyPrediction workflow trained with Engine.
- Self-supervised pretrainingCovers InfoGraph and AttributeMasking tasks for molecular encoders.
- Molecule generationDescribes GCPN and GraphAF workflows built on the ZINC250k dataset.
- RetrosynthesisExplains CenterIdentification, SynthonCompletion and Retrosynthesis tasks on USPTO50k.
- Knowledge graph reasoningCovers RotatE embedding and NeuralLP workflows on FB15k237.
- Protein modelingBuilds proteins from sequences or PDB files and uses ESM and GearNet encoders.
- Version and environment checkInspects Python, PyTorch and TorchDrug versions before generating code.
- Troubleshooting guidanceCovers install failures, feature dimension, device and checkpoint mismatches.
What you need
- Python 3.7 to 3.10
- PyTorch 1.8 to 2.0
- torch-scatter and torch-cluster matched to the PyTorch build
- RDKit and fair-esm
- Network access for uncached datasets and weights
Try asking
- Train a GIN property predictor on ClinTox with TorchDrug
- Pretrain a molecular encoder with InfoGraph in TorchDrug
- Why does my torchdrug import fail on Apple Silicon?
Good to know
- MPS is unsupported. Apple Silicon runs CPU only and needs native builds of torch-scatter and torch-cluster.
- Python 3.11+ and PyTorch 2.1+ are not verified and are not presented as supported.
- The old ClinTox HTTP download URL fails, so the skill uses the HTTPS asset.
- Example training runs are illustrative and were not run to convergence.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/torchdrug/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: Read Write Edit Bash
-
SKILL.md12 KB -
references/core_concepts.md7 KB -
references/datasets.md9 KB -
references/knowledge_graphs.md6 KB -
references/models_architectures.md6 KB
Show all 10 files
-
references/molecular_generation.md6 KB -
references/molecular_property_prediction.md7 KB -
references/protein_modeling.md8 KB -
references/retrosynthesis.md7 KB -
references/review.md7 KB
Alternatives to torchdrug
All alternatives →Searches arXiv for scientific papers and preprints, extracts their metadata and abstracts, and downloads PDF or HTML full text. Suited to users who need research papers, literature or specific arXiv IDs.
Downloads AlphaFold predicted structures and PAE matrices for a UniProt ID, then reports pLDDT confidence, domain boundaries and disorder. Built for users who already have a UniProt accession.
Queries the QuickGO and Evidence & Conclusion Ontology REST API to map genes to Gene Ontology terms. Built for researchers doing functional annotation and GO hierarchy exploration.
Connects an AI assistant to Peloton to browse fitness classes, check live and archived schedules, and manage workouts. Built for Peloton users who want to plan rides from their assistant.
Queries NCBI Gene through the E-utilities and Datasets API. It helps researchers search genes by symbol or ID, retrieve gene details, and run batch lookups for annotation and functional analysis.
Prepares and launches nf-core/pacsomatic runs for matched tumor-normal PacBio HiFi data starting from unaligned BAM files. It generates samplesheets and pinned launch artifacts, then runs locally or submits to a scheduler.
Compare with literature-search-arxiv, alphafold-database-fetch-and-analyze or quickgo-database
torchdrug: common questions
Which TorchDrug version does this skill target?
It targets TorchDrug 0.2.1, which the source describes as the current official documentation and latest published release, rechecked October 1, 2026.
Which Python and PyTorch versions are supported?
The source lists Python 3.7 through 3.10 and PyTorch 1.8 through 2.0 for TorchDrug 0.2.1.
Does it run on Apple Silicon GPUs?
No. The source says Apple Silicon is CPU only with native builds, and MPS is unsupported.
How do I install torchdrug?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is torchdrug free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is torchdrug safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to torchdrug?
Similar skills: literature-search-arxiv, alphafold-database-fetch-and-analyze, quickgo-database, peloton.
