Hello everyone!
I am trying to calculate MSD values for two trajectories. In both trajectories, there is a single molecule of sugar in water, the sugars being different from each other.
I don't know if I'm doing something wrong, but the MSD curve I'm getting is exactly the same for both molecules.
My code is:
import MDAnalysis as mda
import MDAnalysis.analysis.msd as msd
msd1 = msd.EinsteinMSD(u1, select='resname UNL', msd_type='xyz', fft=True)
msd1.run()
msd2 = msd.EinsteinMSD(u2, select='resname UNL', msd_type='xyz', fft=True)
msd2.run()
msd_1 = msd1.results.timeseries
msd_2 = msd2.results.timeseries
nframes = msd1.n_frames
timestep = 1 # this needs to be the actual time between frames
lagtimes = np.arange(nframes)*timestep # make the lag-time axis
fig = plt.figure()
ax = plt.axes()
# plot the actual MSD
ax.plot(lagtimes, msd_1, label='1')
ax.plot(lagtimes, msd_2, label='1')
exact = lagtimes*6
# plot the exact result
# ax.plot(lagtimes, exact, label=r'$y=2 D\tau$')
plt.legend()
plt.show()
Is there an explanation for having exactly the same results for both systems? Am I doing something wrong?
Thank you very much!
Best,
Maria