From db13dff4996342d23cffa6aa4e2611ac8f0a50a7 Mon Sep 17 00:00:00 2001 From: Jacob Gissinger Date: Wed, 27 May 2020 23:32:55 -0600 Subject: [PATCH] minor efficiency correction --- 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 d8bd61855d..6ba5d1ce49 100644 --- a/src/USER-REACTION/fix_bond_react.cpp +++ b/src/USER-REACTION/fix_bond_react.cpp @@ -1929,11 +1929,10 @@ void FixBondReact::get_IDcoords(int mode, int myID, double *center) if (onemol->fragmentmask[myID][i]) { if (iref == -1) iref = atom->map(glove[i][1]); - for (int j = 0; j < 3; j++) { - iatom = atom->map(glove[i][1]); - iatom = domain->closest_image(iref,iatom); + iatom = atom->map(glove[i][1]); + iatom = domain->closest_image(iref,iatom); + for (int j = 0; j < 3; j++) center[j] += x[iatom][j]; - } nfragatoms++; } }