LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Variation in x y z coordinates in dump files due to restart
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Variation in x y z coordinates in dump files due to restart

From: Axel Kohlmeyer <akohlmey@...24...>
Date: Sun, 30 Jul 2017 20:46:29 -0400

On Jul 30, 2017 1:34 PM, "Vivek Ananth" <vivekananthrp@...24...> wrote:
Dear Axel,

Thanks for the reply.
The dump file shown is 200,000 steps from the restart. 
Given the floating point math, does the variation in z-coordinate from 11.587 to 18.405 acceptable? Or does this indicate an error in simulation. 

That is impossible to say from afar. This is something where you have to make a decision on your own. Whether I give you my approval or not is irrelevant, since it is you yourself that has to justify your choices. Please see the (frequent) previous discussions on similar questions in the mailing list archives. 


Thanks again,
Vivek Ananth

On Sun, 30 Jul 2017 at 21:10 Axel Kohlmeyer <akohlmey@...24...> wrote:
On Sun, Jul 30, 2017 at 7:37 AM, Vivek Ananth <vivekananthrp@...24...> wrote:
Dear all,

I am running a polymer simulation with bond, angle, dihedral and nonbonded potentials. The sample was deformed under nvt ensemble.

the specific commands are as folows: 

#read_data       1000_PE_LAMMPS_INPUT
read_restart      pmr.restart.5000000

pair_modify tail yes
neighbor        1.0 bin
timestep        1.0
run_style       verlet

fix 1 all deform 1 x vel 0.0003 units box
fix 2 all nvt temp 100 100 500

When the simulation was run directly from the data file  and then by using a intermediate restart file, the output at a given step say 5183000 were compared and were found to be varying.

First few lines from the dump file of both runs are shown below,
For run from original datafile,
ITEM: ATOMS id x y z
1 -416.997 9.7084 11.587 
2 -418.323 8.93339 11.6771 
3 -419.256 9.61928 12.6947 
4 -420.546 8.83569 12.88 
5 -420.327 7.45046 13.5581 
6 -421.494 6.50961 13.3391 
7 -421.181 5.04872 13.6829 
8 -421.296 4.74522 15.1938 
9 -421.424 3.26868 15.6285 
10 -421.471 3.11456 17.1354 

For run from restart file at 5000000
ITEM: ATOMS id x y z
1 -417.077 9.70336 18.4055 
2 -417.566 9.08762 17.1175 
3 -418.873 9.73894 16.5819 
4 -419.58 9.15077 15.3765 
5 -419.859 7.66144 15.5719 
6 -420.442 6.9203 14.349 
7 -420.553 5.42464 14.6078 
8 -421.461 5.14037 15.7876 
9 -421.411 3.69951 16.2402 
10 -422.2 3.43722 17.526

The variation in the y and z coordinates seem significant. The correlation between them along each axis is given below,
X_original and X_ restart --> 0.997742
Y_original and Y_restart --> 0.940218
Z_original and Z_restart --> 0.935896

Why do these variations occur, and are variations in the acceptable range?

​there is not enough information here to confirm that you ran your simulations and restart correctly, but you should be aware, that LAMMPS uses floating point math and thus any operation that changes the order of operation can lead to small differences, e.g. when summing up forces due to floating point math not being associative. for more details on that, i recommend reading the following two blog posts:

​restarting enforces building a new neighbor list and ​thus may change the order of how positions are stored. same goes for using a different number of processors.
after restarting positions and energies should be the same as right before the restart and then slowly diverge exponentially.


Vivek Ananth

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
lammps-users mailing list

Dr. Axel Kohlmeyer  akohlmey@...24...
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.