diff --git a/arc/scheduler.py b/arc/scheduler.py index 7c725ee357..c26623e6fa 100644 --- a/arc/scheduler.py +++ b/arc/scheduler.py @@ -23,6 +23,7 @@ get_logger, get_number_with_ordinal_indicator, is_angle_linear, + read_yaml_file, safe_copy_file, save_yaml_file, sort_two_lists_by_the_first, @@ -2556,6 +2557,9 @@ def post_sp_actions(self, if species_has_freq(self.output[label], self.species_dict[label].yml_path): self.check_rxn_e0_by_spc(label) + if self.report_e_elect: + self.save_e_elect(label) + # set *at the end* to differentiate between sp jobs when using complex solvation corrections self.output[label]['job_types']['sp'] = True @@ -3618,6 +3622,18 @@ def generate_final_ts_guess_report(self): if content: save_yaml_file(path=path, content=content) + def save_e_elect(self, label: str): + """ + Save the electronic energy of the corresponding species. + It will append if the file already exists. + """ + path = os.path.join(self.project_directory, 'output', 'e_elect_summary.yml') + content = dict() + if os.path.isfile(path): + content = read_yaml_file(path) + content[label] = self.species_dict[label].e_elect + save_yaml_file(path=path, content=content) + def species_has_freq(species_output_dict: dict, yml_path: Optional[str] = None,