ABACUS
develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
source
source_io
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
//==========================================================
19
class
winput
20
{
21
public
:
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);
135
private
:
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
winput
Definition
winput.h:20
winput::winput
winput()
Definition
winput.cpp:71
winput::b_plot_build
static bool b_plot_build
Definition
winput.h:70
winput::mesh
static int mesh
Definition
winput.h:123
winput::atom_start
static int atom_start
Definition
winput.h:111
winput::before_iter
static bool before_iter
Definition
winput.h:36
winput::cal_bands
static bool cal_bands
Definition
winput.h:120
winput::Check
static void Check(void)
Definition
winput.cpp:554
winput::imp_pao
static int imp_pao
Definition
winput.h:67
winput::b_fftwan
static bool b_fftwan
Definition
winput.h:69
winput::target
static std::string target
Definition
winput.h:35
winput::Bcast
static void Bcast()
Definition
winput.cpp:695
winput::charge_type
static std::string charge_type
Definition
winput.h:119
winput::Print
static void Print(const std::string &fn)
Definition
winput.cpp:596
winput::sph_type
static bool sph_type
Definition
winput.h:96
winput::cal_bands2
static bool cal_bands2
Definition
winput.h:121
winput::fermi_t
static double fermi_t
Definition
winput.h:92
winput::no_center
static bool no_center
Definition
winput.h:126
winput::n_unitcell
static int n_unitcell
Definition
winput.h:116
winput::after_iter
static bool after_iter
Definition
winput.h:37
winput::sph_proj
static int sph_proj
Definition
winput.h:95
winput::b_plot_atomic
static bool b_plot_atomic
Definition
winput.h:71
winput::~winput
~winput()
Definition
winput.cpp:75
winput::range1
static double range1
Definition
winput.h:107
winput::px
static double px
Definition
winput.h:85
winput::trunc_ao
static double trunc_ao
Definition
winput.h:49
winput::spillage_outdir
static std::string spillage_outdir
Definition
winput.h:131
winput::bloch_begin
static int bloch_begin
Definition
winput.h:89
winput::recon_wanq
static bool recon_wanq
Definition
winput.h:101
winput::trunc_wlmr
static double trunc_wlmr
Definition
winput.h:50
winput::out_all
static bool out_all
Definition
winput.h:117
winput::out_chg
static int out_chg
Definition
winput.h:118
winput::cal_dos
static bool cal_dos
Definition
winput.h:122
winput::bloch_end
static int bloch_end
Definition
winput.h:90
winput::dr
static double dr
Definition
winput.h:124
winput::begin_stop_flag
static bool begin_stop_flag
Definition
winput.h:38
winput::sum_lm
static int sum_lm
Definition
winput.h:127
winput::L_start
static int L_start
Definition
winput.h:109
winput::mix_wf
static double mix_wf
Definition
winput.h:100
winput::b_near_atom
static bool b_near_atom
Definition
winput.h:105
winput::plot_wanq
static bool plot_wanq
Definition
winput.h:114
winput::end_flag
static bool end_flag
Definition
winput.h:39
winput::atom_end
static int atom_end
Definition
winput.h:112
winput::wf_type
static std::string wf_type
Definition
winput.h:65
winput::plot_option
static std::string plot_option
Definition
winput.h:115
winput::trunc_wan
static double trunc_wan
Definition
winput.h:51
winput::trial
static std::string trial
Definition
winput.h:82
winput::rcut
static double rcut
Definition
winput.h:48
winput::Read
static void Read(const std::string &fn)
Definition
winput.cpp:95
winput::build_wf
static bool build_wf
Definition
winput.h:66
winput::b_recon
static bool b_recon
Definition
winput.h:98
winput::Default
static void Default()
Definition
winput.cpp:447
winput::range0
static double range0
Definition
winput.h:106
winput::speed_mode
static bool speed_mode
Definition
winput.h:103
winput::L_end
static int L_end
Definition
winput.h:110
winput::wlmr_dir
static std::string wlmr_dir
Definition
winput.h:64
winput::g1
static double g1
Definition
winput.h:86
winput::bp
static double bp
Definition
winput.h:84
winput::bs
static double bs
Definition
winput.h:83
winput::out_spillage
static int out_spillage
Definition
winput.h:130
winput::clm2_lowest
static double clm2_lowest
Definition
winput.h:93
winput::g2
static double g2
Definition
winput.h:87
winput::read_value
static void read_value(std::ifstream &ifs, T &var)
Definition
winput.h:138
winput::b_mix_wf
static bool b_mix_wf
Definition
winput.h:99
winput::compare_atomic
static bool compare_atomic
Definition
winput.h:128
winput::Init
static void Init(const std::string &fn)
Definition
winput.cpp:79
winput::b_out_wf
static bool b_out_wf
Definition
winput.h:68
T
#define T
Definition
exp.cpp:237
Generated by
1.9.8