This keyword computes the self-diffusion coefficient (SDC) from the mean-square displacement (MSD) function. If this keyword appears in a run, the MSD function will be computed and the SDC is also calculated as a time derivative of it. The results will be written to msd.out output file.


For this keyword, the command looks like:

compute_msd <sample_interval> <Nc> [<optional_arg>]

with parameters defined as

  • sample_interval: Sampling interval of the position data

  • Nc: Maximum number of correlation steps

The optional argument optional_arg allows an additional special keyword. The keyword for this function is group. The parameters are:

  • group, where group_method is the grouping method to use for computation and group is the group in the grouping method to use


An example of this function is:

compute_msd 5 200 group 1 1

This means that you

  • want to calculate the MSD

  • the position data will be recorded every 5 steps

  • the maximum number of correlation steps is 200

  • you would like to compute only over group 1 in group method 1.