# reactionmechanismgenerator/rmg-py architecture

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

- Interactive diagram: https://gitdiagram.com/reactionmechanismgenerator/rmg-py
- Repository: https://github.com/reactionmechanismgenerator/rmg-py

## Overview

RMG generates chemical reaction mechanisms for specified reaction systems; Arkane is a companion workflow for deriving thermodynamic and kinetic properties from quantum-chemistry calculations. The graph shows their main runtime entry points, the documented capability branches, and shared chemical, database, and property-model layers. Some subsystem links rely on SOURCE INDEX references or the README rather than full source excerpts; unsampled internals and uncertain call direction are not expanded.

Main entry points: [`arkane/main.py`](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/arkane/main.py) (Arkane entry), [`rmgpy/rmg/main.py`](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/rmg/main.py) (RMG entry), [`rmgpy/species.py`](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/species.py) (Species), [`arkane/thermo.py`](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/arkane/thermo.py) (Thermo evaluation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_rmg["Mechanism generation"]
  node_rmg_entry["RMG entry<br/>[main.py]"]
  node_rmg_input["RMG input<br/>[input.py]"]
  node_mechanism["Mechanism model<br/>[model.py]"]
  node_reactor["Reaction systems<br/>[main.py]"]
  node_qm_estimation["QM estimation<br/>[main.py]"]
end

subgraph group_arkane["Arkane calculations"]
  node_arkane_entry["Arkane entry<br/>[main.py]"]
  node_ess["Quantum chemistry adapters"]
  node_statmech["Statistical mechanics<br/>[statmech.py]"]
  node_arkane_thermo["Thermo evaluation<br/>[thermo.py]"]
  node_arkane_kinetics["Kinetics evaluation<br/>[kinetics.py]"]
  node_pdep["Pressure dependence<br/>[pdep.py]"]
  node_arkane_output["Arkane output<br/>[output.py]"]
end

subgraph group_data["Chemical databases"]
  node_db_base["Database framework<br/>[base.py]"]
  node_db_kinetics["Kinetics databases"]
  node_db_rmg["Database collection<br/>[rmg.py]"]
  node_db_thermo["Thermo database<br/>[thermo.py]"]
  node_db_solvation["Solvation database<br/>[solvation.py]"]
end

subgraph group_core["Chemical model"]
  node_element["Elements<br/>[element.py]"]
  node_molecule["Molecular graphs<br/>[molecule.py]"]
  node_fragment["Molecular fragments<br/>[fragment.py]"]
  node_group["Group structures<br/>[group.py]"]
  node_species["Species<br/>[species.py]"]
  node_reaction["Reactions<br/>[reaction.py]"]
  node_quantity["Units and quantities<br/>[quantity.py]"]
end

node_user(("User"))
node_chemistry_service["Quantum chemistry software"]

node_user -->|"starts job"| node_rmg_entry
node_user -->|"starts calculation"| node_arkane_entry
node_rmg_entry -->|"loads input"| node_rmg_input
node_rmg_entry -->|"runs generation"| node_mechanism
node_rmg_entry -->|"executes systems"| node_reactor
node_rmg_entry -->|"loads databases"| node_db_rmg
node_rmg_entry -->|"uses kinetics data"| node_db_kinetics
node_rmg_entry -->|"invokes QM"| node_qm_estimation
node_mechanism -->|"uses reactions"| node_reaction
node_mechanism -->|"tracks species"| node_species
node_rmg_entry -->|"uses thermo data"| node_db_thermo
node_arkane_entry -->|"calculates statmech"| node_statmech
node_arkane_entry -->|"evaluates thermo"| node_arkane_thermo
node_arkane_entry -->|"evaluates kinetics"| node_arkane_kinetics
node_arkane_entry -->|"evaluates pressure dependence"| node_pdep
node_arkane_entry -->|"loads databases"| node_db_base
node_arkane_entry -->|"uses libraries"| node_db_kinetics
node_arkane_entry -->|"uses thermo data"| node_db_thermo
node_statmech -->|"uses adapters"| node_ess
node_ess -.->|"reads calculations"| node_chemistry_service
node_arkane_entry -->|"writes results"| node_arkane_output
node_db_rmg -->|"uses framework"| node_db_base
node_db_kinetics -->|"uses framework"| node_db_base
node_db_kinetics -->|"uses reactions"| node_reaction
node_db_thermo -->|"uses framework"| node_db_base
node_db_thermo -->|"uses species"| node_species
node_arkane_thermo -->|"gets databases"| node_db_rmg
node_arkane_thermo -->|"applies solvation"| node_db_solvation
node_molecule -->|"uses elements"| node_element
node_fragment -->|"converts to"| node_molecule
node_fragment -->|"uses groups"| node_group
node_species -->|"stores structures"| node_molecule
node_species -->|"uses fragments"| node_fragment
node_reaction -->|"uses species"| node_species
node_species -->|"uses quantities"| node_quantity
node_arkane_thermo -->|"evaluates species"| node_species

click node_rmg_entry "https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/rmg/main.py"
click node_rmg_input "https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/rmg/input.py"
click node_mechanism "https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/rmg/model.py"
click node_reactor "https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/rmg/main.py"
click node_qm_estimation "https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/qm/main.py"
click node_arkane_entry "https://github.com/reactionmechanismgenerator/rmg-py/blob/main/arkane/main.py"
click node_ess "https://github.com/reactionmechanismgenerator/rmg-py/tree/main/arkane/ess"
click node_statmech "https://github.com/reactionmechanismgenerator/rmg-py/blob/main/arkane/statmech.py"
click node_arkane_thermo "https://github.com/reactionmechanismgenerator/rmg-py/blob/main/arkane/thermo.py"
click node_arkane_kinetics "https://github.com/reactionmechanismgenerator/rmg-py/blob/main/arkane/kinetics.py"
click node_pdep "https://github.com/reactionmechanismgenerator/rmg-py/blob/main/arkane/pdep.py"
click node_arkane_output "https://github.com/reactionmechanismgenerator/rmg-py/blob/main/arkane/output.py"
click node_db_base "https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/data/base.py"
click node_db_kinetics "https://github.com/reactionmechanismgenerator/rmg-py/tree/main/rmgpy/data/kinetics"
click node_db_rmg "https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/data/rmg.py"
click node_db_thermo "https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/data/thermo.py"
click node_db_solvation "https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/data/solvation.py"
click node_element "https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/molecule/element.py"
click node_molecule "https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/molecule/molecule.py"
click node_fragment "https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/molecule/fragment.py"
click node_group "https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/molecule/group.py"
click node_species "https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/species.py"
click node_reaction "https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/reaction.py"
click node_quantity "https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/quantity.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_rmg_entry,node_rmg_input,node_mechanism,node_reactor,node_qm_estimation,node_user toneBlue
class node_arkane_entry,node_ess,node_statmech,node_arkane_thermo,node_arkane_kinetics,node_pdep,node_arkane_output toneAmber
class node_db_base,node_db_kinetics,node_db_rmg,node_db_thermo,node_db_solvation toneMint
class node_element,node_molecule,node_fragment,node_group,node_species,node_reaction,node_quantity toneRose
class node_chemistry_service toneIndigo
```

## Components

### Mechanism generation

- [RMG entry](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/rmg/main.py): `rmgpy/rmg/main.py`
- [RMG input](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/rmg/input.py): `rmgpy/rmg/input.py`
- [Mechanism model](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/rmg/model.py): `rmgpy/rmg/model.py`
- [Reaction systems](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/rmg/main.py): `rmgpy/rmg/main.py`
- [QM estimation](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/qm/main.py): `rmgpy/qm/main.py`

### Arkane calculations

- [Arkane entry](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/arkane/main.py): `arkane/main.py`
- [Quantum chemistry adapters](https://github.com/reactionmechanismgenerator/rmg-py/tree/main/arkane/ess): `arkane/ess`
- [Statistical mechanics](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/arkane/statmech.py): `arkane/statmech.py`
- [Thermo evaluation](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/arkane/thermo.py): `arkane/thermo.py`
- [Kinetics evaluation](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/arkane/kinetics.py): `arkane/kinetics.py`
- [Pressure dependence](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/arkane/pdep.py): `arkane/pdep.py`
- [Arkane output](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/arkane/output.py): `arkane/output.py`

### Chemical databases

- [Database framework](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/data/base.py): `rmgpy/data/base.py`
- [Kinetics databases](https://github.com/reactionmechanismgenerator/rmg-py/tree/main/rmgpy/data/kinetics): `rmgpy/data/kinetics`
- [Database collection](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/data/rmg.py): `rmgpy/data/rmg.py`
- [Thermo database](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/data/thermo.py): `rmgpy/data/thermo.py`
- [Solvation database](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/data/solvation.py): `rmgpy/data/solvation.py`

### Chemical model

- [Elements](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/molecule/element.py): `rmgpy/molecule/element.py`
- [Molecular graphs](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/molecule/molecule.py): `rmgpy/molecule/molecule.py`
- [Molecular fragments](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/molecule/fragment.py): `rmgpy/molecule/fragment.py`
- [Group structures](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/molecule/group.py): `rmgpy/molecule/group.py`
- [Species](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/species.py): `rmgpy/species.py`
- [Reactions](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/reaction.py): `rmgpy/reaction.py`
- [Units and quantities](https://github.com/reactionmechanismgenerator/rmg-py/blob/main/rmgpy/quantity.py): `rmgpy/quantity.py`

### Other components

- **User**
- **Quantum chemistry software**

## Connections

- User → RMG entry: starts job
- User → Arkane entry: starts calculation
- RMG entry → RMG input: loads input (evidence: `rmgpy/rmg/main.py`)
- RMG entry → Mechanism model: runs generation (evidence: `rmgpy/rmg/main.py`)
- RMG entry → Reaction systems: executes systems (evidence: `rmgpy/rmg/main.py`)
- RMG entry → Database collection: loads databases (evidence: `rmgpy/rmg/main.py`)
- RMG entry → Kinetics databases: uses kinetics data (evidence: `rmgpy/rmg/main.py`)
- RMG entry → QM estimation: invokes QM (evidence: `rmgpy/rmg/main.py`)
- Mechanism model → Reactions: uses reactions (evidence: `rmgpy/rmg/model.py`)
- Mechanism model → Species: tracks species (evidence: `rmgpy/rmg/model.py`)
- RMG entry → Thermo database: uses thermo data (evidence: `rmgpy/rmg/main.py`)
- Arkane entry → Statistical mechanics: calculates statmech (evidence: `arkane/main.py`)
- Arkane entry → Thermo evaluation: evaluates thermo (evidence: `arkane/main.py`)
- Arkane entry → Kinetics evaluation: evaluates kinetics (evidence: `arkane/main.py`)
- Arkane entry → Pressure dependence: evaluates pressure dependence (evidence: `arkane/main.py`)
- Arkane entry → Database framework: loads databases (evidence: `arkane/main.py`)
- Arkane entry → Kinetics databases: uses libraries (evidence: `arkane/main.py`)
- Arkane entry → Thermo database: uses thermo data (evidence: `arkane/main.py`)
- Statistical mechanics → Quantum chemistry adapters: uses adapters (evidence: `arkane/statmech.py`)
- Quantum chemistry adapters → Quantum chemistry software: reads calculations
- Arkane entry → Arkane output: writes results (evidence: `arkane/main.py`)
- Database collection → Database framework: uses framework (evidence: `rmgpy/data/rmg.py`)
- Kinetics databases → Database framework: uses framework (evidence: `rmgpy/data/kinetics/library.py`)
- Kinetics databases → Reactions: uses reactions (evidence: `rmgpy/data/kinetics/library.py`)
- Thermo database → Database framework: uses framework (evidence: `rmgpy/data/thermo.py`)
- Thermo database → Species: uses species (evidence: `rmgpy/data/thermo.py`)
- Thermo evaluation → Database collection: gets databases
- Thermo evaluation → Solvation database: applies solvation
- Molecular graphs → Elements: uses elements (evidence: `rmgpy/molecule/__init__.py`)
- Molecular fragments → Molecular graphs: converts to (evidence: `rmgpy/molecule/fragment.py`)
- Molecular fragments → Group structures: uses groups (evidence: `rmgpy/molecule/fragment.py`)
- Species → Molecular graphs: stores structures (evidence: `rmgpy/species.py`)
- Species → Molecular fragments: uses fragments (evidence: `rmgpy/species.py`)
- Reactions → Species: uses species (evidence: `rmgpy/reaction.py`)
- Species → Units and quantities: uses quantities (evidence: `rmgpy/species.py`)
- Thermo evaluation → Species: evaluates species
