# elseviersoftwarex/softx-d-25-00304 architecture

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

- Interactive diagram: https://gitdiagram.com/elseviersoftwarex/softx-d-25-00304
- Repository: https://github.com/elseviersoftwarex/softx-d-25-00304

## Overview

gorder is a CLI and library for calculating lipid order parameters from molecular-dynamics simulations, with Rust and Python APIs. The main user workflow is to provide YAML analysis settings and structure/trajectory inputs, run an atomistic, coarse-grained, or united-atom analysis, then inspect results in a selected output format. Documented capabilities also include molecule classification, leaflet and geometry selection, dynamic membrane normals, order maps, and error estimation. Edges are limited to README statements and visible source-index references; unsampled feature internals are represented without asserted call paths.

Main entry points: [`src/analysis/mod.rs`](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/mod.rs) (Shared analysis), [`src/analysis/topology/mod.rs`](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/topology/mod.rs) (System topology), [`src/application/mod.rs`](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/application/mod.rs) (Application), [`pygorder/src/lib.rs`](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/pygorder/src/lib.rs) (Python API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_configuration["Configuration"]
  node_settings["Analysis settings<br/>[analysis.rs]"]
  node_feature_settings["Feature settings"]
end

subgraph group_topology["Topology"]
  node_structure["System topology<br/>[mod.rs]"]
  node_bonds["Bond topology<br/>[bond.rs]"]
  node_atoms["Atom topology<br/>[atom.rs]"]
  node_classification["Molecule classification<br/>[classify.rs]"]
end

subgraph group_calculation["Analysis"]
  node_aa["Atomistic order<br/>[aaorder.rs]"]
  node_cg["Coarse-grained order<br/>[cgorder.rs]"]
  node_ua["United-atom order<br/>[uaorder.rs]"]
  node_shared_analysis["Shared analysis<br/>[mod.rs]"]
  node_leaflets["Leaflet assignment<br/>[leaflets.rs]"]
  node_geometry["Region selection<br/>[geometry.rs]"]
  node_normals["Membrane normals<br/>[normal.rs]"]
  node_maps["Order maps<br/>[ordermap.rs]"]
  node_pbc["Periodic boundaries<br/>[pbc.rs]"]
  node_error_estimation["Error estimation<br/>[timewise.rs]"]
end

subgraph group_results["Results and APIs"]
  node_converter["Result conversion<br/>[converter.rs]"]
  node_typed_results["Typed results<br/>[aaresults.rs]"]
  node_presenters["Output presenters<br/>[mod.rs]"]
  node_rust_api["Rust API<br/>[lib.rs]"]
  node_python_api["Python API<br/>[lib.rs]"]
  node_python_features["Python analysis features<br/>[analysis.rs]"]
end

node_user(("Analyst"))
node_cli["CLI entry<br/>[main.rs]"]
node_app["Application<br/>[mod.rs]"]
node_output_files["Result files"]

node_user -->|"runs"| node_cli
node_user -->|"configures"| node_settings
node_cli -->|"dispatches"| node_app
node_settings -.->|"configures"| node_app
node_feature_settings -.->|"configures"| node_shared_analysis
node_app -.->|"starts analysis"| node_shared_analysis
node_shared_analysis -->|"dispatches"| node_aa
node_shared_analysis -->|"dispatches"| node_cg
node_shared_analysis -->|"dispatches"| node_ua
node_structure -->|"uses"| node_bonds
node_structure -->|"uses"| node_atoms
node_structure -->|"uses"| node_classification
node_shared_analysis -.->|"builds topology"| node_structure
node_shared_analysis -.->|"supports"| node_leaflets
node_shared_analysis -.->|"supports"| node_geometry
node_shared_analysis -.->|"supports"| node_normals
node_shared_analysis -.->|"supports"| node_maps
node_shared_analysis -->|"uses"| node_pbc
node_shared_analysis -.->|"supports"| node_error_estimation
node_shared_analysis -.->|"converts results"| node_converter
node_converter -->|"constructs"| node_typed_results
node_presenters -->|"writes"| node_output_files
node_user -->|"reads"| node_output_files
node_rust_api -->|"exposes"| node_shared_analysis
node_python_api -->|"registers"| node_python_features
node_python_api -.->|"wraps core"| node_rust_api

click node_cli "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/main.rs"
click node_settings "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/input/analysis.rs"
click node_feature_settings "https://github.com/elseviersoftwarex/softx-d-25-00304/tree/main/src/input"
click node_app "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/application/mod.rs"
click node_structure "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/topology/mod.rs"
click node_bonds "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/topology/bond.rs"
click node_atoms "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/topology/atom.rs"
click node_classification "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/topology/classify.rs"
click node_aa "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/aaorder.rs"
click node_cg "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/cgorder.rs"
click node_ua "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/uaorder.rs"
click node_shared_analysis "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/mod.rs"
click node_leaflets "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/leaflets.rs"
click node_geometry "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/geometry.rs"
click node_normals "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/normal.rs"
click node_maps "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/ordermap.rs"
click node_pbc "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/pbc.rs"
click node_error_estimation "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/timewise.rs"
click node_converter "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/presentation/converter.rs"
click node_typed_results "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/presentation/aaresults.rs"
click node_presenters "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/presentation/mod.rs"
click node_rust_api "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/lib.rs"
click node_python_api "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/pygorder/src/lib.rs"
click node_python_features "https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/pygorder/src/analysis.rs"

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_settings,node_feature_settings toneBlue
class node_structure,node_bonds,node_atoms,node_classification toneAmber
class node_aa,node_cg,node_ua,node_shared_analysis,node_leaflets,node_geometry,node_normals,node_maps,node_pbc,node_error_estimation toneMint
class node_converter,node_typed_results,node_presenters,node_rust_api,node_python_api,node_python_features toneRose
class node_user,node_output_files toneIndigo
class node_cli,node_app toneTeal
```

## Components

### Configuration

- [Analysis settings](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/input/analysis.rs): `src/input/analysis.rs`
- [Feature settings](https://github.com/elseviersoftwarex/softx-d-25-00304/tree/main/src/input): `src/input`

### Topology

- [System topology](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/topology/mod.rs): `src/analysis/topology/mod.rs`
- [Bond topology](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/topology/bond.rs): `src/analysis/topology/bond.rs`
- [Atom topology](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/topology/atom.rs): `src/analysis/topology/atom.rs`
- [Molecule classification](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/topology/classify.rs): `src/analysis/topology/classify.rs`

### Analysis

- [Atomistic order](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/aaorder.rs): `src/analysis/aaorder.rs`
- [Coarse-grained order](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/cgorder.rs): `src/analysis/cgorder.rs`
- [United-atom order](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/uaorder.rs): `src/analysis/uaorder.rs`
- [Shared analysis](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/mod.rs): `src/analysis/mod.rs`
- [Leaflet assignment](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/leaflets.rs): `src/analysis/leaflets.rs`
- [Region selection](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/geometry.rs): `src/analysis/geometry.rs`
- [Membrane normals](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/normal.rs): `src/analysis/normal.rs`
- [Order maps](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/ordermap.rs): `src/analysis/ordermap.rs`
- [Periodic boundaries](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/pbc.rs): `src/analysis/pbc.rs`
- [Error estimation](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/analysis/timewise.rs): `src/analysis/timewise.rs`

### Results and APIs

- [Result conversion](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/presentation/converter.rs): `src/presentation/converter.rs`
- [Typed results](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/presentation/aaresults.rs): `src/presentation/aaresults.rs`
- [Output presenters](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/presentation/mod.rs): `src/presentation/mod.rs`
- [Rust API](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/lib.rs): `src/lib.rs`
- [Python API](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/pygorder/src/lib.rs): `pygorder/src/lib.rs`
- [Python analysis features](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/pygorder/src/analysis.rs): `pygorder/src/analysis.rs`

### Other components

- **Analyst**
- [CLI entry](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/main.rs): `src/main.rs`
- [Application](https://github.com/elseviersoftwarex/softx-d-25-00304/blob/main/src/application/mod.rs): `src/application/mod.rs`
- **Result files**

## Connections

- Analyst → CLI entry: runs
- Analyst → Analysis settings: configures
- CLI entry → Application: dispatches (evidence: `src/main.rs`)
- Analysis settings → Application: configures
- Feature settings → Shared analysis: configures (evidence: `src/analysis/mod.rs`)
- Application → Shared analysis: starts analysis
- Shared analysis → Atomistic order: dispatches (evidence: `src/analysis/mod.rs`)
- Shared analysis → Coarse-grained order: dispatches (evidence: `src/analysis/mod.rs`)
- Shared analysis → United-atom order: dispatches (evidence: `src/analysis/mod.rs`)
- System topology → Bond topology: uses (evidence: `src/analysis/topology/mod.rs`)
- System topology → Atom topology: uses (evidence: `src/analysis/topology/mod.rs`)
- System topology → Molecule classification: uses (evidence: `src/analysis/topology/mod.rs`)
- Shared analysis → System topology: builds topology (evidence: `src/analysis/mod.rs`)
- Shared analysis → Leaflet assignment: supports (evidence: `src/analysis/mod.rs`)
- Shared analysis → Region selection: supports (evidence: `src/analysis/mod.rs`)
- Shared analysis → Membrane normals: supports (evidence: `src/analysis/mod.rs`)
- Shared analysis → Order maps: supports (evidence: `src/analysis/mod.rs`)
- Shared analysis → Periodic boundaries: uses (evidence: `src/analysis/pbc.rs`)
- Shared analysis → Error estimation: supports (evidence: `src/analysis/mod.rs`)
- Shared analysis → Result conversion: converts results
- Result conversion → Typed results: constructs (evidence: `src/presentation/converter.rs`)
- Output presenters → Result files: writes (evidence: `src/presentation/mod.rs`)
- Analyst → Result files: reads
- Rust API → Shared analysis: exposes (evidence: `src/lib.rs`)
- Python API → Python analysis features: registers (evidence: `pygorder/src/lib.rs`)
- Python API → Rust API: wraps core
