[lammps-users] Image of center-of-mass

Dear LAMMPS users:

Is there any variable in LAMMPS code which can be identified once the center-of-mass crossing the periodic boundaries, like the image flag for each atom defined in LAMMPS?

Thanks.

Best
Yajie

Center-of-mass of what? If a group, then you can compute
it via a variable and print it out, average it, etc. I suppose
if you compared it to a box boundary, you'd know when it
crossed.

Steve

Steven, thank you very much for your reply. I understand what you mean. But what I want is whether there is a variable directly can tell the user once the center-of-mass of a group crossed the boundary. Similarly, like the image of each atom that can be dumped as “ix, iy, iz” and tracked in the code, not need I make the post judgment after I got the output. Yajie

The com is not a per-atom quantity, so it can't be put in a dump file.
But it can be printed with the thermodynamics and thus in a log file
if you define it in a variable. If the variable divides by the box
length then the printed quantity will look like an image flag value.

Steve