Quantum 3xplorer (Q3)
An AI-native quantum simulation engine
Loading...
Searching...
No Matches
q3::MakovPayneCorrectionCalculator Class Reference

#include <makov_payne.hpp>

+ Inheritance diagram for q3::MakovPayneCorrectionCalculator:

Public Member Functions

IsolatedSystemCorrectionResult compute (const NormConservingPlanewaveKohnShamSCFState &scf_state) const override
 
std::string name () const override
 Scheme name as accepted by the input ("none", "makov-payne", ...).
 
- Public Member Functions inherited from q3::IsolatedSystemCorrectionCalculator
virtual ~IsolatedSystemCorrectionCalculator ()=default
 

Detailed Description

Definition at line 84 of file makov_payne.hpp.

Member Function Documentation

◆ compute()

IsolatedSystemCorrectionResult q3::MakovPayneCorrectionCalculator::compute ( const NormConservingPlanewaveKohnShamSCFState &  scf_state) const
inlineoverridevirtual

Evaluate the correction on a converged SCF state. Schemes that have geometric preconditions (Makov-Payne: cubic lattice) throw std::runtime_error before touching any density data when violated.

Ionic dipole/second moments about x0 – NOT minimum-image wrapped, while the electronic grid sum below is. This unwrapped-ion gauge is part of what the cross-code reference values in tests/validation/test_makov_payne.py pin: reproducing them requires the same gauge for the atomic positions.

Electronic dipole/quadrupole: dense real-space grid sum, minimum-image wrapping (r - x0) into the cell via fractional coordinates before use.

One sweep over this rank's part of the dense grid, run once post-SCF. The grid translates each local storage index to the global flat index before the fractional coordinate is derived. Serial execution visits the complete grid with the two indices equal, preserving its original arithmetic.

Implements q3::IsolatedSystemCorrectionCalculator.

Definition at line 87 of file makov_payne.hpp.

References q3::IsolatedSystemCorrectionResult::applied, q3::Crystal::bravais_lattice_index(), q3::Crystal::cell_volume(), q3::PlanewaveKohnShamSCFState::charge_density_real, q3::Crystal::convert_from_crystal_to_cartesian(), q3::PlanewaveKohnShamSCFState::crystal_structure, q3::constants::electron_charge_squared_rydberg, q3::PlanewaveKohnShamSCFState::execution_policy, q3::PlanewaveBasis::fft_rho(), q3::FFTGrid::grid_dimension_1(), q3::Matrix3x3::inverse(), q3::Crystal::lattice_parameter(), q3::Crystal::lattice_vectors(), q3::IsolatedSystemCorrectionResult::method, name(), q3::Crystal::number_of_atoms(), q3::constants::pi, q3::PlanewaveKohnShamSCFState::planewave_basis, q3::execution::PlanewaveExecutionPolicy::reduce_within_pool_vector(), q3::Crystal::species_type_index(), q3::IsolatedSystemCorrectionResult::terms_in_ry, q3::Matrix3x3::transpose(), q3::Crystal::valence_charge(), q3::Vector3D::x, q3::Vector3D::y, and q3::Vector3D::z.

◆ name()

std::string q3::MakovPayneCorrectionCalculator::name ( ) const
inlineoverridevirtual

Scheme name as accepted by the input ("none", "makov-payne", ...).

Implements q3::IsolatedSystemCorrectionCalculator.

Definition at line 252 of file makov_payne.hpp.

Referenced by compute().


The documentation for this class was generated from the following file: