ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
klist.h
Go to the documentation of this file.
1
3
7
8#include <fstream>
9#include <iostream>
10
11namespace Test_Deepks
12{
14{
15 public:
16 ModuleBase::Vector3<double>* kvec_c; // Cartesian coordinates of k points
17 std::vector<ModuleBase::Vector3<double>> kvec_d; // Direct coordinates of k points
18
19 double* wk; // wk, weight of k points
20
21 int* isk; // distinguish spin up and down k points
22
23 int nkstot; // total number of k points
24
25 int nmp[3]; // Number of Monhorst-Pack
26
27 K_Vectors();
28 ~K_Vectors();
29
30 void set(const std::string& k_file_name,
31 const int& nspin,
32 const ModuleBase::Matrix3& reciprocal_vec,
33 const ModuleBase::Matrix3& latvec,
34 bool& GAMMA_ONLY_LOCAL,
35 std::ofstream& ofs_running,
36 std::ofstream& ofs_warning);
37
38 private:
39 int nspin;
40 bool kc_done;
41 bool kd_done;
42 double koffset[3]; // used only in automatic k-points.
43 std::string k_kword; // LiuXh add 20180619
44 int k_nkstot; // LiuXh add 20180619
45
46 // step 1 : generate kpoints
47 bool read_kpoints(const std::string& fn,
48 bool& GAMMA_ONLY_LOCAL,
49 std::ofstream& ofs_warning,
50 std::ofstream& ofs_running);
51 void Monkhorst_Pack(const int* nmp_in, const double* koffset_in, const int tipo);
52 double Monkhorst_Pack_formula(const int& k_type, const double& offset, const int& n, const int& dim);
53
54 // step 2 : set both kvec and kved; normalize weight
55 void set_both_kvec(const ModuleBase::Matrix3& G, const ModuleBase::Matrix3& Rm, std::ofstream& ofs_running);
56 void renew(const int& kpoint_number);
57 void normalize_wk(const int& degspin);
58
59 // step 3 : *2 or *4 kpoints.
60 // *2 for LSDA
61 // *4 for non-collinear
62 void set_kup_and_kdw(std::ofstream& ofs_running);
63
64 // step 4
65 // print k lists.
66 void print_klists(std::ofstream& fn_running);
67};
68} // namespace Test_Deepks
3x3 matrix and related mathamatical operations
Definition matrix3.h:19
3 elements vector
Definition vector3.h:24
Definition klist.h:14
ModuleBase::Vector3< double > * kvec_c
Definition klist.h:16
int k_nkstot
Definition klist.h:44
K_Vectors()
Definition klist_1.cpp:6
void Monkhorst_Pack(const int *nmp_in, const double *koffset_in, const int tipo)
Definition klist_1.cpp:396
void print_klists(std::ofstream &fn_running)
Definition klist_1.cpp:567
int nspin
Definition klist.h:39
void normalize_wk(const int &degspin)
Definition klist_1.cpp:494
std::vector< ModuleBase::Vector3< double > > kvec_d
Definition klist.h:17
double Monkhorst_Pack_formula(const int &k_type, const double &offset, const int &n, const int &dim)
Definition klist_1.cpp:384
void renew(const int &kpoint_number)
Definition klist_1.cpp:93
void set_both_kvec(const ModuleBase::Matrix3 &G, const ModuleBase::Matrix3 &Rm, std::ofstream &ofs_running)
Definition klist_1.cpp:437
~K_Vectors()
Definition klist_1.cpp:21
std::string k_kword
Definition klist.h:43
bool read_kpoints(const std::string &fn, bool &GAMMA_ONLY_LOCAL, std::ofstream &ofs_warning, std::ofstream &ofs_running)
Definition klist_1.cpp:112
int nkstot
Definition klist.h:23
int * isk
Definition klist.h:21
int nmp[3]
Definition klist.h:25
double koffset[3]
Definition klist.h:42
void set_kup_and_kdw(std::ofstream &ofs_running)
Definition klist_1.cpp:521
double * wk
Definition klist.h:19
void set(const std::string &k_file_name, const int &nspin, const ModuleBase::Matrix3 &reciprocal_vec, const ModuleBase::Matrix3 &latvec, bool &GAMMA_ONLY_LOCAL, std::ofstream &ofs_running, std::ofstream &ofs_warning)
Definition klist_1.cpp:29
bool kc_done
Definition klist.h:40
bool kd_done
Definition klist.h:41
Definition klist.h:12