calculate msd, but doesnt take periodicity into account