Loading...
Searching...
No Matches
init.hpp
Go to the documentation of this file.
1#pragma once
2
3/**
4 * WannierConstructionReport — what the construction produces beside the
5 * Hamiltonian: the numbers a driver needs to decide whether to keep the
6 * model.
7 *
8 * One section per strategy. The subspace selection fills `disentanglement`,
9 * the gauge choice fills `spread`, and the builder measures the decay of the
10 * H(R) it assembled. A section a strategy did not run says so in its own
11 * flag rather than by a sentinel value, so a reader never mistakes a zero
12 * for a measurement.
13 */
14
15#include <string>
16
21
22namespace q3 {
23
24struct [[nodiscard]] WannierConstructionReport {
27 /// How far H(R) has decayed by the edge of its Wigner-Seitz domain.
29
30 /**
31 * "wannier", then what was done to it, so the model says how it was
32 * built -- including when the localisation did not finish. A gauge that
33 * stalled is not maximally localised, and a description that says it is
34 * turns a warning in the log into a claim in the results file.
35 */
36 [[nodiscard]] std::string description() const {
37 std::string text = "wannier (";
38 text += disentanglement.performed ? "projectability disentanglement" : "projection gauge";
39 if (spread.localized) {
40 text +=
41 spread.localization_converged ? ", maximally localized" : ", localization stalled";
42 }
43 text += ")";
44 return text;
45 }
46};
47
48} // namespace q3
bool performed
Whether the subspace was chosen by classification and iteration rather than taken as given.
bool localized
Whether the gauge was rotated by the spread minimiser at all.
DisentanglementReport disentanglement
Definition init.hpp:25
std::string description() const
Definition init.hpp:36
HamiltonianDecay hamiltonian_decay
How far H(R) has decayed by the edge of its Wigner-Seitz domain.
Definition init.hpp:28