dgl-lifesci
Use DGL-LifeSci and dgllife for molecular graph learning, molecule featurization, datasets, property prediction, reaction prediction, binding affinity, model-zoo/pretrained models, and molecular generation workflows.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- dgl-lifesci
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Use DGL-LifeSci and dgllife for molecular graph learning, molecule featurization, datasets, property prediction, reaction prediction, binding affinity, model-zoo/pretrained models, and molecular generation workflows.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/repo-provenance.md2.0 KB
- 参考文档references/repo-routing-metadata.json503 B
- 参考文档references/troubleshooting.md3.0 KB
- 脚本scripts/check_dgllife_environment.py3.3 KB
03 SKILL.md 正文
DGL-LifeSci
Use this repo skill when a task involves DGL-LifeSci, the dgllife Python package, or DGL-based graph neural networks for chemistry and biology.
DGL-LifeSci builds on PyTorch, DGL, RDKit, NumPy/SciPy/Pandas, and scikit-learn. It covers molecule graph construction, featurization, datasets, property prediction, reaction prediction, protein-ligand binding affinity, pretrained/model-zoo architectures, molecule embeddings, link prediction, and molecular generative models.
Quick Start
Install the public package for normal use:
pip install dgllife
For source checkouts, install from the package directory:
cd python
python setup.py install
Verify imports before deeper work:
python - <<'PY'
import dgllife
print(dgllife.__version__)
PY
For a broader local diagnostic, run:
python scripts/check_dgllife_environment.py
Read references/repo-provenance.md before deciding whether this skill matches a current checkout. Read references/troubleshooting.md for package-wide import, dependency, data, download, and runtime issues.
Route By Task
sub-skills/molecule-data-prep/SKILL.md: use for SMILES/CSV/text inputs, RDKit molecule loading, DGL graph construction, atom/bond featurizers, built-in datasets, splits, metric helpers, and tiny fixture validation.sub-skills/property-prediction/SKILL.md: use for custom CSV supervised prediction, MoleculeNet, Alchemy, PubChem aromaticity, OGB graph property workflows, multitask labels/masks, metrics, and safe config generation.sub-skills/model-zoo-pretraining/SKILL.md: use fordgllife.modelconstructors, GNN/readout/model-zoo selection, pretrained model names, molecule embeddings, link prediction heads, and constructor signature inspection.sub-skills/reaction-prediction/SKILL.md: use for WLN reaction center prediction, candidate product ranking, USPTO datasets, atom-mapped reaction SMILES, candidate bond files, and rexgen-direct-style planning.sub-skills/binding-affinity/SKILL.md: use for PDBBind, local protein-ligand complexes, ACNN, PotentialNet, complex graph construction, ligand/protein file checks, and binding-affinity workflow troubleshooting.sub-skills/generative-models/SKILL.md: use for DGMG, JTVAE/JTNNVAE, molecular generation/reconstruction, SMILES/vocabulary validation, checkpoints, and generation-specific troubleshooting.
Common Workflow
- Classify the task by route above; start in
molecule-data-prepif raw molecules, labels, or graphs are not yet validated. - Check package imports and optional dependencies with
scripts/check_dgllife_environment.pyor the nearest sub-skill helper. - Use bundled references for signatures, configs, data formats, and failure modes rather than relying on source checkout examples.
- Run only tiny offline validations by default. Treat full training, dataset downloads, pretrained checkpoint downloads, PDBBind/USPTO/OGB downloads, benchmarks, and generative training as networked or long-running work that needs explicit user approval.
- When a task crosses areas, validate inputs first, inspect constructors second, then plan workflow-specific training/evaluation in the owning sub-skill.
Important Boundaries
- Do not route generic DGL graph operations here unless the task specifically involves DGL-LifeSci/dgllife or chemistry/biology graph workflows.
- Do not run original repository examples or tests as runtime instructions; use the distilled references and bundled helper scripts in this skill.
- Do not assume RDKit is optional for chemistry workflows. Many
dgllife.utilsand dataset paths require RDKit even when top-level import only prints a warning. - Do not promise GPU execution. Most guidance supports CPU smoke checks; large training can use GPU but should be planned separately.
- Do not overpromise root exports. Verify constructor availability with
model-zoo-pretraining/scripts/inspect_model_constructors.pywhen targeting a specific installeddgllifeversion.
Bundled Repo-Level Resources
references/repo-provenance.md: source snapshot, package version, evidence paths, and refresh checks.references/repo-routing-metadata.json: structured scenario placement for managedrepo-skills-routerimport.references/troubleshooting.md: cross-cutting DGL-LifeSci install/import/runtime guidance shared by all sub-skills.scripts/check_dgllife_environment.py: safe import/signature smoke checker for package-wide prerequisites.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).