#include <augmentation.hpp>
Public Member Functions | |
| UltrasoftForceCalculator (const Crystal &crystal_structure, const PlanewaveBasis &planewave_basis) | |
| std::vector< Vector3D > | compute (const NormConservingPlanewaveKohnShamQuantumSystem &quantum_system, const std::vector< std::vector< Complex > > &potential_g_by_spin, const std::vector< Matrix< Real > > &coefficients_by_spin) |
Definition at line 52 of file augmentation.hpp.
|
inline |
Definition at line 54 of file augmentation.hpp.
|
inline |
| potential_g_by_spin | One effective potential per spin channel. |
| coefficients_by_spin | One coefficient matrix per spin channel, same order. |
Spin is summed inside, channel against matching channel. Passing the spin-averaged potential and the spin-summed coefficients instead — which is what this took until 2026-08-09 — drops ∫(V↑−V↓)(ρ↑−ρ↓) dQ/dR / 2. That vanishes for a non-magnetic cell, which is why it survived every unpolarized test, and does not vanish for a magnetic one, where it left this term inconsistent with the spin-resolved nonlocal force it must cancel against.
Gamma-only keeps only the positive half sphere, and this summand is even under G -> -G, so the omitted half contributes as much again. The same factor appears in the local, NLCC and Ewald forces.
A_I(G), assembled exactly as add_augmentation_charges does: channel-indexed ρ_ij against the precomputed Q_ij(G), with the Q_ij = Q_ji symmetry folded into a single upper-triangle pass.
G = 0 carries no force (G_α is zero there), but which index that is depends on the rank: once G-vectors are partitioned the local list does not start at G = 0, and first_nonzero_g_index() returns 0 on every rank that does not own it. Hardcoding 1 silently drops one legitimate G-vector per rank under band parallelism.
Definition at line 71 of file augmentation.hpp.
References q3::Crystal::cell_volume(), q3::compute_phase_factor(), q3::Crystal::convert_from_crystal_to_cartesian(), q3::math::tolerances::d_matrix_element_threshold, q3::PlanewaveBasis::first_nonzero_g_index(), q3::PlanewaveBasis::g_vectors(), q3::NormConservingPlanewaveKohnShamQuantumSystem::has_ultrasoft(), q3::PlanewaveBasis::is_gamma_only(), q3::Crystal::number_of_atoms(), q3::PlanewaveBasis::number_of_g_vectors(), q3::NormConservingPlanewaveBasis::number_of_projector_channels(), q3::NormConservingPlanewaveKohnShamQuantumSystem::pseudopotential_basis(), q3::Crystal::species_type_index(), q3::constants::two_pi, and q3::Crystal::two_pi_over_lattice_parameter().
Referenced by q3::NormConservingPlanewaveForceCalculator::compute().