Loading...
Searching...
No Matches
q3::ExchangeCorrelationStressTensorCalculator Class Reference

#include <exchange_correlation.hpp>

+ Inheritance diagram for q3::ExchangeCorrelationStressTensorCalculator:

Public Member Functions

 ExchangeCorrelationStressTensorCalculator (const Crystal &crystal_structure, const PlanewaveBasis &planewave_basis, const NormConservingPlanewaveKohnShamSCFState &scf_state, StressTensorContributions &result)
 
virtual ~ExchangeCorrelationStressTensorCalculator ()=default
 
void compute ()
 
- Public Member Functions inherited from q3::ExchangeCorrelationStressDensitySource
virtual ~ExchangeCorrelationStressDensitySource ()=default
 

Protected Member Functions

std::vector< Complex > build_spin_charge_density_g (int spin_index) const override
 
std::vector< Complex > build_total_charge_density_g () const override
 

Protected Attributes

const Crystal & crystal_structure_
 
const PlanewaveBasis & planewave_basis_
 
StressTensorContributions & result_
 
const NormConservingPlanewaveKohnShamSCFState & scf_state_
 

Detailed Description

Definition at line 34 of file exchange_correlation.hpp.

Constructor & Destructor Documentation

◆ ExchangeCorrelationStressTensorCalculator()

q3::ExchangeCorrelationStressTensorCalculator::ExchangeCorrelationStressTensorCalculator ( const Crystal &  crystal_structure,
const PlanewaveBasis &  planewave_basis,
const NormConservingPlanewaveKohnShamSCFState &  scf_state,
StressTensorContributions &  result 
)
inline

Definition at line 36 of file exchange_correlation.hpp.

◆ ~ExchangeCorrelationStressTensorCalculator()

virtual q3::ExchangeCorrelationStressTensorCalculator::~ExchangeCorrelationStressTensorCalculator ( )
virtualdefault

Member Function Documentation

◆ build_spin_charge_density_g()

std::vector< Complex > q3::ExchangeCorrelationStressTensorCalculator::build_spin_charge_density_g ( int  spin_index) const
inlineoverrideprotectedvirtual

Build the per-spin charge density in G-space for spin-polarized (LSDA) GGA gradient corrections. Base implementation FFTs the valence spin channel from the SCF state. Subclasses override to split additional contributions evenly across spins (e.g., NLCC core charge, which carries no net moment).

Implements q3::ExchangeCorrelationStressDensitySource.

Reimplemented in q3::PseudopotentialExchangeCorrelationStressTensorCalculator.

Definition at line 97 of file exchange_correlation.hpp.

References q3::PlanewaveKohnShamSCFState::charge_density_real, planewave_basis_, q3::PlanewaveBasis::rho_r_to_g(), and scf_state_.

Referenced by q3::PseudopotentialExchangeCorrelationStressTensorCalculator::build_spin_charge_density_g().

◆ build_total_charge_density_g()

std::vector< Complex > q3::ExchangeCorrelationStressTensorCalculator::build_total_charge_density_g ( ) const
inlineoverrideprotectedvirtual

Build the total charge density in G-space for GGA gradient corrections. Base implementation returns the valence charge density from the SCF. Subclasses override to include additional contributions (e.g., NLCC core charge). Declared public on ExchangeCorrelationStressDensitySource, which is how the gradient-stress strategy reaches them; protected here keeps them out of this class's own public surface.

Implements q3::ExchangeCorrelationStressDensitySource.

Reimplemented in q3::PseudopotentialExchangeCorrelationStressTensorCalculator.

Definition at line 82 of file exchange_correlation.hpp.

References q3::PlanewaveKohnShamSCFState::charge_density_g, q3::PlanewaveBasis::number_of_g_vectors(), planewave_basis_, and scf_state_.

Referenced by q3::PseudopotentialExchangeCorrelationStressTensorCalculator::build_total_charge_density_g().

◆ compute()

Member Data Documentation

◆ crystal_structure_

const Crystal& q3::ExchangeCorrelationStressTensorCalculator::crystal_structure_
protected

Definition at line 103 of file exchange_correlation.hpp.

Referenced by compute().

◆ planewave_basis_

const PlanewaveBasis& q3::ExchangeCorrelationStressTensorCalculator::planewave_basis_
protected

◆ result_

StressTensorContributions& q3::ExchangeCorrelationStressTensorCalculator::result_
protected

Definition at line 106 of file exchange_correlation.hpp.

Referenced by compute().

◆ scf_state_

const NormConservingPlanewaveKohnShamSCFState& q3::ExchangeCorrelationStressTensorCalculator::scf_state_
protected

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