From 45b935ead3f451b799ca29ddd567d9b2f5ec03c4 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Thu, 30 Apr 2015 17:33:34 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13448 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/RIGID/fix_rigid_small.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/RIGID/fix_rigid_small.cpp b/src/RIGID/fix_rigid_small.cpp index a1a383654c..a4aa9bb19b 100644 --- a/src/RIGID/fix_rigid_small.cpp +++ b/src/RIGID/fix_rigid_small.cpp @@ -2658,6 +2658,12 @@ void FixRigidSmall::set_molecule(int nlocalprev, tagint tagprev, int imol, double ctr2com[3],ctr2com_rotate[3]; double rotmat[3][3]; + // increment total # of rigid bodies + + nbody++; + + // loop over atoms I added for the new body + int nlocal = atom->nlocal; if (nlocalprev == nlocal) return; @@ -2715,10 +2721,6 @@ void FixRigidSmall::set_molecule(int nlocalprev, tagint tagprev, int imol, nlocal_body++; } } - - // increment total # of rigid bodies - - nbody++; } /* ----------------------------------------------------------------------