From e65442871240a1c8f6760dc35bf637af7247e829 Mon Sep 17 00:00:00 2001 From: Calvin Date: Wed, 13 Dec 2023 09:28:43 +0200 Subject: [PATCH] Updated args['trsh'] if condition --- arc/scheduler.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/arc/scheduler.py b/arc/scheduler.py index 0a8af14861..7d36015879 100644 --- a/arc/scheduler.py +++ b/arc/scheduler.py @@ -784,7 +784,19 @@ def run_job(self, self.deduce_job_adapter(level=Level(repr=level_of_theory), job_type=job_type) args = {'keyword': {}, 'block': {}} if trsh: - args['trsh'] = {'trsh': trsh} + if isinstance(trsh, (str, list)): + args['trsh'] = {'trsh': trsh} + elif isinstance(trsh, dict) and 'trsh' in args: + for key, value in trsh.items(): + if key in args['trsh']: + if isinstance(args['trsh'][key], list) and isinstance(value, list): + args['trsh'][key].extend(value) + else: + args['trsh'][key] = value + else: + args['trsh'][key] = value + else: + args['trsh'] = trsh if shift: args['shift'] = shift if scan_trsh: