From 51f78e769b00acf8618860da14b8ab9acb369520 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Wed, 28 Nov 2007 14:56:34 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1184 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/ASPHERE/pair_gayberne.cpp | 12 ++++++------ src/ASPHERE/pair_resquared.cpp | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/ASPHERE/pair_gayberne.cpp b/src/ASPHERE/pair_gayberne.cpp index acb38e20ac..3bd54302f5 100755 --- a/src/ASPHERE/pair_gayberne.cpp +++ b/src/ASPHERE/pair_gayberne.cpp @@ -196,12 +196,12 @@ void PairGayBerne::compute(int eflag, int vflag) if (vflag == 1) { if (newton_pair == 0 && j >= nlocal) for (m = 0; m < 6; m++) fforce[m] *= 0.5; - virial[0] += r12[0]*r12[0]*fforce[0]; - virial[1] += r12[1]*r12[1]*fforce[1]; - virial[2] += r12[2]*r12[2]*fforce[2]; - virial[3] += r12[0]*r12[1]*fforce[0]; - virial[4] += r12[0]*r12[2]*fforce[1]; - virial[5] += r12[1]*r12[2]*fforce[2]; + virial[0] -= r12[0]*fforce[0]; + virial[1] -= r12[1]*fforce[1]; + virial[2] -= r12[2]*fforce[2]; + virial[3] -= r12[0]*fforce[1]; + virial[4] -= r12[0]*fforce[2]; + virial[5] -= r12[1]*fforce[2]; } } } diff --git a/src/ASPHERE/pair_resquared.cpp b/src/ASPHERE/pair_resquared.cpp index 7544e104ab..be511ba3c2 100755 --- a/src/ASPHERE/pair_resquared.cpp +++ b/src/ASPHERE/pair_resquared.cpp @@ -206,12 +206,12 @@ void PairRESquared::compute(int eflag, int vflag) if (vflag == 1) { if (newton_pair == 0 && j >= nlocal) for (m = 0; m < 6; m++) fforce[m] *= 0.5; - virial[0] += r12[0]*r12[0]*fforce[0]; - virial[1] += r12[1]*r12[1]*fforce[1]; - virial[2] += r12[2]*r12[2]*fforce[2]; - virial[3] += r12[0]*r12[1]*fforce[0]; - virial[4] += r12[0]*r12[2]*fforce[1]; - virial[5] += r12[1]*r12[2]*fforce[2]; + virial[0] -= r12[0]*fforce[0]; + virial[1] -= r12[1]*fforce[1]; + virial[2] -= r12[2]*fforce[2]; + virial[3] -= r12[0]*fforce[1]; + virial[4] -= r12[0]*fforce[2]; + virial[5] -= r12[1]*fforce[2]; } } }