# rkailasham-group/computational-soft-matter architecture

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

- Interactive diagram: https://gitdiagram.com/rkailasham-group/computational-soft-matter
- Repository: https://github.com/rkailasham-group/computational-soft-matter

## Overview

This repository is a computational soft-matter research project: it prepares particle configurations, runs Active Brownian Particle simulations, and analyzes trajectories against diffusion theory or collective-clustering measures. The principal workflow is initial configuration → simulation → saved trajectory → analysis/visualization. The README also documents 2D reciprocal-swimmer and 3D single-particle MSD studies; the sampled 2D `simulate.py` only writes a one-frame starting snapshot, so its connection to the plot’s expected trajectories is not established here. Collective-analysis wiring is based on the sampled scripts; some excerpts are partial.

Main entry points: [`Prince/Active-Brownian-Particles/3D_Single_Sphere/simulate.py`](https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/3D_Single_Sphere/simulate.py) (3D Simulator), [`Prince/Active-Brownian-Particles/3D_Single_Sphere/msd.py`](https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/3D_Single_Sphere/msd.py) (MSD Extractor), [`Prince/Active-Brownian-Particles/Multiple_Colloidal_Spheres/simulate.py`](https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/Multiple_Colloidal_Spheres/simulate.py) (Collective Simulator), [`Prince/Active-Brownian-Particles/2D_Disk/simulate.py`](https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/2D_Disk/simulate.py) (Disk Snapshot)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_two_d["2D Disk Study"]
  node_disk_init["Disk Snapshot<br/>[simulate.py]"]
  node_disk_gsd[("Disk GSD")]
  node_disk_msd["MSD Plot<br/>[plot_msd.py]"]
end

subgraph group_single["3D Single Sphere"]
  node_sphere_init["Sphere Snapshot<br/>[box.py]"]
  node_sphere_sim["3D Simulator<br/>[simulate.py]"]
  node_sphere_gsd[("3D Trajectories")]
  node_sphere_msd["MSD Extractor<br/>[msd.py]"]
  node_sphere_data[("MSD Data")]
  node_sphere_vis["Theory Comparison<br/>[vis.py]"]
end

subgraph group_collective["Collective Spheres"]
  node_dense_init["Dense Snapshot<br/>[box.py]"]
  node_dense_sim["Collective Simulator<br/>[simulate.py]"]
  node_dense_gsd[("Dense Trajectories")]
  node_cluster_analysis["Cluster Dynamics"]
  node_cluster_summary["Cluster Statistics"]
  node_cluster_variance["Cluster Variance<br/>[variance.py]"]
end

subgraph group_engine["Simulation Engine"]
  node_hoomd["HOOMD-blue"]
end

node_researcher(("Researcher"))

node_researcher -->|"starts"| node_disk_init
node_disk_init -->|"writes snapshot"| node_disk_gsd
node_researcher -->|"runs analysis"| node_disk_msd
node_disk_msd -->|"reads trajectories"| node_disk_gsd
node_researcher -->|"creates state"| node_sphere_init
node_sphere_init -->|"writes snapshot"| node_sphere_gsd
node_researcher -->|"starts runs"| node_sphere_sim
node_sphere_sim -->|"reads input, writes output"| node_sphere_gsd
node_sphere_sim -->|"uses simulation API"| node_hoomd
node_researcher -->|"runs extraction"| node_sphere_msd
node_sphere_msd -->|"reads trajectories"| node_sphere_gsd
node_sphere_msd -->|"writes MSD"| node_sphere_data
node_researcher -->|"plots comparison"| node_sphere_vis
node_sphere_vis -->|"reads MSD"| node_sphere_data
node_researcher -->|"creates state"| node_dense_init
node_dense_init -->|"writes snapshot"| node_dense_gsd
node_researcher -->|"starts run"| node_dense_sim
node_dense_sim -->|"reads input, writes output"| node_dense_gsd
node_dense_sim -->|"uses simulation API"| node_hoomd
node_researcher -->|"runs analysis"| node_cluster_analysis
node_cluster_analysis -->|"reads trajectories"| node_dense_gsd
node_researcher -->|"runs summary"| node_cluster_summary
node_cluster_summary -->|"reads trajectories"| node_dense_gsd
node_researcher -->|"runs analysis"| node_cluster_variance
node_cluster_variance -->|"reads trajectories"| node_dense_gsd

