Skip to content

Commit 118c699

Browse files
committed
Added only_process to main and Scheduler
1 parent 552bcb3 commit 118c699

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

arc/main.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ class ARC(object):
146146
ts_adapters (list, optional): Entries represent different TS adapters.
147147
report_e_elect (bool, optional): Whether to report electronic energy. Default is ``False``.
148148
skip_nmd (bool, optional): Whether to skip normal mode displacement check. Default is ``False``.
149+
only_process (bool, optional): Whether to only run statmech and process runs from a (restart) input file.
149150
150151
Attributes:
151152
project (str): The project's name. Used for naming the working directory.
@@ -215,7 +216,7 @@ class ARC(object):
215216
ts_adapters (list): Entries represent different TS adapters.
216217
report_e_elect (bool): Whether to report electronic energy.
217218
skip_nmd (bool): Whether to skip normal mode displacement check.
218-
219+
only_process (bool): Whether to only run statmech and process runs from a (restart) input file.
219220
"""
220221

221222
def __init__(self,
@@ -246,6 +247,7 @@ def __init__(self,
246247
level_of_theory: str = '',
247248
max_job_time: Optional[float] = None,
248249
n_confs: int = 10,
250+
only_process: bool = False,
249251
opt_level: Optional[Union[str, dict, Level]] = None,
250252
orbitals_level: Optional[Union[str, dict, Level]] = None,
251253
output: Optional[dict] = None,
@@ -329,6 +331,7 @@ def __init__(self,
329331
for ts_adapter in self.ts_adapters or list():
330332
if ts_adapter.lower() not in _registered_job_adapters.keys():
331333
raise InputError(f'Unknown TS adapter: "{ts_adapter}"')
334+
self.only_process = only_process
332335

333336
# attributes related to level of theory specifications
334337
self.level_of_theory = level_of_theory
@@ -464,6 +467,8 @@ def as_dict(self) -> dict:
464467
restart_dict['ts_adapters'] = self.ts_adapters
465468
if self.e_confs != 5.0:
466469
restart_dict['e_confs'] = self.e_confs
470+
if self.only_process:
471+
restart_dict['only_process'] = self.only_process
467472
restart_dict['ess_settings'] = self.ess_settings
468473
if self.freq_level is not None and str(self.freq_level).split()[0] != default_levels_of_theory['freq']:
469474
restart_dict['freq_level'] = self.freq_level.as_dict() \
@@ -603,6 +608,7 @@ def execute(self) -> dict:
603608
report_e_elect=self.report_e_elect,
604609
skip_nmd=self.skip_nmd,
605610
output=self.output,
611+
only_process=self.only_process,
606612
)
607613

608614
self.output = self.scheduler.output

arc/scheduler.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ class Scheduler(object):
168168
report_e_elect (bool, optional): Whether to report electronic energy. Default is ``False``.
169169
skip_nmd (bool, optional): Whether to skip normal mode displacement check. Default is ``False``.
170170
output (dict, optional): Output dictionary with status per job type and final QM file paths for all species.
171+
only_process (bool, optional): Whether to only run statmech and process runs from a (restart) input file.
171172
172173
Attributes:
173174
project (str): The project's name. Used for naming the working directory.
@@ -263,6 +264,7 @@ def __init__(self,
263264
report_e_elect: Optional[bool] = False,
264265
skip_nmd: Optional[bool] = False,
265266
output: Optional[dict] = None,
267+
only_process: bool = False,
266268
) -> None:
267269

268270
self.project = project
@@ -429,7 +431,10 @@ def __init__(self,
429431
self.running_jobs[species.label if not species.multi_species else species.multi_species] = list()
430432
if self.output[species.label]['convergence']:
431433
continue
432-
if species.is_monoatomic():
434+
if only_process:
435+
pass
436+
elif species.is_monoatomic():
437+
self.running_jobs[species.label] = list() # initialize before running the first job
433438
if not self.output[species.label]['job_types']['sp'] \
434439
and not self.output[species.label]['job_types']['composite'] \
435440
and 'sp' not in list(self.job_dict[species.label].keys()) \
@@ -507,7 +512,7 @@ def __init__(self,
507512
species.ts_conf_spawned = True
508513
self.save_restart = True
509514
self.timer = True
510-
if not self.testing:
515+
if not self.testing and not only_process:
511516
self.schedule_jobs()
512517

513518
def schedule_jobs(self):

0 commit comments

Comments
 (0)