scripts for msd analysis