HomeSelf-Driving Lab (Autonomous Experimentation)Self-Optimizing Reaction Condition Explorer

🤖 Self-Optimizing Reaction Condition Explorer

This simulation optimizes reaction conditions (temperature, catalysts, solvents) for chemical reactions. It uses advanced algorithms to find the best parameters that maximize yield and minimize waste.

Self-Driving Lab (Autonomous Experimentation)2DModerate60 FPS
self-optimizing-reaction-explorer ↗ Open standalone

Specifying a Continuous Reaction Space Before the Pumps Start

Self-optimizing flow chemistry begins with a formal, bounded definition of every continuous variable the algorithm is allowed to move — plus the physical hardware graph (pumps, mixers, heated reactor coil, back-pressure regulator) that will realize whatever condition set the optimizer proposes next.

  • 3–6: Continuous parameters (temp, catalyst, residence time…)
  • 40–180 °C: Typical temp range (coil jacket / block heater)
  • 0.5–30 min: Residence time range (set by flow rate ÷ coil volume)
  • 0.1–10 mol%: Catalyst loading range (pumped as stock solution)

Bounding the search domain and wiring the hardware graph

Before any optimization algorithm can propose a condition, every parameter it is allowed to touch must be given a physically realizable range:

Parameter bounds: • Temperature — set by the reactor's heat-transfer jacket or block heater, bounded above by solvent boiling point (or back-pressure-regulator-elevated boiling point) and below by reagent solubility • Residence time — not set directly, but derived from total flow rate divided by reactor coil internal volume, so pump flow rate is the true manipulated variable • Catalyst loading — delivered as a pumped stock solution at a controlled ratio, bounded by cost and downstream purification burden • Solvent choice — often treated as a categorical variable evaluated as a discrete outer loop around the continuous inner optimization

Hardware graph: • Precision syringe or HPLC-style pumps meter each reagent stream at a commanded flow rate • A static mixer (T-piece or packed-bed) combines streams before the temperature-controlled reactor coil • A back-pressure regulator (BPR) holds the line above ambient pressure, suppressing boiling and permitting superheated conditions unreachable in batch glassware

This architecture is the shared substrate behind self-optimizing platforms built by the Cronin group (Glasgow, the Chemputer), the Jensen group (MIT, modular flow synthesis platforms), and industrial/academic collaborations led by the Doyle group (Princeton/UCLA) with process chemistry partners such as Merck.

Seeding the Simplex — A Coarse First Look at the Response Surface

Gradient-free simplex methods do not start from a single guess; they start from a small polytope of n+1 vertices spanning n parameters. Running each seed vertex once gives the optimizer its first read on which direction "up" points in condition space.

  • 4: Seed vertices (n=3 params) (Nelder-Mead simplex size)
  • Coarse grid / LHS: Alternative seeding (Latin hypercube sampling)
  • 15–45%: Typical seed yield spread (before any optimization)
  • 2–10 min: Time per seed experiment (steady-state flow settling)

Why n+1 vertices, and what a bad seed costs

The Nelder-Mead simplex algorithm (Nelder & Mead, Computer Journal, 1965) requires exactly n+1 vertices to bracket an n-dimensional search — three points for a 2-parameter problem, four for three parameters (temperature, catalyst loading, residence time), because that is the minimum number of points needed to define a non-degenerate polytope with a genuine "up-slope" direction in every dimension.

Seeding strategies used in practice: • Vertices of a regular simplex scaled to a fraction of the full parameter range, centered on a chemist-supplied best guess • A coarse full-factorial or Latin hypercube grid, from which the best-performing points are selected as simplex seeds • For noisy, expensive-to-evaluate flow reactions, SNOBFIT (Stable Noisy Optimization by Branch and Fit, Huyer & Neumaier, ACM TOMS 2008) instead seeds a soft branch-and-bound partition of the space, better suited to the small measurement noise inherent in inline analytics

A poorly chosen seed simplex can bias the optimizer toward a local plateau; most flow platforms mitigate this by placing seeds wide across the bounded range rather than clustered near a single hypothesis.

Reading Yield From the Flowing Stream Without Ever Stopping It

The defining feature of a self-optimizing flow platform is that yield and conversion are measured inline — HPLC loop injection, FTIR flow cells, or UV/Vis absorbance cells sample the live stream — so no operator collects a fraction, walks it to an offline instrument, or waits on a queue.

  • ~30–60 sec: Inline FTIR cycle (ReactIR-style flow cell)
  • <5 sec: Inline UV/Vis read (continuous absorbance trace)
  • 3–8 min: Automated HPLC injection (loop injection, no operator)
  • 0: Manual sampling steps (fully inline analytics)

Steady-state sampling inside a continuously flowing reactor

Because the reaction never stops, "measuring a data point" means sampling the outlet stream once it reaches steady state at a new condition — typically 3–5 residence times after a pump setpoint change — then reading:

• FTIR flow cells (as pioneered in Jensen-group MIT flow platforms) track characteristic product/reagent absorbance bands in real time, giving conversion estimates without any chromatography • Automated HPLC with a loop-injection valve draws a small stream aliquot on a timer and runs a short analytical method, giving quantitative yield with chromatographic resolution between close-eluting byproducts • UV/Vis flow cells give the fastest, cheapest read when the product has a distinguishing chromophore, useful as a fast proxy signal between slower orthogonal HPLC checks

The Sampling Rate control in this simulation mirrors a real trade-off: sampling more often (shorter HPLC method, faster FTIR duty cycle) gives the optimizer fresher data per unit time but noisier individual readings, while slower, higher-resolution analytics give cleaner data at lower throughput.

