Computation of diffusion Coefficient

I know we can use msd command to compute mean squared displacement
But i dont know how this command could compute that quantity?
I need to compute gradient of diagram of diffusion coeffiient versus polymer length
I dont know if i can use msd commnd for this purpose?
Thanks in advance for your help

Hello, Samira:

You can use the MSD command to produce the data needed to calculate a diffusion coefficient. However, the results that you get if you do post-processing of trajectory data, such as that stored by the store/state compute associated with the compute msd, or through a customized trajectory file) are much better than those that can be obtained from just using the msd output alone, because you can use multiple starting points along your trajectory.

As for measuring the effects of polymer length, that would obviously require you to set up your simulations carefully, and you’ll need to perform multiple simulations in order to measure polymer length effects. (You may also need to run very long simulations, since polymers aren’t exactly known for diffusing quickly!)

Also, you’ll probably want to make use of the msd/molecule compute, rather than the msd compute, since the latter allows averaging over independent molecules, which isn’t done by the msd compute.


Ahmed is correct - there is also a compute msd/molecule command
which may be useful to you.