apply the rigid body checks to some more example codes
This commit is contained in:
@ -64,7 +64,7 @@ idregion(NULL), hstr(NULL), vheat(NULL), vscale(NULL)
|
|||||||
// optional args
|
// optional args
|
||||||
|
|
||||||
iregion = -1;
|
iregion = -1;
|
||||||
|
|
||||||
int iarg = 5;
|
int iarg = 5;
|
||||||
while (iarg < narg) {
|
while (iarg < narg) {
|
||||||
if (strcmp(arg[iarg],"region") == 0) {
|
if (strcmp(arg[iarg],"region") == 0) {
|
||||||
@ -126,6 +126,10 @@ void FixHeat::init()
|
|||||||
else error->all(FLERR,"Variable for fix heat is invalid style");
|
else error->all(FLERR,"Variable for fix heat is invalid style");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check for rigid bodies in region (done here for performance reasons)
|
||||||
|
if (modify->check_rigid_region_overlap(groupbit,domain->regions[iregion]))
|
||||||
|
error->warning(FLERR,"Cannot apply fix heat to atoms in rigid bodies");
|
||||||
|
|
||||||
// cannot have 0 atoms in group
|
// cannot have 0 atoms in group
|
||||||
|
|
||||||
if (group->count(igroup) == 0)
|
if (group->count(igroup) == 0)
|
||||||
|
|||||||
@ -128,6 +128,9 @@ void FixTempBerendsen::init()
|
|||||||
error->all(FLERR,"Temperature ID for fix temp/berendsen does not exist");
|
error->all(FLERR,"Temperature ID for fix temp/berendsen does not exist");
|
||||||
temperature = modify->compute[icompute];
|
temperature = modify->compute[icompute];
|
||||||
|
|
||||||
|
if (modify->check_rigid_group_overlap(groupbit))
|
||||||
|
error->warning(FLERR,"Cannot thermostat atoms in rigid bodies");
|
||||||
|
|
||||||
if (temperature->tempbias) which = BIAS;
|
if (temperature->tempbias) which = BIAS;
|
||||||
else which = NOBIAS;
|
else which = NOBIAS;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -155,6 +155,9 @@ void FixTempCSLD::init()
|
|||||||
error->all(FLERR,"Temperature ID for fix temp/csld does not exist");
|
error->all(FLERR,"Temperature ID for fix temp/csld does not exist");
|
||||||
temperature = modify->compute[icompute];
|
temperature = modify->compute[icompute];
|
||||||
|
|
||||||
|
if (modify->check_rigid_group_overlap(groupbit))
|
||||||
|
error->warning(FLERR,"Cannot thermostat atoms in rigid bodies");
|
||||||
|
|
||||||
if (temperature->tempbias) which = BIAS;
|
if (temperature->tempbias) which = BIAS;
|
||||||
else which = NOBIAS;
|
else which = NOBIAS;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user