Quantum 3xplorer (Q3)
An AI-native quantum simulation engine
Loading...
Searching...
No Matches
q3::NormConservingPlanewaveKohnShamQuantumSystem Class Reference

#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}
 

Detailed Description

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().

Definition at line 42 of file init.hpp.

Constructor & Destructor Documentation

◆ NormConservingPlanewaveKohnShamQuantumSystem()

q3::NormConservingPlanewaveKohnShamQuantumSystem::NormConservingPlanewaveKohnShamQuantumSystem ( )
default

◆ ~NormConservingPlanewaveKohnShamQuantumSystem()

q3::NormConservingPlanewaveKohnShamQuantumSystem::~NormConservingPlanewaveKohnShamQuantumSystem ( )
overridedefault

Member Function Documentation

◆ d_matrix_element()

virtual Real q3::NormConservingPlanewaveKohnShamQuantumSystem::d_matrix_element ( int  atom_index,
int  species_type,
int  projector_index_i,
int  projector_index_j,
int  spin = 0 
) const
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().

◆ has_ultrasoft()

◆ init()

virtual void q3::NormConservingPlanewaveKohnShamQuantumSystem::init ( const Crystal &  crystal_structure,
const PlanewaveBasis &  planewave_basis,
const PseudopotentialSet &  pseudopotential_set 
)
inlinevirtual

◆ pseudopotential_basis()

◆ require_identity_overlap()

virtual void q3::NormConservingPlanewaveKohnShamQuantumSystem::require_identity_overlap ( const std::string &  purpose) const
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.

Definition at line 118 of file init.hpp.

Member Data Documentation

◆ norm_conserving_basis_

std::unique_ptr<NormConservingPlanewaveBasis> q3::NormConservingPlanewaveKohnShamQuantumSystem::norm_conserving_basis_
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().


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