Skip to content

Commit

Permalink
Added only_process to main and Scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
alongd committed May 10, 2023
1 parent a56b0df commit 6349438
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions arc/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ class ARC(object):
output (dict, optional): Output dictionary with status and final QM file paths for all species.
Only used for restarting.
running_jobs (dict, optional): A dictionary of jobs submitted in a precious ARC instance, used for restarting.
only_process (bool, optional): Whether to only run statmech and process runs from a (restart) input file.
Attributes:
project (str): The project's name. Used for naming the working directory.
Expand Down Expand Up @@ -218,6 +219,7 @@ class ARC(object):
three_params (bool): Compute rate coefficients using the modified three-parameter Arrhenius equation
format (``True``) or classical two-parameter Arrhenius equation format (``False``).
trsh_ess_jobs (bool): Whether to attempt troubleshooting failed ESS jobs. Default is ``True``.
only_process (bool): Whether to only run statmech and process runs from a (restart) input file.
"""

def __init__(self,
Expand Down Expand Up @@ -246,6 +248,7 @@ def __init__(self,
level_of_theory: str = '',
max_job_time: Optional[float] = None,
n_confs: int = 10,
only_process: bool = False,
opt_level: Optional[Union[str, dict, Level]] = None,
orbitals_level: Optional[Union[str, dict, Level]] = None,
output: Optional[dict] = None,
Expand Down Expand Up @@ -315,6 +318,7 @@ def __init__(self,
self.bac_type = bac_type
self.arkane_level_of_theory = Level(repr=arkane_level_of_theory) if arkane_level_of_theory is not None else None
self.freq_scale_factor = freq_scale_factor
self.only_process = only_process

# attributes related to level of theory specifications
self.level_of_theory = level_of_theory
Expand Down Expand Up @@ -465,6 +469,8 @@ def as_dict(self) -> dict:
restart_dict['conformer_level'] = self.conformer_level.as_dict()
if self.dont_gen_confs:
restart_dict['dont_gen_confs'] = self.dont_gen_confs
if self.only_process:
restart_dict['only_process'] = self.only_process
restart_dict['e_confs'] = self.e_confs
restart_dict['ess_settings'] = self.ess_settings
if self.freq_level is not None:
Expand Down Expand Up @@ -581,6 +587,7 @@ def execute(self) -> dict:
dont_gen_confs=self.dont_gen_confs,
trsh_ess_jobs=self.trsh_ess_jobs,
fine_only=self.fine_only,
only_process=self.only_process,
)

save_yaml_file(path=os.path.join(self.project_directory, 'output', 'status.yml'), content=self.scheduler.output)
Expand Down
4 changes: 3 additions & 1 deletion arc/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ class Scheduler(object):
kinetics_adapter (str, optional): The statmech software to use for kinetic rate coefficient calculations.
freq_scale_factor (float, optional): The harmonic frequencies scaling factor.
trsh_ess_jobs (bool, optional): Whether to attempt troubleshooting failed ESS jobs. Default is ``True``.
only_process (bool, optional): Whether to only run statmech and process runs from a (restart) input file.
Attributes:
project (str): The project's name. Used for naming the working directory.
Expand Down Expand Up @@ -247,6 +248,7 @@ def __init__(self,
trsh_ess_jobs: Optional[bool] = True,
kinetics_adapter: str = 'arkane',
freq_scale_factor: float = 1.0,
only_process: bool = False,
) -> None:

self.project = project
Expand Down Expand Up @@ -482,7 +484,7 @@ def __init__(self,
species.ts_conf_spawned = True
self.save_restart = True
self.timer = True
if not self.testing:
if not self.testing and not only_process:
self.schedule_jobs()

def schedule_jobs(self):
Expand Down

0 comments on commit 6349438

Please sign in to comment.