Dear Lammps user,
I ran a simulation to test the rerun output for fix ave/atom. I compared per atom force by outputting from fix ave/atom and directly dump. The results between run and rerun in the dump file are difference. Here is my input:
fix 1 all ave/atom 1 1 1 fx fy fz
dump 1 all custom 1 dump.test id type x y z f_1[1] f_2[2] f_3[3] fx fy fz
dump_modify 1 sort id
run 5
unfix 1
fix 1 all ave/atom 1 1 1 fx fy fz
rerun dump.test dump x y z
Here are the dump for the run and rerun respectively (only pick two atoms as representatives):
The dump result from run:
ITEM: TIMESTEP
765000
ITEM: NUMBER OF ATOMS
281559
ITEM: BOX BOUNDS pp pp pp
-300 300
-300 300
-300 300
ITEM: ATOMS id type x y z f_1[1] f_1[2] f_1[3] fx fy fz
1 2 -56.217 -4.42573 16.5556 -0.338444 -0.0338628 -0.494495 -0.338444 -0.0338628 -0.494495
2 2 -54.4396 -2.5463 16.5178 0.520896 -1.33248 -0.321579 0.520896 -1.33248 -0.321579
ITEM: TIMESTEP
765001
ITEM: NUMBER OF ATOMS
281559
ITEM: BOX BOUNDS pp pp pp
-300 300
-300 300
-300 300
ITEM: ATOMS id type x y z f_1[1] f_1[2] f_1[3] fx fy fz
1 2 -56.2191 -4.42448 16.5492 -0.290837 -0.0548452 -0.336676 -0.290837 -0.0548452 -0.336676
2 2 -54.4409 -2.54797 16.5143 0.548 -1.33351 -0.232806 0.548 -1.33351 -0.232806
ITEM: TIMESTEP
765002
ITEM: NUMBER OF ATOMS
281559
ITEM: BOX BOUNDS pp pp pp
-300 300
-300 300
-300 300
ITEM: ATOMS id type x y z f_1[1] f_1[2] f_1[3] fx fy fz
1 2 -56.2213 -4.42324 16.5426 -0.24171 -0.0760658 -0.182134 -0.24171 -0.0760658 -0.182134
2 2 -54.442 -2.5501 16.5107 0.572144 -1.32926 -0.144882 0.572144 -1.32926 -0.144882
The output from fix ave/atom and fx fy fz in the dump file are the same in run.
The dump result from rerun:
ITEM: TIMESTEP
765000
ITEM: NUMBER OF ATOMS
281559
ITEM: BOX BOUNDS pp pp pp
-300 300
-300 300
-300 300
ITEM: ATOMS id type x y z f_1[1] f_1[2] f_1[3] fx fy fz
1 2 -56.217 -4.42573 16.5556 0 0 0 -0.338467 -0.0340717 -0.493734
2 2 -54.4396 -2.5463 16.5178 0 0 0 0.520938 -1.33287 -0.320757
ITEM: TIMESTEP
765001
ITEM: NUMBER OF ATOMS
281559
ITEM: BOX BOUNDS pp pp pp
-300 300
-300 300
-300 300
ITEM: ATOMS id type x y z f_1[1] f_1[2] f_1[3] fx fy fz
1 2 -56.2191 -4.42448 16.5492 0 0 0 -0.2909 -0.0548794 -0.336745
2 2 -54.4409 -2.54797 16.5143 0 0 0 0.54833 -1.3337 -0.233108
ITEM: TIMESTEP
765002
ITEM: NUMBER OF ATOMS
281559
ITEM: BOX BOUNDS pp pp pp
-300 300
-300 300
-300 300
ITEM: ATOMS id type x y z f_1[1] f_1[2] f_1[3] fx fy fz
1 2 -56.2213 -4.42324 16.5426 0 0 0 -0.241795 -0.0761449 -0.181805
2 2 -54.442 -2.5501 16.5107 0 0 0 0.5726 -1.32918 -0.145172
ITEM: TIMESTEP
765003
ITEM: NUMBER OF ATOMS
281559
ITEM: BOX BOUNDS pp pp pp
-300 300
-300 300
-300 300
ITEM: ATOMS id type x y z f_1[1] f_1[2] f_1[3] fx fy fz
1 2 -56.2236 -4.42203 16.536 0 0 0 -0.191415 -0.0973218 -0.032688
2 2 -54.4429 -2.55268 16.507 0 0 0 0.593827 -1.31968 -0.0589363
ITEM: TIMESTEP
765004
ITEM: NUMBER OF ATOMS
281559
ITEM: BOX BOUNDS pp pp pp
-300 300
-300 300
-300 300
ITEM: ATOMS id type x y z f_1[1] f_1[2] f_1[3] fx fy fz
1 2 -56.2259 -4.42086 16.5293 0 0 0 -0.14097 -0.118181 0.111637
2 2 -54.4435 -2.55572 16.5033 0 0 0 0.610664 -1.30368 0.024525
ITEM: TIMESTEP
765005
ITEM: NUMBER OF ATOMS
281559
ITEM: BOX BOUNDS pp pp pp
-300 300
-300 300
-300 300
ITEM: ATOMS id type x y z f_1[1] f_1[2] f_1[3] fx fy fz
1 2 -56.2283 -4.41972 16.5227 -0.0895541 -0.138876 0.249939 -0.0895541 -0.138876 0.249939
2 2 -54.444 -2.5592 16.4996 0.625361 -1.28246 0.104772 0.625361 -1.28246 0.104772
The output from fix ave/atom are Zero at all timestep except for the last one. It is different from the direct output of fx fy fz.
I test with different timesteps of run ( 5, 10, 100), the output of fix ave/atom is only effective in the last timestep and all others output Zero.
I would be great appreciative if anyone could shed some light for this problem.
Thanks a lot,
Rimei