# noel-research-group/robochem_flex architecture

> Architecture diagram of the GitHub repository noel-research-group/robochem_flex, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/noel-research-group/robochem_flex
- Repository: https://github.com/noel-research-group/robochem_flex

## Overview

Robochem-Flex is a modular self-driving laboratory platform: users configure an optimization campaign, define reagents and physical conditions, run experiments on laboratory hardware, and use measured results to guide optimization. The control application, backend optimization code, and OmniPlatypus device/procedure framework form the principal workflow. ChromTroller provides a separate LCMS automation and analysis path; Raman control and Lamas analytics are additional measurement/analysis capabilities. The README describes the product at a high level; where source excerpts do not establish wiring between subsystems, the graph omits those links.

Main entry points: [`Control Software/backend/platform_backend.py`](https://github.com/noel-research-group/robochem_flex/blob/master/Control%20Software/backend/platform_backend.py) (Platform backend), [`Control Software/backend/Robochem_ML/robrains/ml_modules`](https://github.com/noel-research-group/robochem_flex/tree/master/Control%20Software/backend/Robochem_ML/robrains/ml_modules) (Optimization backends), [`Devices/ChromTroller/software/ChromTroller.py`](https://github.com/noel-research-group/robochem_flex/blob/master/Devices/ChromTroller/software/ChromTroller.py) (ChromTroller server), [`Control Software/robochem_flex.py`](https://github.com/noel-research-group/robochem_flex/blob/master/Control%20Software/robochem_flex.py) (Streamlit application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Campaign control"]
  node_app["Streamlit application<br/>[robochem_flex.py]"]
  node_campaign_pages["Campaign pages<br/>[07_Run_Platform.py]"]
  node_ui_helpers["Configuration helpers"]
  node_platform_backend["Platform backend"]
  node_session["Session management"]
end

subgraph group_ml["Optimization backend"]
  node_ml_backends["Optimization backends"]
  node_models["Surrogate models"]
  node_acquisition["Acquisition strategies"]
  node_parameters["Experiment parameters"]
end

subgraph group_automation["Lab automation"]
  node_procedures["Experiment procedures"]
  node_unit_tasks["Hardware tasks"]
  node_device_framework["Device framework<br/>[device.py]"]
  node_instrument_drivers["Instrument drivers"]
end

subgraph group_measurement["Measurement and analysis"]
  node_chromtroller["ChromTroller server<br/>[ChromTroller.py]"]
  node_chrom_client["ChromTroller client<br/>[ct_client.py]"]
  node_chrom_controller["LCMS controller<br/>[ct_controller.py]"]
  node_chrom_analysis["Chromatogram analysis"]
  node_raman_control["Raman spectrometer<br/>[AVAlanCHE_class.py]"]
  node_lama_analysis["Spectral analysis<br/>[glama.py]"]
end

node_researcher(("Researcher"))

node_researcher -->|"configures and runs"| node_app
node_app -->|"renders"| node_campaign_pages
node_campaign_pages -->|"uses configuration"| node_ui_helpers
node_ui_helpers -->|"updates campaign"| node_platform_backend
node_platform_backend -->|"manages state"| node_session
node_platform_backend -->|"runs optimization"| node_ml_backends
node_ml_backends -->|"fits models"| node_models
node_ml_backends -->|"selects candidates"| node_acquisition
node_ml_backends -->|"uses parameters"| node_parameters
node_platform_backend -->|"runs experiments"| node_procedures
node_procedures -->|"dispatches tasks"| node_unit_tasks
node_unit_tasks -->|"commands devices"| node_instrument_drivers
node_instrument_drivers -->|"uses device base"| node_device_framework
node_chrom_client -->|"sends commands"| node_chromtroller
node_chromtroller -->|"controls LCMS"| node_chrom_controller
node_chromtroller -->|"runs analysis"| node_chrom_analysis
node_raman_control -.->|"provides spectra for"| node_lama_analysis

click node_app "https://github.com/noel-research-group/robochem_flex/blob/master/Control%20Software/robochem_flex.py"
click node_campaign_pages "https://github.com/noel-research-group/robochem_flex/blob/master/Control%20Software/pages/07_Run_Platform.py"
click node_ui_helpers "https://github.com/noel-research-group/robochem_flex/blob/master/Control%20Software/backend/frontend_functions.py"
click node_platform_backend "https://github.com/noel-research-group/robochem_flex/blob/master/Control%20Software/backend/platform_backend.py"
click node_session "https://github.com/noel-research-group/robochem_flex/blob/master/Control%20Software/backend/Robochem_ML/robrains/session_management/session_management.py"
click node_ml_backends "https://github.com/noel-research-group/robochem_flex/tree/master/Control%20Software/backend/Robochem_ML/robrains/ml_modules"
click node_models "https://github.com/noel-research-group/robochem_flex/tree/master/Control%20Software/backend/Robochem_ML/robrains/custom_models"
click node_acquisition "https://github.com/noel-research-group/robochem_flex/tree/master/Control%20Software/backend/Robochem_ML/robrains/custom_acquisition"
click node_parameters "https://github.com/noel-research-group/robochem_flex/tree/master/Control%20Software/backend/Robochem_ML/robrains/parameter_backends"
click node_procedures "https://github.com/noel-research-group/robochem_flex/tree/master/Control%20Software/OmniPlatypus/OmniPlatypus/omniplatypus/procedures/experiments"
click node_unit_tasks "https://github.com/noel-research-group/robochem_flex/tree/master/Control%20Software/OmniPlatypus/OmniPlatypus/omniplatypus/procedures/unit_tasks"
click node_device_framework "https://github.com/noel-research-group/robochem_flex/blob/master/Control%20Software/OmniPlatypus/OmniPlatypus/omniplatypus/devices/base/device.py"
click node_instrument_drivers "https://github.com/noel-research-group/robochem_flex/tree/master/Control%20Software/OmniPlatypus/OmniPlatypus/omniplatypus/devices"
click node_chromtroller "https://github.com/noel-research-group/robochem_flex/blob/master/Devices/ChromTroller/software/ChromTroller.py"
click node_chrom_client "https://github.com/noel-research-group/robochem_flex/blob/master/Devices/ChromTroller/software/src/ct_components/ct_client.py"
click node_chrom_controller "https://github.com/noel-research-group/robochem_flex/blob/master/Devices/ChromTroller/software/src/ct_components/ct_controller.py"
click node_chrom_analysis "https://github.com/noel-research-group/robochem_flex/tree/master/Devices/ChromTroller/software/src/ct_components/analysis_backend"
click node_raman_control "https://github.com/noel-research-group/robochem_flex/blob/master/Devices/Raman%20Spectrometer/Spectrometer%20Control/AVAlanCHE/AVAlanCHE_class.py"
click node_lama_analysis "https://github.com/noel-research-group/robochem_flex/blob/master/Control%20Software/Lamas/lamas/glama.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_campaign_pages,node_ui_helpers,node_platform_backend,node_session toneBlue
class node_ml_backends,node_models,node_acquisition,node_parameters toneAmber
class node_procedures,node_unit_tasks,node_device_framework,node_instrument_drivers toneMint
class node_chromtroller,node_chrom_client,node_chrom_controller,node_chrom_analysis,node_raman_control,node_lama_analysis toneRose
class node_researcher toneIndigo
```

## Components

### Campaign control

- [Streamlit application](https://github.com/noel-research-group/robochem_flex/blob/master/Control%20Software/robochem_flex.py): `Control Software/robochem_flex.py`
- [Campaign pages](https://github.com/noel-research-group/robochem_flex/blob/master/Control%20Software/pages/07_Run_Platform.py): `Control Software/pages/07_Run_Platform.py`
- [Configuration helpers](https://github.com/noel-research-group/robochem_flex/blob/master/Control%20Software/backend/frontend_functions.py): `Control Software/backend/frontend_functions.py`
- [Platform backend](https://github.com/noel-research-group/robochem_flex/blob/master/Control%20Software/backend/platform_backend.py): `Control Software/backend/platform_backend.py`
- [Session management](https://github.com/noel-research-group/robochem_flex/blob/master/Control%20Software/backend/Robochem_ML/robrains/session_management/session_management.py): `Control Software/backend/Robochem_ML/robrains/session_management/session_management.py`

### Optimization backend

- [Optimization backends](https://github.com/noel-research-group/robochem_flex/tree/master/Control%20Software/backend/Robochem_ML/robrains/ml_modules): `Control Software/backend/Robochem_ML/robrains/ml_modules`
- [Surrogate models](https://github.com/noel-research-group/robochem_flex/tree/master/Control%20Software/backend/Robochem_ML/robrains/custom_models): `Control Software/backend/Robochem_ML/robrains/custom_models`
- [Acquisition strategies](https://github.com/noel-research-group/robochem_flex/tree/master/Control%20Software/backend/Robochem_ML/robrains/custom_acquisition): `Control Software/backend/Robochem_ML/robrains/custom_acquisition`
- [Experiment parameters](https://github.com/noel-research-group/robochem_flex/tree/master/Control%20Software/backend/Robochem_ML/robrains/parameter_backends): `Control Software/backend/Robochem_ML/robrains/parameter_backends`

### Lab automation

- [Experiment procedures](https://github.com/noel-research-group/robochem_flex/tree/master/Control%20Software/OmniPlatypus/OmniPlatypus/omniplatypus/procedures/experiments): `Control Software/OmniPlatypus/OmniPlatypus/omniplatypus/procedures/experiments`
- [Hardware tasks](https://github.com/noel-research-group/robochem_flex/tree/master/Control%20Software/OmniPlatypus/OmniPlatypus/omniplatypus/procedures/unit_tasks): `Control Software/OmniPlatypus/OmniPlatypus/omniplatypus/procedures/unit_tasks`
- [Device framework](https://github.com/noel-research-group/robochem_flex/blob/master/Control%20Software/OmniPlatypus/OmniPlatypus/omniplatypus/devices/base/device.py): `Control Software/OmniPlatypus/OmniPlatypus/omniplatypus/devices/base/device.py`
- [Instrument drivers](https://github.com/noel-research-group/robochem_flex/tree/master/Control%20Software/OmniPlatypus/OmniPlatypus/omniplatypus/devices): `Control Software/OmniPlatypus/OmniPlatypus/omniplatypus/devices`

### Measurement and analysis

- [ChromTroller server](https://github.com/noel-research-group/robochem_flex/blob/master/Devices/ChromTroller/software/ChromTroller.py): `Devices/ChromTroller/software/ChromTroller.py`
- [ChromTroller client](https://github.com/noel-research-group/robochem_flex/blob/master/Devices/ChromTroller/software/src/ct_components/ct_client.py): `Devices/ChromTroller/software/src/ct_components/ct_client.py`
- [LCMS controller](https://github.com/noel-research-group/robochem_flex/blob/master/Devices/ChromTroller/software/src/ct_components/ct_controller.py): `Devices/ChromTroller/software/src/ct_components/ct_controller.py`
- [Chromatogram analysis](https://github.com/noel-research-group/robochem_flex/tree/master/Devices/ChromTroller/software/src/ct_components/analysis_backend): `Devices/ChromTroller/software/src/ct_components/analysis_backend`
- [Raman spectrometer](https://github.com/noel-research-group/robochem_flex/blob/master/Devices/Raman%20Spectrometer/Spectrometer%20Control/AVAlanCHE/AVAlanCHE_class.py): `Devices/Raman Spectrometer/Spectrometer Control/AVAlanCHE/AVAlanCHE_class.py`
- [Spectral analysis](https://github.com/noel-research-group/robochem_flex/blob/master/Control%20Software/Lamas/lamas/glama.py): `Control Software/Lamas/lamas/glama.py`

### Other components

- **Researcher**

## Connections

- Researcher → Streamlit application: configures and runs
- Streamlit application → Campaign pages: renders
- Campaign pages → Configuration helpers: uses configuration
- Configuration helpers → Platform backend: updates campaign
- Platform backend → Session management: manages state
- Platform backend → Optimization backends: runs optimization
- Optimization backends → Surrogate models: fits models
- Optimization backends → Acquisition strategies: selects candidates
- Optimization backends → Experiment parameters: uses parameters
- Platform backend → Experiment procedures: runs experiments
- Experiment procedures → Hardware tasks: dispatches tasks
- Hardware tasks → Instrument drivers: commands devices
- Instrument drivers → Device framework: uses device base
- ChromTroller client → ChromTroller server: sends commands
- ChromTroller server → LCMS controller: controls LCMS
- ChromTroller server → Chromatogram analysis: runs analysis
- Raman spectrometer → Spectral analysis: provides spectra for
