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

This commit is contained in:
sjplimp 2013-08-19 19:25:51 +00:00
parent c45e800224
commit 3293a669c1
1 changed files with 4 additions and 1 deletions

View File

@ -1425,7 +1425,10 @@ void PPPMCuda::slabcorr(int eflag)
double e_slabcorr = 2.0*MY_PI*dipole_all*dipole_all/volume;
if (eflag) energy += qqrd2e*scale * e_slabcorr;
//if (eflag) energy += qqrd2e*scale * e_slabcorr;
// need to add a correction to make non-neutral systems and per-atom energy translationally invariant
if (eflag || fabs(qsum) > SMALL)
error->all(FLERR,"Cannot (yet) use slab correction with kspace_style pppm/cuda for non-neutral systems or to get per-atom energy. Aborting.");
double ffact = -4.0*MY_PI*dipole_all/volume;