the whole system will rotate

Hi everyone,

I am using LAMMPS to simulate a 2D LJ system recently. I have met a problem.
When I used boundary as “s s p”, the whole system will rotate.
I had use the commands:

velocity all create ${temp} 76329 loop geom mom yes rot yes

fix 3 all enforce2d
fix 4 all momentum 1 angular

to zeroed the angular momentum.

If I set the boundary as “sf s p” or something like that, I will get the error of “lost atoms”.

May anyone give some advice to make the system not rotate?
Thank you in advance.


I would first try to figure out why it is rotating. If you
have initial zero angular momentum, it shouldn't. What
kind of problem are you modeling, and are you applying
external forces of some kind? I would also run w/out
fix momentum to see what your system does w/out
extra constraints.