git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8084 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -50,14 +50,16 @@ ComputeTempSphere::ComputeTempSphere(LAMMPS *lmp, int narg, char **arg) :
|
||||
int iarg = 3;
|
||||
while (iarg < narg) {
|
||||
if (strcmp(arg[iarg],"bias") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal compute temp/sphere command");
|
||||
if (iarg+2 > narg)
|
||||
error->all(FLERR,"Illegal compute temp/sphere command");
|
||||
tempbias = 1;
|
||||
int n = strlen(arg[iarg+1]) + 1;
|
||||
id_bias = new char[n];
|
||||
strcpy(id_bias,arg[iarg+1]);
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"dof") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal compute temp/sphere command");
|
||||
if (iarg+2 > narg)
|
||||
error->all(FLERR,"Illegal compute temp/sphere command");
|
||||
if (strcmp(arg[iarg+1],"rotate") == 0) mode = ROTATE;
|
||||
else if (strcmp(arg[iarg+1],"all") == 0) mode = ALL;
|
||||
else error->all(FLERR,"Illegal compute temp/sphere command");
|
||||
@ -87,7 +89,8 @@ void ComputeTempSphere::init()
|
||||
{
|
||||
if (tempbias) {
|
||||
int i = modify->find_compute(id_bias);
|
||||
if (i < 0) error->all(FLERR,"Could not find compute ID for temperature bias");
|
||||
if (i < 0)
|
||||
error->all(FLERR,"Could not find compute ID for temperature bias");
|
||||
tbias = modify->compute[i];
|
||||
if (tbias->tempflag == 0)
|
||||
error->all(FLERR,"Bias compute does not calculate temperature");
|
||||
|
||||
Reference in New Issue
Block a user