make compute msd (and msd/nongauss) error out immediately when used with a dynamic group

This commit is contained in:
Axel Kohlmeyer
2022-04-02 17:13:30 -04:00
parent dab640220c
commit 93c67a3c07
3 changed files with 15 additions and 7 deletions

View File

@ -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 <dump>` command for a discussion of "unwrapped" coordinates.
See the Atoms section of the :doc:`read_data <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
<dump>` command for a discussion of "unwrapped" coordinates. See the
Atoms section of the :doc:`read_data <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 <set>` command.
.. note::
@ -108,7 +109,8 @@ distance\^2 :doc:`units <units>`.
Restrictions
""""""""""""
none
Compute *msd* cannot be used with a dynamic group.
Related commands
""""""""""""""""

View File

@ -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 <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
<Build_package>` page for more info.
Related commands
""""""""""""""""

View File

@ -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