Skip to content

Commit

Permalink
vasp.handlers: alternative BRMIX error strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Feb 1, 2016
1 parent 4f98518 commit 0ad6486
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions custodian/vasp/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,31 @@ def correct(self):
"action": {"_set": {"SYMPREC": 1e-8}}})

if "brmix" in self.errors:
actions.append({"dict": "INCAR",
"action": {"_set": {"ISYM": 0}}})
#actions.append({"dict": "INCAR",
# "action": {"_set": {"ISYM": 0}}})

if vi["KPOINTS"].style == Kpoints.supported_modes.Monkhorst:
actions.append({"dict": "KPOINTS",
"action": {"_set": {"generation_style": "Gamma"}}})

if vi["KPOINTS"].num_kpts < 1:
all_kpts_even = all([
bool(n % 2 == 0) for n in vi["KPOINTS"].kpts[0]
])
print("all_kpts_even = {}".format(all_kpts_even))
if all_kpts_even:
new_kpts = (tuple(n+1 for n in vi["KPOINTS"].kpts[0]),)
print("new_kpts = {}".format(new_kpts))
actions.append({"dict": "KPOINTS", "action": {"_set": {
"kpoints": new_kpts
}}})

# Based on VASP forum's recommendation, you should delete the
# CHGCAR and WAVECAR when dealing with this error.
actions.append({"file": "CHGCAR",
"action": {"_file_delete": {'mode': "actual"}}})
actions.append({"file": "WAVECAR",
"action": {"_file_delete": {'mode': "actual"}}})
#actions.append({"file": "CHGCAR",
# "action": {"_file_delete": {'mode': "actual"}}})
#actions.append({"file": "WAVECAR",
# "action": {"_file_delete": {'mode': "actual"}}})

if "zpotrf" in self.errors:
# Usually caused by short bond distances. If on the first step,
Expand Down

0 comments on commit 0ad6486

Please sign in to comment.