From 196b6b92730cd2a9949f158a8981258e52003eb4 Mon Sep 17 00:00:00 2001 From: jrgissing Date: Sat, 20 Feb 2021 20:22:53 -0500 Subject: [PATCH] variable probability fix --- src/USER-REACTION/fix_bond_react.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/USER-REACTION/fix_bond_react.cpp b/src/USER-REACTION/fix_bond_react.cpp index 173a92b7fb..93c9fe525b 100644 --- a/src/USER-REACTION/fix_bond_react.cpp +++ b/src/USER-REACTION/fix_bond_react.cpp @@ -868,6 +868,9 @@ void FixBondReact::post_integrate() ghostly_rxn_count[i] = 0; nlocalskips[i] = 0; nghostlyskips[i] = 0; + // update reaction probability + if (var_flag[PROB][i]) + fraction[i] = input->variable->compute_equal(var_id[PROB][i]); } if (nevery_check) { @@ -875,10 +878,6 @@ void FixBondReact::post_integrate() return; } - // update reaction probability - if (var_flag[PROB][rxnID]) - fraction[rxnID] = input->variable->compute_equal(var_id[PROB][rxnID]); - // acquire updated ghost atom positions // necessary b/c are calling this after integrate, but before Verlet comm