Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Bayesian Reaction Optimizer

A Streamlit web application for iterative Bayesian optimization of enzyme reaction conditions. Uses a Gaussian Process surrogate model with Expected Improvement acquisition to suggest the most informative next experiments, minimizing the number of lab runs needed to find optimal conditions.

Features

  • Gaussian Process surrogate model -- Matern kernel with per-parameter length scales and per-point noise from replicates
  • Expected Improvement acquisition -- balances exploitation of known good regions with exploration of uncertain regions, plus a diversity penalty to avoid clustering suggestions
  • Replicate support -- enter multiple measurements per condition; the model uses replicate variance as observation noise
  • Chromeleon HPLC CSV parsing -- import results directly from Chromeleon exports (European decimal format, dual peak windows)
  • Response surface visualization -- interactive 2D contour plots of the GP prediction and uncertainty for any pair of parameters
  • Parameter importance -- correlation-based ranking of which parameters matter most
  • Latin Hypercube initial design -- space-filling initial experiments with practical rounding for lab pipetting
  • Project save/load -- export and import the full optimization state as JSON

Requirements

pip install streamlit pandas numpy plotly scikit-learn scipy

Python 3.9 or later.

Usage

streamlit run bayesian_optimizer.py

Workflow

  1. Define parameters -- set the name, unit, and bounds for each reaction variable (cofactors, pH, temperature, etc.). Fixed parameters can have equal min/max bounds.
  2. Generate initial experiments -- the app creates a Latin Hypercube design rounded to practical pipetting volumes.
  3. Run experiments in the lab and measure the response (concentration, HPLC area, conversion percentage, or area ratio).
  4. Enter results -- type values manually, upload a CSV, or import a Chromeleon HPLC file. Multiple replicates per condition are supported.
  5. Get AI-suggested next experiments -- the Bayesian optimizer trains a Gaussian Process on your data and proposes the next batch of conditions that maximize Expected Improvement.
  6. Iterate -- repeat steps 3--5 until the response plateaus or reaches the target.

Result metrics

The app supports four output metrics selectable at project setup:

Metric Unit Typical use
Concentration mM Calibrated standard curve
Relative HPLC area % Quick conversion estimate
Absolute peak area mAU*min Raw detector signal
Area ratio (product/substrate) ratio Internal-standard normalization

License

MIT

About

Bayesian optimization for enzyme reaction conditions — Gaussian process surrogate, expected improvement acquisition, Chromeleon HPLC integration, and iterative experiment design

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages