From 1ff01635e579fdb0d89b5f91abdcf039119a0b74 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 30 Oct 2009 14:52:32 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@3255 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/fix_shake.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fix_shake.cpp b/src/fix_shake.cpp index 82c4206ac5..b400c3eaa7 100644 --- a/src/fix_shake.cpp +++ b/src/fix_shake.cpp @@ -784,9 +784,12 @@ void FixShake::find_clusters() // check if mass of either atom is in input mass_list // ----------------------------------------------------- + int np; + for (i = 0; i < nlocal; i++) { nshake[i] = 0; - for (j = 0; j < npartner[i]; j++) { + np = npartner[i]; + for (j = 0; j < np; j++) { partner_shake[i][j] = 0; if (!(mask[i] & groupbit)) continue;