Dear Lammps,
I am trying to understand how to assign image flags in fix_rigid.
1. How can I assign an image flag value? I tried the following code to force certain image flag values.
int box = -2;
for ( int j=0; j<3; j++ )
xdata[j] = atom->x[0][j];
int imagedata = ((box + 512 & 1023) << 20) |
((box + 512 & 1023) << 10) | (box + 512 & 1023);
domain->remap(xdata,imagedata);
}
My understanding was that this would force the image flag values to be -2, but later when I convert the contents of atom->image into xbox, ybox and zbox and print the values, I do not see that at all.
2. Where in fix_rigid.cpp are the image flags reassigned? I only see code for converting atom->image into xbox, etc, but not the other way around.
Any help with this is greatly appreciated!
Cheers,
Joyce