3d msd coding

Nice to meet you

It’s not different, we’re going through a 3d dpd simulation, and we’re trying to derive the msd value over time as lammps.

There is no error and it goes well, but according to the preceding code, the temperature should be set to 1.0, but it gradually rises. Also, the diffusivity value obtained from the thesis value and the slope value of msd are different. Maybe I entered the code incorrectly?

variable dt equal 1.0

fix nve all nve

compute msd all msd com yes
variable D equal c_msd[4]/6/(step*${dt}+1.0e-6)

fix 1 all vector 10 c_msd[4]

variable fitslope equal slope(f_1)/6/(10*${dt})

variable Time equal step*${dt}*1.0e-6
thermo_style custom step v_Time temp press c_msd[4] v_D v_fitslope

dump 1 all custom 1 tmp.dump id type vx vy vz

thermo 1000
run 100000

If the temperature is not well controlled, for sure the MSD will be wrong. I don’t see any temperature control in the piece of code you did copy-past.
Simon