[lammps-users] how to calc Coulombic interactions in a2D system?


I have a 2D system with charges. Since fix enforce2d can’t be used if dimension = 3, I have choose dimension = 2. However ewald and pppm can’t be used if dimension = 2. Therefore the only choice I have is to use coul/cut to calculate Coulombic interactions. Is my understanding correct?

In the version of 5 oct 2007, LAMMPS allows to use fix enforce2d when dimension = 2. But in the new version, LAMMPS prevent it by the following:

/* ---------------------------------------------------------------------- */

void FixEnforce2D::init()
if (domain->dimension == 3)
error->all(“Should not use fix enforce2d with 3d simulation”);

Is there any reason for this change?

All the best!


You could run a 3d simulation w/out fix enforce2d and use fix setforce
to zero the z forces (and set z velocity to 0). Then you could use PPPM
in slab mode as if it were only 2d periodic. But I don't think that's
really the model you want. What you really need is a 2d Ewald or
PPPM, which no one has implemented for LAMMPS.