Loading...
Searching...
No Matches
q3::PlanewaveKohnShamSCFState Struct Referenceabstract

#include <init.hpp>

+ Inheritance diagram for q3::PlanewaveKohnShamSCFState:

Public Member Functions

 PlanewaveKohnShamSCFState ()=default
 
 PlanewaveKohnShamSCFState (const PlanewaveKohnShamSCFState &)=delete
 
 PlanewaveKohnShamSCFState (PlanewaveKohnShamSCFState &&)=default
 
const std::vector< Real > & charge_density_for_spin (int spin_index) const
 
Real eigenvalue (int kpoint_index, int band_index) const
 
const PlanewaveKohnShamEnergies & energies () const override=0
 Narrow the energies return type to the planewave level.
 
const std::vector< int > & g_vector_indices_at_kpoint (int kpoint_index) const
 
int number_of_bands () const
 
int number_of_occupied_bands_per_spin () const
 
int number_of_plane_waves (int kpoint_index) const
 
int number_of_spin_components () const
 
Real occupation (int kpoint_index, int band_index) const
 
PlanewaveKohnShamSCFState & operator= (const PlanewaveKohnShamSCFState &)=delete
 
PlanewaveKohnShamSCFState & operator= (PlanewaveKohnShamSCFState &&)=default
 
virtual const PlanewaveKohnShamQuantumSystem & quantum_system () const =0
 
Real spin_degeneracy () const
 
Complex wavefunction_coefficient (int kpoint_index, int band_index, int g_vector_index) const
 
- Public Member Functions inherited from q3::SCFState
 SCFState ()=default
 
 SCFState (const SCFState &)=default
 
 SCFState (SCFState &&)=default
 
virtual ~SCFState ()=default
 
SCFState & operator= (const SCFState &)=default
 
SCFState & operator= (SCFState &&)=default
 

Public Attributes

std::vector< Complex > charge_density_g
 
std::vector< std::vector< Real > > charge_density_real
 
const Crystal * crystal_structure {nullptr}
 
const XCFunctional * exchange_correlation {nullptr}
 
std::vector< Complex > exchange_correlation_potential_g
 
const execution::PlanewaveExecutionPolicy * execution_policy {nullptr}
 
const KPointsGrid * kpoint_grid {nullptr}
 
const PlanewaveBasis * planewave_basis {nullptr}
 
std::vector< std::vector< Real > > real_space_potential
 
std::vector< Complex > total_potential_g
 
std::vector< std::vector< Complex > > total_potential_g_by_spin
 
- Public Attributes inherited from q3::SCFState
bool converged {false}
 
int scf_iterations {}
 

Detailed Description

Converged SCF state for a plane-wave Kohn-Sham calculation.

Extends SCFState with the fields that are specific to a plane-wave representation: charge density, effective potential, and non-owning pointers to the basis and XC functional (which are owned by the iterator).

The quantum system snapshot is declared as a pure virtual accessor here (covariant return), so that concrete subtypes can own the correctly typed quantum system by value.

Definition at line 29 of file init.hpp.

Constructor & Destructor Documentation

◆ PlanewaveKohnShamSCFState() [1/3]

q3::PlanewaveKohnShamSCFState::PlanewaveKohnShamSCFState ( )
default

◆ PlanewaveKohnShamSCFState() [2/3]

q3::PlanewaveKohnShamSCFState::PlanewaveKohnShamSCFState ( PlanewaveKohnShamSCFState &&  )
default

◆ PlanewaveKohnShamSCFState() [3/3]

q3::PlanewaveKohnShamSCFState::PlanewaveKohnShamSCFState ( const PlanewaveKohnShamSCFState &  )
delete

Member Function Documentation

◆ charge_density_for_spin()

const std::vector< Real > & q3::PlanewaveKohnShamSCFState::charge_density_for_spin ( int  spin_index) const
inline

Definition at line 94 of file init.hpp.

References charge_density_real.

◆ eigenvalue()

