From 47b5b2dfa3e6dba0b248b59dfe87a3de6976e97c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 21 Aug 2024 10:34:20 -0400 Subject: [PATCH] throw error when trying to use neigh_modify exclude with dynamic groups --- doc/src/neigh_modify.rst | 2 ++ src/neighbor.cpp | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) 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 ||