Skip to content

Commit 16282f7

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

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

t3/main.py

Lines changed: 4 additions & 2 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'),
@@ -730,9 +731,10 @@ def determine_species_and_reactions_to_calculate(self) -> bool:
730731

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

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

0 commit comments

Comments
 (0)