Skip to content

Commit

Permalink
recreate calc (#378)
Browse files Browse the repository at this point in the history
* Update cp2k.py

* remove restart files if not converged

---------

Co-authored-by: PythonFZ <[email protected]>
  • Loading branch information
PythonFZ and PythonFZ authored Dec 13, 2024
1 parent b73dd4c commit bf157db
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ipsuite/calculators/cp2k.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.*"):
Expand Down

0 comments on commit bf157db

Please sign in to comment.