Quantum 3xplorer (Q3)
An AI-native quantum simulation engine
Loading...
Searching...
No Matches
contributions.hpp
Go to the documentation of this file.
1#pragma once
2
3/**
4 * StressTensorContributions — per-contribution stress breakdown.
5 *
6 * Plain data holder written into by each sub-calculator during compute_stress().
7 * Returned alongside the 3×3 stress tensor from compute_stress().
8 *
9 * All values are in kbar (converted from Ry/bohr³ inside
10 * assemble_total_stress_and_log() before being returned).
11 *
12 * This type has no JSON serialization dependency. The SCF flavor copies these
13 * primitive tensors into ESSE stress_tensor records for results.json.
14 */
15
17
18namespace q3 {
19
20/**
21 * StressTensorTotal — assembled stress tensor (kbar).
22 *
23 * Plain data holder returned by compute_stress() alongside
24 * StressTensorContributions. Values are in kbar (converted from
25 * Ry/bohr³ inside assemble_total_stress_and_log()).
26 */
28 Real values[3][3]{}; // 3×3 Voigt stress tensor (kbar)
29 Real pressure = 0.0; // hydrostatic pressure = Tr(σ)/3 (kbar)
30};
31
32/// Per-contribution stress tensor breakdown (kbar after conversion).
34 Real kinetic[3][3]{}; // kinetic
35 Real hartree[3][3]{}; // Hartree
36 Real exchange_correlation[3][3]{}; // exchange-correlation
37 Real ewald[3][3]{}; // Ewald ionic
38 Real local[3][3]{}; // local pseudopotential
39 Real nonlocal[3][3]{}; // nonlocal (KB); includes augmentation after merge
40 Real core_correction[3][3]{}; // NLCC core correction
41 Real augmentation[3][3]{}; // USPP augmentation (before merge into nonlocal)
42 Real hubbard[3][3]{}; // DFT+U (Hubbard) projector strain derivative
43 Real dispersion[3][3]{}; // DFT-D3(BJ) semi-empirical dispersion
44};
45
46} // namespace q3
double Real
Per-contribution stress tensor breakdown (kbar after conversion).