|
Quantum 3xplorer (Q3)
An AI-native quantum simulation engine
|
#include <g_vectors_grid.hpp>
Inheritance diagram for q3::GVectorsGrid:Protected Attributes | |
| int | first_nonzero_g_index_ {} |
| std::vector< Real > | g_vector_magnitudes_ |
| std::vector< GVector > | g_vectors_ |
| int | global_number_of_g_vectors_ {0} |
| int | grid_dimension_1_ {} |
| int | grid_dimension_2_ {} |
| int | grid_dimension_3_ {} |
| bool | is_gamma_only_ {false} |
| int | local_count_ {0} |
| int | local_start_ {0} |
Protected Attributes inherited from q3::ReciprocalSpaceVectorsGrid | |
| std::vector< ReciprocalSpaceVector > | vectors_ |
Protected Attributes inherited from q3::PointsGrid | |
| std::vector< WeightedPoint3D > | points_ |
Definition at line 19 of file g_vectors_grid.hpp.
|
default |
|
inline |
Definition at line 225 of file g_vectors_grid.hpp.
References q3::math::tolerances::energy_cutoff_rounding_tolerance, g_vector(), g_vectors_, q3::GVector::magnitude_squared, and q3::ReciprocalSpaceVectorsGrid::vector().
Referenced by q3::PlanewaveBasis::generate().
|
inline |
Definition at line 212 of file g_vectors_grid.hpp.
References first_nonzero_g_index_.
Referenced by q3::PlanewaveBasis::first_nonzero_g_index(), and q3::ChargeDensityTransformer::rho_g_to_r().
Definition at line 208 of file g_vectors_grid.hpp.
References g_vectors_.
Referenced by estimate_maximum_plane_waves_per_kpoint(), g_vector_to_fft_grid_index(), and generate().
Definition at line 216 of file g_vectors_grid.hpp.
References g_vector_magnitudes_.
Referenced by q3::PlanewaveBasis::g_vector_magnitudes().
Compute the FFT grid index for a G-vector from its Miller indices.
Definition at line 167 of file g_vectors_grid.hpp.
References g_vector(), grid_dimension_1_, grid_dimension_2_, grid_dimension_3_, q3::GVector::miller, and q3::ReciprocalSpaceVectorsGrid::vector().
Definition at line 204 of file g_vectors_grid.hpp.
References g_vectors_.
Referenced by q3::WavefunctionTransformer::g_to_r(), q3::PlanewaveBasis::g_vectors(), q3::PlanewaveBasis::initialize_kpoint_data(), q3::WavefunctionTransformer::r_to_g(), q3::ChargeDensityTransformer::rho_g_to_r(), q3::ChargeDensityTransformer::rho_r_to_g(), q3::PlaneWaveSelector::select(), and q3::PlanewaveBasis::stick_weights_for_grid().
|
inline |
For gamma-only, keep only the positive half-sphere: index_3 > 0, OR index_3 == 0 && index_2 > 0, OR index_3 == 0 && index_2 == 0 && index_1 >= 0 The half itself is dictated: rho(-G) = conj(rho(G)) for a real density, so one of each +/-G pair is redundant, and G = 0 – its own partner – is kept once, which is why the last key above is >= 0 and not > 0. Which half is free, and this is not the one Quantum ESPRESSO keeps: its rule leads on the FIRST Miller index where this one leads on the third, so the two codes hold mirror-image halves. Read the rule above rather than assume the two lists are interchangeable.
SLAB-BASED PARTITIONING: Each rank owns G-vectors that fall into its FFT slabs. This ensures all G-vectors are local when scattering to/from the FFT grid. Note: This replaces index-based partitioning when FFT slab info is provided.
Overwrite global g_vectors_ with local ones. WARNING: This rank now only knows about its local G-vectors. For dot_product and other collectives, this is fine as long as everyone knows it's a partition.
Definition at line 23 of file g_vectors_grid.hpp.
References q3::math::tolerances::energy_cutoff_rounding_tolerance, first_nonzero_g_index_, q3::GVector::g_cart, g_vector(), g_vector_magnitudes_, g_vectors_, global_number_of_g_vectors_, grid_dimension_1(), grid_dimension_1_, grid_dimension_2_, grid_dimension_3_, is_gamma_only(), is_gamma_only_, local_count_, local_start_, q3::GVector::magnitude_squared, q3::GVector::miller, q3::Crystal::reciprocal_lattice_vectors(), q3::Crystal::two_pi_over_lattice_parameter(), q3::Crystal::two_pi_over_lattice_parameter_squared(), q3::ReciprocalSpaceVectorsGrid::vector(), q3::IntegerVector3D::x, and q3::math::tolerances::zero_vector_magnitude_threshold.
Referenced by q3::PlanewaveBasis::generate().
|
inline |
Total number of G-vectors across all band ranks (before partitioning). Equal to number_of_g_vectors() when band_size == 1.
Definition at line 192 of file g_vectors_grid.hpp.
References global_number_of_g_vectors_.
|
inline |
Definition at line 184 of file g_vectors_grid.hpp.
References grid_dimension_1_.
Referenced by generate().
|
inline |
Definition at line 220 of file g_vectors_grid.hpp.
References is_gamma_only_.
Referenced by generate(), and q3::ChargeDensityTransformer::rho_g_to_r().
|
inline |
Definition at line 200 of file g_vectors_grid.hpp.
References local_start_.
|
inline |
Definition at line 196 of file g_vectors_grid.hpp.
References local_count_.
|
inline |
Definition at line 180 of file g_vectors_grid.hpp.
References g_vectors_.
Referenced by q3::PlanewaveBasis::number_of_g_vectors(), q3::ChargeDensityTransformer::rho_g_to_r(), and q3::ChargeDensityTransformer::rho_r_to_g().
|
protected |
Definition at line 241 of file g_vectors_grid.hpp.
Referenced by first_nonzero_g_index(), and generate().
|
protected |
Definition at line 240 of file g_vectors_grid.hpp.
Referenced by g_vector_magnitudes(), and generate().
|
protected |
Definition at line 239 of file g_vectors_grid.hpp.
Referenced by estimate_maximum_plane_waves_per_kpoint(), g_vector(), g_vectors(), generate(), and number_of_g_vectors().
|
protected |
Definition at line 247 of file g_vectors_grid.hpp.
Referenced by generate(), and global_number_of_g_vectors().
|
protected |
Definition at line 242 of file g_vectors_grid.hpp.
Referenced by g_vector_to_fft_grid_index(), generate(), and grid_dimension_1().
|
protected |
Definition at line 243 of file g_vectors_grid.hpp.
Referenced by g_vector_to_fft_grid_index(), and generate().
|
protected |
Definition at line 244 of file g_vectors_grid.hpp.
Referenced by g_vector_to_fft_grid_index(), and generate().
Definition at line 248 of file g_vectors_grid.hpp.
Referenced by generate(), and is_gamma_only().
|
protected |
Definition at line 246 of file g_vectors_grid.hpp.
Referenced by generate(), and local_number_of_g_vectors().
|
protected |
Definition at line 245 of file g_vectors_grid.hpp.
Referenced by generate(), and local_g_vector_start_index().