Skip to content

Commit d9225f3

Browse files
committed
Add thermo comment for LSR adjustments.
Reports how much the thermo has been changed by linear scaling.
1 parent 28c096d commit d9225f3

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

rmgpy/data/thermo.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,15 +1538,16 @@ def correct_binding_energy(self, thermo, species, metal_to_scale_from=None, meta
15381538

15391539
# now edit the adsorptionThermo using LSR
15401540
comments = []
1541-
for element,bond in normalized_bonds.items():
1541+
change_in_binding_energy = 0
1542+
for element, bond in normalized_bonds.items():
15421543
if bond:
15431544
try:
1544-
change_in_binding_energy = delta_atomic_adsorption_energy[element].value_si * bond
1545+
change_in_binding_energy += delta_atomic_adsorption_energy[element].value_si * bond
15451546
except KeyError:
15461547
continue
1547-
thermo.H298.value_si += change_in_binding_energy
15481548
comments.append(f'{bond:.2f}{element}')
1549-
thermo.comment += " Binding energy corrected by LSR ({}) from {}".format('+'.join(comments), metal_to_scale_from)
1549+
thermo.H298.value_si += change_in_binding_energy
1550+
thermo.comment += f" Binding energy corrected by LSR ({'+'.join(comments)}) from {metal_to_scale_from} (H={change_in_binding_energy/1e3:+.0f}kJ/mol)"
15501551
return thermo
15511552

15521553
def get_thermo_data_for_surface_species(self, species):

0 commit comments

Comments
 (0)