Quantum 3xplorer (Q3)
An AI-native quantum simulation engine
Loading...
Searching...
No Matches
quality_report.hpp
Go to the documentation of this file.
1#pragma once
2
3/**
4 * WannierQualityReport — what a run can say about its own model with no
5 * reference calculation in hand.
6 *
7 * A driver that has to accept or reject a model unattended reads numbers, and
8 * the ones that can be had for free -- from the model alone, in the time it
9 * takes to evaluate it -- are three:
10 *
11 * The spreads, function by function. The totals say how localised the set
12 * is; the per-function values say which one is not. The published
13 * no-reference criterion (the automated Wannier90 workflows judge a model
14 * with no bands to compare against by the VARIANCE of its spreads) is
15 * reported, with two outlier flags beside it.
16 *
17 * The centres against the atoms. A Wannier function built from atomic
18 * projections sits on its atom, one built from bond projections on its bond;
19 * a centre far from both is the classic sign of a model that will
20 * interpolate badly, and it is visible without a band structure.
21 *
22 * How far H(R) has decayed by the edge of its domain (HamiltonianDecay).
23 *
24 * Plain data; WannierQualityAssessor measures it. The lengths are in bohr, as
25 * the record's lattice is, and the field names say so.
26 */
27
28#include <vector>
29
32
33namespace q3 {
34
35struct [[nodiscard]] WannierQualityReport {
36 std::vector<Real> spreads_bohr_squared;
37 Real spread_median_bohr_squared = 0.0;
38 /// Population variance of the spreads across functions, the no-reference criterion.
39 Real spread_variance_bohr_squared = 0.0;
40 Real spread_maximum_bohr_squared = 0.0;
41 /// Zero-based indices of functions far above the median spread.
42 std::vector<int> spread_outliers;
43 /// Zero-based indices of functions above ten square angstrom.
45
46 /**
47 * Per function, the distance to the nearest atom over all periodic images; empty without
48 * atoms.
49 */
50 std::vector<Real> nearest_atom_distance_bohr;
51 /// Per function, the distance to the nearest midpoint of a bond; empty without atoms.
53 /// The shortest interatomic distance, which defines what a bond is here.
54 Real shortest_bond_bohr = 0.0;
55
57};
58
59} // namespace q3
double Real
std::vector< Real > spreads_bohr_squared
std::vector< int > spread_outliers
Zero-based indices of functions far above the median spread.
std::vector< int > spreads_above_ten_angstrom_squared
Zero-based indices of functions above ten square angstrom.
std::vector< Real > nearest_atom_distance_bohr
std::vector< Real > nearest_bond_midpoint_distance_bohr
Per function, the distance to the nearest midpoint of a bond; empty without atoms.