Skip to content

Commit

Permalink
Merge pull request #253 from TheoChem-VU/252-issue-with-kffile-creati…
Browse files Browse the repository at this point in the history
…on-errors

Fixed an issue related to failed jobs and KFFile creation
  • Loading branch information
YHordijk authored Jun 3, 2024
2 parents 722e606 + b28b937 commit 3ad08ae
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/tcutility/job/ams.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,19 @@ 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)
# clean the workdir if it contains files
for file in os.listdir(self.workdir):
p = os.path.join(self.workdir, file)
if p.endswith('.rkf'):
os.remove(p)
if 'ams.kid' in p:
os.remove(p)
if p.startswith('t21.'):
os.remove(p)
if p.startswith('t12.'):
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.')
Expand Down

0 comments on commit 3ad08ae

Please sign in to comment.