# qef/q-e architecture

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

- Interactive diagram: https://gitdiagram.com/qef/q-e
- Repository: https://github.com/qef/q-e

## Overview

Quantum ESPRESSO is a suite of scientific codes for electronic-structure simulation and related materials properties. A researcher selects a calculation and supplies a physical system; the corresponding package computes the documented result. The repository also isolates reusable numerical libraries, including distributed FFTs. Package descriptions come from the README; the supplied excerpts do not expose package runtime call chains, so the graph shows documented capabilities rather than inferred links between packages. Test harnesses and build machinery are omitted.

Main entry points: [`TDDFPT/ColorCalculator/src/ColorCalculator.java`](https://github.com/qef/q-e/blob/develop/TDDFPT/ColorCalculator/src/ColorCalculator.java) (Spectrum Color Calculator), [`PW`](https://github.com/qef/q-e/tree/develop/PW) (PWscf), [`CPV`](https://github.com/qef/q-e/tree/develop/CPV) (Car-Parrinello), [`NEB`](https://github.com/qef/q-e/tree/develop/NEB) (PWneb)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ground["Ground-State Methods"]
  node_pwscf["PWscf"]
  node_cp["Car-Parrinello"]
  node_neb["PWneb"]
end

subgraph group_response["Response and Spectra"]
  node_phonon["PHonon"]
  node_tddfpt["TD-DFPT"]
  node_hp["Hubbard Parameters"]
  node_xspectra["XSpectra"]
  node_colorcalc["Spectrum Color Calculator"]
  node_graphfactory["Spectrum Plotting<br/>[GraphFactory.java]"]
end

subgraph group_transport["Transport and Materials"]
  node_epw["EPW"]
  node_pwcond["PWCOND"]
  node_gwl["GWL"]
  node_qeheat["QEHeat"]
  node_kcw["KCW"]
end

subgraph group_libraries["Numerical Libraries"]
  node_fftx["Distributed FFTs<br/>[fftw_sp.h]"]
  node_lax["Dense Diagonalization<br/>[laxlib_hi.h]"]
  node_ks["Kohn-Sham Solvers"]
end

node_researcher(("Researcher"))

node_researcher -->|"optimizes ground state"| node_pwscf
node_researcher -->|"runs molecular dynamics"| node_cp
node_researcher -->|"finds reaction pathways"| node_neb
node_researcher -->|"computes vibrational properties"| node_phonon
node_researcher -->|"computes spectra"| node_tddfpt
node_researcher -->|"calculates Hubbard parameters"| node_hp
node_researcher -->|"computes X-ray absorption"| node_xspectra
node_researcher -->|"computes electron-phonon properties"| node_epw
node_researcher -->|"computes ballistic transport"| node_pwcond
node_researcher -->|"computes GW properties"| node_gwl
node_researcher -->|"computes thermal transport"| node_qeheat
node_researcher -->|"computes Koopmans functionals"| node_kcw
node_colorcalc -->|"renders spectrum plots"| node_graphfactory

click node_pwscf "https://github.com/qef/q-e/tree/develop/PW"
click node_cp "https://github.com/qef/q-e/tree/develop/CPV"
click node_neb "https://github.com/qef/q-e/tree/develop/NEB"
click node_phonon "https://github.com/qef/q-e/tree/develop/PHonon"
click node_tddfpt "https://github.com/qef/q-e/tree/develop/TDDFPT"
click node_hp "https://github.com/qef/q-e/tree/develop/HP"
click node_xspectra "https://github.com/qef/q-e/tree/develop/XSpectra"
click node_epw "https://github.com/qef/q-e/tree/develop/EPW"
click node_pwcond "https://github.com/qef/q-e/tree/develop/PWCOND"
click node_gwl "https://github.com/qef/q-e/tree/develop/GWW"
click node_qeheat "https://github.com/qef/q-e/tree/develop/QEHeat"
click node_kcw "https://github.com/qef/q-e/tree/develop/KCW"
click node_fftx "https://github.com/qef/q-e/blob/develop/FFTXlib/src/fftw_sp.h"
click node_lax "https://github.com/qef/q-e/blob/develop/LAXlib/laxlib_hi.h"
click node_ks "https://github.com/qef/q-e/blob/develop/KS_Solvers/ks_solver_interfaces.h"
click node_colorcalc "https://github.com/qef/q-e/blob/develop/TDDFPT/ColorCalculator/src/ColorCalculator.java"
click node_graphfactory "https://github.com/qef/q-e/blob/develop/TDDFPT/ColorCalculator/src/GraphFactory.java"

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_pwscf,node_cp,node_neb toneBlue
class node_phonon,node_tddfpt,node_hp,node_xspectra,node_colorcalc,node_graphfactory toneAmber
class node_epw,node_pwcond,node_gwl,node_qeheat,node_kcw toneMint
class node_fftx,node_lax,node_ks toneRose
class node_researcher toneIndigo
```

## Components

### Ground-State Methods

- [PWscf](https://github.com/qef/q-e/tree/develop/PW): `PW`
- [Car-Parrinello](https://github.com/qef/q-e/tree/develop/CPV): `CPV`
- [PWneb](https://github.com/qef/q-e/tree/develop/NEB): `NEB`

### Response and Spectra

- [PHonon](https://github.com/qef/q-e/tree/develop/PHonon): `PHonon`
- [TD-DFPT](https://github.com/qef/q-e/tree/develop/TDDFPT): `TDDFPT`
- [Hubbard Parameters](https://github.com/qef/q-e/tree/develop/HP): `HP`
- [XSpectra](https://github.com/qef/q-e/tree/develop/XSpectra): `XSpectra`
- [Spectrum Color Calculator](https://github.com/qef/q-e/blob/develop/TDDFPT/ColorCalculator/src/ColorCalculator.java): `TDDFPT/ColorCalculator/src/ColorCalculator.java`
- [Spectrum Plotting](https://github.com/qef/q-e/blob/develop/TDDFPT/ColorCalculator/src/GraphFactory.java): `TDDFPT/ColorCalculator/src/GraphFactory.java`

### Transport and Materials

- [EPW](https://github.com/qef/q-e/tree/develop/EPW): `EPW`
- [PWCOND](https://github.com/qef/q-e/tree/develop/PWCOND): `PWCOND`
- [GWL](https://github.com/qef/q-e/tree/develop/GWW): `GWW`
- [QEHeat](https://github.com/qef/q-e/tree/develop/QEHeat): `QEHeat`
- [KCW](https://github.com/qef/q-e/tree/develop/KCW): `KCW`

### Numerical Libraries

- [Distributed FFTs](https://github.com/qef/q-e/blob/develop/FFTXlib/src/fftw_sp.h): `FFTXlib/src/fftw_sp.h`
- [Dense Diagonalization](https://github.com/qef/q-e/blob/develop/LAXlib/laxlib_hi.h): `LAXlib/laxlib_hi.h`
- [Kohn-Sham Solvers](https://github.com/qef/q-e/blob/develop/KS_Solvers/ks_solver_interfaces.h): `KS_Solvers/ks_solver_interfaces.h`

### Other components

- **Researcher**

## Connections

- Researcher → PWscf: optimizes ground state
- Researcher → Car-Parrinello: runs molecular dynamics
- Researcher → PWneb: finds reaction pathways
- Researcher → PHonon: computes vibrational properties
- Researcher → TD-DFPT: computes spectra
- Researcher → Hubbard Parameters: calculates Hubbard parameters
- Researcher → XSpectra: computes X-ray absorption
- Researcher → EPW: computes electron-phonon properties
- Researcher → PWCOND: computes ballistic transport
- Researcher → GWL: computes GW properties
- Researcher → QEHeat: computes thermal transport
- Researcher → KCW: computes Koopmans functionals
- Spectrum Color Calculator → Spectrum Plotting: renders spectrum plots (evidence: `TDDFPT/ColorCalculator/src/ColorCalculator.java`)
