Skip to content

Commit

Permalink
Add missing init for errors in VASP UnconvergedErrorHandler (#315)
Browse files Browse the repository at this point in the history
* Add missing errors init for UnconvergedErrorHandler

* Add missing init for errors in vasp.handlers.UnconvergedErrorHandler, and test

* Unzip vasprun - pytest seems to unzip files at startup
  • Loading branch information
esoteric-ephemera authored Mar 8, 2024
1 parent cc24f02 commit 9b67478
Show file tree
Hide file tree
Showing 3 changed files with 36,424 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custodian/vasp/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,7 @@ def correct(self):
v = load_vasprun(os.path.join(os.getcwd(), self.output_filename))
algo = v.incar.get("ALGO", "Normal").lower()
actions = []
errors = ["Unconverged"]
if not v.converged_electronic:
# NOTE: This is the amin error handler
# Sometimes an AMIN warning can appear with large unit cell dimensions, so we'll address it now
Expand Down Expand Up @@ -1127,8 +1128,7 @@ def correct(self):

# Check for PSMAXN errors - see extensive discussion here
# https://github.com/materialsproject/custodian/issues/133
# Only correct PSMAXN when run couldn't converge for any reason
errors = ["Unconverged"]
# Only correct PSMAXN when run didn't converge for fixable reasons
if os.path.isfile("OUTCAR"):
with open("OUTCAR") as file:
outcar_as_str = file.read()
Expand Down
Loading

0 comments on commit 9b67478

Please sign in to comment.