[lammps-users] Calculating MSD for 3D system

Dear Users,
Currently, I am trying to investigate the diffusivity of 3D fluid through MSD. I learn from the example in DIFFUSE folder, and I still don't understand what is "factor of 4 in 2 variables is for 2d",so it means that if we have 3D system, we should have a different factor number.

   variable twopoint equal c_msd[4]/4/(step*dt+1.0e-6)
   variable fitslope equal slope(f_9)/4/(10*dt)

Is anyone could explain more about the factor number?
Thank you in advance


Please pick up a text book on Molecular Dynamics and look up how to compute self-diffusion via the Einstein relation. That should provide the required insight so you can write an input for your needs.

It is a good idea to study the theory behind any methods you use, anyway.