1
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
3
:link(lws,http://lammps.sandia.gov)
5
:link(lc,Section_commands.html#comm)
9
compute msd/molecule command :h3
13
compute ID group-ID msd/molecule :pre
15
ID, group-ID are documented in "compute"_compute.html command
16
msd/molecule = style name of this compute command :ul
20
compute 1 all msd/molecule :pre
24
Define a computation that calculates the mean-squared displacement
25
(MSD) of individual molecules. The calculation includes all effects
26
due to atoms passing thru periodic boundaries.
28
Four quantites are calculated by this compute for each molecule. The
29
first 3 quantities are the squared dx,dy,dz displacements of the
30
center-of-mass. The 4th component is the total squared displacement,
31
i.e. (dx*dx + dy*dy + dz*dz) of the center-of-mass.
33
The slope of the mean-squared displacement (MSD) versus time is
34
proportional to the diffusion coefficient of the diffusing molecules.
36
The displacement of the center-of-mass of the molecule is from its
37
original center-of-mass position at the time the compute command was
40
The MSD for a particular molecule is only computed if one or more of
41
its atoms are in the specified group. Normally all atoms in the
42
molecule should be in the group, however this is not required. LAMMPS
43
will warn you if this is not the case. Only atoms in the group
44
contribute to the center-of-mass calculation for the molecule, which
45
is used to caculate its initial and current position.
47
The ordering of per-molecule quantities produced by this compute is
48
consistent with the ordering produced by other compute commands that
49
generate per-molecule datums. Conceptually, them molecule IDs will be
50
in ascending order for any molecule with one or more of its atoms in
53
IMPORTANT NOTE: The initial coordinates of each molecule are stored in
54
"unwrapped" form, by using the image flags associated with each atom.
55
See the "dump custom"_dump.html command for a discussion of
56
"unwrapped" coordinates. See the Atoms section of the
57
"read_data"_read_data.html command for a discussion of image flags and
58
how they are set for each atom. You can reset the image flags
59
(e.g. to 0) before invoking this compute by using the "set
60
image"_set.html command.
62
IMPORTANT NOTE: If an atom is part of a rigid body (see the "fix
63
rigid"_fix_rigid.html command), it's periodic image flags are altered,
64
and its contribution to the MSD may not reflect its true contribution.
65
See the "fix rigid"_fix_rigid.html command for details. Thus, to
66
compute the MSD of rigid bodies as they cross periodic boundaries, you
67
will need to post-process a "dump file"_dump.html containing
68
coordinates of the atoms in the bodies.
70
IMPORTANT NOTE: Unlike the "compute msd"_compute_msd.html command,
71
this compute does not store the initial center-of-mass coorindates of
72
its molecules in a restart file. Thus you cannot continue the MSD per
73
molecule calculation of this compute when running from a "restart
74
file"_read_restart.html.
78
This compute calculates a global array where the number of rows =
79
Nmolecules and the number of columns = 4 for dx,dy,dz and the total
80
displacement. These values can be accessed by any command that uses
81
global array values from a compute as input. See "this
82
section"_Section_howto.html#howto_15 for an overview of LAMMPS output
85
The array values are "intensive". The array values will be in
86
distance^2 "units"_units.html.
92
"compute msd"_compute_msd.html