Skip to content

Commit

Permalink
add_rules_from_training: adding metal entry attribute
Browse files Browse the repository at this point in the history
passing through metal training entry attribute during reverse rate thermo calculations
  • Loading branch information
mazeau committed Sep 10, 2020
1 parent 128f140 commit 44f02cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rmgpy/data/kinetics/family.py
Expand Up @@ -1219,11 +1219,11 @@ def add_rules_from_training(self, thermo_database=None, train_indices=None):
# Clear atom labels to avoid effects on thermo generation, ok because this is a deepcopy
reactant.molecule[0].clear_labeled_atoms()
reactant.generate_resonance_structures()
reactant.thermo = thermo_database.get_thermo_data(reactant, training_set=True)
reactant.thermo = thermo_database.get_thermo_data(reactant, training_set=True, metal=entry.metal)
for product in item.products:
product.molecule[0].clear_labeled_atoms()
product.generate_resonance_structures()
product.thermo = thermo_database.get_thermo_data(product, training_set=True)
product.thermo = thermo_database.get_thermo_data(product, training_set=True, metal=entry.metal)
# Now that we have the thermo, we can get the reverse k(T)
item.kinetics = data
data = item.generate_reverse_rate_coefficient()
Expand Down Expand Up @@ -1258,6 +1258,7 @@ def add_rules_from_training(self, thermo_database=None, train_indices=None):
reference=entry.reference,
short_desc="Rate rule generated from training reaction {0}. ".format(entry.index) + entry.short_desc,
long_desc="Rate rule generated from training reaction {0}. ".format(entry.index) + entry.long_desc,
metal=entry.metal
)
new_entry.data.comment = "From training reaction {1} used for {0}".format(';'.join([g.label for g in template]), entry.index)

Expand Down

0 comments on commit 44f02cb

Please sign in to comment.