How calculate MSD of water molecules?

how calculate MSD of water molecules ?
only oxygen atom is enough to calculate MSD of water molecules ?

I suppose that your 2nd question is: is it enough to consider only the oxygen atoms positions for calculating the diffusion coefficient through mean square displacement. And the answer is yes. LAMMPS has a “compute msd” option, you can fin plenty of examples online.

Thanks sir