Skip to content

Commit 8d7756a

Browse files
committed
Write the thermo coverage dependent data to yaml files in right format
1 parent e9e2703 commit 8d7756a

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
@@ -1197,11 +1197,13 @@ def execute(self, initialize=True, **kwargs):
11971197
mol = Molecule().from_adjacency_list(dep_sp)
11981198
for sp in self.reaction_model.core.species:
11991199
if sp.is_isomorphic(mol, strict=False):
1200+
parameters['units'] = {'energy':'J', 'quantity':'mol'}
1201+
parameters['enthalpy-coefficients'] = [float(value) for value in parameters['enthalpy-coefficients']]
1202+
parameters['entropy-coefficients'] = [float(value) for value in parameters['entropy-coefficients']]
12001203
try:
1201-
parameters['units'] = {'energy':'J', 'quantity':'mol'}
1202-
content["species"][surf.species_index(sp.to_chemkin())]['coverage-dependencies'][sp.to_chemkin()] = parameters
1204+
content["species"][gas.n_species+surf.species_index(sp.to_chemkin())]['coverage-dependencies'][sp.to_chemkin()] = parameters
12031205
except KeyError:
1204-
content["species"][surf.species_index(sp.to_chemkin())]['coverage-dependencies'] = {sp.to_chemkin(): parameters}
1206+
content["species"][gas.n_species+surf.species_index(sp.to_chemkin())]['coverage-dependencies'] = {sp.to_chemkin(): parameters}
12051207

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

0 commit comments

Comments
 (0)