diff --git a/doc/src/compute_msd.rst b/doc/src/compute_msd.rst index 02b5550093..6e89cc59c1 100644 --- a/doc/src/compute_msd.rst +++ b/doc/src/compute_msd.rst @@ -75,10 +75,11 @@ solids undergoing thermal motion. .. note:: Initial coordinates are stored in "unwrapped" form, by using the - image flags associated with each atom. See the :doc:`dump custom ` command for a discussion of "unwrapped" coordinates. - See the Atoms section of the :doc:`read_data ` command for a - discussion of image flags and how they are set for each atom. You can - reset the image flags (e.g. to 0) before invoking this compute by + image flags associated with each atom. See the :doc:`dump custom + ` command for a discussion of "unwrapped" coordinates. See the + Atoms section of the :doc:`read_data ` command for a + discussion of image flags and how they are set for each atom. You + can reset the image flags (e.g. to 0) before invoking this compute by using the :doc:`set image ` command. .. note:: @@ -108,7 +109,8 @@ distance\^2 :doc:`units `. Restrictions """""""""""" - none + +Compute *msd* cannot be used with a dynamic group. Related commands """""""""""""""" diff --git a/doc/src/compute_msd_nongauss.rst b/doc/src/compute_msd_nongauss.rst index 70f4505d7f..1658d26f93 100644 --- a/doc/src/compute_msd_nongauss.rst +++ b/doc/src/compute_msd_nongauss.rst @@ -74,8 +74,11 @@ the third is dimensionless. Restrictions """""""""""" -This compute is part of the EXTRA-COMPUTE package. It is only enabled if -LAMMPS was built with that package. See the :doc:`Build package ` page for more info. +Compute *msd/nongauss* cannot be used with a dynamic group. + +This compute is part of the EXTRA-COMPUTE package. It is only enabled +if LAMMPS was built with that package. See the :doc:`Build package +` page for more info. Related commands """""""""""""""" diff --git a/src/compute_msd.cpp b/src/compute_msd.cpp index 229b965761..8370e9f833 100644 --- a/src/compute_msd.cpp +++ b/src/compute_msd.cpp @@ -58,6 +58,9 @@ ComputeMSD::ComputeMSD(LAMMPS *lmp, int narg, char **arg) : } else error->all(FLERR,"Illegal compute msd command"); } + if (group->dynamic[igroup]) + error->all(FLERR, "Compute {} is not compatible with dynamic groups", style); + // create a new fix STORE style for reference positions // id = compute-ID + COMPUTE_STORE, fix group = compute group