aizynthfinder-retrosynthesis
AiZynthFinder retrosynthetic route planning (CASP) from AstraZeneca Molecular AI.
Skill by FridrichMethod
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/fridrichmethod-aizynthfinder-retrosynthesis
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, finance
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/aizynthfinder-retrosynthesis
What's inside
- Skill name
aizynthfinder-retrosynthesis- Description
- AiZynthFinder retrosynthetic route planning (CASP) from AstraZeneca Molecular AI. Monte Carlo tree search guided by a template-based neural expansion policy recursively disconnects a target SMILES until precursors are found in a purchasable stock. Covers config.yml (v4 format), aizynthcli batch screening, the AiZynthFinder/AiZynthExpander Python API, one-step disconnections, custom stocks via smiles2stock, scorers, Retro*/breadth-first/DFPN search alternatives, and reading output.json.gz / trees.json. Use for synthesis route planning, synthesizability screening, and building-block/precursor search. For reaction barriers use neb-irc-activation-energy; for 2D reaction scheme drawing use rdkit-chemdraw-cdxml.
- License
- MIT
- Instructions
- 387 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# AiZynthFinder Retrosynthesis
## Overview
AiZynthFinder performs computer-aided synthesis planning (CASP): a search algorithm — Monte Carlo tree search by default — recursively disconnects a target molecule into precursors, guided by a neural expansion policy that ranks known reaction templates. The search terminates when all precursors are found in a *stock* (a set of purchasable building blocks) or the maximum depth is reached. Output is a ranked set of reaction trees plus per-target statistics (`is_solved`, step count, precursors in/out of stock).
Version covered: **4.4.1** (Python 3.10–3.12). The v4 config format differs substantially from v2/v3 as described in the 2020 paper — never copy a config from an old blog post without translating it.
## When to Use
- Planning a synthesis route for a designed or purchased target molecule
- Screening a compound library for synthesizability before committing to make-on-demand
- Finding purchasable precursors or building blocks that lead to a scaffold
- Ranking design ideas by route length and by how many precursors fall outside a catalogue
- Enumerating the first retro step only — plausible disconnections without a full tree
- Testing whether a specific bond can be made disconnection-aware (`break_bonds`) in a route
- Comparing solve rate across two building-block catalogues for the same target set
- Use `torchdrug` instead when training a retrosynthesis model rather than running route search
- For forward reaction barriers and transition states use `neb-irc-activation-energy`; for drawing the resulting scheme use `rdkit-chemdraw-cdxml`
## Prerequisites
- **Python packages**: `aizynthfinder` (4.4.x), `rdkit`, `pandas`
- **Data requirements**: a stock file (InChIKeys), a trained expansion policy (ONNX model + template CSV), optionally a filter policy
- **Environment**: Python 3.10–3.12. Default runtime is `onnxruntime`; TensorFlow is not needed unless serving remote models or loading legacy `.hdf5` Keras models.
Check before installing — `aizynthcli`, `download_public_data`, and `smiles2stock` ship with the package and may already be on PATH inside a pixi/conda env. Inside a pixi project, invoke them as `pixi run aizynthcli ...`.
```bash
command -v aizynthcli || {
conda create "python>=3.10,<3.13" -n aizynth-env -y
conda activate aizynth-env
python -m pip install "aizynthfinder[all]"
}
```
`[all]` adds molbloom (bloom-filter stocks), pymongo, route-distances (route clustering), scipy, and timeout-decorator. Drop it for a lighter install; add `[tf]` only for TF-serving or `.hdf5` models.
## Quick Start
```python
from aizynthfinder.aizynthfinder import AiZynthFinder
finder = AiZynthFinder(configfile="config.yml")
finder.stock.select("zinc")
finder.expansion_policy.select("uspto")
finder.target_smiles = "Cc1cccc(c1N(CC(=O)Nc2ccc(cc2)c3ncon3)C(=O)C4CCS(=O)(=O)CC4)C"
finder.tree_search()
finder.build_routes() # required before touching finder.routes
stats = finder.extract_statistics()
print(f"solved={stats['is_solved']} steps={stats['number_of_steps']} "
f"routes={stats['number_of_routes']} time={stats['search_time']:.1f}s")
finder.routes[0]["image"].save("route_top.png")
```
## Workflow
### Step 1: Get the Models and Stock
`download_public_data` fetches the public USPTO models and the ZINC stock subset (several hundred MB, from zenodo.org and figshare.com) and writes a ready-to-use `config.yml`.
```bash
# Skip if the folder already holds the models — this is a large download.
test -f my_folder/config.yml || download_public_data my_folder
ls my_folder
# uspto_model.onnx uspto_templates.csv.gz
# uspto_ringbreaker_model.onnx uspto_ringbreaker_templates.csv.gz
# uspto_filter_model.onnx zinc_stock.hdf5
# config.yml
```
### Step 2: Write or Adjust config.yml
The list short-cut means "template-based strategy, model first, templates second, defaults elsewhere". The same short-cut works for a single `filter` model path and a single `stock` file path.
```yaml
# config.yml — minimal
expansion:
uspto:
- uspto_model.onnx
- uspto_templates.csv.gz
stock:
zinc: zinc_stock.hdf5
```
```yaml
# config.yml — explicit form, the settings that matter in practice
search:
algorithm: mcts
algorithm_config:
C: 1.4
use_prior: True
prune_cycles_in_search: True
search_rewards: ["state score"]
max_transforms: 6
iteration_limit: 100
time_limit: 120
return_first: false
exclude_target_from_stock: True
expansion:
uspto:
type: template-based
model: uspto_model.onnx
template: uspto_templates.csv.gz
template_column: retro_template
cutoff_cumulative: 0.995
cutoff_number: 50
use_rdchiral: True
filter:
uspto:
type: quick-filter
model: uspto_filter_model.onnx
filter_cutoff: 0.05
stock:
zinc:
type: inchisetFrom FridrichMethod/awesome-skills, MIT.
More from FridrichMethod/awesome-skills
- 0.629score
access
FridrichMethod
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy.
SkillAFreshness: A★ 15Claude Code +9 - 0.625score
academic-paper-reviewer
FridrichMethod
Multi-perspective academic paper review with dynamic reviewer personas.
SkillAFreshness: A★ 15Claude Code +9 - 0.625score
access
FridrichMethod
Manage Telegram channel access — approve pairings, edit allowlists, set DM/group policy.
SkillAFreshness: A★ 15Claude Code +9 - 0.625score
academic-pipeline
FridrichMethod
Orchestrator for the full academic research pipeline: research -> write -> integrity check -> review -> revise -> re-review -> re-revise -> final integrity…
SkillAFreshness: A★ 15Claude Code +9 - 0.625score
academic-paper
FridrichMethod
12-agent academic paper writing pipeline.
SkillAFreshness: A★ 15Claude Code +9 - 0.625score
access
FridrichMethod
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy.
SkillAFreshness: A★ 15Claude Code +9 - 0.617score
accessibility-compliance
FridrichMethod
Web accessibility patterns for news and academic sites.
SkillAFreshness: A★ 15Claude Code +9 - 0.593score
ai-writing-detox
FridrichMethod
Eliminates AI-generated writing patterns that erode reader trust.
SkillBFreshness: B★ 15Claude Code +9 - 0.581score
academic-writing
FridrichMethod
Scholarly writing and research compliance.
SkillBFreshness: B★ 15Claude Code +9 - 0.548score
adaptyv-bio
FridrichMethod
API + Python SDK for ordering cell-free protein expression and binding assays.
SkillCFreshness: C★ 15Claude Code +9 - 0.548score
aeon
FridrichMethod
scikit-learn compatible Python toolkit for time series ML: classify, cluster, regress, segment, transform with 30+ algorithms (ROCKET, InceptionTime, KNN-DTW…
SkillCFreshness: C★ 15Claude Code +9 - 0.543score
ai-debt-detector
FridrichMethod
Use after generating code, after accepting AI suggestions, or when reviewing AI-written modules.
SkillCFreshness: C★ 15Claude Code +9
Signals
- Stars
- 15
- Forks
- 1
- Open issues
- 2
- Last commit (this folder)
- Aug 23, 2026 (2 months ago)
- Last release
- May 20, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/FridrichMethod/awesome-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from FridrichMethod
- 0.629score
access
FridrichMethod
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy.
SkillAFreshness: A★ 15Claude Code +9 - 0.625score
academic-paper-reviewer
FridrichMethod
Multi-perspective academic paper review with dynamic reviewer personas.
SkillAFreshness: A★ 15Claude Code +9 - 0.625score
academic-pipeline
FridrichMethod
Orchestrator for the full academic research pipeline: research -> write -> integrity check -> review -> revise -> re-review -> re-revise -> final integrity…
SkillAFreshness: A★ 15Claude Code +9 - 0.625score
academic-paper
FridrichMethod
12-agent academic paper writing pipeline.
SkillAFreshness: A★ 15Claude Code +9 - 0.625score
access
FridrichMethod
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy.
SkillAFreshness: A★ 15Claude Code +9 - 0.625score
access
FridrichMethod
Manage Telegram channel access — approve pairings, edit allowlists, set DM/group policy.
SkillAFreshness: A★ 15Claude Code +9
Cite this page
aizynthfinder-retrosynthesis skill. Agent Mart. https://agentmart.dev/skills/fridrichmethod-aizynthfinder-retrosynthesis (last updated 2026-10-24)