15 std::vector<ModuleBase::Vector3<double>>
kvec_c;
16 std::vector<ModuleBase::Vector3<double>>
kvec_d;
18 std::vector<double>
wk;
28 std::vector<std::map<int, ModuleBase::Vector3<double>>>
kstars;
62 const std::string& k_file_name,
150 const std::vector<double>& wk_ibz);
177 void renew(
const int& kpoint_number);
201 const std::string& fn);
241 void Monkhorst_Pack(
const int* nmp_in,
const double* koffset_in,
const int tipo);
bool is_mp
Definition klist.h:161
void interpolate_k_between(std::ifstream &ifk, std::vector< ModuleBase::Vector3< double > > &kvec)
Adds k-points linearly between special points.
Definition klist.cpp:403
int nspin
Definition klist.h:157
double koffset[3]
Definition klist.h:158
int get_nkstot_full() const
Definition klist.h:78
void set_nkstot_full(int value)
Definition klist.h:113
int get_nks() const
Definition klist.h:68
void set_nks(int value)
Definition klist.h:103
std::vector< int > kl_segids
Number of Monhorst-Pack.
Definition klist.h:24
int nmp[3]
distinguish spin up and down k points
Definition klist.h:23
K_Vectors()
Definition klist.h:33
void Monkhorst_Pack(const int *nmp_in, const double *koffset_in, const int tipo)
Generates k-points using the Monkhorst-Pack scheme.
Definition klist.cpp:483
std::string k_kword
Definition klist.h:159
void normalize_wk(const int °spin)
Normalizes the weights of the k-points.
Definition klist.cpp:558
double get_koffset(const int i) const
Definition klist.h:83
double Monkhorst_Pack_formula(const int &k_type, const double &offset, const int &n, const int &dim)
Calculates the coordinate of a k-point using the Monkhorst-Pack scheme.
Definition klist.cpp:468
std::vector< ModuleBase::Vector3< double > > kvec_d
Cartesian coordinates of k points.
Definition klist.h:16
void renew(const int &kpoint_number)
Resize the k-point related vectors according to the new k-point number.
Definition klist.cpp:182
void set_kup_and_kdw()
Sets up the k-points for spin-up and spin-down calculations.
Definition klist.cpp:588
~K_Vectors()
Definition klist.h:34
K_Vectors & operator=(K_Vectors &&rhs)=default
bool kc_done
Definition klist.h:30
std::vector< int > ik2iktot
[nks] map ik to the global index of k points
Definition klist.h:128
K_Vectors & operator=(const K_Vectors &)=default
bool read_kpoints(const UnitCell &ucell, const std::string &fn)
Reads the k-points from a file.
Definition klist.cpp:195
void update_use_ibz(const int &nkstot_ibz, const std::vector< ModuleBase::Vector3< double > > &kvec_d_ibz, const std::vector< double > &wk_ibz)
Updates the k-points to use the irreducible Brillouin zone (IBZ).
Definition klist.cpp:528
int get_nspin() const
Definition klist.h:93
std::vector< int > isk
ngk, number of plane waves for each k point
Definition klist.h:21
int get_k_nkstot() const
Definition klist.h:88
void set_nkstot(int value)
Definition klist.h:108
int nks
number of symmetry-reduced k points in this pool(processor, up+dw)
Definition klist.h:153
int nkstot_full
number of k points before symmetry reduction in full k mesh
Definition klist.h:155
void cal_ik_global()
Gets the global index of a k-point.
Definition klist.cpp:14
int k_nkstot
Definition klist.h:160
void set(const UnitCell &ucell, const ModuleSymmetry::Symmetry &symm, const std::string &k_file_name, const int &nspin, const ModuleBase::Matrix3 &reciprocal_vec, const ModuleBase::Matrix3 &latvec, std::ofstream &ofs)
Set up the k-points for the system.
Definition klist.cpp:43
Parallel_Kpoints para_k
parallel for kpoints
Definition klist.h:38
std::vector< int > ngk
wk, weight of k points
Definition klist.h:20
std::string get_k_kword() const
Definition klist.h:98
std::vector< std::map< int, ModuleBase::Vector3< double > > > kstars
index of kline segment
Definition klist.h:28
int nkstot
number of symmetry-reduced k points in full k mesh
Definition klist.h:154
std::vector< ModuleBase::Vector3< double > > kvec_c
Definition klist.h:15
int get_nkstot() const
Definition klist.h:73
std::vector< double > wk
Direct coordinates of k points.
Definition klist.h:18
std::vector< int > ibz_index
map k points (before symmetry reduction) to irreducible k-points
Definition klist.h:129
bool kd_done
Definition klist.h:31
bool get_is_mp() const
Definition klist.h:123
void set_nspin(int value)
Definition klist.h:118
3x3 matrix and related mathamatical operations
Definition matrix3.h:19
3 elements vector
Definition vector3.h:22
Definition parallel_kpoints.h:10
void kvec_mpi_k(K_Vectors &kv)
Distributes k-points among MPI processes.
Definition k_vector_utils.cpp:221