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

#include <kinetic.hpp>

Public Member Functions

 KineticStressTensorCalculator (const Crystal &crystal_structure, const PlanewaveBasis &planewave_basis, const KPointsGrid &kpoint_grid, const NormConservingPlanewaveKohnShamSCFState &scf_state, StressTensorContributions &result)
 
void compute ()
 

Detailed Description

Definition at line 24 of file kinetic.hpp.

Constructor & Destructor Documentation

◆ KineticStressTensorCalculator()

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

Definition at line 26 of file kinetic.hpp.

Member Function Documentation

◆ compute()

void q3::KineticStressTensorCalculator::compute ( )
inline

kpoint_state_index runs over kpoint_grid_.number_of_kpoints() * number_of_spin_components "quantum states" (spin-major: spin_index * number_of_kpoints + kpoint_index — matching PlanewaveKohnShamQuantumSystem's storage convention). Summing only kpoint_index without the spin_index loop silently drops the second spin channel for LSDA (nspin=2), exactly halving this contribution — kpoint_grid_[kpoint_index] itself is NOT spin-doubled (same physical k-point, same already spin-halved weight, for both channels).

number_of_plane_waves/g_vector_indices_at_kpoint are PlanewaveBasis-derived (the G-vector set for a k-point does not depend on spin) — physical kpoint_index. occupation/wavefunction_coefficient are QuantumSystem-derived (per spin channel) — spin-doubled kpoint_state_index.

Definition at line 37 of file kinetic.hpp.

References q3::Crystal::cell_volume(), q3::constants::electron_charge_squared_rydberg, q3::PlanewaveKohnShamSCFState::g_vector_indices_at_kpoint(), q3::PlanewaveBasis::g_vectors(), q3::PlanewaveBasis::is_gamma_only(), q3::StressTensorContributions::kinetic, q3::PlanewaveKohnShamSCFState::number_of_bands(), q3::KPointsGrid::number_of_kpoints(), q3::PlanewaveKohnShamSCFState::number_of_plane_waves(), q3::PlanewaveKohnShamSCFState::number_of_spin_components(), q3::PlanewaveKohnShamSCFState::occupation(), q3::math::tolerances::occupation_threshold, q3::Crystal::reciprocal_lattice_vectors(), q3::Crystal::two_pi_over_lattice_parameter(), q3::PlanewaveKohnShamSCFState::wavefunction_coefficient(), q3::Vector3D::x, q3::Vector3D::y, and q3::Vector3D::z.

Referenced by q3::compute_stress().


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