Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions arc/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
format (``True``, default) or classical two-parameter Arrhenius equation format
(``False``).
trsh_ess_jobs (bool, optional): Whether to attempt troubleshooting failed ESS jobs. Default is ``True``.
trsh_rotors (bool, optional): Whether to attempt troubleshooting failed rotor scan jobs. Default is ``True``.
output (dict, optional): Output dictionary with status and final QM file paths for all species.
Only used for restarting.
output_multi_spc (dict, optional): Output dictionary with status and final QM file paths for the multi species.
Expand Down Expand Up @@ -227,6 +228,7 @@
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``.
trsh_rotors (bool): Whether to attempt troubleshooting failed rotor scan jobs. Default is ``True``.
ts_adapters (list): Entries represent different TS adapters.
report_e_elect (bool): Whether to report electronic energy.
skip_nmd (bool): Whether to skip normal mode displacement check.
Expand Down Expand Up @@ -279,6 +281,7 @@
thermo_adapter: str = 'Arkane',
three_params: bool = True,
trsh_ess_jobs: bool = True,
trsh_rotors: bool = True,
ts_adapters: List[str] = None,
ts_guess_level: Optional[Union[str, dict, Level]] = None,
verbose=logging.INFO,
Expand Down Expand Up @@ -317,6 +320,7 @@
self.compute_rates = compute_rates
self.three_params = three_params
self.trsh_ess_jobs = trsh_ess_jobs
self.trsh_rotors = trsh_rotors
self.compute_transport = compute_transport
self.thermo_adapter = StatmechEnum(thermo_adapter.lower()).value
self.kinetics_adapter = StatmechEnum(kinetics_adapter.lower()).value
Expand Down Expand Up @@ -440,6 +444,10 @@
logger.info('\n')
logger.warning('Not troubleshooting ESS jobs!')
logger.info('\n')
elif not self.trsh_rotors:
logger.info('\n')

Check warning on line 448 in arc/main.py

View check run for this annotation

Codecov / codecov/patch

arc/main.py#L448

Added line #L448 was not covered by tests
logger.warning('Not troubleshooting rotor scan jobs!')
logger.info('\n')

Check warning on line 450 in arc/main.py

View check run for this annotation

Codecov / codecov/patch

arc/main.py#L450

Added line #L450 was not covered by tests

self.scheduler = None
self.restart_dict = self.as_dict()
Expand Down Expand Up @@ -544,6 +552,8 @@
restart_dict['three_params'] = self.three_params
if not self.trsh_ess_jobs:
restart_dict['trsh_ess_jobs'] = self.trsh_ess_jobs
if not self.trsh_rotors:
restart_dict['trsh_rotors'] = self.trsh_rotors

Check warning on line 556 in arc/main.py

View check run for this annotation

Codecov / codecov/patch

arc/main.py#L556

Added line #L556 was not covered by tests
if self.ts_guess_level is not None and str(self.ts_guess_level).split()[0] != default_levels_of_theory['ts_guesses']:
restart_dict['ts_guess_level'] = self.ts_guess_level.as_dict() \
if not isinstance(self.ts_guess_level, (dict, str)) else self.ts_guess_level
Expand Down Expand Up @@ -617,6 +627,7 @@
e_confs=self.e_confs,
dont_gen_confs=self.dont_gen_confs,
trsh_ess_jobs=self.trsh_ess_jobs,
trsh_rotors=self.trsh_rotors,
fine_only=self.fine_only,
ts_adapters=self.ts_adapters,
report_e_elect=self.report_e_elect,
Expand Down
12 changes: 8 additions & 4 deletions arc/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@
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``.
trsh_rotors (bool, optional): Whether to attempt troubleshooting failed rotor scan jobs. Default is ``True``.
ts_adapters (list, optional): Entries represent different TS adapters.
report_e_elect (bool, optional): Whether to report electronic energy. Default is ``False``.
skip_nmd (bool, optional): Whether to skip normal mode displacement check. Default is ``False``.
Expand Down Expand Up @@ -219,6 +220,7 @@
kinetics_adapter (str): The statmech software to use for kinetic rate coefficient calculations.
freq_scale_factor (float): The harmonic frequencies scaling factor.
trsh_ess_jobs (bool): Whether to attempt troubleshooting failed ESS jobs. Default is ``True``.
trsh_rotors (bool): Whether to attempt troubleshooting failed rotor scan jobs. Default is ``True``.
ts_adapters (list): Entries represent different TS adapters.
report_e_elect (bool): Whether to report electronic energy.
skip_nmd (bool): Whether to skip normal mode displacement check.
Expand Down Expand Up @@ -253,6 +255,7 @@
e_confs: Optional[float] = 5,
fine_only: Optional[bool] = False,
trsh_ess_jobs: Optional[bool] = True,
trsh_rotors: Optional[bool] = True,
kinetics_adapter: str = 'arkane',
freq_scale_factor: float = 1.0,
ts_adapters: List[str] = None,
Expand Down Expand Up @@ -284,6 +287,7 @@
self.job_types = job_types if job_types is not None else default_job_types
self.fine_only = fine_only
self.trsh_ess_jobs = trsh_ess_jobs
self.trsh_rotors = trsh_rotors
self.kinetics_adapter = kinetics_adapter
self.freq_scale_factor = freq_scale_factor
self.ts_adapters = ts_adapters if ts_adapters is not None else default_ts_adapters
Expand Down Expand Up @@ -2888,7 +2892,7 @@

if len(list(actions.keys())) \
and 'pivTS' not in self.species_dict[label].rotors_dict[job.rotor_index]['invalidation_reason'] \
and self.trsh_ess_jobs:
and self.trsh_ess_jobs and self.trsh_rotors:
# The rotor scan is problematic (and does not block a TS reaction zone), troubleshooting is required.
logger.info(f'Trying to troubleshoot rotor '
f'{self.species_dict[label].rotors_dict[job.rotor_index]["pivots"]} '
Expand Down Expand Up @@ -3219,9 +3223,9 @@
- ``True`` if the troubleshooting is valid.
- The actions are applied in the troubleshooting.
"""
if not self.trsh_ess_jobs:
if not self.trsh_ess_jobs or not self.trsh_rotors:

Check warning on line 3226 in arc/scheduler.py

View check run for this annotation

Codecov / codecov/patch

arc/scheduler.py#L3226

Added line #L3226 was not covered by tests
logger.warning(f'Not troubleshooting failed scan job {job.job_name}. To enable troubleshooting, '
f'set the "trsh_ess_jobs" to "True".')
f'set the "trsh_ess_jobs" and the "trsh_rotors" arguments to "True".')
return False, dict()

label = job.species_label
Expand Down Expand Up @@ -3413,7 +3417,7 @@
level_of_theory (Level, dict, str): The level of theory to use.
conformer (int, optional): The conformer index.
"""
if not self.trsh_ess_jobs:
if not self.trsh_ess_jobs or not self.trsh_rotors and job.job_type == 'scan':

Check warning on line 3420 in arc/scheduler.py

View check run for this annotation

Codecov / codecov/patch

arc/scheduler.py#L3420

Added line #L3420 was not covered by tests
logger.warning(f'Not troubleshooting failed {label} job {job.job_name}. '
f'To enable troubleshooting, set the "trsh_ess_jobs" argument to "True".')
return None
Expand Down
Loading