diff --git a/src/displace_atoms.cpp b/src/displace_atoms.cpp index 5ecf5a2c9e..d5b6c1b9af 100644 --- a/src/displace_atoms.cpp +++ b/src/displace_atoms.cpp @@ -74,8 +74,7 @@ void DisplaceAtoms::command(int narg, char **arg) // group and style igroup = group->find(arg[0]); - if (igroup == -1) error->all(FLERR,"Could not find displace_atoms group ID"); - groupbit = group->bitmask[igroup]; + groupbit = group->get_bitmask_by_id(FLERR, arg[0], "displace_atoms"); if (modify->check_rigid_group_overlap(groupbit)) error->warning(FLERR,"Attempting to displace atoms in rigid bodies"); diff --git a/src/dump.cpp b/src/dump.cpp index 3425b6d441..b6d8cf535a 100644 --- a/src/dump.cpp +++ b/src/dump.cpp @@ -58,7 +58,7 @@ Dump::Dump(LAMMPS *lmp, int /*narg*/, char **arg) : id = utils::strdup(arg[0]); igroup = group->find(arg[1]); - groupbit = group->bitmask[igroup]; + groupbit = group->get_bitmask_by_id(FLERR, arg[1], fmt::format("dump {}", arg[2])); style = utils::strdup(arg[2]); @@ -311,6 +311,7 @@ void Dump::init() int Dump::count() { + // group all if (igroup == 0) return atom->nlocal; int *mask = atom->mask; diff --git a/src/fix.cpp b/src/fix.cpp index 8678706347..3f3b585e0a 100644 --- a/src/fix.cpp +++ b/src/fix.cpp @@ -48,8 +48,8 @@ Fix::Fix(LAMMPS *lmp, int /*narg*/, char **arg) : error->all(FLERR,"Fix ID must be alphanumeric or underscore characters"); igroup = group->find(arg[1]); - if (igroup == -1) error->all(FLERR,"Could not find fix group ID"); - groupbit = group->bitmask[igroup]; + if (igroup == -1) error->all(FLERR,"Could not find fix {} group ID {}", arg[2], arg[1]); + groupbit = group->get_bitmask_by_id(FLERR, arg[1], fmt::format("fix {}",arg[2])); style = utils::strdup(arg[2]);