#include <nonlocal.hpp>
Public Member Functions | |
| NonlocalPseudopotentialForceCalculator (const Crystal &crystal_structure, const PlanewaveBasis &planewave_basis, const KPointsGrid &kpoint_grid, const NormConservingPlanewaveKohnShamSCFState &scf_state) | |
| std::vector< Vector3D > | compute () const |
Definition at line 51 of file nonlocal.hpp.
|
inline |
Definition at line 53 of file nonlocal.hpp.
|
inline |
Needed for the ultrasoft/PAW overlap term below, which is band-dependent through the eigenvalue where the D term is not.
We need 4 overlaps per band: 0: <beta | psi> 1,2,3: <beta | -i(k+G) psi> for x,y,z
When ranks share a k-point pool, each holds only its slab of this k-point's plane waves, so every overlap above is a partial sum over G. The force multiplies two of them, so they are summed across the pool here, before any product. Summing the per-rank forces instead drops every cross term between two ranks' slabs: the energy, linear in the projections the SCF already reduced, stayed exact while the forces came out up to 0.6 Ry/bohr wrong (camsai/q3#22). The DFT+U force reduces its overlaps the same way. A no-op when a pool has one rank.
The G = 0 term that 2·Re[B_half] double counts.
Q3's gamma-only half sphere includes G = 0 (the selection rule is index_1 >= 0 when the other two vanish), so 2·Re[<beta|psi>_half] = <beta|psi>_full + beta(0)psi(0). The derivative overlap needs no such correction — its summand carries a factor G_alpha, which is zero there — which is why leaving it out skewed the components unevenly rather than scaling them: it only touches projectors with beta(0) != 0, i.e. l = 0. Silicon's Gamma force came out right in x and 1.36x too large in y.
Quantum ESPRESSO corrects the same double count, in a different place: it subtracts inside the overlap routine itself, so both overlaps are corrected there and the correction on the derivative one is a no-op for the same reason it is skipped here. The derivation above rests on this file's own selection rule; the upstream agreement is corroboration, not its basis.
D is per spin channel for ultrasoft and PAW, and the loop above is spin-major over kpoint_spin_index, so the channel is the quotient by the k-point count.
The generalized-eigenvalue term, for ultrasoft and PAW.
These solve H|psi> = eps S|psi> with S = 1 + sum q_ij |p_i><p_j|, so S moves with the atom too and the force contracts (D_ij - eps_nk q_ij), not D_ij alone. The stress has always carried this correction; the force did not, which left it ~6% high on silicon even after the augmentation term was repaired – and unlike a missing augmentation term, this one is band-dependent, so it cannot be absorbed into any scale factor.
q_ij is diagonal in (l, m): the augmentation overlap integral is a radial quantity and the angular parts are orthonormal.
has_ultrasoft is a whole-system flag: a cell with one PAW species and one norm-conserving species takes the ultrasoft iterator. Asking the norm-conserving species for an augmentation overlap dereferences a null as_ultrasoft, and the assert that would catch it is compiled out in Release. Gate per species.
Definition at line 62 of file nonlocal.hpp.
References q3::NormConservingPlanewaveBasis::beta_angular_momentum(), q3::NormConservingPlanewaveBasis::beta_function_table(), q3::compute_kleinman_bylander_projectors(), q3::NormConservingPlanewaveKohnShamQuantumSystem::d_matrix_element(), q3::math::tolerances::d_matrix_element_threshold, q3::Matrix< T >::data(), q3::PlanewaveKohnShamSCFState::eigenvalue(), q3::PlanewaveKohnShamSCFState::execution_policy, q3::PlanewaveKohnShamSCFState::g_vector_indices_at_kpoint(), q3::PlanewaveBasis::g_vectors(), q3::harmonic_order_sequence(), q3::PseudopotentialSet::has_augmentation_charges(), q3::NormConservingPlanewaveKohnShamQuantumSystem::has_ultrasoft(), q3::PlanewaveBasis::is_gamma_only(), q3::Crystal::number_of_atoms(), q3::PlanewaveKohnShamSCFState::number_of_bands(), q3::KPointsGrid::number_of_kpoints(), q3::PlanewaveKohnShamSCFState::number_of_plane_waves(), q3::NormConservingPlanewaveBasis::number_of_projectors(), q3::PlanewaveKohnShamSCFState::number_of_spin_components(), q3::math::tolerances::numerical_zero_threshold, q3::PlanewaveKohnShamSCFState::occupation(), q3::math::tolerances::occupation_threshold, q3::NormConservingPlanewaveKohnShamQuantumSystem::pseudopotential_basis(), q3::NormConservingPlanewaveBasis::pseudopotential_set(), q3::NormConservingPlanewaveKohnShamSCFState::quantum_system(), q3::Crystal::reciprocal_lattice_vectors(), q3::execution::ExecutionPolicy::reduce_within_group(), q3::Crystal::species_type_index(), q3::NormConservingPlanewaveBasis::total_number_of_projectors(), q3::Crystal::two_pi_over_lattice_parameter(), q3::PlanewaveKohnShamSCFState::wavefunction_coefficient(), q3::Vector3D::x, q3::Vector3D::y, q3::Vector3D::z, and q3::blas::zgemm_().
Referenced by q3::NormConservingPlanewaveForceCalculator::compute().