diff --git a/doc/src/neigh_modify.rst b/doc/src/neigh_modify.rst index 63d7221c70..753990c93f 100644 --- a/doc/src/neigh_modify.rst +++ b/doc/src/neigh_modify.rst @@ -271,6 +271,8 @@ The value of the *page* setting must be at least 10x larger than the *one* setting. This ensures neighbor pages are not mostly empty space. +The *exclude group* setting is currently not compatible with dynamic groups. + Related commands """""""""""""""" diff --git a/src/neighbor.cpp b/src/neighbor.cpp index 072240b482..c43f86e7ed 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -2721,7 +2721,9 @@ void Neighbor::modify_params(int narg, char **arg) if (ex1_group[nex_group] == -1) error->all(FLERR, "Invalid exclude group keyword: group {} not found", arg[iarg+2]); if (ex2_group[nex_group] == -1) - error->all(FLERR, "Invalid exclude group keyword: group {} not found", arg[iarg+3]); + error->all(FLERR, "Invalid exclude group keyword: group {} not found", arg[iarg+3]); + if (group->dynamic[ex1_group[nex_group]] || group->dynamic[ex2_group[nex_group]]) + error->all(FLERR, "Neigh_modify exclude group is not compatible with dynamic groups"); nex_group++; iarg += 4; } else if (strcmp(arg[iarg+1],"molecule/inter") == 0 ||