Dear LAMMPS users,
I am trying to compute the MSD of a groups of atoms. I do not want the MSD along the simulation only but also the MSD between “thermo” prints as if they were independent simulations. I am not sure how to do it with LAMMPS.
I though I found an inefficient way of doing it, but it has to be wrong, as the difference between the total MSD between two “thermo” prints is bigger than the MSD values of the interval. The group has only one atom so this is impossible taking into account the triangle inequality.
MSD_TOTAL[ t + 1 ] - MSD_TOTAL[ t ] > MSD_INTERVAL
and this means
d(p1, p0) - d(p2, p0) > d(p1, p2)
This is how I get the total the global MSD:
compute msd some_group msd
variable Msd equal c_msd[4]
thermo ${thermo_steps}
thermo_style custom v_Msd
run ${total_steps}
Now to retrieve MSD value of the interval, I use a different “compute” command every time I print with thermo:
compute msd some_group msd
variable Step equal step
variable Msd equal c_msd[4]
variable Msd_interval equal c_msd_step[4]
thermo 0
thermo_style custom v_Msd v_Msd_interval
label msd_loop
compute msd_step some_group msd
run ${thermo_steps}
uncompute msd_step
if “{Step} < {total_steps}” then “jump SELF msd_loop”
How could improve this?
Thanks,
Bruno