add rigid body overlap warnings to change_box and delete_atoms
This commit is contained in:
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user