git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10010 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2013-06-04 14:55:56 +00:00
parent a6e871f0a5
commit 7f18289ee3
7 changed files with 554 additions and 544 deletions

View File

@ -700,10 +700,13 @@ void PPPM::compute(int eflag, int vflag)
// per-atom energy/virial
// energy includes self-energy correction
// notal accounts for TIP4P tallying eatom/vatom for ghost atoms
if (evflag_atom) {
double *q = atom->q;
int nlocal = atom->nlocal;
int ntotal = nlocal;
if (tip4pflag) ntotal += atom->nghost;
if (eflag_atom) {
for (i = 0; i < nlocal; i++) {
@ -712,10 +715,11 @@ void PPPM::compute(int eflag, int vflag)
(g_ewald*g_ewald*volume);
eatom[i] *= qscale;
}
for (i = nlocal; i < ntotal; i++) eatom[i] *= 0.5*qscale;
}
if (vflag_atom) {
for (i = 0; i < nlocal; i++)
for (i = 0; i < ntotal; i++)
for (j = 0; j < 6; j++) vatom[i][j] *= 0.5*qscale;
}
}