
Diffusion ConstantTable of contentsNo headersUsing a GROMACS trajectory you can calculate diffusion constants both with Einstein (g_msd) and GreenKubo (g_velacc and then g_analyze) equations. While g_msd is selfexplanatory, using g_velacc starting from the version 4.0 is a bit trickier. To calculate the diffusion constant of the particle via GreenKubo equation the following commands should be supplied: g_velacc acflen 1001 nonormalize mol n atoms.ndx s topol.tpr where 'atoms.ndx' should contain the numbers of the atoms which form the particle of interest. By default, you will obtain 'vac.xvg' with a linear velocity autocorrelation function (VACF). Then to obtain the diffusion constant type: g_analyze f vac.xvg integrate This will give an integral of the VACF in [nm^{2}/ps]. Finally, if you've obtained the solution for the integral value of 6 x 10^{5} nm^{2}/ps from VACF, multiplying this quantity by 10^{6} (to simultaneously convert nm^{2} to m^{2} and ps to s) and dividing it by 3 (according to GreenKubo equation) would yield 2 x 10^{11} m^{2}/s. This is the value of diffusion constant. 