Skip to content

Commit 32e5e89

Browse files
Nora Khalilrwest
authored andcommitted
Prevents clearing of regularization dimension during each step of cascade algorithm. Allows optimization dimensions of reg_dim_atm dictionary to clear (first list in dictionary), but preserves the regularization dimension in reg_dim_atm (second list in dictionary).
1 parent 4677a8d commit 32e5e89

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

rmgpy/data/kinetics/family.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3393,7 +3393,14 @@ def prune_tree(self, rxns, newrxns, thermo_database=None, new_fraction_threshold
33933393
parent.children.remove(entry)
33943394
del self.groups.entries[key]
33953395
else:
3396-
entry.item.clear_reg_dims()
3396+
for atm in entry.item.atoms:
3397+
atm.reg_dim_atm[0] = [] #only clear the optimization dimension, preserve the regularization dimension
3398+
atm.reg_dim_u[0] = []
3399+
atm.reg_dim_r[0] = []
3400+
atm.reg_dim_site[0] = []
3401+
atm.reg_dim_morphology[0] = []
3402+
for bd in self.get_all_edges():
3403+
bd.reg_dim[0] = []
33973404

33983405
def make_tree_nodes(self, template_rxn_map=None, obj=None, T=1000.0, nprocs=0, depth=0, min_splitable_entry_num=2,
33993406
min_rxns_to_spawn=20, extension_iter_max=np.inf, extension_iter_item_cap=np.inf):

0 commit comments

Comments
 (0)