# zuxianh/bea_project architecture

> Architecture diagram of the GitHub repository zuxianh/bea_project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zuxianh/bea_project
- Repository: https://github.com/zuxianh/bea_project

## Overview

Bertini Bethe Continuation computes Bethe roots through a Wolfram SUSY Wronskian workflow and a Python/Bertini continuation backend. The principal workflow configures a single or batch run, launches it, tracks progress and cancellation, then saves result CSVs for browsing and root comparison. Separate product branches support flip checks and saved-result plotting. Core execution and the UI are sampled; the Wolfram solver internals and several Python modules are not, so those links are limited to README-documented relationships.

Main entry points: [`src/bae_bertini/config.py`](https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/config.py) (Run configuration), [`src/bae_bertini/ui/app.py`](https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/ui/app.py) (Results browser), [`wolfram/RunSingle.wl`](https://github.com/zuxianh/bea_project/blob/main/wolfram/RunSingle.wl) (Wolfram entry), [`src/bae_bertini/results.py`](https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/results.py) (Result merge and read)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_run["Run orchestration"]
  node_config["Run configuration<br/>[config.py]"]
  node_job["Job manager<br/>[jobs.py]"]
  node_paths["Path settings<br/>[paths.py]"]
end

subgraph group_solver["Numerical solvers"]
  node_wolfram_entry["Wolfram entry<br/>[RunSingle.wl]"]
  node_wolfram_workflow["SUSY Wronskian workflow<br/>[SUSYWBEWorkflow.wl]"]
  node_wolfram_solver["Numerical WBE solver"]
  node_bertini["Bertini continuation<br/>[continuation.py]"]
end

subgraph group_results["Results and checks"]
  node_result_files["Result CSVs"]
  node_results_tools["Result merge and read<br/>[results.py]"]
  node_root_parse["Root parsing<br/>[roots.py]"]
  node_root_plot["Root plots<br/>[plots.py]"]
  node_flip_check["Flip-distance checks<br/>[flip_checks.py]"]
  node_crosscheck["Flip crosscheck<br/>[crosscheck.py]"]
end

subgraph group_studio["Studio interface"]
  node_studio["Streamlit studio<br/>[app.py]"]
  node_launcher["Studio launcher<br/>[launcher.py]"]
  node_result_browser["Results browser<br/>[app.py]"]
end

node_user(("User"))
node_kernel["WolframKernel"]
node_reference_data[("Reference CSVs")]
node_batch_inputs["Tableau lists"]

node_user -->|"uses"| node_studio
node_studio -->|"validates settings"| node_config
node_studio -->|"manages runs"| node_job
node_config -->|"resolves paths"| node_paths
node_job -->|"uses locations"| node_paths
node_launcher -->|"starts"| node_studio
node_user -->|"starts"| node_launcher
node_config -->|"configures command"| node_wolfram_entry
node_wolfram_entry -.->|"executes workflow"| node_kernel
node_wolfram_entry -.->|"runs workflow"| node_wolfram_workflow
node_wolfram_workflow -.->|"uses solver"| node_wolfram_solver
node_config -->|"reads batch list"| node_batch_inputs
node_config -.->|"configures command"| node_bertini
node_bertini -->|"writes results"| node_result_files
node_wolfram_entry -.->|"writes results"| node_result_files
node_results_tools -->|"merges and reads"| node_result_files
node_result_browser -->|"reads previews"| node_results_tools
node_result_browser -->|"loads roots"| node_result_files
node_result_browser -->|"renders comparisons"| node_root_plot
node_root_plot -->|"parses roots"| node_root_parse
node_result_browser -->|"opens references"| node_reference_data
node_user -->|"runs checks"| node_flip_check
node_flip_check -->|"reads and updates"| node_result_files
node_user -->|"compares tableaux"| node_crosscheck
node_crosscheck -->|"reads roots"| node_result_files
node_user -->|"merges snapshots"| node_results_tools

click node_config "https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/config.py"
click node_job "https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/jobs.py"
click node_paths "https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/paths.py"
click node_studio "https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/ui/app.py"
click node_launcher "https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/launcher.py"
click node_wolfram_entry "https://github.com/zuxianh/bea_project/blob/main/wolfram/RunSingle.wl"
click node_wolfram_workflow "https://github.com/zuxianh/bea_project/blob/main/wolfram/SUSYWBEWorkflow.wl"
click node_wolfram_solver "https://github.com/zuxianh/bea_project/tree/main/wolfram/solver"
click node_bertini "https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/continuation.py"
click node_results_tools "https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/results.py"
click node_root_parse "https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/roots.py"
click node_root_plot "https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/ui/plots.py"
click node_flip_check "https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/flip_checks.py"
click node_crosscheck "https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/crosscheck.py"
click node_result_browser "https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/ui/app.py"
click node_reference_data "https://github.com/zuxianh/bea_project/tree/main/data/references"
click node_batch_inputs "https://github.com/zuxianh/bea_project/tree/main/data/tableaux"

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_config,node_job,node_paths,node_user toneBlue
class node_wolfram_entry,node_wolfram_workflow,node_wolfram_solver,node_bertini,node_reference_data toneAmber
class node_result_files,node_results_tools,node_root_parse,node_root_plot,node_flip_check,node_crosscheck toneMint
class node_studio,node_launcher,node_result_browser toneRose
class node_kernel toneIndigo
class node_batch_inputs toneTeal
```

## Components

### Run orchestration

- [Run configuration](https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/config.py): `src/bae_bertini/config.py`
- [Job manager](https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/jobs.py): `src/bae_bertini/jobs.py`
- [Path settings](https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/paths.py): `src/bae_bertini/paths.py`

### Numerical solvers

- [Wolfram entry](https://github.com/zuxianh/bea_project/blob/main/wolfram/RunSingle.wl): `wolfram/RunSingle.wl`
- [SUSY Wronskian workflow](https://github.com/zuxianh/bea_project/blob/main/wolfram/SUSYWBEWorkflow.wl): `wolfram/SUSYWBEWorkflow.wl`
- [Numerical WBE solver](https://github.com/zuxianh/bea_project/tree/main/wolfram/solver): `wolfram/solver`
- [Bertini continuation](https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/continuation.py): `src/bae_bertini/continuation.py`

### Results and checks

- **Result CSVs**
- [Result merge and read](https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/results.py): `src/bae_bertini/results.py`
- [Root parsing](https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/roots.py): `src/bae_bertini/roots.py`
- [Root plots](https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/ui/plots.py): `src/bae_bertini/ui/plots.py`
- [Flip-distance checks](https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/flip_checks.py): `src/bae_bertini/flip_checks.py`
- [Flip crosscheck](https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/crosscheck.py): `src/bae_bertini/crosscheck.py`

### Studio interface

- [Streamlit studio](https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/ui/app.py): `src/bae_bertini/ui/app.py`
- [Studio launcher](https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/launcher.py): `src/bae_bertini/launcher.py`
- [Results browser](https://github.com/zuxianh/bea_project/blob/main/src/bae_bertini/ui/app.py): `src/bae_bertini/ui/app.py`

### Other components

- **User**
- **WolframKernel**
- [Reference CSVs](https://github.com/zuxianh/bea_project/tree/main/data/references): `data/references`
- [Tableau lists](https://github.com/zuxianh/bea_project/tree/main/data/tableaux): `data/tableaux`

## Connections

- User → Streamlit studio: uses (evidence: `README.md`)
- Streamlit studio → Run configuration: validates settings (evidence: `src/bae_bertini/ui/app.py`)
- Streamlit studio → Job manager: manages runs (evidence: `src/bae_bertini/ui/app.py`)
- Run configuration → Path settings: resolves paths (evidence: `src/bae_bertini/config.py`)
- Job manager → Path settings: uses locations (evidence: `src/bae_bertini/jobs.py`)
- Studio launcher → Streamlit studio: starts (evidence: `src/bae_bertini/launcher.py`)
- User → Studio launcher: starts (evidence: `README.md`)
- Run configuration → Wolfram entry: configures command (evidence: `src/bae_bertini/config.py`)
- Wolfram entry → WolframKernel: executes workflow (evidence: `README.md`)
- Wolfram entry → SUSY Wronskian workflow: runs workflow (evidence: `README.md`)
- SUSY Wronskian workflow → Numerical WBE solver: uses solver (evidence: `README.md`)
- Run configuration → Tableau lists: reads batch list (evidence: `src/bae_bertini/config.py`)
- Run configuration → Bertini continuation: configures command (evidence: `README.md`)
- Bertini continuation → Result CSVs: writes results (evidence: `README.md`)
- Wolfram entry → Result CSVs: writes results (evidence: `README.md`)
- Result merge and read → Result CSVs: merges and reads (evidence: `src/bae_bertini/results.py`)
- Results browser → Result merge and read: reads previews (evidence: `src/bae_bertini/ui/app.py`)
- Results browser → Result CSVs: loads roots (evidence: `src/bae_bertini/ui/app.py`)
- Results browser → Root plots: renders comparisons (evidence: `src/bae_bertini/ui/app.py`)
- Root plots → Root parsing: parses roots (evidence: `src/bae_bertini/ui/plots.py`)
- Results browser → Reference CSVs: opens references (evidence: `README.md`)
- User → Flip-distance checks: runs checks (evidence: `README.md`)
- Flip-distance checks → Result CSVs: reads and updates (evidence: `src/bae_bertini/flip_checks.py`)
- User → Flip crosscheck: compares tableaux (evidence: `README.md`)
- Flip crosscheck → Result CSVs: reads roots (evidence: `src/bae_bertini/crosscheck.py`)
- User → Result merge and read: merges snapshots (evidence: `README.md`)
