-
Notifications
You must be signed in to change notification settings - Fork 0
/
parameters.py
95 lines (77 loc) · 2.32 KB
/
parameters.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/lrz/sys/tools/python/intelpython27_u4/intelpython2/bin/python
#solver = 'triqs'
solver = 'w2dyn'
solver = 1
N_iter = 1
max_time = 0
beta = 27.0
mu = 7.37546
U = 2.234
J = 0.203
N_atoms = 2
N_bands = 3
data_folder = "data_from_scratch"
### still assumed that all atoms have same size and no noninteracting orbitals
spin_names = ['up', 'dn']
orb_names = [0, 1, 2]
n_iw = 1000
### statistics
max_time = 0
n_warmup_cycles = 10000
n_cycles = 10000
length_cycle = 100
### the hamiltonian
hkfilename = "wannier90_hk_t2gbasis.dat_"
print 'parameters.py read!'
def check_sanity_of_parameters():
if not isinstance(N_iter, int):
print 'parameter N_iter must be integer!'
exit()
if not isinstance(max_time, int):
print 'parameter max_time must be integer!'
exit()
if not isinstance(N_atoms, int):
print 'parameter N_atoms must be integer!'
exit()
if not isinstance(N_bands, int):
print 'parameter N_bands must be integer!'
exit()
if not isinstance(beta, float):
print 'parameter beta must be integer!'
exit()
if not isinstance(mu, float):
print 'parameter mu must be integer!'
exit()
if not isinstance(U, float):
print 'parameter U must be integer!'
exit()
if not isinstance(J, float):
print 'parameter J must be integer!'
exit()
if not isinstance(solver, basestring):
print 'parameter solver must be string!'
exit()
if not isinstance(data_folder, basestring):
print 'parameter data_folder must be string!'
exit()
if not isinstance(hkfilename, basestring):
print 'parameter hkfilename must be string!'
exit()
if not len(orb_names) == N_bands:
print 'len(orb_names) must be N_bands!'
exit()
if not len(spin_names) == 2:
print 'system must have two spins!'
exit()
if not isinstance(max_time, int):
print 'parameter max_time must be integer!'
exit()
if not isinstance(n_warmup_cycles, int):
print 'parameter n_warmup_cycles must be integer!'
exit()
if not isinstance(n_cycles, int):
print 'parameter n_cycles must be integer!'
exit()
if not isinstance(length_cycle, int):
print 'parameter length_cycle must be integer!'
exit()