This page is generated from the code repository every time the site is published. The change log is the commit history, the test results are from the run that preceded this build, and the notes are kept in the repository next to the code. Built 2026-09-11.
Live now
Four reaction families generate from any named substrate: Robinson annulation, SN2, Grignard reactions, Diels–Alder.
Benzene rings are read from names and SMILES.
Stereochemistry is drawn where the chemistry sets it: SN2 inversion, and the endo Diels–Alder adduct with cis and trans retained.
The base for a Robinson annulation is whatever the request names (NaOH, NaOEt, NaOMe, KOtBu).
330 mechanisms generated across the substrate space and inspected as drawings; 0 drawing problems.
The generator reproduces the chemist-signed-off Robinson annulation arrow for arrow.
185 generated panels re-sanitised by RDKit on 2026-09-11; 0 rejected.
Up next
Perspective drawing for bridged bicyclic products (norbornene-type), instead of the flat hexagon with the bridge inside.
Sean's fourth reaction family, once chosen. An aldol or Claisen condensation reuses most of what is built.
The Anthropic API key on the Cloudflare project, so the written explanations and the photo route come alive.
Open questions
Which reaction replaces acetal/hemiacetal formation as the fourth family.
More worked examples of the families already built, especially the cases students get wrong: each one becomes a test.
Comments
Leave a note here — a mechanism that looks wrong, a case to add, a decision made. It is stored with the site and shown to everyone who opens this page.
Loading comments…
Change log
2026-09-11
Status page: join wrapped commit-message lines
Public development status page, generated on every publish
/status is built from the repository at build time: STATUS.md (now / next / open questions), the git history as a change log, and the test and RDKit results recorded by the last run
test/run.sh and test/verify-with-rdkit.sh write .status/*.json summaries
npm run ship = test, RDKit check, build, deploy in one command, so the page can never be newer than the checks behind it
welcome page links to it
2026-09-10
Stereochemistry: parity and geometry on the graph, wedges from the drawing, SN2 inversion, Diels-Alder endo/retention
graph.ts: TetrahedralStereo (ordered neighbours + parity, SMILES semantics), BondGeometry (cis/trans), parity from positions calibrated against an ideal tetrahedron, atom classes and a stereocentre test
smiles.ts: reads @/@@ and / \, keeps the written neighbour order
stereo.ts: wedge/hash chosen per centre by embedding each candidate in 3D and recomputing the parity; forming/breaking bonds never carry the wedge; stale configuration pruned when a centre's neighbours change
engine.ts: stereoAfter hook for rules; IR bonds carry stereo/stereo_from
layout.ts: recorded double-bond geometry enforced by reflecting a subtree
sn2.ts: inverts a stated configuration, or draws one enantiomer of an unspecified stereocentre and inverts it, saying so
dielsalder.ts: four new centres set from a transition-state model (diene s-cis in plane, dienophile stacked, EWG endo); cis stays cis, trans stays trans; tested by wedge faces on flat rings and by re-derivation for the bicyclic
Bond.tsx / Legend.tsx: wedge polygon and hash ladder
welcome page and README rewritten for the four-family scope
Diels-Alder family and aromatic rings
Diels-Alder: one concerted [4+2] step generated from perceived diene and dienophile; regiochemistry from donor/withdrawer positions (ortho/para rule, tested both ways); alkyne dienophiles; ring-locked dienes give bridged bicyclics; a second cycloaddition on request for benzoquinone-type dienophiles. Stereochemistry is stated as not drawn. Layout: bridged bicyclic systems (outer cycle as polygon, bridge inside), fusable onto rings already placed; a second ring system reached by chain growth is drawn as polygons and rotated clear of what is drawn. Aromatics: lowercase SMILES is read and kekulised; six-membered rings of alternating double bonds are recognised structurally and excluded from diene, dienophile and enone perception; benzene-parent names are built (4-methoxybenzaldehyde, 1-bromo-4-nitrobenzene, phenylmagnesium bromide).
rules/grignard.ts: one rule for aldehyde/ketone/ester/CO2/epoxide electrophiles; the tetrahedral intermediate collapses and takes a second equivalent when it has a leaving group; workup drawn as its own hydronium proton transfer; optional formation panel when the request gives halide + Mg
refusals with the reason: O-H/N-H substrates (Grignard is destroyed), alkyl halides (no SN2), nothing electrophilic
Mg in the parser (2 valence electrons, R-Mg-X) and renderer
Name grammar: diones, dienes, alcohols, acids, esters; base is a parameter
one grammar for the parent: leading or trailing locants, di/tri multipliers on both the unsaturation and the functional suffix, so 1,3-cyclohexanedione, cyclohexane-1,3-dione, pentane-2,4-dione, 2-methylbuta-1,3-diene, butan-2-ol, propanoic acid and ethyl propanoate all build
the Robinson rule takes the base as a parameter; a request naming NaOH, NaOMe or KOtBu is drawn under that base (Sean draws hydroxide in water), the default stays ethoxide to match the signed-off template
lexicon gains Grignard reagents, dienophiles, Kekulé aromatics and workup reagents ahead of the next families
2026-08-23
Fixes found by actually running it
portrait mechanisms are turned a quarter turn so they fill the landscape viewing pane instead of letterboxing into it (rigid, identical every panel)
refusals no longer quote internal atom ids at the student, and the refusal now sits above the suggestions instead of duplicating the example list
layout: substituent direction from the widest angular gap, not the sum of bond vectors (three balanced substituents produced a near-zero sum whose direction was noise, dropping a carbonyl oxygen inside its own ring)
layout: terminal atoms relax to the roomiest angle; reagents are placed with label-sized clearance; fragment captions push clear of other molecules
chemistry: a cyclic enone is refused as the Michael acceptor — its aldol closure would bridge the existing ring to a bicyclo[2.2.2] cage rather than the fused enone. It is accepted as the donor instead.
Docs, test runner, mechanism sheets: v3 generative
npm test / npm run verify:rdkit / npm run sheet
welcome page rewritten for what this build actually does
README describes the generative core and how to add a third family
Wire the generator into the app: name/SMILES input, derivation panel, deep links
api.ts generates mechanisms in the browser; signed-off templates still served for the exact substrates a chemist reviewed
old keyword matcher removed (no more two-matcher parity trap)
?q= and ?step= make any generated mechanism a shareable link
ring-closure panels laid out from the product so the aldol reads folded
backend/verify_generated.py: RDKit sanitises every generated panel
Loading comments…