|
Quantum 3xplorer (Q3)
An AI-native quantum simulation engine
|
#include <init.hpp>
Inheritance diagram for q3::NormConservingPlanewaveKohnShamQuantumSystem:Public Member Functions | |
| NormConservingPlanewaveKohnShamQuantumSystem ()=default | |
| ~NormConservingPlanewaveKohnShamQuantumSystem () override=default | |
| virtual Real | d_matrix_element (int atom_index, int species_type, int projector_index_i, int projector_index_j, int spin=0) const |
| virtual bool | has_ultrasoft () const |
| virtual void | init (const Crystal &crystal_structure, const PlanewaveBasis &planewave_basis, const PseudopotentialSet &pseudopotential_set) |
| const NormConservingPlanewaveBasis & | pseudopotential_basis () const |
| virtual void | require_identity_overlap (const std::string &purpose) const |
Public Member Functions inherited from q3::PlanewaveKohnShamQuantumSystem | |
| 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 | |
| std::unique_ptr< NormConservingPlanewaveBasis > | norm_conserving_basis_ |
| NC pseudopotential basis: local potential, beta projectors, core charge, atomic densities. | |
Protected Attributes inherited from q3::PlanewaveKohnShamQuantumSystem | |
| 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} |
Norm-conserving planewave Kohn-Sham quantum system.
Owns a NormConservingPlanewaveBasis (single source of truth for all static PP data). Provides virtual d_matrix_element() dispatch (NC vs US). All other PP data should be accessed via pseudopotential_basis().
|
default |
|
overridedefault |
|
inlinevirtual |
Get D-matrix element for a pair of expanded projector channels. For norm-conserving PPs, dispatches to the bare D-matrix (dion) when the (l,m) indices match. For ultrasoft PPs, the ultrasoft subclass overrides this to return the effective D-matrix element. D_ij for one projector pair, in one spin channel.
Norm-conserving ignores spin: its D_ion comes straight from the dataset and has no v_eff dependence, so both channels share it exactly. Ultrasoft and PAW override this, where D = D_ion + ∫v_eff·Q_ij does depend on spin.
Reimplemented in q3::UltrasoftPlanewaveKohnShamQuantumSystem.
Definition at line 84 of file init.hpp.
References q3::PlanewaveKohnShamQuantumSystem::basis(), and norm_conserving_basis_.
Referenced by q3::NonlocalPseudopotentialForceCalculator::compute(), and q3::PlanewaveDirectDiagonalizer::solve().
|
inlinevirtual |
Whether this quantum system uses ultrasoft pseudopotentials. Consumers can use this to check if augmentation is needed.
Reimplemented in q3::UltrasoftPlanewaveKohnShamQuantumSystem.
Definition at line 106 of file init.hpp.
Referenced by q3::NormConservingPlanewaveForceCalculator::compute(), q3::HubbardStressTensorCalculator::compute(), q3::NonlocalPseudopotentialStressTensorCalculator::compute(), q3::UltrasoftAugmentationStressTensorCalculator::compute(), q3::HubbardForceCalculator::compute(), q3::NonlocalPseudopotentialForceCalculator::compute(), q3::UltrasoftForceCalculator::compute(), q3::ForceCalculator::compute_forces(), q3::compute_stress(), q3::create_overlap_operator(), q3::NormConservingPlanewaveChargeDensity::needs_augmentation(), and q3::NormConservingPlanewaveWavefunctionInitializer::rotate_wavefunctions().
|
inlinevirtual |
Initialize by creating and populating the internal PP basis.
Reimplemented in q3::UltrasoftPlanewaveKohnShamQuantumSystem.
Definition at line 50 of file init.hpp.
References q3::PlanewaveKohnShamQuantumSystem::basis_, q3::NormConservingPlanewaveBasisFactory::create(), q3::QuantumSystem< QuantumStateType >::crystal_structure, and norm_conserving_basis_.
|
inline |
Access the underlying pseudopotential plane-wave basis (single source of truth). All static PP data (local potential, projectors, beta functions, core charge, atomic charge density, etc.) should be accessed through this.
Definition at line 65 of file init.hpp.
References norm_conserving_basis_.
Referenced by q3::add_kleinman_bylander_projectors_to_mean_field_record(), q3::UltrasoftPseudopotentialOverlapOperator::build_dense_matrix(), q3::NormConservingPlanewaveForceCalculator::compute(), q3::NormConservingPlanewaveStressTensorCalculator::compute(), q3::HubbardStressTensorCalculator::compute(), q3::NonlocalPseudopotentialStressTensorCalculator::compute(), q3::HubbardForceCalculator::compute(), q3::NonlocalPseudopotentialForceCalculator::compute(), q3::UltrasoftForceCalculator::compute(), q3::ForceCalculator::compute_forces(), q3::UltrasoftPlanewaveKohnShamQuantumSystem::d_matrix_element(), q3::GPUPlanewaveHamiltonianApplicator::prepare_kpoint(), q3::ScfStateMeanFieldProjectorSource::projectors(), q3::PlanewaveDavidsonDiagonalizer::solve(), and q3::PlanewaveDirectDiagonalizer::solve().
|
inlinevirtual |
Refuses, naming purpose, unless H ψ = E ψ is the whole eigenproblem.
For a consumer that hands the Hamiltonian to a code with no notion of an overlap operator, such as the BerkeleyGW VKB export. A norm-conserving dataset leaves S = 1, so this accepts; the ultrasoft system, which PAW runs use as well, overrides it to refuse.
Reimplemented in q3::UltrasoftPlanewaveKohnShamQuantumSystem.
|
protected |
NC pseudopotential basis: local potential, beta projectors, core charge, atomic densities.
Definition at line 124 of file init.hpp.
Referenced by d_matrix_element(), init(), q3::UltrasoftPlanewaveKohnShamQuantumSystem::init(), and pseudopotential_basis().