Differences in calculation msd run and rerun .

Dear,

Calculations have msd differences when I run “run” and " rerun" . For the same times I have different values.

In the rerun file I not use a pair potential , because MSD depends on the positions only.

I get to run the following outputs msd :

Fix print output for fix result

1 5.8497307081053128683e-24
2 2.3379300022448075844e-23
3 5.2503752979565054526e-23
4 9.3066253786508429407e-23
.
.
.
.

997 1.6541091626371912689e-19
998 1.6553335236650332228e-19
999 1.656529132665683038e-19
1000 1.6577013083230237643e-19

Output Rerun:

Fix print output for fix result

0 6.198723976552925194e-18
1 6.1983215571799740077e-18
2 6.1979336377194136635e-18
3 6.218576828398167311e-18
4 6.2672523252387131332e-18

.
.
.
.

997 3.8320096377745592783e-16
998 3.8314881028886177417e-16
999 3.8326466741209909051e-16
1000 3.8375387450191112038e-16

As I understand msd should get the same in both cases. I do not understand because the values ​​are different.

what am I doing wrong?

in.rerun_msd (1.49 KB)

in.simulacion (3.76 KB)

Why are your MSD values so tiny? What are your distance

units? Can you calculate an MSD yourself from a dump

file snapshot, (e.g. make your group = 1 or 2 atoms), and

see which answer is “right”?

Steve

I am using S.I units. Probe calculating from the dump file with 2 atoms and the correct value is given by the original " run" .

Another thing , when in charge rerun ix iy iz ( images ) the MSD value calculated by the rerun changes again and is still wrong .

I am using S.I units. Probe calculating from the dump file with 2 atoms and

using SI units for atomic systems is just making your life needlessly
complicated. you can always convert your units after the fact.

the correct value is given by the original " run" .

Another thing , when in charge rerun ix iy iz ( images ) the MSD value
calculated by the rerun changes again and is still wrong .

"wrong" is a strong word. it is "different" and "not as expected", but
that doesn't automatically mean it is "wrong", as you may have been
overlooking some details and are simply not using the right input for
what you want.

here is a simple recipe:
- take the input from examples/melt
- add (only) the commands to compute and output the MSD and change the
number of MD steps as needed for a reasonably converged output.
- make a copy of the input and adjust it to compute the MSD via rerun

if you *still* get an unexpected difference, post the two inputs, so
that somebody can verify whether the problem is with your input or
with LAMMPS.

axel.

> I am using S.I units. Probe calculating from the dump file with 2 atoms
and

using SI units for atomic systems is just making your life needlessly
complicated. you can always convert your units after the fact.

> the correct value is given by the original " run" .
>
> Another thing , when in charge rerun ix iy iz ( images ) the MSD value
> calculated by the rerun changes again and is still wrong .

"wrong" is a strong word. it is "different" and "not as expected", but
that doesn't automatically mean it is "wrong", as you may have been
overlooking some details and are simply not using the right input for
what you want.

Thanks , you are right " wrong" is a strong word . Sorry for the misuse of
the word.

Finally it worked for me . My mistake is that I was not using the correct amount of dump files . I test with the example / melt script helped me find my error.

My original script had the following structure:

(RELAX COMANDS)
run 300
unfix relax_fix

(TERMOSTAT COMMANDS)
run 5000
unfix control_temp

reset_timestep 0
(MSD CALC)
run 1000
dump config.dump

I am rerun just calling my config.dump.

(MSD CALC)
rerun config.dump first 1 dump …

Now I edited my original file as:

(RELAX COMANDS)
dump relax.dump
run 300
unfix relax_fix

(TERMOSTAT COMMANDS)
dump termostat.dump

run 5000
unfix control_temp

reset_timestep 0
(MSD CALC)
run 1000
dump config.dump

and my rerun script is as follows :

rerun relax.dump dump …
rerun termostat.dump dump …
(MSD CALC)
rerun config.dump first 1 dump …

This works for me and the results of the original script and rerun are almost identical .

Thanks