Skip to content

Commit 4275c7a

Browse files
Nora Khalilrwest
authored andcommitted
handling leaf nodes. Running leaf nodes through get_extension_edge so regularization info is passed (but not actually extending them).
1 parent 9698c6b commit 4275c7a

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

rmgpy/data/kinetics/family.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3796,10 +3796,17 @@ def simple_regularization(self, node, template_rxn_map, test=True):
37963796

37973797
if isinstance(node.item, Group):
37983798
indistinguishable = []
3799+
3800+
if node.children==[]: #if this is a leaf node, run it through get_extension_edge so that the regularization info is passed to leaf node
3801+
print('extending leaf nodes to get regularization info')
3802+
_, _ = self.get_extension_edge(node, template_rxn_map, obj=None, T=1000.0, iter_max=1, iter_item_cap=1)
3803+
37993804
for i, atm1 in enumerate(grp.atoms):
38003805

38013806
skip = False
3802-
if node.children == []: # if the atoms or bonds are graphically indistinguishable don't regularize
3807+
if node.children == []:
3808+
3809+
# if the atoms or bonds are graphically indistinguishable don't regularize
38033810
bdpairs = {(atm, tuple(bd.order)) for atm, bd in atm1.bonds.items()}
38043811
for atm2 in grp.atoms:
38053812
if atm1 is not atm2 and atm1.atomtype == atm2.atomtype and len(atm1.bonds) == len(atm2.bonds):

0 commit comments

Comments
 (0)