Install
openclaw skills install @zbc0315/synomegaRetrosynthesis, reaction prediction, and synthesizability for organic molecules, using the synomega Python package (pip install synomega) — runs locally, works out of the box. Six capabilities: single-step retrosynthesis (product → reactants, candidate disconnections), single-step forward reaction prediction / reaction outcome (reactants → product), multi-step route planning down to purchasable building blocks, a continuous synthesizability / makeability score (SynScore), reaction-plausibility screening, and multi-component evolution (growing a forward synthesis network from a set of reactants, e.g. one-pot / multicomponent chemistry). Use this whenever the user gives a molecule (as SMILES or a resolvable name) and asks how to make / synthesize it, whether it can be made or how hard, how to rank molecules by ease of synthesis, what reactants give a target, what product a set of reactants gives, a reaction outcome, or how a reactant mixture evolves — i.e. for retrosynthesis, synthesis planning, cheminformatics, and reaction-prediction tasks. Safety judgments for hazardous, controlled, or otherwise dual-use compounds are deferred to the host's safety policy (see "Safety boundary / dual-use" below).
openclaw skills install @zbc0315/synomegaSynOmega is a Python package (PyPI, docs) for organic small-molecule reactions. It exposes six capabilities behind one install:
| # | Capability | Direction | Helper command |
|---|---|---|---|
| 1 | Single-step retrosynthesis | product → reactants | single-step |
| 2 | Single-step forward prediction | reactants → product | forward |
| 3 | Multi-step route planning | target → route to purchasable stock | plan |
| 4 | Synthesizability score (SynScore) | target → 0–1 makeability | score |
| 5 | Reaction-plausibility screening | filter single-step candidates | env toggle |
| 6 | Multi-component evolution | reactant set → forward synthesis network | evolve |
It runs entirely locally. It works out of the box — the pretrained models and building-block stock download automatically on first use, so there is nothing to train or configure.
⚠️ Network + disk notice (first use downloads a few hundred MB). The first call automatically reaches out to a remote mirror (USTC GitLab and/or GitHub) and downloads the model(s) and stock — a few hundred MB — into
~/.cache/synomega. Nothing else phones home, but this first fetch does. Controls: pre-fetch withsynomega download; change the cache dir withSYNOMEGA_CACHE; pick a mirror withSYNOMEGA_MIRROR(ustcorgithub). In air-gapped, bandwidth-limited, privacy-sensitive, or reproducibility-critical environments, pre-fetch (or point at a local model/stock) and treat the download as an explicit opt-in rather than a surprise.
pip install "synomega[gnn]>=0.9.4" # neural D-MPNN backend (torch) — recommended
synomega download # optional: pre-fetch the default assets
Requires Python ≥ 3.10.
scripts/synomega_run.py prints JSON for every operation — no configuration, it
downloads what it needs on first call. Always pass a valid SMILES (dot-separate
multiple molecules).
# 1. single-step retrosynthesis — "what reacts to give X?"
python scripts/synomega_run.py single-step "CC(=O)Nc1ccccc1O" --top-k 10
# 2. forward prediction — "what do these reactants give?"
python scripts/synomega_run.py forward "CC(=O)O.NCc1ccccc1" --top-k 5
# 3. multi-step route planning — "how do I make X?"
python scripts/synomega_run.py plan "CC(=O)Nc1ccccc1O" --max-depth 5
# 4. synthesizability score — "can X be made / how hard?" (simplify model by default)
python scripts/synomega_run.py score "CC(=O)Nc1ccccc1O" --max-steps 5
# 6. multi-component evolution — grow a forward synthesis network
python scripts/synomega_run.py evolve "CC(=O)c1ccccc1.C=O.CNC" --max-depth 3 --score-threshold 0.01
(Capability 5, reaction plausibility, is an env toggle applied to the others — see below.)
single-stepGiven a product, rank one-step disconnections into candidate reactants.
python scripts/synomega_run.py single-step "CC(=O)Nc1ccccc1O" --top-k 10
Output: {"target", "predictions": [{"rank", "reactants": [SMILES,...], "score" (0–1, higher = more likely), "plausibility" (null unless screening is on), "template_id"}]}. Present the top few disconnections.
forwardGiven reactants, rank the likely products. Uses a separate forward model.
python scripts/synomega_run.py forward "CC(=O)O.NCc1ccccc1" --top-k 5
Output: {"reactants", "products": [{"rank", "product" (SMILES), "score" (0–1 forward probability), "template_id"}]}. Template-based (product top-1 ≈ 0.64):
treat products as candidates, not guarantees.
planSearch an AND-OR graph for a full route from the target down to purchasable building blocks.
python scripts/synomega_run.py plan "CC(=O)Nc1ccccc1O" --max-depth 5
python scripts/synomega_run.py plan "CC(=O)Nc1ccccc1O" --simplify # cheaper search
python scripts/synomega_run.py plan "CC(=O)Nc1ccccc1O" --library molport # MolPort stock
python scripts/synomega_run.py plan "CC(=O)Nc1ccccc1O" --forward-consistency
Output: {"target", "algorithm", "solved" (bool — a fully-purchasable route exists), "routes": [route tree, best first]}. Each route tree nests
reactants → product recursively until every leaf is an in-stock building block;
read it top-down. Options: --algorithm {retrostar,mcts,bfs}, --max-routes,
--exclude-target, --simplify, --forward-consistency (with --forward-top-k,
default 3 — keep a single-step candidate only if its retro template is in the
forward model's top-k for its reactants; prunes forward-implausible disconnections).
scoreScore a target 0–1 for how makeable it is, for ranking a set of molecules. Runs one route search internally, then folds it into a score.
python scripts/synomega_run.py score "CC(=O)Nc1ccccc1O" --max-steps 5
python scripts/synomega_run.py score "CC(=O)Nc1ccccc1O" --original # unconstrained model
Output (a MoleculeReport dict): the headline is score = 1/(U+1)**U, where
U is the number of the best route's starting materials that are not
purchasable. Solved (U=0) → 1.0; U=1 → 0.5; U=2 → 0.11; no route → 0. Also:
solved, bb_coverage (fraction of leaves purchasable), min_steps,
num_leaves, num_purchasable_leaves. Use score to rank candidates; use
solved to compare against published solve-rate. Defaults to the
simplification-constrained model @ expansion width 10 (synomega's recommended
scoring config); --original reverts to the unconstrained model.
An optional mapping-free dual-tower model scores how likely each single-step
candidate's reactants → target actually happens, and drops implausible ones
(it only removes wrong disconnections, never re-ranks the rest). It applies to
single-step, plan, and score alike. Off by default — it does not improve
top-k recall and adds latency.
SYNOMEGA_PLAUSIBILITY=1 SYNOMEGA_PLAUSIBILITY_THRESHOLD=0.4 \
python scripts/synomega_run.py single-step "CC(=O)Nc1ccccc1O" --top-k 10
When on, each single-step prediction gains a plausibility field (0–1). In
Python: synomega.load_default_planner(plausibility=True, plausibility_threshold=0.4).
evolveFrom a set of starting reactants, repeatedly pick two molecules from a growing pool, run the forward model, and add products back — growing a forward synthesis network. Good for exploring multi-component / one-pot chemistry.
python scripts/synomega_run.py evolve "CC(=O)c1ccccc1.C=O.CNC" \
--max-depth 3 --score-threshold 0.01 --top 20
Output: {"reactants", "stats", "num_molecules", "num_reaction_edges", "molecules": [{"smiles", "total_score", "depth", "step_score", "parents", "template_id"}]}. Each molecule's total_score = min(parent totals) × step probability (starting reactants = 1.0); depth is the synthesis-tree depth.
Options: --forward-top-k (products per pair), --frontier-width (cap fan-out for
many reactants), --top (how many products to report). In Python,
MultiComponentEvolution(...).evolve([...]) also supports mode="disk" (SQLite)
for reactant sets whose intermediates do not fit in RAM.
--library {zinc,molport} (plan, score): pick which built-in commercial
building-block set counts as "purchasable" — zinc (default) or molport (a
MolPort in-stock reagent set, better coverage of medicinal-chemistry starting
materials). Ignored when SYNOMEGA_STOCK points at your own catalogue.--exclude-target (plan, score): treat the target as not purchasable
even if it is itself in the stock, so a catalogue molecule is not reported as
trivially solved in zero steps. Use it for "how would you actually make X" about
a possibly-buyable molecule.--simplify (plan) / --original (score): the
simplification-constrained single-step model proposes only fragmentation
disconnections (split into ≥2 precursors) and reaches stock with fewer
expansions. score uses it by default; plan uses the original model unless you
pass --simplify.import synomega
planner = synomega.load_default_planner() # default model + stock (downloads once)
# 1. single-step retro
for p in planner.model.predict("CC(=O)Nc1ccccc1O", top_k=10):
print(p.score, p.reactants)
# 3. multi-step plan
result = planner.plan("CC(=O)Nc1ccccc1O", max_depth=5)
print(result.solved); print(result.best_route.describe())
# 4. synthesizability score (recommended entry — simplify model @ k=10)
scorer = synomega.load_default_scorer()
print(scorer.score("CC(=O)Nc1ccccc1O").as_dict())
# 2 + 6. forward + evolution
from synomega.forward import ForwardTemplateGNN, MultiComponentEvolution
fwd = ForwardTemplateGNN.default()
for pred in fwd.predict("CC(=O)O.NCc1ccccc1", top_k=5):
print(pred.score, pred.product)
evo = MultiComponentEvolution(fwd, max_depth=3, score_threshold=0.01)
res = evo.evolve(["CC(=O)c1ccccc1", "C=O", "CNC"]); print(res.describe()); res.close()
Switch the built-in commercial library, or compose libraries, in Python:
from synomega.stock import InMemoryStock, resolve_stock
planner = synomega.load_default_planner(stock=InMemoryStock.molport()) # or .zinc()
mine = InMemoryStock.from_file("my_catalogue.smi")
combined = InMemoryStock.zinc() | mine # union (supplement)
stock = resolve_stock("molport", user_stock=mine, mode="supplement") # declarative form
To use your own checkpoint/stock instead of the defaults, set SYNOMEGA_MODEL,
SYNOMEGA_STOCK (+ SYNOMEGA_STOCK_KEYS=1 for a precomputed .keys file), and
SYNOMEGA_FORWARD_MODEL (the helper reads them), or build the objects directly
with TemplateGNN.from_pretrained(...) / InMemoryStock.from_keys_file(...).
--max-depth / --max-steps / --top-k finds more but is slower; start
at the defaults (depth 5, top-k 10).plan/score; what makes X →
single-step; what do these give → forward; explore a reactant mixture →
evolve.Retrosynthesis is inherently dual-use: the same route-planning that helps legitimate chemistry can also apply to hazardous, controlled, or otherwise regulated compounds. This skill does not itself decide what is permissible — that judgment is deferred to the host's safety policy, which takes precedence over any request handled here.