ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
qlist.h
Go to the documentation of this file.
1
9#ifndef QLIST_H
10#define QLIST_H
11
12#include "source_base/vector3.h"
14#include "reciprocal_grid.h"
15#include <vector>
16
17class UnitCell;
18namespace ModuleSymmetry
19{
20class Symmetry;
21}
22
23namespace ModuleCell {
24
36public:
40 QList();
41
45 ~QList();
46
56 const std::vector<int>& mp_grid, bool use_irreps);
57
70 void read_from_file(const std::string& filename, UnitCell& ucell);
71
76 void print_qlists(std::ofstream& ofs) const;
77
82 int get_nq() const { return this->nkstot; }
83
90 {
91 if (idx < 0 || idx >= static_cast<int>(this->kvec_d.size()))
92 {
94 }
95 return this->kvec_d[idx];
96 }
97
103 int get_nirr(int idx) const
104 {
105 if (idx < 0 || idx >= static_cast<int>(this->nirr_.size()))
106 {
107 return 0;
108 }
109 return nirr_[idx];
110 }
111
118 std::vector<int> get_irrep_modes(int q_idx, int irrep_idx) const;
119
134 void reduce_by_symmetry(const UnitCell& ucell,
135 const ModuleSymmetry::Symmetry& symm,
136 bool use_symm,
137 std::string& skpt,
138 bool& match,
139 const int my_rank,
140 std::ofstream& ofs_running) override;
141
142private:
143 std::vector<int> nirr_;
144 std::vector<std::vector<std::vector<int>>> irrep_modes_;
146
153 void interpolate_q_between(std::ifstream& ifq, std::vector<ModuleBase::Vector3<double>>& qvec);
154
164 void get_irreps(const UnitCell& ucell, const ModuleSymmetry::Symmetry& symm);
165};
166
167} // namespace ModuleCell
168
169#endif // QLIST_H
3 elements vector
Definition vector3.h:21
void print_qlists(std::ofstream &ofs) const
Print the q-points in both Cartesian and direct coordinates.
Definition qlist.cpp:294
~QList()
Destructor.
Definition qlist.cpp:23
void get_irreps(const UnitCell &ucell, const ModuleSymmetry::Symmetry &symm)
Get irreps for each q-point.
Definition qlist.cpp:416
ModuleSymmetry::LittleGroup little_group_
little group of the current q-point
Definition qlist.h:145
QList()
Default constructor.
Definition qlist.cpp:21
void interpolate_q_between(std::ifstream &ifq, std::vector< ModuleBase::Vector3< double > > &qvec)
Interpolate q-points between successive special points.
Definition qlist.cpp:237
void generate_mesh(UnitCell &ucell, ModuleSymmetry::Symmetry &symm, const std::vector< int > &mp_grid, bool use_irreps)
Generate the Monkhorst-Pack q-point mesh and reduce it by star.
Definition qlist.cpp:25
std::vector< std::vector< std::vector< int > > > irrep_modes_
irrep modes
Definition qlist.h:144
std::vector< int > nirr_
number of irreps for each q-point
Definition qlist.h:143
void read_from_file(const std::string &filename, UnitCell &ucell)
Read q-points from a q-points file.
Definition qlist.cpp:77
std::vector< int > get_irrep_modes(int q_idx, int irrep_idx) const
Get irrep modes at given q-point and irrep index.
Definition qlist.cpp:331
ModuleBase::Vector3< double > get_q(int idx) const
Get q-point at given index.
Definition qlist.h:89
int get_nirr(int idx) const
Get the number of irreps at given q-point.
Definition qlist.h:103
int get_nq() const
Get the number of q-points.
Definition qlist.h:82
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) override
Reduce the q-points by star (time-reversal included).
Definition qlist.cpp:343
Abstract base class shared by K_Vectors (electrons) and QList (phonons).
Definition reciprocal_grid.h:52
std::vector< ModuleBase::Vector3< double > > kvec_d
Direct coordinates of the points.
Definition reciprocal_grid.h:57
int nkstot
Definition reciprocal_grid.h:78
Little group (group of the wavevector) of a q-point.
Definition little_group.h:32
Symmetry analysis class.
Definition symmetry.h:24
Provide the basic information about unitcell.
Definition unitcell.h:16
Little group (group of the wavevector) of a q-point.
Definition qlist.cpp:19
Definition klist_io.h:13
Abstract base class for reciprocal-space point grids.