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