Adding in a new slab option for Jeremy Templeton. Invoked by "kspace_modify slab nozforce", which run slab mode with no long-range z forces.
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8464 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -131,7 +131,7 @@ void PPPM::init()
|
||||
|
||||
if (slabflag == 0 && domain->nonperiodic > 0)
|
||||
error->all(FLERR,"Cannot use nonperiodic boundaries with PPPM");
|
||||
if (slabflag == 1) {
|
||||
if (slabflag) {
|
||||
if (domain->xperiodic != 1 || domain->yperiodic != 1 ||
|
||||
domain->boundary[2][0] != 1 || domain->boundary[2][1] != 1)
|
||||
error->all(FLERR,"Incorrect boundaries with slab PPPM");
|
||||
@ -800,7 +800,7 @@ void PPPM::compute(int eflag, int vflag)
|
||||
|
||||
// 2d slab correction
|
||||
|
||||
if (slabflag) slabcorr();
|
||||
if (slabflag == 1) slabcorr();
|
||||
|
||||
// convert atoms back from lamda to box coords
|
||||
|
||||
@ -2247,7 +2247,7 @@ void PPPM::fieldforce()
|
||||
const double qfactor = force->qqrd2e * scale * q[i];
|
||||
f[i][0] += qfactor*ekx;
|
||||
f[i][1] += qfactor*eky;
|
||||
f[i][2] += qfactor*ekz;
|
||||
if (slabflag != 2) f[i][2] += qfactor*ekz;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user