[lammps-users] Dumping initial coordinates with fix store/state

Dear lammps user,

My lammps version is 29 Oct 2020.

The below script describes a system of ellipsoids. The ellipsoids are grown up from tiny particles using the “set command” until the aspect ratio becomes 3.5 . The radii, {(0.1,0.1,0.1),(0.2,0.2,0.2), …, (1,1,3.5)} , are located in two files “fort_x_1.txt” “and fort_z_3_5.txt”

The point is that after the aspect ratio becomes 3.5, I need to store the initial coordinates and then print them using the dump command.

I have noticed that the initial values of very few atoms (just two atoms) stored by the command “fix store/state” are different from those initial values stored in vectors “x y z” for the same few atoms. The coordinates stored by the “fix store/state” are a little bit outside the coordinates of my simulation box. This makes my self intermediate scattering function not exactly equals 1 at timestep = 0 .

For example, I see the following lines in the dump file “coordEq.1”, (please notice the coordinates of atom 773):

ITEM: TIMESTEP
0
ITEM: NUMBER OF ATOMS
2197
ITEM: BOX BOUNDS pp pp pp
0.0000000000000000e+00 2.3946204741162511e+01
0.0000000000000000e+00 2.3946204741162511e+01
0.0000000000000000e+00 2.3946204741162511e+01
ITEM: ATOMS id x y z f_coord0[1] f_coord0[2] f_coord0[3]
842 1.49414 8.15017 16.2395 1.49414 8.15017 16.2395
773 0.0164369 9.0247 16.9628 23.9626 9.0247 16.9628

780 4.7422 9.8905 15.0058 4.7422 9.8905 15.0058

Is there any way to avoid such a problem ?

Thanks
Mohammed

Coordinates may be a little bit outside the box, if they are in between neighbor list updates.

I don’t understand your use of fix store/state. why not just store a single (reference) frame with write_dump before the run and then only store the updated coordinates with your regular dump.
for dumps of coordinates (but not fix outputs) you can enforce PBC conformance with the dump_modify pbc option.

Thanks Axel .

The reason is that LAMMPS dumps atoms with indeterminate order for every snapshot of coordinates.

Therefore, I thought that dumping the coordinates of an atom together with its initial coordinates next to them, every timestep, will make me easily compute any function of coordinates correlated to the initial coordinates.

I hope I am clear.

I am trying to avoid “dump_modify sort” because it is computationally costly.

Now, the only possible way is, for every timestep, I should read coordinates of atoms into an array making the array id consistent with the atom id.

If you find my approach not smart, I would be thankful to hear your suggestions.

Best regards
Mohammed

Thanks Axel .

The reason is that LAMMPS dumps atoms with indeterminate order for every snapshot of coordinates.

that is easily alleviated by also outputting the atom IDs which uniquely identify each atom.

Therefore, I thought that dumping the coordinates of an atom together with its initial coordinates next to them, every timestep, will make me easily compute any function of coordinates correlated to the initial coordinates.

I hope I am clear.

I am trying to avoid “dump_modify sort” because it is computationally costly.

how costly? have you made benchmarks? do you think that outputting doubling the amount of data is helping performance?
outputting atom IDs would occupy much less disk space. From your quoted input it doesn’t look like a very large system and/or that you would run across a very large number of processors (it wouldn’t make sense for such a small system anyway).