click node_disk_init "https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/2D_Disk/simulate.py"
click node_disk_msd "https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/2D_Disk/plot_msd.py"
click node_sphere_init "https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/3D_Single_Sphere/box.py"
click node_sphere_sim "https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/3D_Single_Sphere/simulate.py"
click node_sphere_msd "https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/3D_Single_Sphere/msd.py"
click node_sphere_vis "https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/3D_Single_Sphere/vis.py"
click node_dense_init "https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/Multiple_Colloidal_Spheres/box.py"
click node_dense_sim "https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/Multiple_Colloidal_Spheres/simulate.py"
click node_cluster_analysis "https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/Multiple_Colloidal_Spheres/cluster_analysis.py"
click node_cluster_summary "https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/Multiple_Colloidal_Spheres/average_cluster_size.py"
click node_cluster_variance "https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/Multiple_Colloidal_Spheres/variance.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_disk_init,node_disk_gsd,node_disk_msd toneBlue
class node_sphere_init,node_sphere_sim,node_sphere_gsd,node_sphere_msd,node_sphere_data,node_sphere_vis toneAmber
class node_dense_init,node_dense_sim,node_dense_gsd,node_cluster_analysis,node_cluster_summary,node_cluster_variance toneMint
class node_hoomd toneRose
class node_researcher toneIndigo
```

## Components

### 2D Disk Study

- [Disk Snapshot](https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/2D_Disk/simulate.py): `Prince/Active-Brownian-Particles/2D_Disk/simulate.py`
- **Disk GSD**
- [MSD Plot](https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/2D_Disk/plot_msd.py): `Prince/Active-Brownian-Particles/2D_Disk/plot_msd.py`

### 3D Single Sphere

- [Sphere Snapshot](https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/3D_Single_Sphere/box.py): `Prince/Active-Brownian-Particles/3D_Single_Sphere/box.py`
- [3D Simulator](https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/3D_Single_Sphere/simulate.py): `Prince/Active-Brownian-Particles/3D_Single_Sphere/simulate.py`
- **3D Trajectories**
- [MSD Extractor](https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/3D_Single_Sphere/msd.py): `Prince/Active-Brownian-Particles/3D_Single_Sphere/msd.py`
- **MSD Data**
- [Theory Comparison](https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/3D_Single_Sphere/vis.py): `Prince/Active-Brownian-Particles/3D_Single_Sphere/vis.py`

### Collective Spheres

- [Dense Snapshot](https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/Multiple_Colloidal_Spheres/box.py): `Prince/Active-Brownian-Particles/Multiple_Colloidal_Spheres/box.py`
- [Collective Simulator](https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/Multiple_Colloidal_Spheres/simulate.py): `Prince/Active-Brownian-Particles/Multiple_Colloidal_Spheres/simulate.py`
- **Dense Trajectories**
- [Cluster Dynamics](https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/Multiple_Colloidal_Spheres/cluster_analysis.py): `Prince/Active-Brownian-Particles/Multiple_Colloidal_Spheres/cluster_analysis.py`
- [Cluster Statistics](https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/Multiple_Colloidal_Spheres/average_cluster_size.py): `Prince/Active-Brownian-Particles/Multiple_Colloidal_Spheres/average_cluster_size.py`
- [Cluster Variance](https://github.com/rkailasham-group/computational-soft-matter/blob/main/Prince/Active-Brownian-Particles/Multiple_Colloidal_Spheres/variance.py): `Prince/Active-Brownian-Particles/Multiple_Colloidal_Spheres/variance.py`

### Simulation Engine

- **HOOMD-blue**

### Other components

- **Researcher**

## Connections

- Researcher → Disk Snapshot: starts
- Disk Snapshot → Disk GSD: writes snapshot
- Researcher → MSD Plot: runs analysis
- MSD Plot → Disk GSD: reads trajectories
- Researcher → Sphere Snapshot: creates state
- Sphere Snapshot → 3D Trajectories: writes snapshot
- Researcher → 3D Simulator: starts runs
- 3D Simulator → 3D Trajectories: reads input, writes output
- 3D Simulator → HOOMD-blue: uses simulation API
- Researcher → MSD Extractor: runs extraction
- MSD Extractor → 3D Trajectories: reads trajectories
- MSD Extractor → MSD Data: writes MSD
- Researcher → Theory Comparison: plots comparison
- Theory Comparison → MSD Data: reads MSD
- Researcher → Dense Snapshot: creates state
- Dense Snapshot → Dense Trajectories: writes snapshot
- Researcher → Collective Simulator: starts run
- Collective Simulator → Dense Trajectories: reads input, writes output
- Collective Simulator → HOOMD-blue: uses simulation API
- Researcher → Cluster Dynamics: runs analysis
- Cluster Dynamics → Dense Trajectories: reads trajectories
- Researcher → Cluster Statistics: runs summary
- Cluster Statistics → Dense Trajectories: reads trajectories
- Researcher → Cluster Variance: runs analysis
- Cluster Variance → Dense Trajectories: reads trajectories
