Skip to content

Commit 94368f8

Browse files
authored
test: update input parameters in abacus.scf UT (#335)
1 parent 742c2ad commit 94368f8

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

dpdata/abacus/scf.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def get_block (lines, keyword, skip = 0, nlines = None):
3333
def get_geometry_in(fname, inlines):
3434
geometry_path_in = os.path.join(fname, "STRU")
3535
for line in inlines:
36-
if "atom_file" in line and "atom_file"==line.split()[0]:
36+
if "stru_file" in line and "stru_file"==line.split()[0]:
3737
atom_file = line.split()[1]
3838
geometry_path_in = os.path.join(fname, atom_file)
3939
break
@@ -148,7 +148,6 @@ def get_frame (fname):
148148

149149
geometry_path_in = get_geometry_in(fname, inlines)
150150
path_out = get_path_out(fname, inlines)
151-
152151
with open(geometry_path_in, 'r') as fp:
153152
geometry_inlines = fp.read().split('\n')
154153
with open(path_out, 'r') as fp:
@@ -280,4 +279,4 @@ def make_unlabeled_stru(data, frame_idx, pp_file=None, numerical_orbital=None, n
280279

281280
#if __name__ == "__main__":
282281
# path = "/home/lrx/work/12_ABACUS_dpgen_interface/dpdata/dpdata/tests/abacus.scf"
283-
# data = get_frame(path)
282+
# data = get_frame(path)

tests/abacus.scf/INPUT

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
INPUT_PARAMETERS
22
#Parameters (General)
3-
suffix ch4
4-
atom_file STRU.ch4 #the filename of file containing atom positions
5-
kpoint_file KPT.ch4 #the name of file containing k points
6-
pseudo_dir ./
7-
ntype 2
8-
nbands 8
3+
suffix ch4
4+
stru_file STRU.ch4 #the filename of file containing atom positions
5+
kpoint_file KPT.ch4 #the name of file containing k points
6+
pseudo_dir ./
7+
ntype 2
8+
nbands 8
99
#Parameters (Accuracy)
10-
ecutwfc 100
11-
symmetry 1
12-
niter 50
13-
smearing gauss #type of smearing: gauss; fd; fixed; mp; mp2; mv
14-
sigma 0.01
15-
mixing_beta 0.5
16-
mixing_type plain
17-
force 1
18-
stress 1
10+
ecutwfc 100
11+
symmetry 1
12+
scf_nmax 50
13+
smearing_method gauss #type of smearing: gauss; fd; fixed; mp; mp2; mv
14+
smearing_sigma 0.01
15+
mixing_type plain
16+
mixing_beta 0.5
17+
cal_force 1
18+
cal_stress 1

0 commit comments

Comments
 (0)