sciagent-skill-creator
Scaffold a new SciAgent-Skills entry. Picks pipeline/toolkit/database/guide template, creates skills/{category}/{name}/SKILL.md with valid frontmatter, appends…
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),
$ npx -y skills add jaechang-hits/SciAgent-Skills --skill aizynthfinder-retrosynthesis --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/aizynthfinder-retrosynthesisContext preview
The summary Claude sees to decide when to auto-load this skill.
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),
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"
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.
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 ...`.
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.
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")`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`.
# 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
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.
# config.yml — minimal
expansion:
uspto:
- uspto_model.onnx
- uspto_templates.csv.gz
stock:
zinc: zinc_stock.hdf5# 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: inchiset
path: zinc_stock.hdf5
post_processing:
min_routes: 5
max_routes: 25
all_routes: FalseValues can be pulled from the environment: `iteration_limit: ${ITERATION_LIMIT}`.
An unparseable target burns the whole time limit before failing. Check first.
from rdkit import Chem smiles = "Cc1
Turn your AI coding agent into a life sciences expert — 199 bioinformatics skills for Claude Code covering RNA-seq, single-cell analysis, genomics, proteomics, drug discovery, and more. Boosted BixBench from 65% to 92%. Open source.
Scaffold a new SciAgent-Skills entry. Picks pipeline/toolkit/database/guide template, creates skills/{category}/{name}/SKILL.md with valid frontmatter, appends…
Bayesian modeling with PyMC 5: priors, likelihood, NUTS/ADVI sampling, diagnostics (R-hat, ESS), LOO/WAIC comparison, prediction. Hierarchical, logistic, GP…
Time-to-event modeling with scikit-survival: Cox PH (elastic net), Random Survival Forests, Boosting, SVMs for censored data. C-index, Brier, time-dependent…
Guided statistical analysis: test choice, assumption checks, effect sizes, power, APA reporting. Pick tests, verify assumptions, or format results for…
Python statistical modeling: regression (OLS, WLS, GLM), discrete (Logit, Poisson, NegBin), time series (ARIMA, SARIMAX, VAR), with rigorous inference,…
DL cell/nucleus segmentation for fluorescence and brightfield microscopy. Pre-trained models (cyto3, nuclei, tissuenet) and a generalist flow-based algorithm…