From bf157dbe96a46efb50bb1cd8dca4e477f888a10b Mon Sep 17 00:00:00 2001 From: Fabian Zills <46721498+PythonFZ@users.noreply.github.com> Date: Fri, 13 Dec 2024 12:41:38 +0100 Subject: [PATCH] recreate calc (#378) * Update cp2k.py * remove restart files if not converged --------- Co-authored-by: PythonFZ --- ipsuite/calculators/cp2k.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ipsuite/calculators/cp2k.py b/ipsuite/calculators/cp2k.py index 1f4c6983..7bfcb1a6 100644 --- a/ipsuite/calculators/cp2k.py +++ b/ipsuite/calculators/cp2k.py @@ -105,6 +105,10 @@ def run(self): raise err log.warning(f"Skipping calculation: {err}") self.failed_configs["skipped"].append(idx) + # remove restart files after non-converged runs + for file in self.cp2k_directory.glob("*wfn"): + file.unlink() + calc = self.get_calculator() continue for file in self.cp2k_directory.glob("cp2k-RESTART.wfn.*"):