Retrospect
What it is
Retrospect is a small set of working tools for organic chemistry. The main one is a canvas for retrosynthesis, which is planning how to make a molecule by working backwards from it. There's also a tool for solving NMR spectra, and a bank of the starting materials the canvas treats as things you can buy.
Everything runs in your browser, so there's nothing to install and no account to make.
Taking a molecule apart
You start with a target, either one of the 18 worked examples or a molecule of your own pasted in as SMILES. Hover a bond and the canvas previews what cutting it would give you. Click it and you get the reactions that could make that bond, each with the pieces it needs. Choose one, and those pieces become the next molecules to take apart.
You keep going until everything left is in the bank. A side panel then turns the tree round into the order you'd run it in the lab, with a shopping list. If you'd rather watch than click, Suggest route finishes the open branches for you.
Each route sits on its own canvas, in a tab you can name and duplicate, so you can try two ways to the same molecule and compare them. Your canvases are saved in your browser.
Working a structure out of a spectrum
NMR is how chemists work out what a compound is from the signals its hydrogens and carbons give. You type in a peak table, plus a formula, carbon shifts or IR bands if you have them. The tool reads off the clues the way you're taught to, such as a triplet and a quartet that mean an ethyl group, then ranks candidate structures by how well their predicted spectrum fits yours.
The observed and predicted spectra are drawn against each other, and every peak links to the atoms it comes from, so you can check the reasoning instead of trusting a score. There are 12 worked unknowns to practise on, and it also goes the other way and predicts the spectrum of a structure you give it.
How it's built
The chemistry runs on RDKit compiled to WebAssembly, so parsing, drawing and running reactions all happen on your device. Disconnections come from 72 reaction families applied backwards, and the NMR predictions come from published additivity rules. The site itself is Next.js and TypeScript.
There's no language model in the loop yet. I wanted engines whose working you can read first, so that chemistry a model proposes later can be checked against them.
The molecules drifting across the home page are real 3D shapes from PubChem, drawn as dots. You can tap one, or pick it up and throw it.
Why I'm building it
I studied natural sciences at university, and spent a lot of that time on disconnections and NMR problems. I'm making these tools for fun, and to help future scientists explore and learn more.
It's still a prototype, so a route it suggests is a proposal to check, not a procedure anyone has run in a lab.