Real q3::PlanewaveKohnShamSCFState::eigenvalue ( int  kpoint_index,
int  band_index 
) const
inline

◆ energies()

const PlanewaveKohnShamEnergies & q3::PlanewaveKohnShamSCFState::energies ( ) const
overridepure virtual

Narrow the energies return type to the planewave level.

Implements q3::SCFState.

Implemented in q3::NormConservingPlanewaveKohnShamSCFState.

◆ g_vector_indices_at_kpoint()

◆ number_of_bands()

◆ number_of_occupied_bands_per_spin()

int q3::PlanewaveKohnShamSCFState::number_of_occupied_bands_per_spin ( ) const
inline

◆ number_of_plane_waves()

◆ number_of_spin_components()

◆ occupation()

◆ operator=() [1/2]

PlanewaveKohnShamSCFState & q3::PlanewaveKohnShamSCFState::operator= ( const PlanewaveKohnShamSCFState &  )
delete

◆ operator=() [2/2]

PlanewaveKohnShamSCFState & q3::PlanewaveKohnShamSCFState::operator= ( PlanewaveKohnShamSCFState &&  )
default

◆ quantum_system()

virtual const PlanewaveKohnShamQuantumSystem & q3::PlanewaveKohnShamSCFState::quantum_system ( ) const
pure virtual

Return the correctly typed quantum system snapshot. Overridden with covariant return in each concrete subtype.

Implemented in q3::NormConservingPlanewaveKohnShamSCFState.

Referenced by eigenvalue(), number_of_bands(), number_of_occupied_bands_per_spin(), number_of_spin_components(), occupation(), spin_degeneracy(), and wavefunction_coefficient().

◆ spin_degeneracy()

Real q3::PlanewaveKohnShamSCFState::spin_degeneracy ( ) const
inline

◆ wavefunction_coefficient()

Member Data Documentation

◆ charge_density_g

◆ charge_density_real

◆ crystal_structure

◆ exchange_correlation

◆ exchange_correlation_potential_g

◆ execution_policy

const execution::PlanewaveExecutionPolicy* q3::PlanewaveKohnShamSCFState::execution_policy {nullptr}

Non-owning pointer to the execution policy, set by the iterator.

Forces and stress calculators use this to perform pool-level reductions (MPI_Allreduce across k-point pools) after accumulating k-point-local contributions. Null in serial mode; non-null in MPI mode.

Definition at line 64 of file init.hpp.

Referenced by q3::HubbardStressTensorCalculator::compute(), q3::HubbardForceCalculator::compute(), q3::NonlocalPseudopotentialForceCalculator::compute(), q3::MakovPayneCorrectionCalculator::compute(), q3::MartynaTuckermanCorrectionCalculator::compute(), q3::ForceCalculator::compute_forces(), q3::compute_stress(), q3::PlanewavePseudopotentialKohnShamSCFIterator::result(), and q3::QEPlanewaveKohnShamWavefunctionCheckpoint::write_to_file().

◆ kpoint_grid

◆ planewave_basis

◆ real_space_potential

std::vector<std::vector<Real> > q3::PlanewaveKohnShamSCFState::real_space_potential

Definition at line 51 of file init.hpp.

Referenced by q3::PlanewavePseudopotentialKohnShamSCFIterator::result().

◆ total_potential_g

std::vector<Complex> q3::PlanewaveKohnShamSCFState::total_potential_g

◆ total_potential_g_by_spin

std::vector<std::vector<Complex> > q3::PlanewaveKohnShamSCFState::total_potential_g_by_spin

The same potential per spin channel, un-averaged. Empty for an unpolarized run, where total_potential_g already is the whole story.

Layer 5 needs both: the augmentation force and stress contract the potential against the projector occupancies, and doing that with the spin average against the spin sum drops ∫(V↑−V↓)(ρ↑−ρ↓) dQ/dR / 2 — identically zero without a moment, and not zero with one.

Definition at line 49 of file init.hpp.

Referenced by q3::build_mean_field_record(), and q3::PlanewavePseudopotentialKohnShamSCFIterator::result().


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