Eliminating the offline sampling step is what actually closes the loop. A platform that still requires a technician to grab a vial and walk it to a shared HPLC queue is automated, not self-optimizing — the multi-hour queue delay dominates total campaign time far more than the chemistry itself.

Reflect, Expand, Contract — How the Simplex Decides Where to Go Next

With fresh yield readings at every current vertex, the optimizer ranks them and proposes exactly one new condition set using simple geometric moves — no derivative of the (unknown, expensive-to-evaluate) yield function is ever computed.

  • Reflect/Expand/Contract: Move set (+ shrink fallback)
  • 1.0: Reflection coefficient α (scaled by Step Aggressiveness)
  • 2.0: Expansion coefficient γ (on reflection success)
  • ~20 vs. 1000+: Experiments vs. full factorial (for 3 parameters, 10 levels each)

The geometry of a gradient-free step

Each iteration of the Nelder-Mead update, applied here to temperature / catalyst loading / residence time jointly, follows a fixed decision tree:

1. Rank the current vertices by measured yield; identify best, second-worst, and worst 2. Compute the centroid of every vertex except the worst 3. Reflect the worst vertex through that centroid to propose a trial point — if it beats the current best, try an even bigger expansion in the same direction 4. If the reflected point only beats the second-worst, keep it as a modest improvement 5. If it beats nothing, contract halfway back toward the centroid instead 6. If even contraction fails, shrink the entire simplex toward the best vertex and re-measure everything — a full reset of local search radius

SNOBFIT handles the same problem differently: it fits local quadratic models within a branch-and-bound partition of the space and explicitly balances exploitation of promising sub-boxes against exploration of unsampled ones, which tends to be more robust than Nelder-Mead when measurement noise from the inline analytics is non-trivial. Doyle-group work applying Bayesian optimization (Shields et al., Nature 2021) to Pd-catalyzed cross-coupling and other reaction classes reported locating conditions competitive with expert chemists using a small fraction of the experiments a full grid search would require, reinforcing that all three families of gradient-free method — simplex, branch-and-fit, and Bayesian — exist to buy the same thing: fewer physical experiments per unit of yield improvement.

Shrinking the Simplex Until the Yield Plateau Is Trustworthy

Iteration continues until the spread of yields across the current simplex vertices — and the geometric size of the simplex itself — falls below a pre-set tolerance, signaling that further moves are unlikely to buy meaningful additional yield.

  • <1% yield spread: Typical convergence tolerance (across simplex vertices)
  • 15–30: Iterations to converge (for 3-parameter problems)
  • 2–4× fewer runs: Reported flow-optimization gains (vs. one-factor-at-a-time)
  • 85–95%: Typical converged yield (from ~30% baseline seed)

Knowing when to stop searching

Convergence is declared, not assumed, using explicit numerical criteria rather than a fixed experiment budget alone:

• Vertex yield spread: the difference between the best and worst simplex vertex yields drops under a tolerance (often 1–2 percentage points of yield) • Simplex size: the maximum pairwise distance between vertices, normalized by the parameter ranges, shrinks under a geometric tolerance — this is the "Convergence Distance" metric tracked in this simulation • Repeat-measurement stability: re-running the current best condition confirms the reading was not a lucky noise spike from the inline analytics

Because each physical run costs pump time, reagent, and analytics cycles, campaigns are designed to stop as soon as these criteria are met rather than continuing to a fixed iteration count — this is precisely what gives gradient-free flow optimization its efficiency advantage over exhaustive factorial screening.

Published self-optimizing flow campaigns from groups including Jensen (MIT) and Cronin (Glasgow) commonly reach a converged optimum in roughly 20-40 total experiments for a 3-4 parameter space — where a full factorial grid at even a modest 10 levels per parameter would require 1,000 to 10,000 runs to cover the same space exhaustively.

From Optimized Microliters to Pilot Throughput — Numbering Up, Not Scaling Up

The converged condition set is not simply re-run in a bigger vessel. Flow chemistry scale-up preserves the exact residence time, mixing regime, and heat-transfer characteristics discovered during optimization by running many identical small reactors in parallel — "numbering up" rather than growing reactor volume.

  • Numbering-up: Scale-up method (parallel identical channels)
  • Exact match: Residence time preserved (same coil geometry, more units)
  • 4–64: Typical parallel units (pilot to production scale)
  • Matched: Reynolds number / mixing (no re-optimization needed)

Why volume scale-up breaks flow chemistry optima

In batch chemistry, scaling from bench to plant means a bigger stirred tank, which changes mixing time, heat-transfer area-to-volume ratio, and local concentration gradients — often forcing re-optimization from scratch at each scale. Flow chemistry avoids this entirely:

• Numbering-up: the identical reactor coil, mixer geometry, and flow rates validated during optimization are replicated in parallel — 8, 16, or more channels run the exact same physics simultaneously • Residence time invariance: because residence time is set by coil volume ÷ flow rate per channel, and both are held constant per channel, the chemistry each molecule experiences is identical to the optimized single-channel run • Heat/mass transfer invariance: channel diameter and wall thickness stay constant, so the favorable heat-transfer area-to-volume ratio that let flow chemistry access high-temperature, short-residence-time conditions in the first place is preserved at any throughput

This approach underlies continuous-manufacturing pilot work associated with MIT-industry collaborations (e.g. the MIT-Novartis Center for Continuous Manufacturing) and is the standard scale-up philosophy advocated by the Jensen group: throughput scales by adding parallel reactor units, not by re-deriving an optimum at a new, larger vessel geometry.

⚙ Under the hood

This simulation optimizes reaction conditions (temperature, catalysts, solvents) for chemical reactions. It uses advanced algorithms to find the best parameters that maximize yield and minimize waste.

CanvasBiomedicine

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)