Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor(abacus): return None but not raise error when energy can not be found in scf #402

Merged
merged 6 commits into from
Dec 22, 2022
2 changes: 1 addition & 1 deletion dpdata/abacus/scf.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def get_energy(outlines):
Etot = float(line.split()[1]) # in eV
break
if not Etot:
raise RuntimeError("Final total energy cannot be found in output. Unknown problem.")
return Etot,False
for line in outlines:
if "convergence has NOT been achieved!" in line:
return Etot,False
Expand Down