|
Quantum 3xplorer (Q3)
An AI-native quantum simulation engine
|
#include <init.hpp>
Inheritance diagram for q3::NormConservingPlanewaveBasis:Public Member Functions | |
| NormConservingPlanewaveBasis ()=default | |
| virtual | ~NormConservingPlanewaveBasis ()=default |
| const std::vector< Real > & | atomic_charge_density_g (int species_type) const |
| Real | bare_d_matrix_element (int species_type, int projector_a, int projector_b) const |
| int | beta_angular_momentum (int species_type, int projector_index) const |
| const BetaFunctionTable & | beta_function_table () const |
| const std::vector< Complex > & | core_charge_density_reciprocal () const |
| const CoreChargeDensityTable & | core_charge_density_table () const |
| bool | has_nonlinear_core_correction () const |
| virtual void | init (const Crystal &crystal_structure, const PlanewaveBasis &planewave_basis, const PseudopotentialSet &pseudopotential_set) |
| Real | interpolate_beta (int species_type_index, int beta_index, Real q_value) const |
| Real | interpolate_core_charge_density (int element_type, Real q_value) const |
| Real | interpolate_core_charge_density_derivative (int element_type, Real q_value) const |
| Real | interpolate_dbeta (int species_type_index, int beta_index, Real q_value) const |
| Real | interpolate_local_potential (int element_type, Real q_value) const |
| Real | interpolate_local_potential_derivative (int element_type, Real q_value) const |
| Real | interpolate_rho_core (int element_type, Real q_value) const |
| virtual bool | is_ultrasoft () const |
| const std::vector< Real > & | local_potential_g (int species_type_index) const |
| const LocalPotentialTable & | local_potential_table () const |
| int | number_of_projector_channels (int species_type) const |
| int | number_of_projectors (int species_type) const |
| const PlanewaveBasis & | planewave_basis () const |
| int | projector_angular_momentum (int species_type, int projector_index) const |
| int | projector_combined_lm_index (int species_type, int projector_index) const |
| int | projector_magnetic_quantum_number (int species_type, int projector_index) const |
| const ProjectorMappingTable & | projector_mapping_table () const |
| int | projector_to_beta_index (int species_type, int projector_index) const |
| const PseudopotentialSet & | pseudopotential_set () const |
| const std::vector< Complex > & | total_local_potential_g () const |
| int | total_number_of_projectors () const |
Protected Member Functions | |
| void | compute_mesh_truncation_sizes (int number_of_species_types) |
Protected Attributes | |
| std::vector< std::vector< Real > > | atomic_charge_density_g_ |
| std::unique_ptr< BetaFunctionTable > | beta_function_table_ |
| Real | cell_volume_ {1.0} |
| CoreChargeData | core_charge_data_ |
| CoreChargeDensityTable | core_charge_density_table_ |
| std::vector< std::vector< Real > > | local_potential_g_per_species_ |
| LocalPotentialTable | local_potential_table_ |
| std::vector< int > | mesh_sizes_ |
| const PlanewaveBasis * | planewave_basis_ptr_ = nullptr |
| ProjectorMappingTable | projector_mapping_table_ |
| PseudopotentialSet | pseudopotential_set_ |
| std::vector< Complex > | total_local_potential_g_ |
|
default |
|
virtualdefault |
|
inline |
Atomic charge density in G-space for a species (used as initial guess).
Definition at line 252 of file init.hpp.
References atomic_charge_density_g_.
|
inline |
Bare D-matrix element D^0_{ij} from the pseudopotential file (species-level). For norm-conserving PPs, this is the sole nonlocal coupling. For ultrasoft PPs, this is the ion-bare part before screening.
| species_type | Species index |
| projector_a | Beta projector index i (radial) |
| projector_b | Beta projector index j (radial) |
Definition at line 216 of file init.hpp.
References pseudopotential_set_.
|
inline |
Angular momentum quantum number l for a specific beta projector of a species.
Definition at line 195 of file init.hpp.
References pseudopotential_set_.
Referenced by q3::UltrasoftPseudopotentialOverlapOperator::build_dense_matrix(), q3::NonlocalPseudopotentialForceCalculator::compute(), and q3::PlanewaveDirectDiagonalizer::solve().
|
inline |
Access the pre-tabulated beta function table for direct interpolation.
Definition at line 284 of file init.hpp.
References beta_function_table_.
Referenced by q3::NonlocalPseudopotentialForceCalculator::compute(), q3::GPUPlanewaveHamiltonianApplicator::prepare_kpoint(), q3::PlanewaveDavidsonDiagonalizer::solve(), and q3::PlanewaveDirectDiagonalizer::solve().
|
inlineprotected |
Compute mesh truncation sizes for radial integration of each species.
Definition at line 399 of file init.hpp.
References mesh_sizes_, pseudopotential_set_, q3::math::tolerances::radial_integration_truncation_radius, and q3::math::tolerances::use_radial_integration_truncation.
Referenced by init().
|
inline |
NLCC core charge density in G-space (structure-factor-weighted sum over atoms).
Definition at line 266 of file init.hpp.
References core_charge_data_, and q3::CoreChargeData::core_charge_density_reciprocal().
Referenced by q3::PseudopotentialExchangeCorrelationStressTensorCalculator::build_spin_charge_density_g(), and q3::PseudopotentialExchangeCorrelationStressTensorCalculator::build_total_charge_density_g().
|
inline |
Access the core charge density interpolation table.
Definition at line 354 of file init.hpp.
References core_charge_density_table_.
|
inline |
Whether any species has nonlinear core correction (NLCC) for XC.
Definition at line 259 of file init.hpp.
References core_charge_data_, and q3::CoreChargeData::has_nonlinear_core_correction().
Referenced by q3::NormConservingPlanewaveForceCalculator::compute(), q3::CoreCorrectionForceCalculator::compute(), and q3::ForceCalculator::compute_forces().
|
inlinevirtual |
Initialize all pseudopotential data from crystal, basis, and PP files. Must be called after PlanewaveBasis::generate().
Step 2: Tabulate beta functions on a uniform q-grid, with the table implementation chosen by what the datasets carry (see the factory).
Reimplemented in q3::UltrasoftPlanewaveBasis.
Definition at line 57 of file init.hpp.
References atomic_charge_density_g_, beta_function_table_, q3::ProjectorMappingTable::build(), q3::Crystal::cell_volume(), q3::PseudopotentialSet::clone(), compute_mesh_truncation_sizes(), q3::compute_phase_factor(), q3::Crystal::convert_from_crystal_to_cartesian(), core_charge_data_, core_charge_density_table_, q3::create_beta_function_table(), q3::PlanewaveBasis::g_vector_magnitudes(), q3::PlanewaveBasis::g_vectors(), q3::CoreChargeData::initialize(), q3::CoreChargeDensityTable::initialize(), q3::LocalPotentialTable::initialize(), q3::LocalPotentialTable::interpolate(), local_potential_g_per_species_, local_potential_table_, mesh_sizes_, q3::Crystal::number_of_atoms(), q3::PlanewaveBasis::number_of_g_vectors(), planewave_basis(), planewave_basis_ptr_, projector_mapping_table_, pseudopotential_set(), pseudopotential_set_, q3::PseudopotentialSet::size(), q3::Crystal::species_type_index(), q3::tabulate_atomic_charge_density_in_g_space(), total_local_potential_g_, and q3::constants::two_pi.
Referenced by q3::UltrasoftPlanewaveBasis::init().
|
inline |
Interpolate beta projector function β(|q|) from the pre-tabulated q-grid.
| species_type_index | Species index |
| beta_index | Radial beta projector index |
| q_value | Wavevector magnitude |q| in atomic units (1/Bohr) |
Definition at line 295 of file init.hpp.
References beta_function_table_.
|
inline |
Interpolate core charge density ρ_core(|q|) from pre-tabulated uniform q-grid. Replaces the expensive per-call radial integration with O(1) Lagrange interpolation.
Definition at line 332 of file init.hpp.
References core_charge_density_table_, and q3::CoreChargeDensityTable::interpolate().
Referenced by q3::CoreCorrectionStressTensorCalculator::compute(), and q3::CoreCorrectionForceCalculator::compute().
|
inline |
Interpolate derivative dρ_core/dq from pre-tabulated uniform q-grid.
Definition at line 339 of file init.hpp.
References core_charge_density_table_, and q3::CoreChargeDensityTable::interpolate_derivative().
Referenced by q3::CoreCorrectionStressTensorCalculator::compute().
|
inline |
Interpolate the derivative dβ/dq of a beta projector function. Uses 4-point Lagrange derivative interpolation.
| species_type_index | Species index |
| beta_index | Radial beta projector index |
| q_value | Wavevector magnitude |q| in atomic units (1/Bohr) |
Definition at line 307 of file init.hpp.
References beta_function_table_.
|
inline |
Interpolate local potential V_loc(|q|) from pre-tabulated uniform q-grid. Replaces the expensive per-call radial integration with O(1) Lagrange interpolation.
Definition at line 316 of file init.hpp.
References q3::LocalPotentialTable::interpolate(), and local_potential_table_.
|
inline |
Interpolate derivative dV_loc/dq from pre-tabulated uniform q-grid.
Definition at line 323 of file init.hpp.
References q3::LocalPotentialTable::interpolate_derivative(), and local_potential_table_.
Referenced by q3::LocalPseudopotentialStressTensorCalculator::compute().
|
inline |
Interpolate NLCC core charge density from pre-tabulated values. Uses 4-point Lagrange interpolation on the uniform q-grid.
| element_type | Species index |
| q_value | Wavevector magnitude |q| in atomic units (1/Bohr) |
Definition at line 277 of file init.hpp.
References core_charge_density_table_, and q3::CoreChargeDensityTable::interpolate().
|
inlinevirtual |
Whether this basis uses ultrasoft pseudopotentials. Base class returns false; UltrasoftPlanewaveBasis returns true.
Reimplemented in q3::UltrasoftPlanewaveBasis.
|
inline |
Return the local pseudopotential in G-space for a single species.
| species_type_index | Index into the pseudopotential set (0-based) |
Definition at line 165 of file init.hpp.
References local_potential_g_per_species_.
Referenced by q3::LocalPseudopotentialStressTensorCalculator::compute(), and q3::LocalPseudopotentialForceCalculator::compute().
|
inline |
Access the local potential interpolation table.
Definition at line 347 of file init.hpp.
References local_potential_table_.
|
inline |
Number of expanded projector channels for a species (sum of 2l+1 over all beta projectors, i.e. including magnetic quantum numbers).
Definition at line 203 of file init.hpp.
References q3::ProjectorMappingTable::number_of_channels(), and projector_mapping_table_.
Referenced by q3::UltrasoftPlanewaveBasis::add_augmentation_charges(), q3::PlanewaveBlochOverlapCalculator::add_augmentation_contribution(), q3::UltrasoftForceCalculator::compute(), and q3::UltrasoftPlanewaveBasis::precompute_q_functions_g().
|
inline |
Number of radial beta projectors for a given species (before angular expansion).
Definition at line 188 of file init.hpp.
References pseudopotential_set_, and q3::PseudopotentialSet::size().
Referenced by q3::UltrasoftPseudopotentialOverlapOperator::build_dense_matrix(), q3::NonlocalPseudopotentialForceCalculator::compute(), q3::UltrasoftPlanewaveBasis::compute_q_g_single(), and q3::PlanewaveDirectDiagonalizer::solve().
|
inline |
Access the plane-wave basis set this PP basis was built from.
Definition at line 147 of file init.hpp.
References planewave_basis_ptr_.
Referenced by init(), q3::UltrasoftPlanewaveBasis::init(), q3::UltrasoftPlanewaveBasis::init_ultrasoft(), and q3::UltrasoftPlanewaveBasis::precompute_q_functions_g().
|
inline |
Angular momentum l of an expanded projector channel.
Definition at line 237 of file init.hpp.
References q3::ProjectorMappingTable::angular_momentum(), and projector_mapping_table_.
|
inline |
Combined (l,m) index for an expanded projector channel (QE convention: l² + offset).
Definition at line 230 of file init.hpp.
References q3::ProjectorMappingTable::combined_lm_index(), and projector_mapping_table_.
Referenced by q3::hubbard_augmentation_overlap().
|
inline |
Magnetic quantum number m of an expanded projector channel.
Definition at line 244 of file init.hpp.
References q3::ProjectorMappingTable::magnetic_quantum_number(), and projector_mapping_table_.
|
inline |
Access the projector mapping table for expanded projector channel queries.
Definition at line 363 of file init.hpp.
References projector_mapping_table_.
Referenced by q3::UltrasoftPlanewaveEffectivePotential::compute().
|
inline |
Map an expanded projector channel index back to its radial beta projector index.
Definition at line 223 of file init.hpp.
References projector_mapping_table_, and q3::ProjectorMappingTable::to_beta_index().
Referenced by q3::hubbard_augmentation_overlap().
|
inline |
Access the collection of pseudopotentials for all species.
Definition at line 156 of file init.hpp.
References pseudopotential_set_.
Referenced by q3::CoreCorrectionStressTensorCalculator::compute(), q3::HubbardStressTensorCalculator::compute(), q3::LocalPseudopotentialStressTensorCalculator::compute(), q3::HubbardForceCalculator::compute(), q3::NonlocalPseudopotentialForceCalculator::compute(), q3::UltrasoftPlanewaveEffectivePotential::compute(), q3::CoreCorrectionForceCalculator::compute(), q3::hubbard_augmentation_overlap(), init(), q3::UltrasoftPlanewaveBasis::init(), q3::GPUPlanewaveHamiltonianApplicator::prepare_kpoint(), q3::UltrasoftPlanewaveBasis::projector_degree_for_gaunt_table(), q3::PlanewaveDavidsonDiagonalizer::solve(), and q3::PlanewaveDirectDiagonalizer::solve().
|
inline |
Return the total local pseudopotential in G-space (structure-factor-weighted sum over all atoms and species).
Definition at line 173 of file init.hpp.
References total_local_potential_g_.
|
inline |
Total number of Kleinman-Bylander projectors across all atoms (sum of projector channels per atom, accounting for angular momentum degeneracy).
Definition at line 181 of file init.hpp.
References projector_mapping_table_, and q3::ProjectorMappingTable::total_number_of_projectors().
Referenced by q3::NonlocalPseudopotentialForceCalculator::compute(), q3::GPUPlanewaveHamiltonianApplicator::prepare_kpoint(), q3::PlanewaveDavidsonDiagonalizer::solve(), and q3::PlanewaveDirectDiagonalizer::solve().
|
protected |
Definition at line 382 of file init.hpp.
Referenced by atomic_charge_density_g(), and init().
|
protected |
Definition at line 385 of file init.hpp.
Referenced by beta_function_table(), init(), q3::UltrasoftPlanewaveBasis::init_ultrasoft(), interpolate_beta(), and interpolate_dbeta().
|
protected |
Definition at line 391 of file init.hpp.
Referenced by q3::UltrasoftPlanewaveBasis::init_ultrasoft().
|
protected |
Definition at line 389 of file init.hpp.
Referenced by core_charge_density_reciprocal(), has_nonlinear_core_correction(), and init().
|
protected |
Definition at line 387 of file init.hpp.
Referenced by core_charge_density_table(), init(), interpolate_core_charge_density(), interpolate_core_charge_density_derivative(), and interpolate_rho_core().
|
protected |
Definition at line 381 of file init.hpp.
Referenced by init(), and local_potential_g().
|
protected |
Definition at line 386 of file init.hpp.
Referenced by init(), interpolate_local_potential(), interpolate_local_potential_derivative(), and local_potential_table().
|
protected |
Definition at line 392 of file init.hpp.
Referenced by compute_mesh_truncation_sizes(), init(), and q3::UltrasoftPlanewaveBasis::init_ultrasoft().
|
protected |
Definition at line 378 of file init.hpp.
Referenced by q3::UltrasoftPlanewaveBasis::add_augmentation_charges(), init(), and planewave_basis().
|
protected |
Definition at line 388 of file init.hpp.
Referenced by q3::UltrasoftPlanewaveBasis::add_augmentation_charges(), q3::UltrasoftPlanewaveBasis::compute_q_g_single(), init(), number_of_projector_channels(), q3::UltrasoftPlanewaveBasis::precompute_q_functions_g(), projector_angular_momentum(), projector_combined_lm_index(), projector_magnetic_quantum_number(), projector_mapping_table(), projector_to_beta_index(), and total_number_of_projectors().
|
protected |
Definition at line 380 of file init.hpp.
Referenced by q3::UltrasoftPlanewaveBasis::augmentation_overlap_integral(), bare_d_matrix_element(), beta_angular_momentum(), compute_mesh_truncation_sizes(), q3::UltrasoftPlanewaveBasis::compute_q_g_single(), init(), q3::UltrasoftPlanewaveBasis::init_ultrasoft(), number_of_projectors(), q3::UltrasoftPlanewaveBasis::precompute_q_functions_g(), and pseudopotential_set().
|
protected |
Definition at line 383 of file init.hpp.
Referenced by init(), and total_local_potential_g().