Dear Steve,
Thanks. I guess I am still confused.
My rigid body has three sites. One of the sites is the center of
mass. I output this site by dumping the coordinates and the image
flags (dump 1 site custom 500 site.xyz id x y z ix iy iz). Or replace
by xu,yu,zu.
When visualizing the trajectories I can see the atoms pass the
periodic boundary (and come in the other side since they trajectory is
wrapped). Yet ix iy and iz do not change. The values remain the same
(i.e, they remain ix = 0, iy=0,iz=0, the starting values of the
simulation, even when the trajectory clearly shows that the atoms pass
through a periodic boundary).
I can understand that the atomic site values (in general) should have
the incorrect image flags, but they should be altered regardless,
according to the manual.
Also as I understand it, since one of my sites is the center of mass,
it should have the correct image flags (i.e., the ones that correspond
to the unwrapped coordinates)? This is because the image flags for
the atomic sites are supposed to be updated when the center of mass
passes through a PBC.
I furthermore don't see how to output the "global" array vector of the
COM. In the documentation on fix rigid, it says:
"These fixes compute a global array of values which can be accessed by
various output commands. The number of rows in the array is equal to
the number of rigid bodies. The number of columns is 12. Thus for each
rigid body, 12 values are stored: the xyz coords of the center of mass
(COM), the xyz components of the COM velocity, the xyz components of
the force acting on the COM, and the xyz components of the torque
acting on the COM."
So I need to output a "global array", accessing
f_ID[1],f_ID[2],f_ID[3], where ID = whatever my fix was. The
available command seems to be fix ave/time, but when I use this:
fix 1 fluid rigid/nvt molecule temp 300.0 300.0 0.5
fix 2 fluid ave/time 500 1 500 f_1[1] f_1[2] f_1[3] file
test.xyz mode vector
(note my intention was to output the first 3 columns of the output
produced by fix rigid/nvt every 500 steps without averaging).
I get:
ERROR: Fix ave/time fix does not calculate a array
Sorry for my frustration. I had basically given up trying, and I'm
now unwrapping the trajectory using a VMD script with pbcunwrap in
VMD.
Regardless, even if I can access the COM positions of the rigid body,
they will likely be wrapped and the image flags of the rigid bodies
are not stored. It seems easier to put a massless site on the center
of mass of the rigid body (which I already have), output that, which
should have the correct image flags, but it appears to not. Then I
should be able to output the unwrapped coordinates as I've been doing
with dump custom (with xu,yu,zu).
Best.
Josh