#include <kpoints_grid.hpp>
Public Member Functions | |
| KPointsGrid ()=default | |
| void | add_kpoint (const KPoint &kpoint) |
| void | generate (int grid_dimension_x, int grid_dimension_y, int grid_dimension_z, int shift_x, int shift_y, int shift_z) |
| const std::array< int, 3 > & | grid_dimensions () const |
| const std::array< int, 3 > & | grid_shifts () const |
| const std::vector< KPoint > & | kpoints () const |
| int | number_of_kpoints () const |
| const KPoint & | operator[] (int index) const |
| void | pretty_print () const |
| void | scale_weights (Real factor) |
| void | set_grid_metadata (const std::array< int, 3 > &dimensions, const std::array< int, 3 > &shifts) |
Generates and stores Monkhorst-Pack k-point meshes.
Definition at line 26 of file kpoints_grid.hpp.
|
default |
|
inline |
Add a single k-point (used by IBZ reduction).
Definition at line 84 of file kpoints_grid.hpp.
Referenced by q3::parallel::KPointDistributor::KPointDistributor(), q3::build_global_kpoint_grid_from_input(), q3::SymmetryAnalyzer::reduce_kpoints(), and q3::SymmetryAnalyzer::reduce_kpoints_internal().
|
inline |
Generate Monkhorst-Pack mesh with dimensions and offsets. Offsets are 0 or 1 (as in QE input).
Definition at line 34 of file kpoints_grid.hpp.
References q3::Point3D::coordinates, q3::WeightedPoint3D::weight, q3::Vector3D::x, q3::Vector3D::y, and q3::Vector3D::z.
Referenced by q3::build_global_kpoint_grid_from_input(), and q3::SymmetryAnalyzer::reduce_kpoints().
|
inline |
Access the grid dimensions (x, y, z).
Definition at line 105 of file kpoints_grid.hpp.
Referenced by q3::parallel::KPointDistributor::KPointDistributor(), q3::build_mean_field_record(), q3::PlanewaveKohnShamSCFIterator::initialize_representation(), q3::SymmetryAnalyzer::reduce_kpoints(), and q3::SymmetryAnalyzer::reduce_kpoints_internal().
|
inline |
Access the grid shifts (x, y, z).
Definition at line 112 of file kpoints_grid.hpp.
Referenced by q3::parallel::KPointDistributor::KPointDistributor(), q3::build_mean_field_record(), q3::PlanewaveKohnShamSCFIterator::initialize_representation(), q3::SymmetryAnalyzer::reduce_kpoints(), and q3::SymmetryAnalyzer::reduce_kpoints_internal().
|
inline |
Definition at line 74 of file kpoints_grid.hpp.
Referenced by q3::SymmetryAnalyzer::reduce_kpoints_internal().
|
inline |
Definition at line 71 of file kpoints_grid.hpp.
Referenced by q3::parallel::KPointDistributor::KPointDistributor(), q3::PlanewavePseudopotentialKohnShamSCFIterator::accumulate_hubbard_occupation_and_potential(), q3::UltrasoftPlanewavePseudopotentialKohnShamSCFIterator::accumulate_projector_overlaps(), q3::PlanewaveKohnShamQuantumSystem::allocate_electronic_states(), q3::assemble_global_eigenvalues_at_kpoints(), q3::assemble_global_kpoint_state_blocks(), q3::build_mean_field_record(), q3::PlanewaveWannierCapture::build_ultrasoft(), q3::internal::build_wannier_interface_record(), q3::KineticStressTensorCalculator::compute(), q3::HubbardStressTensorCalculator::compute(), q3::NonlocalPseudopotentialStressTensorCalculator::compute(), q3::HubbardForceCalculator::compute(), q3::NonlocalPseudopotentialForceCalculator::compute(), q3::PlanewaveKohnShamEnergyCalculator::compute_band_energy(), q3::PlanewaveKohnShamEnergyCalculator::compute_smearing_entropy(), q3::create_kohn_sham_iterator(), q3::PlanewaveKohnShamSCFIterator::global_eigenvalues(), q3::PlaneWaveTable::initialize(), q3::PlanewaveBasis::initialize_kpoint_data(), q3::PlanewavePseudopotentialKohnShamSCFIterator::initialize_single_particle_states(), q3::PlanewaveKohnShamSCFIterator::log_representation_summary(), q3::PlanewaveKohnShamQuantumSystem::number_of_kpoint_states(), q3::PlanewaveKohnShamSCFIterator::number_of_kpoint_states(), pretty_print(), q3::SymmetryAnalyzer::reduce_kpoints_internal(), q3::PlanewaveKohnShamSCFIterator::report_convergence_details(), q3::PlanewavePseudopotentialKohnShamSCFIterator::setup_hubbard(), q3::PlanewaveDavidsonDiagonalizer::solve(), q3::PlanewaveDirectDiagonalizer::solve(), q3::PlanewavePseudopotentialKohnShamSCFIterator::solve_single_particle_states(), and q3::QEPlanewaveKohnShamWavefunctionCheckpoint::write_to_file().
|
inline |
Definition at line 77 of file kpoints_grid.hpp.
|
inline |
Log the k-point grid contents with coordinates and weights.
Definition at line 119 of file kpoints_grid.hpp.
References q3::log::info(), and number_of_kpoints().
Referenced by q3::SymmetryAnalyzer::reduce_kpoints(), and q3::SymmetryAnalyzer::reduce_kpoints_internal().
|
inline |
Scale every k-point weight by a constant factor.
Generated weights embed the spin degeneracy of 2 (they sum to 2 over the grid). Spin-polarized (LSDA) calculations enumerate the two spin channels as explicit k-point states, so each state carries half of that weight: scale by 0.5 once, right after the grid (and any IBZ reduction) is built.
Definition at line 96 of file kpoints_grid.hpp.
Referenced by q3::build_global_kpoint_grid_from_input().
|
inline |
Set the Monkhorst-Pack grid metadata (dimensions and shifts).
Used by symmetry reduction and k-point distribution to preserve the requested generated-grid parameters. Explicit k-point lists retain the default zero dimensions and remain distinguishable from generated grids.
Definition at line 138 of file kpoints_grid.hpp.
Referenced by q3::parallel::KPointDistributor::KPointDistributor(), q3::SymmetryAnalyzer::reduce_kpoints(), and q3::SymmetryAnalyzer::reduce_kpoints_internal().