add rigid body overlap warnings to change_box and delete_atoms

This commit is contained in:
Axel Kohlmeyer
2017-06-13 16:26:49 -04:00
parent 4c69bbcf5c
commit 32b967ed9c
3 changed files with 19 additions and 7 deletions

View File

@ -316,6 +316,9 @@ void ChangeBox::command(int narg, char **arg)
} else if (ops[m].style == REMAP) {
if (modify->check_rigid_group_overlap(groupbit))
error->warning(FLERR,"Attempting to remap atoms in rigid bodies");
// convert atoms to lamda coords, using last box state
// convert atoms back to box coords, using current box state
// save current box state

View File

@ -69,6 +69,15 @@ void DeleteAtoms::command(int narg, char **arg)
else if (strcmp(arg[0],"porosity") == 0) delete_porosity(narg,arg);
else error->all(FLERR,"Illegal delete_atoms command");
if (allflag) {
int igroup = group->find("all");
if ((igroup >= 0) && modify->check_rigid_group_overlap(group->bitmask[igroup]))
error->warning(FLERR,"Attempting to delete atoms in rigid bodies");
} else {
if (modify->check_rigid_list_overlap(dlist))
error->warning(FLERR,"Attempting to delete atoms in rigid bodies");
}
// if allflag = 1, just reset atom->nlocal
// else delete atoms one by one

View File

@ -76,7 +76,7 @@ void DisplaceAtoms::command(int narg, char **arg)
groupbit = group->bitmask[igroup];
if (modify->check_rigid_group_overlap(groupbit))
error->warning(FLERR,"Displacing atoms in rigid bodies");
error->warning(FLERR,"Attempting to displace atoms in rigid bodies");
int style = -1;
if (strcmp(arg[1],"move") == 0) style = MOVE;