# mudiambat13/scientificlab architecture

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

- Interactive diagram: https://gitdiagram.com/mudiambat13/scientificlab
- Repository: https://github.com/mudiambat13/scientificlab

## Overview

ScientificLab is a Python toolkit for mathematical computation, physics calculations, scientific simulations, and visualization. Its user-facing workflow is to submit a task through the GUI/API, which dispatches to solver, simulation, unit, or plotting capabilities and returns computed results. The library also exposes these capabilities directly as package modules. The README documents the feature areas; source excerpts and the SOURCE INDEX support only some internal links, so unsampled subsystem relationships are omitted rather than inferred.

Main entry points: [`src/scientificlab/gui/api.py`](https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/gui/api.py) (GUI API), [`src/scientificlab/simulations/mechanics.py`](https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/simulations/mechanics.py) (Mechanics simulation), [`src/scientificlab/solvers/engine.py`](https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/solvers/engine.py) (Equation solver), [`src/scientificlab/gui/server.py`](https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/gui/server.py) (GUI server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_gui_server["GUI server<br/>[server.py]"]
  node_gui_api["GUI API<br/>[api.py]"]
end

subgraph group_math["Mathematics"]
  node_solver["Equation solver<br/>[engine.py]"]
  node_algebra["Algebra<br/>[expressions.py]"]
  node_calculus["Calculus"]
  node_numerics["Numerical methods"]
  node_linear["Linear algebra"]
  node_statistics["Statistics"]
end

subgraph group_physics["Physics"]
  node_physics_calcs["Physics calculations"]
end

subgraph group_simulation["Simulation and visualization"]
  node_sim_mechanics["Mechanics simulation<br/>[mechanics.py]"]
  node_sim_waves["Wave simulation<br/>[waves.py]"]
  node_sim_common["Simulation helpers<br/>[_common.py]"]
  node_visualization["Visualization"]
  node_viz_common["Plot helpers<br/>[_common.py]"]
end

subgraph group_shared["Shared foundations"]
  node_constants["Physical constants<br/>[codata.py]"]
  node_units_conversion["Unit conversion<br/>[conversion.py]"]
  node_units_registry["Unit registry<br/>[registry.py]"]
  node_validation["Input validation<br/>[validation.py]"]
  node_errors["Error types<br/>[exceptions.py]"]
end

node_user(("User"))

node_user -->|"uses"| node_gui_server
node_gui_server -->|"routes to"| node_gui_api
node_gui_api -->|"dispatches to"| node_solver
node_gui_api -->|"dispatches to"| node_visualization
node_gui_api -->|"dispatches to"| node_units_conversion
node_gui_api -->|"dispatches to"| node_sim_mechanics
node_gui_api -->|"dispatches to"| node_sim_waves
node_solver -->|"parses with"| node_algebra
node_solver -->|"uses methods"| node_numerics
node_algebra -->|"raises"| node_errors
node_physics_calcs -->|"uses constants"| node_constants
node_sim_mechanics -->|"uses helpers"| node_sim_common
node_sim_waves -->|"uses helpers"| node_sim_common
node_visualization -->|"uses helpers"| node_viz_common
node_units_conversion -->|"uses registry"| node_units_registry
node_validation -->|"raises"| node_errors
node_sim_mechanics -->|"validates with"| node_validation
node_sim_mechanics -->|"uses constants"| node_constants

click node_gui_server "https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/gui/server.py"
click node_gui_api "https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/gui/api.py"
click node_solver "https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/solvers/engine.py"
click node_algebra "https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/mathematics/algebra/expressions.py"
click node_calculus "https://github.com/mudiambat13/scientificlab/tree/main/src/scientificlab/mathematics/calculus"
click node_numerics "https://github.com/mudiambat13/scientificlab/tree/main/src/scientificlab/mathematics/numerical_methods"
click node_linear "https://github.com/mudiambat13/scientificlab/tree/main/src/scientificlab/mathematics/linear_algebra"
click node_statistics "https://github.com/mudiambat13/scientificlab/tree/main/src/scientificlab/mathematics/statistics"
click node_physics_calcs "https://github.com/mudiambat13/scientificlab/tree/main/src/scientificlab/physics"
click node_constants "https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/constants/codata.py"
click node_sim_mechanics "https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/simulations/mechanics.py"
click node_sim_waves "https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/simulations/waves.py"
click node_sim_common "https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/simulations/_common.py"
click node_visualization "https://github.com/mudiambat13/scientificlab/tree/main/src/scientificlab/visualization"
click node_viz_common "https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/visualization/_common.py"
click node_units_conversion "https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/units/conversion.py"
click node_units_registry "https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/units/registry.py"
click node_validation "https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/utils/validation.py"
click node_errors "https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/utils/exceptions.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_gui_server,node_gui_api,node_user toneBlue
class node_solver,node_algebra,node_calculus,node_numerics,node_linear,node_statistics toneAmber
class node_physics_calcs toneMint
class node_sim_mechanics,node_sim_waves,node_sim_common,node_visualization,node_viz_common toneRose
class node_constants,node_units_conversion,node_units_registry,node_validation,node_errors toneIndigo
```

## Components

### User interface

- [GUI server](https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/gui/server.py): `src/scientificlab/gui/server.py`
- [GUI API](https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/gui/api.py): `src/scientificlab/gui/api.py`

### Mathematics

- [Equation solver](https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/solvers/engine.py): `src/scientificlab/solvers/engine.py`
- [Algebra](https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/mathematics/algebra/expressions.py): `src/scientificlab/mathematics/algebra/expressions.py`
- [Calculus](https://github.com/mudiambat13/scientificlab/tree/main/src/scientificlab/mathematics/calculus): `src/scientificlab/mathematics/calculus`
- [Numerical methods](https://github.com/mudiambat13/scientificlab/tree/main/src/scientificlab/mathematics/numerical_methods): `src/scientificlab/mathematics/numerical_methods`
- [Linear algebra](https://github.com/mudiambat13/scientificlab/tree/main/src/scientificlab/mathematics/linear_algebra): `src/scientificlab/mathematics/linear_algebra`
- [Statistics](https://github.com/mudiambat13/scientificlab/tree/main/src/scientificlab/mathematics/statistics): `src/scientificlab/mathematics/statistics`

### Physics

- [Physics calculations](https://github.com/mudiambat13/scientificlab/tree/main/src/scientificlab/physics): `src/scientificlab/physics`

### Simulation and visualization

- [Mechanics simulation](https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/simulations/mechanics.py): `src/scientificlab/simulations/mechanics.py`
- [Wave simulation](https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/simulations/waves.py): `src/scientificlab/simulations/waves.py`
- [Simulation helpers](https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/simulations/_common.py): `src/scientificlab/simulations/_common.py`
- [Visualization](https://github.com/mudiambat13/scientificlab/tree/main/src/scientificlab/visualization): `src/scientificlab/visualization`
- [Plot helpers](https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/visualization/_common.py): `src/scientificlab/visualization/_common.py`

### Shared foundations

- [Physical constants](https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/constants/codata.py): `src/scientificlab/constants/codata.py`
- [Unit conversion](https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/units/conversion.py): `src/scientificlab/units/conversion.py`
- [Unit registry](https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/units/registry.py): `src/scientificlab/units/registry.py`
- [Input validation](https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/utils/validation.py): `src/scientificlab/utils/validation.py`
- [Error types](https://github.com/mudiambat13/scientificlab/blob/main/src/scientificlab/utils/exceptions.py): `src/scientificlab/utils/exceptions.py`

### Other components

- **User**

## Connections

- User → GUI server: uses
- GUI server → GUI API: routes to (evidence: `src/scientificlab/gui/server.py`)
- GUI API → Equation solver: dispatches to (evidence: `src/scientificlab/gui/api.py`)
- GUI API → Visualization: dispatches to (evidence: `src/scientificlab/gui/api.py`)
- GUI API → Unit conversion: dispatches to (evidence: `src/scientificlab/gui/api.py`)
- GUI API → Mechanics simulation: dispatches to (evidence: `src/scientificlab/gui/api.py`)
- GUI API → Wave simulation: dispatches to (evidence: `src/scientificlab/gui/api.py`)
- Equation solver → Algebra: parses with (evidence: `src/scientificlab/solvers/engine.py`)
- Equation solver → Numerical methods: uses methods (evidence: `src/scientificlab/solvers/engine.py`)
- Algebra → Error types: raises (evidence: `src/scientificlab/mathematics/algebra/expressions.py`)
- Physics calculations → Physical constants: uses constants (evidence: `src/scientificlab/physics/mechanics/kinematics.py`)
- Mechanics simulation → Simulation helpers: uses helpers (evidence: `src/scientificlab/simulations/mechanics.py`)
- Wave simulation → Simulation helpers: uses helpers (evidence: `src/scientificlab/simulations/waves.py`)
- Visualization → Plot helpers: uses helpers (evidence: `src/scientificlab/visualization/functions.py`)
- Unit conversion → Unit registry: uses registry (evidence: `src/scientificlab/units/conversion.py`)
- Input validation → Error types: raises (evidence: `src/scientificlab/utils/validation.py`)
- Mechanics simulation → Input validation: validates with (evidence: `src/scientificlab/simulations/mechanics.py`)
- Mechanics simulation → Physical constants: uses constants (evidence: `src/scientificlab/simulations/mechanics.py`)
