Skip to content
Open
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
2 changes: 1 addition & 1 deletion dpdata/abacus/md.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def get_energy(outlines, ndump, dump_freq):
energy = []
nenergy = 0
for line_idx, line in enumerate(outlines):
if "final etot is" in line:
if "final etot is" in line or "#TOTAL ENERGY#" in line:
if nenergy % dump_freq == 0:
energy.append(float(line.split()[-2]))
nenergy += 1
Expand Down
2 changes: 1 addition & 1 deletion dpdata/abacus/relax.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def get_coords_from_log(loglines, natoms):
list(map(lambda x: float(x) * a0, loglines[i + k].split()[0:3]))
)

elif line[1:14] == "final etot is":
elif line[1:14] == "final etot is" or "#TOTAL ENERGY#" in line:
# add the energy for previous structures whose SCF is not converged
while len(energy) < len(coords) - 1:
energy.append(np.nan)
Expand Down
Loading