Hi,

I'm a PG student and confused. I have looked at many research articles describing mean-squared-displacement and would be grateful if anyone can see if I'm doing anything wrong in the process:

1.Run the program from t=0 to t=tend

2.Calculate the displacement, (s(t)-s(t+tau)), at each time interval and store it in a vector

3.Square the answer to number 2 and find the mean, call this answer <s^2>

Okay, so far so good?

My aim is to end up with a figure with time (t) on the x-axis and <s^2> on the y-axis (see figure attached). On the x-axis: t=100,200,300,...600. I'm not sure what to put on the y-axis.

To put it another way, for each t on the x-axis, what is the coresponding mean-squared displacement? Is it the averaged value over 100 time intervals or is it just the sum of the displacements squared over that time interval?

Any help is greatly appreciated. I hope I have explained the problem clearly, however, if anything is unclear, pleaes let me know.

Maria

Any ideas anyone?

maria87,

I'm not quite sure what you are after, but here's something.

<rsd^2> is a function of time, it's value at any t should be the ensemble average of all the replicate simulations at that same time point. For example: You did three replicate simulations, the displacements s(t) at some time t for these three individual simulations/trajectories are, let's say, 10, 15 and 20. First, square the displacements to get the rsd^2 values 100, 225 and 400. Then, average the values to get <rsd^2> = 242. Repeat this for every different time point and you have the final vector of <rsd^2> versus t.

Does this help?

Cheers,

Thank you very much for your reply. At the moment I'm still unsure on how to calculate <s^2> for a single particle moving spatially over time. I know it sounds pretty trivial but I would appreciate your help.

This is what I'm doing currently to calculate <s^2> at t=100:

- I allow a particle to move spatially over a given period of time, from t=0 to t=100.

- At t=1, I calculate the square displacement of the particle from where it was at t=0, ie. (s(1)-s(0))^2

- At t=2, I calculate the square displacement of the particle from where it was at t=1, ie. (s(2)-s(1))^2 .... and so on until I reach t=100 ...

- At t=100, I calculate the square displacement of the particle from where it was at t=99, ie. (s(100)-s(99))^2 .

- I add up the result of all the displacements squared over that period and divide by 100 to get <s^2> at t=100.

So, should I divide by 100 or not to get the mean (<.>) ? Can you spot anything wrong with what I'm doing? I get a very small <s^2> compared to the data in the attached figure.

Thanks again,

Maria

PS: Also, do you know why the error bar increases for large time?

I 'm a little embarassed by the fact that this is a simple calculation and I'm not getting it. Please be kind and help me clear this up. Anyone? There must be someone on the forum who knows how to calculate Mean-Squared Displacements.

Did you get solution about how to calculate mean square displacement.?

If yes please share.