Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions dpdata/abacus/scf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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)
# data = get_frame(path)
30 changes: 15 additions & 15 deletions tests/abacus.scf/INPUT
Original file line number Diff line number Diff line change
@@ -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