[lammps-users] Fix wall/region on atoms across periodic boundaries

Dear Lammps users:

For ‘fix wall/region’, it will calculate the distance of an atom to the wall. However, for an atom which goes across the Periodic boundary and with nonzero image flag, (e.g. 1 0 0), will its distance to the wall be calculated based on the Re-mapped coordinates (i.e. xyz in simulation box) OR based on its unwrapped coordinates (i.e. true xyz)?

Moreover, if the distance is NOT calculated based on unwrapped coordinates, is there a way to make it do so?



Fix wall/region will always interact with the periodic image of an atom that is inside the box.

You cannot turn that off for atoms with a non-zero image counter. It would not make sense, anyway. If you have periodic boundaries you also have a replicated wall.


If you have periodic boundaries you replicate the entire system. Having the interactions with the wall differ based on image flags would be inconsistent since all other interactions would not know. Besides, with periodic boundaries each particle is the original and all its periodic images, so how can those be treated differently?
While you are counting how many times a particle has passed through the system, you are always modeling the periodic copy that is in the system.

The only consistent way to have the behavior you ask for, is to simulate a larger system.


I understand. However, is it possible to have a non-replicated wall? i.e., I have PBC, but only walls in ONE box. The difference I made here can be achieved by just counting the image flag. Is it possible to have such a function in LAMMPS?

Now I understand, thanks a lot!