# kostergroup/pysimsalabim architecture

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

- Interactive diagram: https://gitdiagram.com/kostergroup/pysimsalabim
- Repository: https://github.com/kostergroup/pysimsalabim

## Overview

pySIMsalabim is a Python interface for the SIMsalabim drift-diffusion simulator. Users configure device parameters, select an experiment, and run simulations through SIMsalabim; the package then reads outputs for analysis and visualization. Experiment modules cover JV, capacitance, EQE, impedance/IMPS, hysteresis, and transient photoluminescence. Supporting capabilities include parallel execution, device-parameter processing, DRT analysis, plotting, and simulator installation. Relationships reflect README statements and source-index references; unsampled implementations are represented by their exact tree paths, without assuming additional call flows.

Main entry points: [`pySIMsalabim/utils/general.py`](https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/utils/general.py) (Run and Dispatch), [`pySIMsalabim/experiments`](https://github.com/kostergroup/pysimsalabim/tree/main/pySIMsalabim/experiments) (Experiment API), [`pySIMsalabim/experiments/CV.py`](https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/experiments/CV.py) (Capacitance), [`pySIMsalabim/experiments/impedance.py`](https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/experiments/impedance.py) (Impedance)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experiments["Experiments"]
  node_experiment_api["Experiment API"]
  node_jv["JV Measurements<br/>[JV_steady_state.py]"]
  node_jvsweep["JV Sweeps<br/>[JV_sweep.py]"]
  node_cv["Capacitance<br/>[CV.py]"]
  node_eqe["EQE<br/>[EQE.py]"]
  node_hyst["Hysteresis<br/>[hysteresis.py]"]
  node_impedance["Impedance<br/>[impedance.py]"]
  node_imps["IMPS<br/>[imps.py]"]
  node_trpl["Transient PL<br/>[trPL.py]"]
end

subgraph group_runtime["Simulation Runtime"]
  node_execution["Run and Dispatch<br/>[general.py]"]
  node_parallel["Parallel Runs<br/>[parallel_sim.py]"]
  node_output_reader["Output Reading<br/>[utils.py]"]
end

subgraph group_analysis["Analysis and Plots"]
  node_drt["DRT Analysis<br/>[DRT.py]"]
  node_plotting["Plot Functions<br/>[plot_functions.py]"]
  node_band_plot["Band Diagram<br/>[band_diagram.py]"]
  node_plot_style["Plot Defaults<br/>[plot_def.py]"]
end

subgraph group_setup["Device and Setup"]
  node_device_params["Device Parameters"]
  node_sim_install["Simulator Install<br/>[get_SIMsalabim.py]"]
end

node_user(("Python User"))
node_sim_engine["SIMsalabim"]

node_user -->|"selects experiment"| node_experiment_api
node_experiment_api -.->|"runs"| node_jv
node_experiment_api -.->|"runs"| node_jvsweep
node_experiment_api -.->|"runs"| node_cv
node_experiment_api -.->|"runs"| node_eqe
node_experiment_api -.->|"runs"| node_hyst
node_experiment_api -.->|"runs"| node_impedance
node_experiment_api -.->|"runs"| node_imps
node_experiment_api -.->|"runs"| node_trpl
node_jv -->|"runs simulation"| node_execution
node_jvsweep -->|"runs simulation"| node_execution
node_cv -->|"runs simulation"| node_execution
node_eqe -->|"uses runtime"| node_execution
node_hyst -->|"uses runtime"| node_execution
node_impedance -->|"runs simulation"| node_execution
node_imps -->|"uses runtime"| node_execution
node_trpl -->|"uses runtime"| node_execution
node_execution -->|"launches"| node_sim_engine
node_parallel -->|"dispatches runs"| node_execution
node_execution -->|"loads parameters"| node_device_params
node_impedance -->|"reads output"| node_output_reader
node_cv -->|"reads output"| node_output_reader
node_impedance -->|"invokes analysis"| node_drt
node_drt -->|"uses plots"| node_plotting
node_cv -->|"uses plots"| node_plotting
node_hyst -->|"uses plots"| node_plotting
node_band_plot -->|"loads parameters"| node_device_params
node_plotting -->|"uses defaults"| node_plot_style
node_user -->|"installs simulator"| node_sim_install

click node_experiment_api "https://github.com/kostergroup/pysimsalabim/tree/main/pySIMsalabim/experiments"
click node_jv "https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/experiments/JV_steady_state.py"
click node_jvsweep "https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/experiments/JV_sweep.py"
click node_cv "https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/experiments/CV.py"
click node_eqe "https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/experiments/EQE.py"
click node_hyst "https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/experiments/hysteresis.py"
click node_impedance "https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/experiments/impedance.py"
click node_imps "https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/experiments/imps.py"
click node_trpl "https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/experiments/trPL.py"
click node_execution "https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/utils/general.py"
click node_parallel "https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/utils/parallel_sim.py"
click node_output_reader "https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/utils/utils.py"
click node_device_params "https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/utils/device_parameters.py"
click node_sim_install "https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/install/get_SIMsalabim.py"
click node_drt "https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/aux_funcs/DRT.py"
click node_plotting "https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/plots/plot_functions.py"
click node_band_plot "https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/plots/band_diagram.py"
click node_plot_style "https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/plots/plot_def.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_experiment_api,node_jv,node_jvsweep,node_cv,node_eqe,node_hyst,node_impedance,node_imps,node_trpl,node_user toneBlue
class node_execution,node_parallel,node_output_reader toneAmber
class node_drt,node_plotting,node_band_plot,node_plot_style toneMint
class node_device_params,node_sim_install toneRose
class node_sim_engine toneIndigo
```

## Components

### Experiments

- [Experiment API](https://github.com/kostergroup/pysimsalabim/tree/main/pySIMsalabim/experiments): `pySIMsalabim/experiments`
- [JV Measurements](https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/experiments/JV_steady_state.py): `pySIMsalabim/experiments/JV_steady_state.py`
- [JV Sweeps](https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/experiments/JV_sweep.py): `pySIMsalabim/experiments/JV_sweep.py`
- [Capacitance](https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/experiments/CV.py): `pySIMsalabim/experiments/CV.py`
- [EQE](https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/experiments/EQE.py): `pySIMsalabim/experiments/EQE.py`
- [Hysteresis](https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/experiments/hysteresis.py): `pySIMsalabim/experiments/hysteresis.py`
- [Impedance](https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/experiments/impedance.py): `pySIMsalabim/experiments/impedance.py`
- [IMPS](https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/experiments/imps.py): `pySIMsalabim/experiments/imps.py`
- [Transient PL](https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/experiments/trPL.py): `pySIMsalabim/experiments/trPL.py`

### Simulation Runtime

- [Run and Dispatch](https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/utils/general.py): `pySIMsalabim/utils/general.py`
- [Parallel Runs](https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/utils/parallel_sim.py): `pySIMsalabim/utils/parallel_sim.py`
- [Output Reading](https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/utils/utils.py): `pySIMsalabim/utils/utils.py`

### Analysis and Plots

- [DRT Analysis](https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/aux_funcs/DRT.py): `pySIMsalabim/aux_funcs/DRT.py`
- [Plot Functions](https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/plots/plot_functions.py): `pySIMsalabim/plots/plot_functions.py`
- [Band Diagram](https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/plots/band_diagram.py): `pySIMsalabim/plots/band_diagram.py`
- [Plot Defaults](https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/plots/plot_def.py): `pySIMsalabim/plots/plot_def.py`

### Device and Setup

- [Device Parameters](https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/utils/device_parameters.py): `pySIMsalabim/utils/device_parameters.py`
- [Simulator Install](https://github.com/kostergroup/pysimsalabim/blob/main/pySIMsalabim/install/get_SIMsalabim.py): `pySIMsalabim/install/get_SIMsalabim.py`

### Other components

- **Python User**
- **SIMsalabim**

## Connections

- Python User → Experiment API: selects experiment (evidence: `README.md`)
- Experiment API → JV Measurements: runs
- Experiment API → JV Sweeps: runs
- Experiment API → Capacitance: runs
- Experiment API → EQE: runs
- Experiment API → Hysteresis: runs
- Experiment API → Impedance: runs
- Experiment API → IMPS: runs
- Experiment API → Transient PL: runs
- JV Measurements → Run and Dispatch: runs simulation (evidence: `pySIMsalabim/experiments/JV_steady_state.py`)
- JV Sweeps → Run and Dispatch: runs simulation (evidence: `pySIMsalabim/experiments/JV_sweep.py`)
- Capacitance → Run and Dispatch: runs simulation (evidence: `pySIMsalabim/experiments/CV.py`)
- EQE → Run and Dispatch: uses runtime (evidence: `pySIMsalabim/experiments/EQE.py`)
- Hysteresis → Run and Dispatch: uses runtime (evidence: `pySIMsalabim/experiments/hysteresis.py`)
- Impedance → Run and Dispatch: runs simulation (evidence: `pySIMsalabim/experiments/impedance.py`)
- IMPS → Run and Dispatch: uses runtime (evidence: `pySIMsalabim/experiments/imps.py`)
- Transient PL → Run and Dispatch: uses runtime (evidence: `pySIMsalabim/experiments/trPL.py`)
- Run and Dispatch → SIMsalabim: launches (evidence: `README.md`)
- Parallel Runs → Run and Dispatch: dispatches runs (evidence: `pySIMsalabim/utils/parallel_sim.py`)
- Run and Dispatch → Device Parameters: loads parameters (evidence: `pySIMsalabim/utils/general.py`)
- Impedance → Output Reading: reads output (evidence: `pySIMsalabim/experiments/impedance.py`)
- Capacitance → Output Reading: reads output (evidence: `pySIMsalabim/experiments/CV.py`)
- Impedance → DRT Analysis: invokes analysis (evidence: `pySIMsalabim/experiments/impedance.py`)
- DRT Analysis → Plot Functions: uses plots (evidence: `pySIMsalabim/aux_funcs/DRT.py`)
- Capacitance → Plot Functions: uses plots (evidence: `pySIMsalabim/experiments/CV.py`)
- Hysteresis → Plot Functions: uses plots (evidence: `pySIMsalabim/experiments/hysteresis.py`)
- Band Diagram → Device Parameters: loads parameters (evidence: `pySIMsalabim/plots/band_diagram.py`)
- Plot Functions → Plot Defaults: uses defaults (evidence: `pySIMsalabim/plots/plot_functions.py`)
- Python User → Simulator Install: installs simulator (evidence: `README.md`)
