#include <init.hpp>
Inheritance diagram for q3::PlanewaveKohnShamQuantumSystem:Public Member Functions | |
| PlanewaveKohnShamQuantumSystem ()=default | |
| PlanewaveKohnShamQuantumSystem (const KPointsGrid &kpoint_grid, const PlanewaveBasis &basis, int number_of_bands, int number_of_spin_components_value, Real number_of_electrons) | |
| ~PlanewaveKohnShamQuantumSystem () override=default | |
| void | allocate_electronic_states (const std::vector< int > &number_of_plane_waves_per_kpoint) |
| const PlanewaveBasis & | basis () const |
| void | copy_quantum_states_from (const QuantumSystem< PlanewaveKohnShamQuantumState > &source) override |
| Real | eigenvalue (int kpoint_state_index, int band_index) const |
| Matrix< Real > | eigenvalues_matrix () const |
| Real | fermi_energy () const |
| const KPointsGrid & | kpoint_grid () const |
| int | number_of_bands () const |
| Real | number_of_electrons () const |
| int | number_of_kpoint_states () const |
| int | number_of_occupied_bands_per_spin () const |
| int | number_of_plane_waves_for_kpoint_state (int kpoint_state_index) const |
| Real | occupation_by_kpoint_state_index_and_band_index (int kpoint_state_index, int band_index) const |
| Occupation | occupation_configuration () const |
| Return a snapshot of the current occupation configuration. | |
| PlanewaveKohnShamQuantumState & | quantum_state (int kpoint_state_index, int band_index) |
| const PlanewaveKohnShamQuantumState & | quantum_state (int kpoint_state_index, int band_index) const |
| void | set_basis (const PlanewaveBasis *basis) |
| void | set_eigenvalue (int kpoint_state_index, int band_index, Real value) |
| void | set_eigenvalues_from_matrix (const Matrix< Real > &eigenvalues) |
| void | set_fermi_energy (Real value) |
| void | set_kpoint_grid (const KPointsGrid *kpoint_grid) |
| void | set_number_of_bands (int value) |
| void | set_number_of_electrons (Real value) |
| void | set_occupation (int kpoint_state_index, int band_index, Real value) |
| Real | spin_degeneracy () const |
| Complex | wavefunction (int kpoint_index, int band_index, int g_vector_index) const |
| Complex * | wavefunction_band_data (int kpoint_state_index, int band_index) |
| const Complex * | wavefunction_band_data (int kpoint_state_index, int band_index) const |
Public Member Functions inherited from q3::KohnShamQuantumSystem< PlanewaveKohnShamQuantumState > | |
| ~KohnShamQuantumSystem () override=default | |
Public Member Functions inherited from q3::QuantumSystem< QuantumStateType > | |
| virtual | ~QuantumSystem ()=default |
| virtual void | copy_quantum_states_from (const QuantumSystem< QuantumStateType > &source) |
| QuantumStateType & | get_quantum_state_by_index (int index) |
| const QuantumStateType & | get_quantum_state_by_index (int index) const |
| Access a quantum state by flat index. | |
| void | load_quantum_system (const QuantumSystem< QuantumStateType > &system) |
| int | number_of_quantum_states () const |
| Number of quantum states in the system. | |
Protected Attributes | |
| const PlanewaveBasis * | basis_ = nullptr |
| Real | fermi_energy_ = 0.0 |
| bool | is_fractionally_occupied_ = false |
| const KPointsGrid * | kpoint_grid_ = nullptr |
| int | number_of_bands_ = 0 |
| Real | number_of_electrons_ = 0.0 |
Protected Attributes inherited from q3::QuantumSystem< QuantumStateType > | |
| std::vector< QuantumStateType > | quantum_states_ |
Additional Inherited Members | |
Public Attributes inherited from q3::KohnShamQuantumSystem< PlanewaveKohnShamQuantumState > | |
| int | number_of_spin_components |
Public Attributes inherited from q3::QuantumSystem< QuantumStateType > | |
| Crystal * | crystal_structure {nullptr} |
| const QuantumSystem< QuantumStateType > * | preloaded_quantum_system_ {nullptr} |
Planewave representation of the electronic quantum system.
Stores an array of PlanewaveKohnShamQuantumState indexed as [kpoint_state_index * number_of_bands + band_index].
|
default |
|
overridedefault |
|
inline |
Definition at line 41 of file init.hpp.
References q3::KohnShamQuantumSystem< PlanewaveKohnShamQuantumState >::number_of_spin_components.
|
inline |
Allocate quantum states using per-k-point PW counts from the basis. Creates number_of_kpoint_states * number_of_bands states, each with its wavefunction sized to the appropriate number of plane waves.
Definition at line 261 of file init.hpp.
References kpoint_grid_, number_of_bands_, number_of_kpoint_states(), q3::KPointsGrid::number_of_kpoints(), and q3::QuantumSystem< QuantumStateType >::quantum_states_.
Referenced by q3::PlanewaveKohnShamSCFIterator::allocate_electronic_states().
|
inline |
Definition at line 85 of file init.hpp.
References basis_.
Referenced by q3::UltrasoftPseudopotentialOverlapOperator::apply(), q3::UltrasoftPseudopotentialOverlapOperator::apply_batch(), q3::NormConservingPlanewaveKohnShamQuantumSystem::d_matrix_element(), q3::UltrasoftPlanewaveKohnShamQuantumSystem::d_matrix_element(), and set_basis().
|
inlineoverride |
Copy all electronic state data from another PlanewaveKohnShamQuantumSystem.
Used to populate the owned quantum_system_snapshot_ in NormConservingPlanewaveKohnShamSCFState at convergence. Copies wavefunction coefficients, eigenvalues, occupations, Fermi energy, spin configuration, and the k-point grid / basis pointers needed to interpret them. Does NOT touch PP-specific data — that must already be set up by the factory on the destination.
Definition at line 231 of file init.hpp.
References basis_, q3::QuantumSystem< QuantumStateType >::copy_quantum_states_from(), fermi_energy_, is_fractionally_occupied_, kpoint_grid_, number_of_bands_, number_of_electrons_, and q3::KohnShamQuantumSystem< PlanewaveKohnShamQuantumState >::number_of_spin_components.
Referenced by q3::PlanewaveKohnShamSCFIterator::preload_single_particle_states().
|
inline |
Definition at line 118 of file init.hpp.
References number_of_bands_, and q3::QuantumSystem< QuantumStateType >::quantum_states_.
Referenced by q3::PlanewaveKohnShamEnergyCalculator::compute_band_energy(), q3::PlanewaveKohnShamEnergyCalculator::compute_smearing_entropy(), q3::PlanewaveKohnShamSCFIterator::eigenvalue(), q3::PlanewaveKohnShamSCFState::eigenvalue(), q3::PlanewaveKohnShamSCFIterator::report_convergence_details(), and q3::PlanewaveDavidsonDiagonalizer::solve().
Copy all eigenvalues into a Matrix<Real>.
Definition at line 171 of file init.hpp.
References number_of_bands_, number_of_kpoint_states(), and q3::QuantumSystem< QuantumStateType >::quantum_states_.
Referenced by q3::PlanewaveKohnShamSCFIterator::eigenvalues().
|
inline |
Definition at line 200 of file init.hpp.
References fermi_energy_.
Referenced by q3::PlanewaveFermiEnergyCalculator::calculate_occupations(), and q3::PlanewaveKohnShamEnergyCalculator::compute_smearing_entropy().
|
inline |
|
inline |
Definition at line 54 of file init.hpp.
References number_of_bands_.
Referenced by q3::PlanewaveKohnShamSCFState::number_of_bands(), and q3::QEPlanewaveKohnShamWavefunctionCheckpoint::write_to_file().
|
inline |
Definition at line 62 of file init.hpp.
References number_of_electrons_.
|
inline |
Definition at line 57 of file init.hpp.
References kpoint_grid_, q3::KPointsGrid::number_of_kpoints(), and q3::KohnShamQuantumSystem< PlanewaveKohnShamQuantumState >::number_of_spin_components.
Referenced by allocate_electronic_states(), eigenvalues_matrix(), set_eigenvalues_from_matrix(), and set_occupation().
|
inline |
Each spin channel holds N/2 electrons: 2 per band when unpolarized (spin_degeneracy 2), 1 per band in LSDA where the two channels are separate k-point states. Fixed occupations therefore describe a zero-total-moment configuration; magnetized systems need smearing (per-channel electron counts then come from the common Fermi level).
Definition at line 156 of file init.hpp.
References number_of_electrons_.
Referenced by q3::PlanewaveKohnShamSCFIterator::number_of_occupied_bands_per_spin(), q3::PlanewaveKohnShamSCFState::number_of_occupied_bands_per_spin(), occupation_by_kpoint_state_index_and_band_index(), occupation_configuration(), set_occupation(), and q3::PlanewaveDavidsonDiagonalizer::solve().
|
inline |
Number of plane waves for a given k-point state.
Definition at line 283 of file init.hpp.
References number_of_bands_, and q3::QuantumSystem< QuantumStateType >::quantum_states_.
|
inline |
Definition at line 127 of file init.hpp.
References is_fractionally_occupied_, number_of_bands_, number_of_occupied_bands_per_spin(), and q3::QuantumSystem< QuantumStateType >::quantum_states_.
Referenced by q3::PlanewavePseudopotentialKohnShamSCFIterator::accumulate_hubbard_occupation_and_potential(), q3::UltrasoftPlanewavePseudopotentialKohnShamSCFIterator::accumulate_projector_overlaps(), q3::PlanewaveKohnShamEnergyCalculator::compute_band_energy(), q3::PlanewaveKohnShamSCFIterator::occupation(), and q3::PlanewaveKohnShamSCFState::occupation().
|
inline |
Return a snapshot of the current occupation configuration.
Definition at line 70 of file init.hpp.
References is_fractionally_occupied_, q3::Occupation::is_smeared, q3::Occupation::number_of_electrons, number_of_electrons_, number_of_occupied_bands_per_spin(), q3::Occupation::occupied_bands_per_spin, q3::Occupation::spin_degeneracy, and spin_degeneracy().
|
inline |
Definition at line 94 of file init.hpp.
References number_of_bands_, and q3::QuantumSystem< QuantumStateType >::quantum_states_.
|
inline |
Definition at line 90 of file init.hpp.
References number_of_bands_, and q3::QuantumSystem< QuantumStateType >::quantum_states_.
|
inline |
|
inline |
Definition at line 121 of file init.hpp.
References number_of_bands_, and q3::QuantumSystem< QuantumStateType >::quantum_states_.
Referenced by q3::GPUPlanewaveSubspaceManager::extract_eigenvectors(), q3::SerialPlanewaveSubspaceManager::extract_eigenvectors(), q3::NormConservingPlanewaveWavefunctionInitializer::rotate_wavefunctions(), and q3::PlanewaveDirectDiagonalizer::solve().
|
inline |
Set all eigenvalues from a Matrix<Real>.
Definition at line 188 of file init.hpp.
References number_of_bands_, number_of_kpoint_states(), and q3::QuantumSystem< QuantumStateType >::quantum_states_.
|
inline |
Definition at line 203 of file init.hpp.
References fermi_energy_.
|
inline |
Definition at line 214 of file init.hpp.
References kpoint_grid(), and kpoint_grid_.
|
inline |
Definition at line 208 of file init.hpp.
References number_of_bands_.
|
inline |
Definition at line 211 of file init.hpp.
References number_of_electrons_.
|
inline |
Definition at line 138 of file init.hpp.
References is_fractionally_occupied_, number_of_bands_, number_of_kpoint_states(), number_of_occupied_bands_per_spin(), and q3::QuantumSystem< QuantumStateType >::quantum_states_.
|
inline |
Definition at line 65 of file init.hpp.
References q3::KohnShamQuantumSystem< PlanewaveKohnShamQuantumState >::number_of_spin_components.
Referenced by occupation_configuration(), q3::PlanewaveKohnShamSCFIterator::spin_degeneracy(), and q3::PlanewaveKohnShamSCFState::spin_degeneracy().
|
inline |
Definition at line 99 of file init.hpp.
References number_of_bands_, and q3::QuantumSystem< QuantumStateType >::quantum_states_.
Referenced by q3::PlanewavePseudopotentialKohnShamSCFIterator::accumulate_hubbard_occupation_and_potential(), q3::PlanewaveKohnShamSCFIterator::wavefunction(), and q3::PlanewaveKohnShamSCFState::wavefunction_coefficient().
|
inline |
Get raw coefficient data for a specific (kpoint_state, band).
Definition at line 107 of file init.hpp.
References number_of_bands_, and q3::QuantumSystem< QuantumStateType >::quantum_states_.
Referenced by q3::UltrasoftPlanewavePseudopotentialKohnShamSCFIterator::accumulate_projector_overlaps(), q3::ScfStateMeanFieldBandSource::coefficients(), q3::PlanewaveTrialOrbitalProjectionCalculator::compute_projections_at_kpoint(), q3::PlanewaveWavefunctionProjectionCalculator::compute_projections_at_kpoint(), q3::GPUPlanewaveSubspaceManager::extract_eigenvectors(), q3::SerialPlanewaveSubspaceManager::extract_eigenvectors(), q3::NormConservingPlanewaveWavefunctionInitializer::rotate_wavefunctions(), and q3::PlanewaveDirectDiagonalizer::solve().
|
inline |
Definition at line 111 of file init.hpp.
References number_of_bands_, and q3::QuantumSystem< QuantumStateType >::quantum_states_.
|
protected |
Definition at line 290 of file init.hpp.
Referenced by basis(), copy_quantum_states_from(), q3::NormConservingPlanewaveKohnShamQuantumSystem::init(), q3::UltrasoftPlanewaveKohnShamQuantumSystem::init(), and set_basis().
|
protected |
Definition at line 293 of file init.hpp.
Referenced by copy_quantum_states_from(), fermi_energy(), and set_fermi_energy().
|
protected |
Definition at line 294 of file init.hpp.
Referenced by copy_quantum_states_from(), occupation_by_kpoint_state_index_and_band_index(), occupation_configuration(), and set_occupation().
|
protected |
Definition at line 289 of file init.hpp.
Referenced by allocate_electronic_states(), copy_quantum_states_from(), kpoint_grid(), number_of_kpoint_states(), and set_kpoint_grid().
|
protected |
Definition at line 291 of file init.hpp.
Referenced by allocate_electronic_states(), copy_quantum_states_from(), eigenvalue(), eigenvalues_matrix(), number_of_bands(), number_of_plane_waves_for_kpoint_state(), occupation_by_kpoint_state_index_and_band_index(), quantum_state(), quantum_state(), set_eigenvalue(), set_eigenvalues_from_matrix(), set_number_of_bands(), set_occupation(), wavefunction(), wavefunction_band_data(), and wavefunction_band_data().
|
protected |
Definition at line 292 of file init.hpp.
Referenced by copy_quantum_states_from(), number_of_electrons(), number_of_occupied_bands_per_spin(), occupation_configuration(), and set_number_of_electrons().