-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_relax_Si_new.py
91 lines (65 loc) · 2.42 KB
/
run_relax_Si_new.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
import cPickle as pck
import numpy as np
from make_input.qe_input import makeQEInput_new
from make_input.qe_run import run_qe_hpc
from tqdm import tqdm
from make_input.SSSP_acc_PBE_info import wfccutoffs,rhocutoffs
calculation_type = '"vc-relax"'
sites_z = [14]
kpt = [2,2,2]
Nkpt = 3000
# rhocutoff ,wfccutoff = None,None
rhocutoff ,wfccutoff = [], []
for zatom in sites_z:
rhocutoff.append(rhocutoffs[zatom])
wfccutoff.append( wfccutoffs[zatom])
rhocutoff = np.max(rhocutoff)
wfccutoff = np.max(wfccutoff)
smearing = 1e-3
etot_conv_thr = 1e-4
forc_conv_thr = 1e-4
nstep = 100
scf_conv_thr = 1e-6
symprec = 1e-5
hpc = 'deneb'
node = 1
tasks = 16
cpus_per_tasks = 1
mem = 63000
time = '20:00:00'
debug = False
dry_run = False
if debug:
time = '00:30:00'
dataPath = '/scratch/musil/qmat/data/'
# dataPath = '/home/musil/git/run_qe/test_run/'
ppPath='"/home/musil/git/run_qe/pseudo/SSSP_acc_PBE/"'
fileNames = {}
structurePath = './structures/'
fileNames['crystals'] = structurePath + 'structures_141117.pck'
with open(fileNames['crystals'],'rb') as f:
crystals = pck.load(f)
dirNames = {it:dataPath + 'run_relax_Si_new/idx_{}'.format(it)
for it, _ in enumerate(crystals)}
# crystal = crystals[sg][it]
# dirName = dataPath + 'test_run/sg_{}-f_{}'.format(sg,it)
# print 'Calc in folder:'
# print dirName
print 'sending the calcs'
pbar = tqdm(total=len(dirNames),ascii=True)
for it,dirName in dirNames.iteritems():
crystal = crystals[it]
input_str = makeQEInput_new(crystal, sites_z, symprec=symprec,
rhocutoff=rhocutoff, wfccutoff=wfccutoff,
calculation_type=calculation_type, smearing=smearing,
pressure=0, press_conv_thr=0.5, cell_factor=2,
etot_conv_thr=etot_conv_thr, forc_conv_thr=forc_conv_thr, nstep=nstep,
scf_conv_thr=scf_conv_thr, print_forces=True, print_stress=True,
restart=False, collect_wf=True, force_ibrav0=False,
kpt=kpt, Nkpt=Nkpt, kpt_offset=[0, 0, 0],
ppPath=ppPath)
exitstatus = run_qe_hpc(input_str,dirName,verbose=False,hpc=hpc, node=node,
tasks_per_node=tasks,name='id_{}'.format(it),dry_run=dry_run,
cpus_per_tasks=cpus_per_tasks, mem=mem, time=time, debug=debug)
pbar.update()
pbar.close()