Skip to content

Commit 4659206

Browse files
committed
Save SA yaml path per iterations
1 parent 653a26b commit 4659206

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

t3/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ def set_paths(self,
370370
'chem annotated': os.path.join(iteration_path, 'RMG', 'chemkin', 'chem_annotated.inp'),
371371
'species dict': os.path.join(iteration_path, 'RMG', 'chemkin', 'species_dictionary.txt'),
372372
'SA': os.path.join(iteration_path, 'SA'),
373+
'SA yaml': os.path.join(iteration_path, 'SA', 'SA.yml'),
373374
'SA solver': os.path.join(iteration_path, 'SA', 'solver'),
374375
'SA input': os.path.join(iteration_path, 'SA', 'input.py'),
375376
'PDep SA': os.path.join(iteration_path, 'PDep_SA'),
@@ -729,10 +730,9 @@ def determine_species_and_reactions_to_calculate(self) -> bool:
729730
or any(spc['converged'] is None for spc in self.species.values())
730731

731732
self.logger.info(f'Additional calculations required: {additional_calcs_required}\n')
732-
if len(species_keys):
733-
self.logger.log_species_to_calculate(species_keys, self.species)
734-
if len(reaction_keys):
735-
self.logger.log_reactions_to_calculate(reaction_keys, self.reactions)
733+
spc_yml = self.logger.log_species_to_calculate(species_keys, self.species) if len(species_keys) else dict()
734+
rxn_yml = self.logger.log_reactions_to_calculate(reaction_keys, self.reactions) if len(reaction_keys) else dict()
735+
save_yaml_file(path=self.paths['SA yaml'], content={'Species': spc_yml, 'Reactions': rxn_yml})
736736
return additional_calcs_required
737737

738738
def determine_species_based_on_sa(self) -> List[int]:

0 commit comments

Comments
 (0)