Skip to content

Commit ef4d18a

Browse files
committed
Added species_has_sp_and_freq() into Scheduler
1 parent e123a3e commit ef4d18a

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

arc/scheduler.py

+16-2
Original file line numberDiff line numberDiff line change
@@ -2431,8 +2431,7 @@ def check_rxn_e0_by_spc(self, label: str):
24312431
for rxn in self.rxn_list:
24322432
labels = rxn.reactants + rxn.products + [rxn.ts_label]
24332433
if label in labels and rxn.ts_species.ts_checks['E0'] is None \
2434-
and all([(species_has_sp(output_dict, self.species_dict[spc_label].yml_path)
2435-
and species_has_freq(output_dict, self.species_dict[spc_label].yml_path))
2434+
and all([species_has_sp_and_freq(output_dict, self.species_dict[spc_label].yml_path)
24362435
for spc_label, output_dict in self.output.items() if spc_label in labels]):
24372436
check_ts(reaction=rxn,
24382437
checks=['energy'],
@@ -3672,3 +3671,18 @@ def species_has_sp(species_output_dict: dict,
36723671
return True
36733672
return False
36743673

3674+
3675+
def species_has_sp_and_freq(species_output_dict: dict,
3676+
yml_path: Optional[str] = None,
3677+
) -> bool:
3678+
"""
3679+
Checks whether a species has a valid converged single-point energy and valid converged frequencies.
3680+
3681+
Args:
3682+
species_output_dict (dict): The species output dict (i.e., Scheduler.output[label]).
3683+
yml_path (str): THe species Arkane YAML file path.
3684+
3685+
Returns: bool
3686+
Whether a species has a valid converged single-point energy and frequencies.
3687+
"""
3688+
return species_has_sp(species_output_dict, yml_path) and species_has_freq(species_output_dict, yml_path)

0 commit comments

Comments
 (0)