How to prevent edge atomic movements

Hello,

I’m using lammps to simulate clay layers in periodic npt condition. In my simulations, there are top, bottom and middle layers, and the middle one is smaller than the others; while the top and bottom layers fully covers the planar area of the box, the middle layer has discontinuity. I’ve constrained all layers to only move in the z direction by:

fix freeze layers setforce 0.0 0.0 NULL

Since the edge atoms of the middle layer had huge movements in the z direction duo to discontinuity, I used:

fix holdEdge edgeAtoms aveforce NULL NULL 0.0

to control the atomic movements, but the problem is that this work gives incorrect results for the box size in the z direction and causes less contraction of the box in that direction. I appreciate any idea to resolve this issue.

Thanks,

Meysam

Are you using fix npt with all 3 dimensions free to rescale?
And you are having the atoms rescale with the box?

If you don’t want atoms to move in xy (other than the rescaling)
then fix setforce should be fine. I don’t see why you would
need or should use fix aveforce, esp if you are wanting fix
npt to scale the z-box dimension correctly.

Steve

Steve,

Yes my NPT box is free to rescale in x,y and z directions.
I’m using aveforce only for the edge atoms of the small layer not the whole atoms of the layer because I want to control the large fluctuations of these atoms. Apparently other atoms of the small layer dont have that kind of fluctuations because they are bonded by their both sides.

Meysam