Loading...
Searching...
No Matches
snapshot.hpp
Go to the documentation of this file.
1#pragma once
2
3/**
4 * KohnShamQuantumSystemSnapshot — data transfer object for Kohn-Sham SCF state.
5 *
6 * Contains the minimal set of KS-level arrays needed to resume an SCF
7 * calculation: iteration metadata, spin-resolved real-space charge density,
8 * and band eigenvalues.
9 */
10
11#include <vector>
12
15
16namespace q3 {
17
19 int iteration{};
24 bool converged{false};
25
26 std::vector<std::vector<Real>> charge_density_real;
28
29 /**
30 * ─── Version 2 fields ────────────────────────────────────────────────────
31 * Effective potential in real space V_eff(r) = V_H(r) + V_xc(r) + V_loc(r).
32 * Populated only in v2 checkpoints; left empty for v1 (NSCF falls back to
33 * reconstruction from charge density + input parameters in that case).
34 */
35 std::vector<std::vector<Real>> effective_potential_real;
36
37 /**
38 * ─── Version 3 fields ────────────────────────────────────────────────────
39 * The PAW on-site occupations ρ_ij per spin channel: one row per atom, each
40 * the channel-by-channel matrix flattened at the widest species' row
41 * length, exactly as the iterator accumulates them. D's one-centre term is
42 * built from these, and a run that diagonalizes before it constructs any
43 * density of its own -- a non-self-consistent pass -- has nothing else to
44 * build it from. Empty for datasets without that term, and in v1 and v2
45 * checkpoints.
46 */
47 std::vector<Matrix<Real>> one_center_occupations;
48
49 virtual ~KohnShamQuantumSystemSnapshot() = default;
50};
51
52} // namespace q3
double Real
std::vector< std::vector< Real > > effective_potential_real
Definition snapshot.hpp:35
std::vector< Matrix< Real > > one_center_occupations
Definition snapshot.hpp:47
std::vector< std::vector< Real > > charge_density_real
Definition snapshot.hpp:26
virtual ~KohnShamQuantumSystemSnapshot()=default