Skip to content

Commit 9c52cca

Browse files
Nora KhalilNora Khalil
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 69444be commit 9c52cca

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
@@ -3388,7 +3388,14 @@ def prune_tree(self, rxns, newrxns, thermo_database=None, new_fraction_threshold
33883388
parent.children.remove(entry)
33893389
del self.groups.entries[key]
33903390
else:
3391-
entry.item.clear_reg_dims()
3391+
for atm in entry.item.atoms:
3392+
atm.reg_dim_atm[0] = [] #only clear the optimization dimension, preserve the regularization dimension
3393+
atm.reg_dim_u[0] = []
3394+
atm.reg_dim_r[0] = []
3395+
atm.reg_dim_site[0] = []
3396+
atm.reg_dim_morphology[0] = []
3397+
for bd in self.get_all_edges():
3398+
bd.reg_dim[0] = []
33923399

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

0 commit comments

Comments
 (0)