compute_msd
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.
Syntax
For this keyword, the command looks like:
compute_msd <sample_interval> <Nc> [<option> ...]
with parameters defined as
sample_interval: Sampling interval of the position dataNc: Maximum number of correlation steps
The optional arguments can be given in any order. Each option can be specified at most once.
The available options are described below.
The first special keyword is group.
The parameters are:
group, wheregroup_methodis the grouping method to use for computation andgroupis the group in the grouping method to use
The second special keyword is all_groups.
This keyword computes the MSD and SDC for each group in the specified grouping method.
Note that group and all_groups are mutually exclusive.
A typical usecase could be to compute the MSD for each molecule in a system.
The parameters are:
all_groups, wheregroup_methodis the grouping method to use for computation
Finally, the third special keyword is save_every.
This keyword saves the internal MSD and SDC computed so far during the simulation, which can be helpful during long running simulations.
The file will have a name formatted as msd_step[step].out.
The parameters are:
save_every, whereintervalis a positive integer giving the number of steps between saving a copy. Note that the copy can only be written at most everysample_intervalsteps. Furthermore, the firstmsd_step[step].outfile will be written afterNctimessample_intervalsteps. Subsequent files will be written everyinterval.
Examples
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.
To compute the MSD for all groups in group method 1 and save a copy of the MSD every 100 000 steps, one can write:
compute_msd 5 200 all_groups 1 save_every 100000