Skip to content

Commit

Permalink
Now looking in the workdir instead of rundir to remove files. Also re…
Browse files Browse the repository at this point in the history
…moving some more files now related to failed jobs
  • Loading branch information
YHordijk committed Jun 3, 2024
1 parent 722e606 commit b28b937
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 b28b937

Please sign in to comment.