pytdc
Skill54 starsChanged 3 months agoMITView on GitHub
Use Therapeutics Data Commons through the PyTDC Python package for registry discovery, approved dataset access, task-aware splits (scaffold, cold-start, temporal, combination), evaluator metrics, benchmark groups, and bounded molecular-oracle workflows. Use this skill to find which TDC datasets exist for a therapeutic task, load them with a split that does not leak, score predictions with the task's own official metric rather than a generic one, and run benchmark groups reproducibly. Also trigger on PyTDC, Therapeutics Data Commons, tdc.single_pred, tdc.multi_pred, ADMET Benchmark Group, scaffold split, get_split, or molecular oracles such as GSK3B, JNK3 and DRD2.
- Installs packages
11 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- BrightGold70/skillstheir own version, first seen Nov 8, 2026
- MarieLynneBlock/arcanum-artifextheir own version, first seen Nov 1, 2026
- davidanthonyn/claude-skillstheir own version, first seen Oct 20, 2026
- patoangolano/bio-stackedited, first seen Oct 15, 2026
- Luooops/skillsedited, first seen Oct 13, 2026
- garri333/Skillstheir own version, first seen Oct 11, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 2
- Luooops/skills★ 191% same
- patoangolano/bio-stack★ 077% same
Wrote their own version · 9
- wu-yc/LabClaw★ 1.1ksame name
- LeonChaoX/qinyan-academic-skills★ 910same name
- qinyan-ai/qinyan-academic-skills★ 80same name
- MarieLynneBlock/arcanum-artifex★ 4same name
- BrightGold70/skills★ 1same name
- garri333/Skills★ 1same name
- uppifyagency/boilerplate-saas-2026★ 1same name
- yf8578/claude-skills-collection★ 1same name
- davidanthonyn/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository36 other files it gives its agents.
- adaptyvSkill
- admet-predictionSkill
- antibody-engineeringSkill
- autodock-vinaSkill
- binding-site-analysisSkill
- boltzSkill
- chemblSkill
- chemical-spaceSkill
- clinicaltrialsSkill
- datamolSkill
- deepchemSkill
- degradersSkill
- depmapSkill
- diffdockSkill
- esmSkill
- free-energy-perturbationSkill
- generative-designSkill
- glycoengineeringSkill
- immunogenicitySkill
- medchemSkill
- molecular-dynamicsSkill
- molfeatSkill
- ncats-araxSkill
- oligonucleotidesSkill
- openfdaSkill
- open-targetsSkill
- patent-landscapeSkill
- pkpd-translationSkill
- primekgSkill
- protein-binder-designSkill
- rdkitSkill
- retrosynthesisSkill
- rowanSkill
- tamarindSkill
- target-safetySkill
- uniprot-rcsbSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 7 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Use the official PyTDC distribution (import tdc) to discover therapeutic ML tasks, load approved datasets, apply task-appropriate splits, …
- Distinctive: line 42
Use an isolated CPython 3.11 environment and pin the reviewed snapshot:
- Distinctive: line 133
Use exact returned names. PyTDC performs fuzzy matching internally, but explicit matching avoids silently selecting the wrong …
- Distinctive: line 147
After the user approves the dataset, license, transfer, and storage:
- Distinctive: line 177
Read references/datasets.md before choosing a task or dataset.
- Very specific: line 195
Do not use undocumented cold_drug_target, temporal, or stratified=True examples.
- Distinctive: line 206
Use exact names from the installed evaluator registry:
- Very specific: line 223
Use specialized classes. Top-level from tdc import BenchmarkGroup is retained only as a deprecated compatibility path in 1.1.15.
- Very specific: line 246
Use scripts/benchmark_evaluation.py to validate a bounded JSON prediction plan before any group download.
- Very specific: line 267
Add --execute only after review.
- Distinctive: line 273
Read references/oracles.md before any oracle call.
- Distinctive: line 285
Every CLI uses lazy optional imports, safe relative output/cache paths, JSON summaries, bounded output, and no implicit dataset/model …
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
PyTDC (Therapeutics Data Commons)
Use the official PyTDC distribution (import tdc) to discover therapeutic ML
tasks, load approved datasets, apply task-appropriate splits, evaluate predictions,
and work with curated benchmark groups. Prefer package metadata over copied dataset
lists, and plan network/storage effects before constructing any loader.
Verified snapshot
- Research date: 2026-07-23
- PyPI stable: PyTDC 1.1.15, released 2025-03-31
- Package/source repository:
mims-harvard/TDC - Code license: MIT
- PyPI supplies only a source distribution and declares no
Requires-Python - The dependency graph makes CPython 3.11 the reproducible target used here:
cellxgene-census==1.15.0excludes Python 3.12, and PyTDC's constrained RDKit release has no CPython 3.13 wheel - PyTDC imports deprecated
pkg_resourcesat runtime. Setuptools 82 removed that module; pin the verified compatibility release setuptools 80.9.0. tdc.readthedocs.iostill identifies itself as TDC 0.4.1; use it as API cross-reference, not as release-version evidence- Upstream publishes no GitHub tags/releases or maintained changelog. Treat undocumented migration claims as uncertainty and verify against the installed 1.1.15 source/metadata.
See references/sources.md for dated evidence and known documentation conflicts.
Installation
Use an isolated CPython 3.11 environment and pin the reviewed snapshot:
uv venv --python 3.11 .venv-pytdc
uv pip install --dry-run --python .venv-pytdc/bin/python \
"setuptools==80.9.0" "PyTDC==1.1.15"
uv pip install --python .venv-pytdc/bin/python \
"setuptools==80.9.0" "PyTDC==1.1.15"The tested macOS ARM64 resolution installed 123 packages, including large
scientific/ML dependencies, so the environment itself can transfer and occupy
hundreds of megabytes before any dataset is downloaded. Review the dry run and
available disk first. The direct pins identify the reviewed API snapshot; generate
a platform-specific uv.lock in the user's project when every transitive version
must also be frozen.
For an ephemeral command:
uv run --python 3.11 \
--with "setuptools==80.9.0" --with "PyTDC==1.1.15" \
python scripts/discover_metadata.py --kind tasksTo check for a newer release, inspect the PyPI release history at
https://pypi.org/project/pytdc/. Before changing the pin, compare its source
distribution, dependencies, official repository, task registries, and smoke tests;
do not silently substitute the separate pytdc-nextml package.
Non-negotiable data and network policy
- Discover first. Reading
tdc.metadataor usingscripts/discover_metadata.pydoes not instantiate a loader or download data. - Plan second. Record the exact task/dataset, official task page, license, expected size, cache directory, split, metric, and reproducibility seed.
- Ask the user before downloading. Loader constructors fetch missing data. Some datasets and benchmark-group archives are large; model-backed oracles can fetch checkpoints; remote/docking oracles can transmit molecular structures.
- Execute only after approval. In bundled CLIs,
--executeacknowledges execution and--downloadis additionally required for MolGen corpora or supported oracle checkpoints. - Keep outputs bounded. Emit counts, schema, and small previews rather than full datasets, sequences, prediction arrays, or molecule corpora.
Cache and cost behavior
- Ordinary loaders default to
path="./data"and save files beneath that path. The bundled scripts instead default to explicit.pytdc-*directories. - Core downloads use Harvard Dataverse file endpoints when a local filename is absent. Newer resource classes may use other upstream services.
admet_group(path=...)and other benchmark-group constructors download and extract the group archive when<path>/<group>is absent.- Download-backed
Oracle(...)construction uses./oracleinternally. The bundled oracle CLI changes into a safe runtime directory before approved calls. - PyTDC 1.1.15 does not provide a universal cache quota, eviction policy, or
dataset-wide checksum manifest. Use
scripts/cache_audit.pyand manage disk retention explicitly. - Network transfer, local storage, decompression, parsing, feature generation, docking, and external service calls can all incur time or monetary cost.
The PyTDC code is MIT. Dataset/task licenses are heterogeneous: official task pages include per-dataset terms ranging from Creative Commons licenses to non-commercial restrictions or “Not Specified.” Verify the exact dataset's page and original source terms before download, redistribution, publication, or commercial use. Cite both TDC and the original dataset.
Start with metadata-only discovery
From this skill directory:
uv run --python 3.11 --with "setuptools==80.9.0" --with "PyTDC==1.1.15" \
python scripts/discover_metadata.py --kind datasets --task ADME --limit 50
uv run --python 3.11 --with "setuptools==80.9.0" --with "PyTDC==1.1.15" \
python scripts/discover_metadata.py --kind benchmarks --limit 50
uv run --python 3.11 --with "setuptools==80.9.0" --with "PyTDC==1.1.15" \
python scripts/discover_metadata.py --kind evaluators --limit 100The package API is also metadata-only:
from tdc.utils import retrieve_dataset_names, retrieve_benchmark_names
adme_names = retrieve_dataset_names("ADME")
admet_benchmarks = retrieve_benchmark_names("admet_group")Use exact returned names. PyTDC performs fuzzy matching internally, but explicit matching avoids silently selecting the wrong dataset/oracle.
Dataset workflow
Plan a split without downloading:
uv run --python 3.11 --with "setuptools==80.9.0" --with "PyTDC==1.1.15" \
python scripts/load_and_split_data.py \
--task ADME --dataset Caco2_Wang --method scaffold \
--seed 42 --data-dir .pytdc-dataAfter the user approves the dataset, license, transfer, and storage:
uv run --python 3.11 --with "setuptools==80.9.0" --with "PyTDC==1.1.15" \
python scripts/load_and_split_data.py \
--task ADME --dataset Caco2_Wang --method scaffold \
--seed 42 --data-dir .pytdc-data --executeVerified public import patterns include:
from tdc.single_pred import ADME, Tox
from tdc.multi_pred import DDI, DTI
from tdc.generation import MolGen, Reaction, RetroSynConstructors perform data access, so do not run them before approval:
data = ADME(name="Caco2_Wang", path=".pytdc-data")
frame = data.get_data(format="df")
split = data.get_split(
method="scaffold",
seed=42,
frac=[0.7, 0.1, 0.2],
)
# split keys are: train, valid, testRead references/datasets.md before choosing a task or dataset.
Split selection without overclaiming leakage control
random: default for loaders; default seed 42 and fractions 0.7/0.1/0.2.scaffold: documented generic support for molecule-based ADME, Tox, and HTS. PyTDC groups RDKit Bemis–Murcko scaffold strings (chirality disabled), but that does not prove absence of analog, duplicate, label, temporal, or provenance leakage.cold_split: multi-instance API. Pass exact dataframe columns, for examplemethod="cold_split", column_name=["Drug", "Target"]. Multi-column splitting can discard cross-partition rows and need not preserve requested row fractions.combination: built-in DrugSyn combination split.time: pair-loader API requiringtime_column; the verified built-in case isBindingDB_Patentwith itsYearcolumn. The API spelling istime, nottemporal.
Do not use undocumented cold_drug_target, temporal, or stratified=True
examples. For every split, record PyTDC version, parameters, row counts, and exact
entity overlap audits. PyTDC 1.1.15's random splitter uses the supplied seed for
test sampling but a fixed random_state=1 for validation sampling; do not describe
all partitions as independently varying with the seed.
Detailed semantics and caveats are in references/utilities.md.
Evaluators
Use exact names from the installed evaluator registry:
from tdc import Evaluator
mae = Evaluator(name="MAE")(y_true, y_pred)
auroc = Evaluator(name="ROC-AUC")(y_true_binary, predicted_scores)
pcc = Evaluator(name="PCC")(y_true, y_pred)PCC is the registered Pearson-correlation name; Pearson is not. Multi-class
registry names are micro-f1, macro-f1, and kappa. Thresholded binary metrics
default to 0.5. Metric direction and input shape are metric-specific; use the
official task/benchmark metric rather than choosing from task type alone.
Benchmark groups
Use specialized classes. Top-level from tdc import BenchmarkGroup is retained
only as a deprecated compatibility path in 1.1.15.
from tdc.benchmark_group import admet_group
# Run only after approval: construction may download the group archive.
group = admet_group(path=".pytdc-benchmarks")
benchmark = group.get("Caco2_Wang")
train_val = benchmark["train_val"]
test = benchmark["test"]
train, valid = group.get_train_valid_split(
seed=1,
benchmark=benchmark["name"],
split_type="default",
)For one run, group.evaluate({name: test_predictions}) returns metric results.
For leaderboard aggregation, pass a list of at least five prediction
dictionaries to group.evaluate_many(...). Do not index group.get(...) by
seed, and do not derive dummy predictions from test labels.
Use scripts/benchmark_evaluation.py to validate a bounded JSON prediction plan
before any group download. See references/utilities.md
for the exact JSON shape and API behavior.
Molecular generation and oracles
PyTDC supplies molecule corpora, evaluators, and oracles; it does not train or provide a generic molecule generator in the core workflow. Discover current names:
uv run --python 3.11 --with "setuptools==80.9.0" --with "PyTDC==1.1.15" \
python scripts/discover_metadata.py --kind oracles --limit 100Plan bounded local QED scoring:
uv run --python 3.11 --with "setuptools==80.9.0" --with "PyTDC==1.1.15" \
python scripts/molecular_generation.py score --oracle QED --smiles CCOAdd --execute only after review. LogP and SA call the downloadable fpscores
artifact in 1.1.15; they and DRD2/GSK3B/JNK3/CYP3A4_Veith also require
--download. The helper intentionally refuses remote services, docking,
distribution, and composite oracles. It preserves input order and never assumes
score direction.
Read references/oracles.md before any oracle call.
Bundled resources
Scripts
scripts/discover_metadata.py— download-free package registry discoveryscripts/load_and_split_data.py— task-aware split plan/explicit executionscripts/benchmark_evaluation.py— prediction validation and explicit evaluationscripts/molecular_generation.py— bounded local/checkpoint scoring and MolGen planscripts/cache_audit.py— read-only bounded cache manifest
Every CLI uses lazy optional imports, safe relative output/cache paths, JSON summaries, bounded output, and no implicit dataset/model download.
References
- references/datasets.md — task discovery, data access, cache behavior, and licensing
- references/utilities.md — splits, evaluators, and benchmark-group APIs
- references/oracles.md — oracle categories, side effects, and safe execution
- references/sources.md — dated authoritative sources and unresolved upstream gaps
Composing with the rest of the bundle
chembl→ before: PyTDC ships curated benchmark sets; ChEMBL is where a dataset for your target comes from. The split discipline here applies to both.rdkit/datamol/molfeat→ alongside: standardisation and featurisation. PyTDC supplies the data and the split; it does not choose your representation.deepchem→ after: the training loop, once the split is decided.admet-prediction→ instead: ADMET-AI is trained on 41 of these same TDC datasets. If you want numbers rather than a benchmark run, use it and skip the training entirely.generative-design→ alongside: TDC's oracles (GSK3B, JNK3, DRD2, QED, SA) are the standard scoring functions for de novo generation, and the usual way to overfit a generator.medchem→ after: an oracle-optimised molecule is not a real molecule until it survives alerts.
The split is the experiment. A random split on molecular data reports a number that will not
survive contact with prospective compounds, because congeneric series from one paper land on both
sides. That is the single reason to use PyTDC's loaders rather than train_test_split.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

