|
Quantum 3xplorer (Q3)
An AI-native quantum simulation engine
|
#include <direct.hpp>
Inheritance diagram for q3::PlanewaveDirectDiagonalizer:Public Member Functions | |
| PlanewaveDirectDiagonalizer (const execution::ExecutionPolicy &execution_policy=default_serial_execution_policy) | |
| std::string | name () const override |
| void | set_cached_projectors (int kpoint_index, const q3::Matrix< Complex > *projectors) override |
| void | solve (int kpoint_index_state, int kpoint_index, int number_of_plane_waves, int number_of_bands, const std::vector< int > &g_vector_indices, const std::vector< Real > &kinetic_energy_squared, const std::vector< Real > &real_space_potential, const Crystal &crystal_structure, const KPointsGrid &kpoint_grid, const PlanewaveBasis &planewave_basis, const NormConservingPlanewaveKohnShamQuantumSystem &pseudopotential_quantum_system, PlanewaveKohnShamQuantumSystem &quantum_system) override |
Public Member Functions inherited from q3::PlanewaveDiagonalizer | |
| ~PlanewaveDiagonalizer () override=default | |
| virtual void | invalidate_smooth_potential_cache () |
| virtual int | number_of_unconverged_bands () const |
| virtual void | release_workspace () |
| virtual void | set_basis_expansion_factor (int) |
| virtual void | set_cached_hubbard_projectors (int, const q3::Matrix< Complex > *) |
| virtual void | set_hubbard_d_matrix (const std::vector< Complex > *) |
| virtual void | set_maximum_iterations (int) |
Public Member Functions inherited from q3::Diagonalizer | |
| virtual | ~Diagonalizer ()=default |
| virtual void | set_first_iteration (bool) |
| virtual void | set_tolerance (Real) |
Static Public Attributes | |
| static const execution::SerialExecutionPolicy | default_serial_execution_policy {} |
Dense (direct) diagonalization using LAPACK. The OverlapOperator selects the standard (NC) or generalized (US) eigenproblem.
Definition at line 32 of file direct.hpp.
|
inlineexplicit |
Definition at line 36 of file direct.hpp.
|
inlineoverridevirtual |
Implements q3::Diagonalizer.
Definition at line 246 of file direct.hpp.
|
inlineoverridevirtual |
Set pre-computed KB projectors for a specific k-point. If set, the solver may use these instead of recomputing them. No-op by default; overridden by solvers that support caching.
Reimplemented from q3::PlanewaveDiagonalizer.
Definition at line 250 of file direct.hpp.
|
inlineoverridevirtual |
Solve the KS eigenvalue problem at one k-point. For NC-PP: H·ψ = ε·ψ (standard eigenvalue problem) For US-PP: H·ψ = ε·S·ψ (generalized eigenvalue problem)
Which spin channel this call belongs to; see the same derivation in the Davidson solver. The nonlocal D is per channel for ultrasoft and PAW, and real_space_potential above is already this channel's.
Reduce Hamiltonian and overlap matrices across band group. No-op when group_size == 1 (serial); MPI_Allreduce when distributed.
Direct diagonalizer solves the FULL matrix problem. We reuse the SubspaceDiagonalizer interface here as well. NOTE: always pass is_gamma_only=false because the direct diag builds a standard complex Hermitian H matrix via explicit G-space convolution — the imaginary part of H[i,j] = V(G_i - G_j) is non-zero even for gamma-only calculations. The real-symmetric solver (dsygv) would discard the imaginary part and produce incorrect eigenvalues.
Implements q3::PlanewaveDiagonalizer.
Definition at line 40 of file direct.hpp.
References q3::NormConservingPlanewaveBasis::beta_angular_momentum(), q3::NormConservingPlanewaveBasis::beta_function_table(), q3::compute_kleinman_bylander_projectors(), q3::create_overlap_operator(), q3::NormConservingPlanewaveKohnShamQuantumSystem::d_matrix_element(), q3::math::tolerances::d_matrix_element_threshold, q3::PlanewaveBasis::fft_rho(), q3::FFTGrid::forward(), q3::FFTGrid::g_vector_to_fft_grid_index(), q3::PlanewaveBasis::g_vectors(), q3::FFTGrid::grid_dimension_1(), q3::FFTGrid::grid_dimension_2(), q3::FFTGrid::grid_dimension_3(), q3::harmonic_order_sequence(), q3::FFTGrid::inverse(), q3::Crystal::number_of_atoms(), q3::KPointsGrid::number_of_kpoints(), q3::NormConservingPlanewaveBasis::number_of_projectors(), q3::NormConservingPlanewaveKohnShamQuantumSystem::pseudopotential_basis(), q3::NormConservingPlanewaveBasis::pseudopotential_set(), q3::execution::ExecutionPolicy::reduce_within_group(), q3::PlanewaveKohnShamQuantumSystem::set_eigenvalue(), q3::Crystal::species_type_index(), q3::FFTGrid::total_grid_points(), q3::NormConservingPlanewaveBasis::total_number_of_projectors(), and q3::PlanewaveKohnShamQuantumSystem::wavefunction_band_data().
|
inlinestatic |
Definition at line 34 of file direct.hpp.