# youmettem/ljvshardspheresimulationmodel architecture

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

- Interactive diagram: https://gitdiagram.com/youmettem/ljvshardspheresimulationmodel
- Repository: https://github.com/youmettem/ljvshardspheresimulationmodel

## Overview

This repository is a molecular-dynamics comparison: the main workflow samples Lennard-Jones and hard-sphere simulations, estimates the stabilized temperature, and compares sampled speed distributions with the Maxwell–Boltzmann distribution using spline fits and error metrics. Separate VPython programs visualize constant-temperature LJ motion and temperature-reduction responses for both models. The shown source supports the main workflow and visualization-to-engine calls; user launch relationships are documented only generally, so those entry links are dashed.

Main entry points: [`src/main.py`](https://github.com/youmettem/ljvshardspheresimulationmodel/blob/main/src/main.py) (Comparison runner), [`src/updateLJ.py`](https://github.com/youmettem/ljvshardspheresimulationmodel/blob/main/src/updateLJ.py) (Lennard-Jones engine), [`src/visLJ3DconstTemp.py`](https://github.com/youmettem/ljvshardspheresimulationmodel/blob/main/src/visLJ3DconstTemp.py) (LJ constant-temperature view), [`src/visTempChangeLJ3D.py`](https://github.com/youmettem/ljvshardspheresimulationmodel/blob/main/src/visTempChangeLJ3D.py) (LJ quench view)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Comparison workflow"]
  node_main["Comparison runner<br/>[main.py]"]
  node_analysis["Distribution analysis<br/>[main.py]"]
end

subgraph group_engines["Particle models"]
  node_lj["Lennard-Jones engine<br/>[updateLJ.py]"]
  node_hs["Hard-sphere engine"]
end

subgraph group_visuals["3D visualizations"]
  node_ljconstant["LJ constant-temperature view"]
  node_ljquench["LJ quench view"]
  node_hsquench["Hard-sphere quench view"]
end

node_user(("Researcher"))

node_user -.->|"runs comparison"| node_main
node_main -->|"samples dynamics"| node_lj
node_main -->|"samples dynamics"| node_hs
node_main -->|"fits distributions"| node_analysis
node_user -.->|"runs visualization"| node_ljconstant
node_user -.->|"runs visualization"| node_ljquench
node_user -.->|"runs visualization"| node_hsquench
node_ljconstant -->|"advances particles"| node_lj
node_ljquench -->|"advances particles"| node_lj
node_hsquench -->|"advances particles"| node_hs

click node_main "https://github.com/youmettem/ljvshardspheresimulationmodel/blob/main/src/main.py"
click node_analysis "https://github.com/youmettem/ljvshardspheresimulationmodel/blob/main/src/main.py"
click node_lj "https://github.com/youmettem/ljvshardspheresimulationmodel/blob/main/src/updateLJ.py"
click node_hs "https://github.com/youmettem/ljvshardspheresimulationmodel/blob/main/src/updateHardSphere.py"
click node_ljconstant "https://github.com/youmettem/ljvshardspheresimulationmodel/blob/main/src/visLJ3DconstTemp.py"
click node_ljquench "https://github.com/youmettem/ljvshardspheresimulationmodel/blob/main/src/visTempChangeLJ3D.py"
click node_hsquench "https://github.com/youmettem/ljvshardspheresimulationmodel/blob/main/src/visTempChangeHardSphere3D.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_main,node_analysis toneBlue
class node_lj,node_hs toneAmber
class node_ljconstant,node_ljquench,node_hsquench toneMint
class node_user toneIndigo
```

## Components

### Comparison workflow

- [Comparison runner](https://github.com/youmettem/ljvshardspheresimulationmodel/blob/main/src/main.py): `src/main.py`
- [Distribution analysis](https://github.com/youmettem/ljvshardspheresimulationmodel/blob/main/src/main.py): `src/main.py`

### Particle models

- [Lennard-Jones engine](https://github.com/youmettem/ljvshardspheresimulationmodel/blob/main/src/updateLJ.py): `src/updateLJ.py`
- [Hard-sphere engine](https://github.com/youmettem/ljvshardspheresimulationmodel/blob/main/src/updateHardSphere.py): `src/updateHardSphere.py`

### 3D visualizations

- [LJ constant-temperature view](https://github.com/youmettem/ljvshardspheresimulationmodel/blob/main/src/visLJ3DconstTemp.py): `src/visLJ3DconstTemp.py`
- [LJ quench view](https://github.com/youmettem/ljvshardspheresimulationmodel/blob/main/src/visTempChangeLJ3D.py): `src/visTempChangeLJ3D.py`
- [Hard-sphere quench view](https://github.com/youmettem/ljvshardspheresimulationmodel/blob/main/src/visTempChangeHardSphere3D.py): `src/visTempChangeHardSphere3D.py`

### Other components

- **Researcher**

## Connections

- Researcher → Comparison runner: runs comparison (evidence: `README.md`)
- Comparison runner → Lennard-Jones engine: samples dynamics (evidence: `src/main.py`)
- Comparison runner → Hard-sphere engine: samples dynamics (evidence: `src/main.py`)
- Comparison runner → Distribution analysis: fits distributions (evidence: `src/main.py`)
- Researcher → LJ constant-temperature view: runs visualization (evidence: `README.md`)
- Researcher → LJ quench view: runs visualization (evidence: `README.md`)
- Researcher → Hard-sphere quench view: runs visualization (evidence: `README.md`)
- LJ constant-temperature view → Lennard-Jones engine: advances particles (evidence: `src/visLJ3DconstTemp.py`)
- LJ quench view → Lennard-Jones engine: advances particles (evidence: `src/visTempChangeLJ3D.py`)
- Hard-sphere quench view → Hard-sphere engine: advances particles (evidence: `src/visTempChangeHardSphere3D.py`)
