ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
winput.h
Go to the documentation of this file.
1//==========================================================
2// AUTHOR : mohan
3// DATE : 2008-11-08
4// Last Update: 2010-06-07
5//==========================================================
6#ifndef WINPUT_H
7#define WINPUT_H
8
9#include <string>
10#include <fstream>
11
12//==========================================================
13// CLASS :
14// NAME : winput
15// ( Readin wannier parameters.
16// Check wannier parameters.
17// Print wannier parameters )
18//==========================================================
19class winput
20{
21public:
22
23 winput();
24 ~winput();
25
26//==========================================================
27// MEMBER FUNCTIONS :
28// NAME : target( no use now)
29// NAME : before_iter ( call wannier::runnning )
30// NAME : after_iter ( call wannier::running )
31// NAME : begin_stop_flag ( only use readin information ,
32// stop at the very beginning ).
33// NAME : end_flag ( output data, etc. )
34//==========================================================
35 static std::string target;
36 static bool before_iter;
37 static bool after_iter;
38 static bool begin_stop_flag;
39 static bool end_flag;
40
41//==========================================================
42// MEMBER FUNCTIONS :
43// NAME : rcut( PAO cutoff )
44// NAME : trunc_ao ( PAO cutoff )
45// NAME : trunc_wlmr ( 1D Radial wave function cutoff )
46// NAME : trunc_wan ( 3D wannier function cutoff )
47//==========================================================
48 static double rcut;
49 static double trunc_ao;
50 static double trunc_wlmr;
51 static double trunc_wan;
52
53//==========================================================
54// MEMBER FUNCTIONS :
55// NAME : wlmr_dir( if reconstruction , this is wlmr adress)
56// NAME : wf_type ( type of wannier functions)
57// NAME : build_wf
58// NAME : imp_pao
59// NAME : b_out_wf
60// NAME : b_fftwan
61// NAME : b_plot_build
62// NAME : b_plot_atomic
63//==========================================================
64 static std::string wlmr_dir;
65 static std::string wf_type;
66 static bool build_wf;
67 static int imp_pao;
68 static bool b_out_wf;
69 static bool b_fftwan;//add 2008-07-20
70 static bool b_plot_build;//add 2008-06-04
71 static bool b_plot_atomic;//add 2008-06-04
72
73//==========================================================
74// MEMBER FUNCTIONS :
75// NAME : trial ( trial wave functions , "atomic" or "gauss")
76// NAME : bs(parameters for gauss orbit)
77// NAME : bp
78// NAME : px
79// NAME : g1
80// NAME : g2
81//==========================================================
82 static std::string trial;//"atomic" or "gauss"
83 static double bs;//parameters for gauss orbit
84 static double bp;
85 static double px;
86 static double g1;
87 static double g2;
88
89 static int bloch_begin;
90 static int bloch_end;
91
92 static double fermi_t;
93 static double clm2_lowest;
94
95 static int sph_proj;//"1" spherical project,"2": first minus atomic orbitals
96 static bool sph_type;//0:Rewrite 1:Skip
97
98 static bool b_recon;//"1" reconstruction of wannier function
99 static bool b_mix_wf;// add 2008-06-15
100 static double mix_wf;//add 2008-06-13
101 static bool recon_wanq;
102
103 static bool speed_mode;
104
105 static bool b_near_atom;
106 static double range0;
107 static double range1;
108
109 static int L_start;
110 static int L_end;
111 static int atom_start;
112 static int atom_end;
113
114 static bool plot_wanq;//add 2008-01-26
115 static std::string plot_option;//(110),[110] etc.
116 static int n_unitcell;//number of unitcell to plot
117 static bool out_all;
118 static int out_chg;
119 static std::string charge_type;
120 static bool cal_bands; //for wan wan basis + wan charge
121 static bool cal_bands2;//for semi-wan ;pw basis + wan charge add 2008-4-11
122 static bool cal_dos;
123 static int mesh;
124 static double dr;
125
126 static bool no_center;
127 static int sum_lm;
128 static bool compare_atomic;
129
130 static int out_spillage; // output spillage file.
131 static std::string spillage_outdir;
132
133 static void Init(const std::string &fn);
134 static void Print(const std::string &fn);
135private:
136
137 template <class T>
138 static void read_value(std::ifstream &ifs, T &var)
139 {
140 ifs >> var;
141 ifs.ignore(75, '\n');
142 return;
143 }
144
145 static void Read(const std::string &fn);
146 static void Default();
147 static void Check(void);
148#ifdef __MPI
149 static void Bcast();
150#endif
151};
152
153#endif
Definition winput.h:20
winput()
Definition winput.cpp:71
static bool b_plot_build
Definition winput.h:70
static int mesh
Definition winput.h:123
static int atom_start
Definition winput.h:111
static bool before_iter
Definition winput.h:36
static bool cal_bands
Definition winput.h:120
static void Check(void)
Definition winput.cpp:554
static int imp_pao
Definition winput.h:67
static bool b_fftwan
Definition winput.h:69
static std::string target
Definition winput.h:35
static void Bcast()
Definition winput.cpp:695
static std::string charge_type
Definition winput.h:119
static void Print(const std::string &fn)
Definition winput.cpp:596
static bool sph_type
Definition winput.h:96
static bool cal_bands2
Definition winput.h:121
static double fermi_t
Definition winput.h:92
static bool no_center
Definition winput.h:126
static int n_unitcell
Definition winput.h:116
static bool after_iter
Definition winput.h:37
static int sph_proj
Definition winput.h:95
static bool b_plot_atomic
Definition winput.h:71
~winput()
Definition winput.cpp:75
static double range1
Definition winput.h:107
static double px
Definition winput.h:85
static double trunc_ao
Definition winput.h:49
static std::string spillage_outdir
Definition winput.h:131
static int bloch_begin
Definition winput.h:89
static bool recon_wanq
Definition winput.h:101
static double trunc_wlmr
Definition winput.h:50
static bool out_all
Definition winput.h:117
static int out_chg
Definition winput.h:118
static bool cal_dos
Definition winput.h:122
static int bloch_end
Definition winput.h:90
static double dr
Definition winput.h:124
static bool begin_stop_flag
Definition winput.h:38
static int sum_lm
Definition winput.h:127
static int L_start
Definition winput.h:109
static double mix_wf
Definition winput.h:100
static bool b_near_atom
Definition winput.h:105
static bool plot_wanq
Definition winput.h:114
static bool end_flag
Definition winput.h:39
static int atom_end
Definition winput.h:112
static std::string wf_type
Definition winput.h:65
static std::string plot_option
Definition winput.h:115
static double trunc_wan
Definition winput.h:51
static std::string trial
Definition winput.h:82
static double rcut
Definition winput.h:48
static void Read(const std::string &fn)
Definition winput.cpp:95
static bool build_wf
Definition winput.h:66
static bool b_recon
Definition winput.h:98
static void Default()
Definition winput.cpp:447
static double range0
Definition winput.h:106
static bool speed_mode
Definition winput.h:103
static int L_end
Definition winput.h:110
static std::string wlmr_dir
Definition winput.h:64
static double g1
Definition winput.h:86
static double bp
Definition winput.h:84
static double bs
Definition winput.h:83
static int out_spillage
Definition winput.h:130
static double clm2_lowest
Definition winput.h:93
static double g2
Definition winput.h:87
static void read_value(std::ifstream &ifs, T &var)
Definition winput.h:138
static bool b_mix_wf
Definition winput.h:99
static bool compare_atomic
Definition winput.h:128
static void Init(const std::string &fn)
Definition winput.cpp:79
static bool b_out_wf
Definition winput.h:68
#define T
Definition exp.cpp:237