Formalized chemical reasoning for multi-step retrosynthesis
Trace Demo | End-to-End Example | Highlights | Selected Molecules | Quickstart
trace.mp4
Rachel treats retrosynthetic planning as a structured state -> action -> validation -> commit process rather than a one-shot text generation task. The current repository is an active research codebase being cleaned up for arXiv-facing presentation while remaining in day-to-day use.
The trace above is a visual walkthrough of the Rachel planning workflow from structured state to a committed retrosynthetic route.
- The trace is meant to show planning behavior, not only final route output
- It is the fastest way to see how Rachel moves from context to sandboxed candidates to validated commitment
The figure below shows a full route-level comparison between a PaRoutes ground-truth plan and Rachel's generated result on case n1_366.
This example is included as a qualitative systems-level reference point. The point is not only whether a single step looks chemically plausible, but whether the route remains interpretable and structurally coherent at the full planning level.
| Capability | What it means in Rachel |
|---|---|
| Stateful planning | Rachel reasons over persistent session state instead of isolated one-shot answers. |
| Grounded operator space | Bond disconnection and FGI are treated as complementary planning operators. |
| Sandbox before commitment | Candidate steps are tried locally before they affect the main route tree. |
| Validation-gated execution | Feasibility checks, atom balance, and related validators help control commitment. |
| Structured route memory | Accepted steps become explicit route-tree objects rather than only free-form text. |
| LLM as strategy layer | The LLM helps organize search and choice, rather than acting as an unchecked chemistry oracle. |
Rachel combines:
- a session-driven planning workflow
- chemistry-grounded operators such as bond disconnection and FGI
- sandboxed local trials before route commitment
- validator-gated route construction
- route-tree memory and audit state
The goal is not just to propose a route, but to make route construction inspectable, recoverable, and chemically checkable.
flowchart LR
A["Current State"] --> B["Candidate Action"]
B --> C["Sandbox Trial"]
C --> D["Validation"]
D --> E["Commit or Reject"]
E --> F["Updated Route Tree"]
Candidate actions are explored before they are written into the route. Validated steps move forward into the main tree; rejected attempts remain informative planning artifacts rather than disappearing into free-form text.
Rachel is currently showcased with three qualitative examples chosen to cover complementary strengths.
![]() QNTR |
![]() Losartan |
![]() Rivaroxaban |
| Molecule | Role | Route depth | What it highlights |
|---|---|---|---|
QNTR |
Experimentally grounded example | 6 steps | A interpretable route tied to real synthesis experience |
Losartan |
Canonical medicinal chemistry target | 4 steps | Convergent route logic with recognizable medicinal chemistry disconnections |
Rivaroxaban |
Deeper drug-like example | 5 steps | Longer-horizon planning with a broader transformation mix |
An experimentally grounded molecule connected to my own synthesis experience. This is a truly flurescence probe that target the NO2-reduction probe and I finished the whole chemical synthesis process, the condition optimization. We both choose to split the target molcular into three main part as using the same terminal mols, same intermediate and reaction.
Even though the first version of Rachel has the mistake and did fgi-action not that good, the ring close/open also not that easy to predict and run synthesis map before experiments without refs in reality. The whole route and design strategy did make me excited. This was also truly an important reason that I began to make it a more chemical-feasible system.
- Short 6-step route from 4 starting materials
- Useful as a compact demonstration of interpretable planning
- Especially valuable because the accepted route reflects strategy beyond simple template satisfaction
A canonical medicinal chemistry target with a recognizable convergent route.
- 4-step route from 4 starting materials
- Highlights tetrazole formation, N-alkylation, and Suzuki coupling logic
- Useful as a benchmark-like example that many readers can immediately interpret
A deeper drug-like example with a richer transformation mix.
- 5-step route from 4 starting materials
- Highlights Buchwald-Hartwig amination, FGI, cyclization, and amide formation
- Useful for showing that Rachel is not limited to short or purely toy routes
The figure below places the Losartan and Rivaroxaban examples into one annotated comparison view. It gives the README a more complete qualitative picture of how Rachel behaves on two recognizable drug-like targets with different route depths and transformation profiles.
Taken together, these two cases make the contrast especially clear:
Losartanemphasizes classical convergent medicinal chemistry logicRivaroxabanemphasizes deeper route depth and operator diversity- The pair helps readers compare route style, not just isolated outcomes
Current local runs assume a Python environment with the main research dependencies already available, including Python 3.10+, RDKit, numpy, and Pillow.
from Rachel.main import RetroCmd
cmd = RetroCmd("my_session.json")
cmd.execute(
"init",
{
"target": "CC(=O)Nc1ccc(O)cc1",
"name": "Paracetamol",
"terminal_cs_threshold": 1.5,
},
)
ctx = cmd.execute("next")
cmd.execute(
"try_precursors",
{
"precursors": ["CC(=O)Cl", "Nc1ccc(O)cc1"],
"reaction_type": "Schotten-Baumann acylation",
},
)
cmd.execute(
"commit",
{
"idx": 0,
"reasoning": "Acylation with simple, accessible precursors.",
"confidence": "high",
},
)This is a protocol-level example, not a full benchmark workflow. More technical notes are preserved in usage notes.
Repository Map
- main: orchestration, session logic, route tree, reports, and command interface
- chem_tools: chemistry-grounded operators and validation utilities
- tools: helper scripts for runs, analysis, visualization, and related research workflows
- tests: current validation and experiment-support material
- Active research codebase
- Currently being prepared for arXiv-facing presentation
- Documentation is being cleaned up, but the repository remains under active use
- Core workflow is already in use
- Not yet a fully hardened OSS release


