[lammps-users] strange phenomena in Langevin dynamics

Dear,

There is a strange phenomena when I do Langevin dynamics. See the
Figure attached, The center of mass of my studying object shift from
postive to negative abruptly though the volecity of c.m. is postive.
Why? Is there a bug in fix langevin command?

Note, I have checked the efield is small sufficiently not to change
the size of radius of gyration of object.

my in code is presented as follows.

in code

langevin.gif

The jump is due to the CM passing thru a periodic boundary.
I'm at home (snow storm) so I can't check the source code,
but the xcm() function in variables probably always puts
the CM inside the periodic box.

Steve

But the boundary of my box is [-15 +15].

another question,

How can I remove the no physical shift of c.m. when there is an
external field. The fix_momentum
command can't be used.

I was wrong. The xcm() command in a variable unwraps the
atoms via the image flags to compute the COM . So whatever
value it is printing is where the COM of those atoms are after
(possibly) passing thru the box many times. If you do a dump
custom with those atoms and use xu,yu,zu you will see the
unscaled coords (via image flag) and can verify for yourself
that the COM is correct.

Steve