Loading...
Searching...
No Matches
result.hpp
Go to the documentation of this file.
1#pragma once
2
3/**
4 * EffectivePotentialResult — result of an effective-potential evaluation.
5 *
6 * Holds the charge density, effective potential in real and reciprocal space,
7 * and the associated energy contributions, all in Rydberg atomic units.
8 */
9
10#include <vector>
11
13
14namespace q3 {
15
17 std::vector<Complex> charge_density_g; // total charge density in reciprocal space
18 std::vector<std::vector<Real>> real_space_potential; // effective potential per spin
19 std::vector<Complex> total_potential_g; // spin-averaged effective potential
20
21 /**
22 * The same potential per spin channel, un-averaged.
23 *
24 * `total_potential_g` above is the average over channels, which is what the
25 * ultrasoft D matrix was historically built from. That average is exact for
26 * a non-magnetic cell and wrong for a magnetic one: D_ij = D_ion +
27 * ∫v_eff·Q_ij inherits v_eff's spin dependence, so a shared D leaves both
28 * channels feeling the same nonlocal potential and the moment collapses.
29 *
30 * One entry per spin component; for an unpolarized run it has a single
31 * entry equal to `total_potential_g`.
32 */
33 std::vector<std::vector<Complex>> total_potential_g_by_spin;
38};
39
40} // namespace q3
double Real
std::vector< Complex > charge_density_g
Definition result.hpp:17
std::vector< Complex > total_potential_g
Definition result.hpp:19
std::vector< std::vector< Complex > > total_potential_g_by_spin
Definition result.hpp:33
std::vector< Complex > exchange_correlation_potential_g
Definition result.hpp:34
std::vector< std::vector< Real > > real_space_potential
Definition result.hpp:18