Skip to content

Commit 2e8a46f

Browse files
committed
Write the thermo coverage dependent data to yaml files in right format
1 parent d70a49d commit 2e8a46f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

rmgpy/rmg/main.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,11 +1230,13 @@ def execute(self, initialize=True, **kwargs):
12301230
mol = Molecule().from_adjacency_list(dep_sp)
12311231
for sp in self.reaction_model.core.species:
12321232
if sp.is_isomorphic(mol, strict=False):
1233+
parameters['units'] = {'energy':'J', 'quantity':'mol'}
1234+
parameters['enthalpy-coefficients'] = [float(value) for value in parameters['enthalpy-coefficients']]
1235+
parameters['entropy-coefficients'] = [float(value) for value in parameters['entropy-coefficients']]
12331236
try:
1234-
parameters['units'] = {'energy':'J', 'quantity':'mol'}
1235-
content["species"][surf.species_index(sp.to_chemkin())]['coverage-dependencies'][sp.to_chemkin()] = parameters
1237+
content["species"][gas.n_species+surf.species_index(sp.to_chemkin())]['coverage-dependencies'][sp.to_chemkin()] = parameters
12361238
except KeyError:
1237-
content["species"][surf.species_index(sp.to_chemkin())]['coverage-dependencies'] = {sp.to_chemkin(): parameters}
1239+
content["species"][gas.n_species+surf.species_index(sp.to_chemkin())]['coverage-dependencies'] = {sp.to_chemkin(): parameters}
12381240

12391241
annotated_yaml_path = os.path.join(self.output_directory, "cantera", "chem_annotated.yaml")
12401242
with open(annotated_yaml_path, 'r') as f:

0 commit comments

Comments
 (0)