Skip to content

Commit

Permalink
Merge pull request #247 from TheoChem-VU/239-error-when-rerunning-fai…
Browse files Browse the repository at this point in the history
…led-calculation

Fixed error related to lingering KFFiles when rerunning jobs
  • Loading branch information
YHordijk authored May 28, 2024
2 parents 3152fda + 688310f commit b3fc0b3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/tcutility/job/ams.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@ def _setup_job(self):
'''
os.makedirs(self.rundir, exist_ok=True)

for file in os.listdir(self.rundir):
p = os.path.join(self.rundir, file)
if p.endswith('.rkf'):
os.remove(p)

if not self._molecule and not self._molecule_path and 'atoms' not in self.settings.input.ams.system:
log.error(f'You did not supply a molecule for this job. Call the {self.__class__.__name__}.molecule method to add one.')
return
Expand Down

0 comments on commit b3fc0b3

Please sign in to comment.