Skip to content

Commit

Permalink
Save SA yaml path per iterations
Browse files Browse the repository at this point in the history
  • Loading branch information
alongd committed Sep 11, 2023
1 parent 653a26b commit 16282f7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions t3/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ def set_paths(self,
'chem annotated': os.path.join(iteration_path, 'RMG', 'chemkin', 'chem_annotated.inp'),
'species dict': os.path.join(iteration_path, 'RMG', 'chemkin', 'species_dictionary.txt'),
'SA': os.path.join(iteration_path, 'SA'),
'SA yaml': os.path.join(iteration_path, 'SA', 'SA.yml'),
'SA solver': os.path.join(iteration_path, 'SA', 'solver'),
'SA input': os.path.join(iteration_path, 'SA', 'input.py'),
'PDep SA': os.path.join(iteration_path, 'PDep_SA'),
Expand Down Expand Up @@ -730,9 +731,10 @@ def determine_species_and_reactions_to_calculate(self) -> bool:

self.logger.info(f'Additional calculations required: {additional_calcs_required}\n')
if len(species_keys):
self.logger.log_species_to_calculate(species_keys, self.species)
spc_yml = self.logger.log_species_to_calculate(species_keys, self.species)
if len(reaction_keys):
self.logger.log_reactions_to_calculate(reaction_keys, self.reactions)
rxn_yml = self.logger.log_reactions_to_calculate(reaction_keys, self.reactions)
save_yaml_file(path=self.paths['SA yaml'], content={'Species': spc_yml, 'Reactions': rxn_yml})

Check failure

Code scanning / CodeQL

Potentially uninitialized local variable Error

Local variable 'spc_yml' may be used before it is initialized.

Check failure

Code scanning / CodeQL

Potentially uninitialized local variable Error

Local variable 'rxn_yml' may be used before it is initialized.
return additional_calcs_required

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

0 comments on commit 16282f7

Please sign in to comment.