atom order in the initial data file

Dear LAMMPS users,

I prepared two data files which can be read by command “read data”.
In the two data files, the snapshot is exactly same to each other. That is, atom number, supercell size, each atom’s position (the numerical precision of atom’s precision is also exactly same).
The only one difference between the two initial data files is that atoms appear as the order of its ID in one data file while atoms appear randomly in another file.

When LAMMPS read the two data files, the initial atoms’ position dumped by LAMMPS is exactly same to each other. However, when two initial configurations were strained to 5% under athermal quasistatic conditions. There is some subtle different in atoms’ position b/t the two samples, which then results in that several atoms in the two samples have much different non-affine squared displacement compared to their initial configurations.

Could you help me understand the rood cause of the difference in atomic position after samples were strained under athermal quasistatic conditions? Thanks in advance!

Best

this is likely due to the non-associative nature of floating point math. due to the different atom ordering, forces are computed and summed(!) in a different order, that can result in slightly different total forces on atoms, especially atoms in high-potential energy areas or where there are multiple large force contributions from neighboring atoms, that mostly cancel.

this all is too much to explain here (again), so please go to these three web pages to see what i mean:
https://floating-point-gui.de/

http://blog.reverberate.org/2014/09/what-every-computer-programmer-should.html

http://blog.reverberate.org/2016/02/06/floating-point-demystified-part2.html

axel.

Thanks Axel again for your good explanation, which makes sense. So we can attribute the resultant subtle difference in atomic positions to unavoidable numerical error rather than bugs in LAMMPS or others, right?

Best,
Zhao

Thanks Axel again for your good explanation, which makes sense. So we can attribute the resultant subtle difference in atomic positions to unavoidable numerical error rather than bugs in LAMMPS or others, right?

i cannot say for certain, since i don’t know anything about your system. i have given you some possible explanation, but it is up to you to find out if my speculation applies.

axel.

Got it. Thanks.
Zhao