planning-workflows
Run AiZynthFinder retrosynthesis planning and one-step expansion through CLI, Python APIs, and optional notebook interfaces.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- planning-workflows
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Run AiZynthFinder retrosynthesis planning and one-step expansion through CLI, Python APIs, and optional notebook interfaces.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/api-reference.md6.8 KB
- 参考文档references/cli-reference.md5.3 KB
- 参考文档references/troubleshooting.md9.1 KB
- 参考文档references/workflows.md7.6 KB
- 脚本scripts/build_aizynthcli_command.py4.6 KB
03 SKILL.md 正文
Planning Workflows
Use this sub-skill when the task is to execute or script AiZynthFinder retrosynthesis planning, construct an aizynthcli command, call AiZynthFinder or AiZynthExpander from Python, debug target SMILES setup, checkpoint a batch run, or launch the optional notebook interface.
Before You Run
- Confirm
aizynthfinderis importable and theaizynthclientry point is onPATH. - Confirm a configuration file or config dictionary is available and points to usable stock, expansion-policy, and optional filter assets.
- If config/assets are missing, first use
../configuration-and-data/SKILL.md. - Decide whether
--smilesis a literal single SMILES or a text file with one SMILES per row; multiprocessing requires a file. - Decide which policy, filter, and stock keys to select at execution time; key names must match loaded config entries.
- Send output parsing, route images, scoring, clustering interpretation, and dataframe work to
../route-analysis/SKILL.md. - Send custom pre/post-processing implementations, plugins, custom stocks, or custom search classes to
../extension-and-development/SKILL.md.
Workflow Map
- For safe CLI command construction, use
scripts/build_aizynthcli_command.pyand then run the printed command in the intended environment. - For CLI behavior, flags, defaults, and command patterns, read
references/cli-reference.md. - For end-to-end single, batch, checkpointed, API, one-step expansion, and notebook recipes, read
references/workflows.md. - For public API signatures, lifecycle ordering, and return-object notes, read
references/api-reference.md. - For concrete failure symptoms and recoveries, read
references/troubleshooting.md.
Quick Routes
- Single CLI target: build
aizynthcli --config CONFIG --smiles SMILES, optionally with--output trees.json. - Batch CLI targets: build
aizynthcli --config CONFIG --smiles smiles.txt --output output.json.gz, optionally with--checkpoint checkpoint.json.gz. - Parallel batch: use
--nproc Nonly when--smilesnames an existing file. - Python planning: instantiate
AiZynthFinder, select stock/policy/filter keys, settarget_smiles, runprepare_tree(),tree_search(show_progress=False),build_routes(), then callextract_statistics()andstock_info(). - One-step expansion: instantiate
AiZynthExpander, select policies and optional filters, then calldo_expansion(smiles, return_n=5, filter_func=None). - GUI/notebook: use
aizynthapp --config CONFIGor create anAiZynthAppinside Jupyter only when an interactive notebook environment is available.
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).