Comments below.
Steve
Steve,
I had been running the simulation for a while and when I used fix
recenter to constrain the COM to the middle of the cell I got the
attached results, which don't make much sense to me. Using the INIT
option could work, but it doesn't allow me to specify the location of
the COM, only to use the current value, right? So is the only way to
get the center of mass right in the middle of the simulation cell to
use fix recenter from the very beginning of the simulation?
All LAMMPS knows how to do is displace the atoms so
their COM is at some location. If you run for a while and
the COM drifts off to some arbitrary location, then you ask
it to move it (at the start of the next run) to some radically different
location, then you will likely break your model. If you
want to move atoms between simulations you should look
at the displace_atoms command.
I would only use fix recenter to keep the COM where it already is.
In your case, maybe that means you need to start that at
the very beginning.
The reason fix recenter uses unwrapped coords, is that
if it didn't then when an atom crossed a periodic boundary,
you would get a delta change in the COM, and thus
in the position of all atoms which is unphysical. With unwrapped coords,
you get only an epsilon change in the group COM, even
when an atom crosses a PBC.I don't understand the problem with changing the position of all of
the atoms together--basically now you are just using a relative
coordinate system instead of an absolute one. You could think this as
taking a bunch of snapshots of a wandering interface and then shifting
the coordinates of the snapshots (using PBCs) so that the interface is
always in the same spot. I don't see how this would affect the
dynamics of the simulation--can you explain more?
If you are using fix recenter on all the atoms, this should be fine.
It's when you use it on a subset of the atoms and they displace
a large distance (in one step) relative to other atoms, that you
have problems. Some people do this, b/c they want their
substrate or solute molecule to stay in the center of the box,
and let water molecules move freely around it. Big displacements
then cause overlaps.