Hi,
I noticed that the elf_kpar error (which occurs if an LELF = True
and KPAR > 1
, and thus VASP wants to create electron localization functions and write them to ELFCAR, which is not supported for KPAR > 1
) is corrected only by setting KPAR = 1
.
However, this error results at the end of the VASP run, because only then ELFCAR is created. If the run is a relaxation, there is potentially a lot of CPU-time lost needlessly because the relaxation with KPAR = 1
will start again from the original POSCAR.
I would modify the code in custodian.vasp.handlers.py
from
if "elf_kpar" in self.errors:
actions.append({"dict": "INCAR", "action": {"_set": {"KPAR": 1}}})
to
if "elf_kpar" in self.errors:
actions.append({"dict": "INCAR", "action": {"_set": {"KPAR": 1}}})
actions.append(
{"file": "CONTCAR", "action": {"_file_copy": {"dest": "POSCAR"}}}
)
In my use case, this props up when I switch from PBE calculations to SCAN, because I use the add_modify_incar
powerup from atomate
on all my workflows to set KPAR
and NCORE
automatically depending on the fireworker, and MPScanRelaxSet
has LELF = True by default. (For now I have fixed this by simply setting LELF = False
‘by hand’ in the MPScanRelaxSet, since I do not need the ELFCAR anyhow.)
I could create a pull request if wanted, but my old one should probably be finished first…