diff --git a/dpdata/abacus/scf.py b/dpdata/abacus/scf.py index ee5208820..4aedc8ab4 100644 --- a/dpdata/abacus/scf.py +++ b/dpdata/abacus/scf.py @@ -33,7 +33,7 @@ def get_block (lines, keyword, skip = 0, nlines = None): def get_geometry_in(fname, inlines): geometry_path_in = os.path.join(fname, "STRU") for line in inlines: - if "atom_file" in line and "atom_file"==line.split()[0]: + if "stru_file" in line and "stru_file"==line.split()[0]: atom_file = line.split()[1] geometry_path_in = os.path.join(fname, atom_file) break @@ -148,7 +148,6 @@ def get_frame (fname): geometry_path_in = get_geometry_in(fname, inlines) path_out = get_path_out(fname, inlines) - with open(geometry_path_in, 'r') as fp: geometry_inlines = fp.read().split('\n') 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 #if __name__ == "__main__": # path = "/home/lrx/work/12_ABACUS_dpgen_interface/dpdata/dpdata/tests/abacus.scf" -# data = get_frame(path) \ No newline at end of file +# data = get_frame(path) diff --git a/tests/abacus.scf/INPUT b/tests/abacus.scf/INPUT index c353aef1f..0281c22df 100644 --- a/tests/abacus.scf/INPUT +++ b/tests/abacus.scf/INPUT @@ -1,18 +1,18 @@ INPUT_PARAMETERS #Parameters (General) -suffix ch4 -atom_file STRU.ch4 #the filename of file containing atom positions -kpoint_file KPT.ch4 #the name of file containing k points -pseudo_dir ./ -ntype 2 -nbands 8 +suffix ch4 +stru_file STRU.ch4 #the filename of file containing atom positions +kpoint_file KPT.ch4 #the name of file containing k points +pseudo_dir ./ +ntype 2 +nbands 8 #Parameters (Accuracy) -ecutwfc 100 -symmetry 1 -niter 50 -smearing gauss #type of smearing: gauss; fd; fixed; mp; mp2; mv -sigma 0.01 -mixing_beta 0.5 -mixing_type plain -force 1 -stress 1 +ecutwfc 100 +symmetry 1 +scf_nmax 50 +smearing_method gauss #type of smearing: gauss; fd; fixed; mp; mp2; mv +smearing_sigma 0.01 +mixing_type plain +mixing_beta 0.5 +cal_force 1 +cal_stress 1