Abstract base class shared by K_Vectors (electrons) and QList (phonons).
More...
#include <reciprocal_grid.h>
|
| | ReciprocalGrid ()=default |
| virtual | ~ReciprocalGrid ()=default |
| ReciprocalGrid & | operator= (const ReciprocalGrid &)=default |
| ReciprocalGrid & | operator= (ReciprocalGrid &&)=default |
| virtual void | renew (const int &kpoint_number) |
| | Resize the point-related containers.
|
| double | Monkhorst_Pack_formula (const int &k_type, const double &offset, const int &n, const int &dim) |
| | Coordinate of a point generated by the Monkhorst-Pack scheme.
|
| void | Monkhorst_Pack (const int *nmp_in, const double *koffset_in, const int k_type) |
| | Generate a Monkhorst-Pack mesh.
|
| void | kvec_d2c (const ModuleBase::Matrix3 &reciprocal_vec) |
| | Convert direct to Cartesian coordinates.
|
| void | kvec_c2d (const ModuleBase::Matrix3 &latvec) |
| | Convert Cartesian to direct coordinates.
|
| void | set_both_kvec (const ModuleBase::Matrix3 &G, const ModuleBase::Matrix3 &R, std::string &skpt, std::ofstream &ofs_running, std::ofstream &ofs_warning) |
| | Set both the direct and Cartesian coordinates, and print the table.
|
| void | normalize_wk (const int °spin) |
| | Normalize the weights so that they sum to the spin degeneracy.
|
| void | print_klists (std::ofstream &ofs) const |
| | Print the points in both Cartesian and direct coordinates.
|
| void | reduce_ibz (const ModuleBase::Matrix3 *rot_ops, int nrotkm, const ModuleBase::Matrix3 &G, const ModuleBase::Matrix3 &k_lattice, const ModuleBase::Matrix3 *kkmatrix, double epsilon, std::vector< ModuleBase::Vector3< double > > &vec_ibz, std::vector< double > &wk_ibz, std::vector< int > &ibz_index, std::vector< int > &ibz2bz) |
| | Star (IBZ) reduction primitive shared by k-points and q-points.
|
| virtual void | reduce_by_symmetry (const UnitCell &ucell, const ModuleSymmetry::Symmetry &symm, bool use_symm, std::string &skpt, bool &match, const int my_rank, std::ofstream &ofs_running)=0 |
| | Reduce this grid according to symmetry operations.
|
|
| std::vector< ModuleBase::Vector3< double > > | kvec_c |
| | Cartesian coordinates of the points, in unit of 2*pi/lat0.
|
| std::vector< ModuleBase::Vector3< double > > | kvec_d |
| | Direct coordinates of the points.
|
| std::vector< ModuleBase::Vector3< double > > | kvec_c_full |
| | Cartesian coordinates of the full (unreduced) mesh, in unit of 2*pi/lat0.
|
| std::vector< double > | wk |
| | Weight of each point.
|
| std::vector< int > | ngk |
| | Number of plane waves for each point (filled by the PW basis).
|
| int | nmp [3] = {0, 0, 0} |
| | Monkhorst-Pack grid dimensions.
|
| std::vector< int > | kl_segids |
| | Index of the k-line segment each point belongs to.
|
| bool | kc_done = false |
| | Whether the Cartesian coordinates have been computed.
|
| bool | kd_done = false |
| | Whether the direct coordinates have been computed.
|
| int | nks = 0 |
| | Number of points in the current pool (spin-free view).
|
| int | nkstot = 0 |
| int | nkstot_nospin = 0 |
| bool | is_mp = false |
| | Whether this is a Monkhorst-Pack grid.
|
| int | k_nkstot = 0 |
| | Total number of points read from a point-list file (0 = auto mesh).
|
| std::string | k_kword |
| | Type keyword of the point-list file.
|
Abstract base class shared by K_Vectors (electrons) and QList (phonons).
This base class is deliberately spin-free and irrep-free:
- spin expansion (isk, nspin doubling) is implemented in K_Vectors;
- irreducible-representation analysis is implemented in QList.
◆ ReciprocalGrid()
| ModuleCell::ReciprocalGrid::ReciprocalGrid |
( |
| ) |
|
|
default |
◆ ~ReciprocalGrid()
| virtual ModuleCell::ReciprocalGrid::~ReciprocalGrid |
( |
| ) |
|
|
virtualdefault |
◆ build_star_ops()
Build the reciprocal-space point-group operations for star reduction.
Determines the Bravais lattice of the reciprocal lattice (and of the k-lattice for Monkhorst-Pack meshes), checks its compatibility with the real-space lattice, constructs the point-group operations, and verifies that every Symmetry::kgmatrix entry belongs to that group.
- Parameters
-
| ucell | unit cell |
| symm | symmetry of the system |
| use_symm | whether symmetry reduction is enabled |
| k_vec | output: k-lattice basis matrix (valid when is_mp) |
| kgmatrix | output: rotation operations (capacity at least 96) |
| nrotkm | output: number of operations written into kgmatrix (0 means no reduction is possible) |
- Returns
- false if the reciprocal lattice is incompatible with the real-space lattice (the caller should then set match to false)
◆ kvec_c2d()
Convert Cartesian to direct coordinates.
◆ kvec_d2c()
Convert direct to Cartesian coordinates.
◆ Monkhorst_Pack()
| void ModuleCell::ReciprocalGrid::Monkhorst_Pack |
( |
const int * | nmp_in, |
|
|
const double * | koffset_in, |
|
|
const int | k_type ) |
Generate a Monkhorst-Pack mesh.
◆ Monkhorst_Pack_formula()
| double ModuleCell::ReciprocalGrid::Monkhorst_Pack_formula |
( |
const int & | k_type, |
|
|
const double & | offset, |
|
|
const int & | n, |
|
|
const int & | dim ) |
Coordinate of a point generated by the Monkhorst-Pack scheme.
◆ normalize_wk()
| void ModuleCell::ReciprocalGrid::normalize_wk |
( |
const int & | degspin | ) |
|
Normalize the weights so that they sum to the spin degeneracy.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ print_klists()
| void ModuleCell::ReciprocalGrid::print_klists |
( |
std::ofstream & | ofs | ) |
const |
Print the points in both Cartesian and direct coordinates.
◆ reduce_by_symmetry()
| virtual void ModuleCell::ReciprocalGrid::reduce_by_symmetry |
( |
const UnitCell & | ucell, |
|
|
const ModuleSymmetry::Symmetry & | symm, |
|
|
bool | use_symm, |
|
|
std::string & | skpt, |
|
|
bool & | match, |
|
|
const int | my_rank, |
|
|
std::ofstream & | ofs_running ) |
|
pure virtual |
Reduce this grid according to symmetry operations.
Pure virtual: implemented by K_Vectors (electron IBZ, including the magnetic/time-reversal handling) and by QList (q-point star reduction plus irreducible-representation analysis).
Implemented in K_Vectors, ModuleCell::QList, and TestGrid.
◆ reduce_ibz()
Star (IBZ) reduction primitive shared by k-points and q-points.
Rotates every point by each operation in rot_ops, folds equivalent points together and accumulates their weights. The rotation matrices in the k-lattice (Monkhorst-Pack) frame are provided in kkmatrix when is_mp is true; the k-lattice basis is k_lattice.
- Parameters
-
| rot_ops | rotation matrices in the reciprocal-space frame |
| nrotkm | number of rotation operations |
| G | reciprocal lattice matrix |
| k_lattice | k-lattice basis matrix (valid when is_mp) |
| kkmatrix | rotation matrices in the k-lattice frame (valid when is_mp) |
| epsilon | symmetry tolerance used by restrict/equivalence checks |
| vec_ibz | output: irreducible points |
| wk_ibz | output: weight of each irreducible point |
| ibz_index | output: mapping point index -> irreducible index |
| ibz2bz | output: origin (full-mesh) index of each irreducible point |
◆ renew()
| void ModuleCell::ReciprocalGrid::renew |
( |
const int & | kpoint_number | ) |
|
|
virtual |
Resize the point-related containers.
- Parameters
-
| kpoint_number | new number of points |
Reimplemented in K_Vectors.
◆ set_both_kvec()
Set both the direct and Cartesian coordinates, and print the table.
- Parameters
-
| G | reciprocal lattice matrix |
| R | real space lattice matrix |
| skpt | output string holding the point table |
| ofs_running | running-log stream |
◆ spin_factor()
| virtual int ModuleCell::ReciprocalGrid::spin_factor |
( |
| ) |
const |
|
inlineprotectedvirtual |
Spin-like multiplicity used by renew() (1 for q-points).
Reimplemented in K_Vectors.
◆ is_mp
| bool ModuleCell::ReciprocalGrid::is_mp = false |
Whether this is a Monkhorst-Pack grid.
◆ k_kword
| std::string ModuleCell::ReciprocalGrid::k_kword |
Type keyword of the point-list file.
◆ k_nkstot
| int ModuleCell::ReciprocalGrid::k_nkstot = 0 |
Total number of points read from a point-list file (0 = auto mesh).
◆ kc_done
| bool ModuleCell::ReciprocalGrid::kc_done = false |
Whether the Cartesian coordinates have been computed.
◆ kd_done
| bool ModuleCell::ReciprocalGrid::kd_done = false |
Whether the direct coordinates have been computed.
◆ kl_segids
| std::vector<int> ModuleCell::ReciprocalGrid::kl_segids |
Index of the k-line segment each point belongs to.
◆ kvec_c
Cartesian coordinates of the points, in unit of 2*pi/lat0.
◆ kvec_c_full
Cartesian coordinates of the full (unreduced) mesh, in unit of 2*pi/lat0.
◆ kvec_d
Direct coordinates of the points.
◆ ngk
| std::vector<int> ModuleCell::ReciprocalGrid::ngk |
Number of plane waves for each point (filled by the PW basis).
◆ nks
| int ModuleCell::ReciprocalGrid::nks = 0 |
Number of points in the current pool (spin-free view).
◆ nkstot
| int ModuleCell::ReciprocalGrid::nkstot = 0 |
Total number of (symmetry-reduced) points, INCLUDING spin multiplicity (i.e. nkstot = nkstot_nospin * spin_mult after K_Vectors::set_kup_and_kdw).
◆ nkstot_nospin
| int ModuleCell::ReciprocalGrid::nkstot_nospin = 0 |
Total number of physical k-points before symmetry reduction, WITHOUT spin multiplicity. EXX/RI/LR code relies on this convention (see e.g. ri_2d_comm.hpp: ik_full + is_k * nkstot_nospin).
◆ nmp
| int ModuleCell::ReciprocalGrid::nmp[3] = {0, 0, 0} |
Monkhorst-Pack grid dimensions.
◆ wk
| std::vector<double> ModuleCell::ReciprocalGrid::wk |
The documentation for this class was generated from the following files:
- /home/runner/work/abacus-develop/abacus-develop/source/source_cell/reciprocal_grid.h
- /home/runner/work/abacus-develop/abacus-develop/source/source_cell/reciprocal_grid.cpp
- /home/runner/work/abacus-develop/abacus-develop/source/source_lcao/module_ri/module_exx_symmetry/test/test_symm_rotation.cpp