git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7003 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2011-09-23 18:06:55 +00:00
parent 2d99de131d
commit 19e8c92a90
468 changed files with 4628 additions and 5204 deletions

View File

@ -68,9 +68,6 @@ enum{SCALAR,VECTOR,ARRAY};
#define MAXLINE 8192 // make this 4x longer than Input::MAXLINE
#define DELTA 8
#define MIN(A,B) ((A) < (B)) ? (A) : (B)
#define MAX(A,B) ((A) > (B)) ? (A) : (B)
/* ---------------------------------------------------------------------- */
Thermo::Thermo(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
@ -103,7 +100,7 @@ Thermo::Thermo(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
lineflag = MULTILINE;
} else if (strcmp(style,"custom") == 0) {
if (narg == 1) error->all("Illegal thermo style custom command");
if (narg == 1) error->all(FLERR,"Illegal thermo style custom command");
line[0] = '\0';
for (int iarg = 1; iarg < narg; iarg++) {
strcat(line,arg[iarg]);
@ -111,7 +108,7 @@ Thermo::Thermo(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
}
line[strlen(line)-1] = '\0';
} else error->all("Illegal thermo style command");
} else error->all(FLERR,"Illegal thermo style command");
// ptrs, flags, IDs for compute objects thermo may use or create
@ -229,7 +226,7 @@ void Thermo::init()
int icompute;
for (i = 0; i < ncompute; i++) {
icompute = modify->find_compute(id_compute[i]);
if (icompute < 0) error->all("Could not find thermo compute ID");
if (icompute < 0) error->all(FLERR,"Could not find thermo compute ID");
computes[i] = modify->compute[icompute];
cudable = cudable && computes[i]->cudable;
}
@ -240,10 +237,10 @@ void Thermo::init()
int ifix;
for (i = 0; i < nfix; i++) {
ifix = modify->find_fix(id_fix[i]);
if (ifix < 0) error->all("Could not find thermo fix ID");
if (ifix < 0) error->all(FLERR,"Could not find thermo fix ID");
fixes[i] = modify->fix[ifix];
if (output->thermo_every % fixes[i]->global_freq)
error->all("Thermo and fix not computed at compatible times");
error->all(FLERR,"Thermo and fix not computed at compatible times");
}
// find current ptr for each Variable ID
@ -252,7 +249,7 @@ void Thermo::init()
for (i = 0; i < nvariable; i++) {
ivariable = input->variable->find(id_variable[i]);
if (ivariable < 0)
error->all("Could not find thermo custom variable name");
error->all(FLERR,"Could not find thermo custom variable name");
variables[i] = ivariable;
}
@ -366,7 +363,7 @@ bigint Thermo::lost_check()
bigint ntotal;
bigint nblocal = atom->nlocal;
MPI_Allreduce(&nblocal,&ntotal,1,MPI_LMP_BIGINT,MPI_SUM,world);
if (ntotal < 0 || ntotal > MAXBIGINT) error->all("Too many total atoms");
if (ntotal < 0 || ntotal > MAXBIGINT) error->all(FLERR,"Too many total atoms");
if (ntotal == atom->natoms) return ntotal;
// if not checking or already warned, just return
@ -385,7 +382,7 @@ bigint Thermo::lost_check()
sprintf(str,
"Lost atoms: original " BIGINT_FORMAT " current " BIGINT_FORMAT,
atom->natoms,ntotal);
error->all(str);
error->all(FLERR,str);
}
// warning message
@ -394,7 +391,7 @@ bigint Thermo::lost_check()
sprintf(str,
"Lost atoms: original " BIGINT_FORMAT " current " BIGINT_FORMAT,
atom->natoms,ntotal);
if (me == 0) error->warning(str,0);
if (me == 0) error->warning(FLERR,str,0);
// reset total atom count
@ -409,25 +406,25 @@ bigint Thermo::lost_check()
void Thermo::modify_params(int narg, char **arg)
{
if (narg == 0) error->all("Illegal thermo_modify command");
if (narg == 0) error->all(FLERR,"Illegal thermo_modify command");
modified = 1;
int iarg = 0;
while (iarg < narg) {
if (strcmp(arg[iarg],"every") == 0) {
if (iarg+2 > narg) error->all("Illegal thermo_modify command");
if (iarg+2 > narg) error->all(FLERR,"Illegal thermo_modify command");
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) {
delete [] output->var_thermo;
int n = strlen(&arg[iarg+1][2]) + 1;
output->var_thermo = new char[n];
strcpy(output->var_thermo,&arg[iarg+1][2]);
} else error->all("Illegal thermo_modify command");
} else error->all(FLERR,"Illegal thermo_modify command");
output->thermo_every = 0;
iarg += 2;
} else if (strcmp(arg[iarg],"temp") == 0) {
if (iarg+2 > narg) error->all("Illegal thermo_modify command");
if (index_temp < 0) error->all("Thermo style does not use temp");
if (iarg+2 > narg) error->all(FLERR,"Illegal thermo_modify command");
if (index_temp < 0) error->all(FLERR,"Thermo style does not use temp");
delete [] id_compute[index_temp];
int n = strlen(arg[iarg+1]) + 1;
id_compute[index_temp] = new char[n];
@ -435,24 +432,24 @@ void Thermo::modify_params(int narg, char **arg)
int icompute = modify->find_compute(arg[iarg+1]);
if (icompute < 0)
error->all("Could not find thermo_modify temperature ID");
error->all(FLERR,"Could not find thermo_modify temperature ID");
temperature = modify->compute[icompute];
if (temperature->tempflag == 0)
error->all("Thermo_modify temperature ID does not "
error->all(FLERR,"Thermo_modify temperature ID does not "
"compute temperature");
if (temperature->igroup != 0 && comm->me == 0)
error->warning("Temperature for thermo pressure is not for group all");
error->warning(FLERR,"Temperature for thermo pressure is not for group all");
// reset id_temp of pressure to new temperature ID
// either pressure currently being used by thermo or "thermo_press"
if (index_press_scalar >= 0) {
icompute = modify->find_compute(id_compute[index_press_scalar]);
if (icompute < 0) error->all("Pressure ID for thermo does not exist");
if (icompute < 0) error->all(FLERR,"Pressure ID for thermo does not exist");
} else if (index_press_vector >= 0) {
icompute = modify->find_compute(id_compute[index_press_vector]);
if (icompute < 0) error->all("Pressure ID for thermo does not exist");
if (icompute < 0) error->all(FLERR,"Pressure ID for thermo does not exist");
} else icompute = modify->find_compute((char *) "thermo_press");
modify->compute[icompute]->reset_extra_compute_fix(arg[iarg+1]);
@ -460,9 +457,9 @@ void Thermo::modify_params(int narg, char **arg)
iarg += 2;
} else if (strcmp(arg[iarg],"press") == 0) {
if (iarg+2 > narg) error->all("Illegal thermo_modify command");
if (iarg+2 > narg) error->all(FLERR,"Illegal thermo_modify command");
if (index_press_scalar < 0 && index_press_vector < 0)
error->all("Thermo style does not use press");
error->all(FLERR,"Thermo style does not use press");
if (index_press_scalar >= 0) {
delete [] id_compute[index_press_scalar];
@ -478,46 +475,46 @@ void Thermo::modify_params(int narg, char **arg)
}
int icompute = modify->find_compute(arg[iarg+1]);
if (icompute < 0) error->all("Could not find thermo_modify pressure ID");
if (icompute < 0) error->all(FLERR,"Could not find thermo_modify pressure ID");
pressure = modify->compute[icompute];
if (pressure->pressflag == 0)
error->all("Thermo_modify pressure ID does not compute pressure");
error->all(FLERR,"Thermo_modify pressure ID does not compute pressure");
iarg += 2;
} else if (strcmp(arg[iarg],"lost") == 0) {
if (iarg+2 > narg) error->all("Illegal thermo_modify command");
if (iarg+2 > narg) error->all(FLERR,"Illegal thermo_modify command");
if (strcmp(arg[iarg+1],"ignore") == 0) lostflag = IGNORE;
else if (strcmp(arg[iarg+1],"warn") == 0) lostflag = WARN;
else if (strcmp(arg[iarg+1],"error") == 0) lostflag = ERROR;
else error->all("Illegal thermo_modify command");
else error->all(FLERR,"Illegal thermo_modify command");
iarg += 2;
} else if (strcmp(arg[iarg],"norm") == 0) {
if (iarg+2 > narg) error->all("Illegal thermo_modify command");
if (iarg+2 > narg) error->all(FLERR,"Illegal thermo_modify command");
normuserflag = 1;
if (strcmp(arg[iarg+1],"no") == 0) normuser = 0;
else if (strcmp(arg[iarg+1],"yes") == 0) normuser = 1;
else error->all("Illegal thermo_modify command");
else error->all(FLERR,"Illegal thermo_modify command");
iarg += 2;
} else if (strcmp(arg[iarg],"flush") == 0) {
if (iarg+2 > narg) error->all("Illegal thermo_modify command");
if (iarg+2 > narg) error->all(FLERR,"Illegal thermo_modify command");
if (strcmp(arg[iarg+1],"no") == 0) flushflag = 0;
else if (strcmp(arg[iarg+1],"yes") == 0) flushflag = 1;
else error->all("Illegal thermo_modify command");
else error->all(FLERR,"Illegal thermo_modify command");
iarg += 2;
} else if (strcmp(arg[iarg],"line") == 0) {
if (iarg+2 > narg) error->all("Illegal thermo_modify command");
if (iarg+2 > narg) error->all(FLERR,"Illegal thermo_modify command");
if (strcmp(arg[iarg+1],"one") == 0) lineflag = ONELINE;
else if (strcmp(arg[iarg+1],"multi") == 0) lineflag = MULTILINE;
else error->all("Illegal thermo_modify command");
else error->all(FLERR,"Illegal thermo_modify command");
iarg += 2;
} else if (strcmp(arg[iarg],"format") == 0) {
if (iarg+3 > narg) error->all("Illegal thermo_modify command");
if (iarg+3 > narg) error->all(FLERR,"Illegal thermo_modify command");
if (strcmp(arg[iarg+1],"int") == 0) {
if (format_int_user) delete [] format_int_user;
int n = strlen(arg[iarg+2]) + 1;
@ -528,7 +525,7 @@ void Thermo::modify_params(int narg, char **arg)
format_bigint_user = new char[n];
char *ptr = strchr(format_int_user,'d');
if (ptr == NULL)
error->all("Thermo_modify int format does not contain d character");
error->all(FLERR,"Thermo_modify int format does not contain d character");
*ptr = '\0';
sprintf(format_bigint_user,"%s%s%s",format_int_user,
BIGINT_FORMAT,ptr+1);
@ -541,7 +538,7 @@ void Thermo::modify_params(int narg, char **arg)
} else {
int i = atoi(arg[iarg+1]) - 1;
if (i < 0 || i >= nfield_initial)
error->all("Illegal thermo_modify command");
error->all(FLERR,"Illegal thermo_modify command");
if (format_user[i]) delete [] format_user[i];
int n = strlen(arg[iarg+2]) + 1;
format_user[i] = new char[n];
@ -549,7 +546,7 @@ void Thermo::modify_params(int narg, char **arg)
}
iarg += 3;
} else error->all("Illegal thermo_modify command");
} else error->all(FLERR,"Illegal thermo_modify command");
}
}
@ -744,15 +741,15 @@ void Thermo::parse_fields(char *str)
} else if (strcmp(word,"xlat") == 0) {
if (domain->lattice == NULL)
error->all("Thermo keyword requires lattice be defined");
error->all(FLERR,"Thermo keyword requires lattice be defined");
addfield("Xlat",&Thermo::compute_xlat,FLOAT);
} else if (strcmp(word,"ylat") == 0) {
if (domain->lattice == NULL)
error->all("Thermo keyword requires lattice be defined");
error->all(FLERR,"Thermo keyword requires lattice be defined");
addfield("Ylat",&Thermo::compute_ylat,FLOAT);
} else if (strcmp(word,"zlat") == 0) {
if (domain->lattice == NULL)
error->all("Thermo keyword requires lattice be defined");
error->all(FLERR,"Thermo keyword requires lattice be defined");
addfield("Zlat",&Thermo::compute_zlat,FLOAT);
} else if (strcmp(word,"pxx") == 0) {
@ -823,21 +820,21 @@ void Thermo::parse_fields(char *str)
if (word[0] == 'c') {
n = modify->find_compute(id);
if (n < 0) error->all("Could not find thermo custom compute ID");
if (n < 0) error->all(FLERR,"Could not find thermo custom compute ID");
if (argindex1[nfield] == 0 && modify->compute[n]->scalar_flag == 0)
error->all("Thermo compute does not compute scalar");
error->all(FLERR,"Thermo compute does not compute scalar");
if (argindex1[nfield] > 0 && argindex2[nfield] == 0) {
if (modify->compute[n]->vector_flag == 0)
error->all("Thermo compute does not compute vector");
error->all(FLERR,"Thermo compute does not compute vector");
if (argindex1[nfield] > modify->compute[n]->size_vector)
error->all("Thermo compute vector is accessed out-of-range");
error->all(FLERR,"Thermo compute vector is accessed out-of-range");
}
if (argindex1[nfield] > 0 && argindex2[nfield] > 0) {
if (modify->compute[n]->array_flag == 0)
error->all("Thermo compute does not compute array");
error->all(FLERR,"Thermo compute does not compute array");
if (argindex1[nfield] > modify->compute[n]->size_array_rows ||
argindex2[nfield] > modify->compute[n]->size_array_cols)
error->all("Thermo compute array is accessed out-of-range");
error->all(FLERR,"Thermo compute array is accessed out-of-range");
}
if (argindex1[nfield] == 0)
@ -850,21 +847,21 @@ void Thermo::parse_fields(char *str)
} else if (word[0] == 'f') {
n = modify->find_fix(id);
if (n < 0) error->all("Could not find thermo custom fix ID");
if (n < 0) error->all(FLERR,"Could not find thermo custom fix ID");
if (argindex1[nfield] == 0 && modify->fix[n]->scalar_flag == 0)
error->all("Thermo fix does not compute scalar");
error->all(FLERR,"Thermo fix does not compute scalar");
if (argindex1[nfield] > 0 && argindex2[nfield] == 0) {
if (modify->fix[n]->vector_flag == 0)
error->all("Thermo fix does not compute vector");
error->all(FLERR,"Thermo fix does not compute vector");
if (argindex1[nfield] > modify->fix[n]->size_vector)
error->all("Thermo fix vector is accessed out-of-range");
error->all(FLERR,"Thermo fix vector is accessed out-of-range");
}
if (argindex1[nfield] > 0 && argindex2[nfield] > 0) {
if (modify->fix[n]->array_flag == 0)
error->all("Thermo fix does not compute array");
error->all(FLERR,"Thermo fix does not compute array");
if (argindex1[nfield] > modify->fix[n]->size_array_rows ||
argindex2[nfield] > modify->fix[n]->size_array_cols)
error->all("Thermo fix array is accessed out-of-range");
error->all(FLERR,"Thermo fix array is accessed out-of-range");
}
field2index[nfield] = add_fix(id);
@ -872,11 +869,11 @@ void Thermo::parse_fields(char *str)
} else if (word[0] == 'v') {
n = input->variable->find(id);
if (n < 0) error->all("Could not find thermo custom variable name");
if (n < 0) error->all(FLERR,"Could not find thermo custom variable name");
if (input->variable->equalstyle(n) == 0)
error->all("Thermo custom variable is not equal-style variable");
error->all(FLERR,"Thermo custom variable is not equal-style variable");
if (argindex1[nfield])
error->all("Thermo custom variable cannot be indexed");
error->all(FLERR,"Thermo custom variable cannot be indexed");
field2index[nfield] = add_variable(id);
addfield(copy,&Thermo::compute_variable,FLOAT);
@ -884,7 +881,7 @@ void Thermo::parse_fields(char *str)
delete [] id;
} else error->all("Invalid keyword in thermo_style custom command");
} else error->all(FLERR,"Invalid keyword in thermo_style custom command");
word = strtok(NULL," \0");
}
@ -974,13 +971,13 @@ int Thermo::evaluate_keyword(char *word, double *answer)
} else if (strcmp(word,"elapsed") == 0) {
if (update->whichflag == 0)
error->all("This variable thermo keyword cannot be used between runs");
error->all(FLERR,"This variable thermo keyword cannot be used between runs");
compute_elapsed();
dvalue = bivalue;
} else if (strcmp(word,"elaplong") == 0) {
if (update->whichflag == 0)
error->all("This variable thermo keyword cannot be used between runs");
error->all(FLERR,"This variable thermo keyword cannot be used between runs");
compute_elapsed_long();
dvalue = bivalue;
@ -989,17 +986,17 @@ int Thermo::evaluate_keyword(char *word, double *answer)
} else if (strcmp(word,"cpu") == 0) {
if (update->whichflag == 0)
error->all("This variable thermo keyword cannot be used between runs");
error->all(FLERR,"This variable thermo keyword cannot be used between runs");
compute_cpu();
} else if (strcmp(word,"tpcpu") == 0) {
if (update->whichflag == 0)
error->all("This variable thermo keyword cannot be used between runs");
error->all(FLERR,"This variable thermo keyword cannot be used between runs");
compute_tpcpu();
} else if (strcmp(word,"spcpu") == 0) {
if (update->whichflag == 0)
error->all("This variable thermo keyword cannot be used between runs");
error->all(FLERR,"This variable thermo keyword cannot be used between runs");
compute_spcpu();
} else if (strcmp(word,"atoms") == 0) {
@ -1008,11 +1005,11 @@ int Thermo::evaluate_keyword(char *word, double *answer)
} else if (strcmp(word,"temp") == 0) {
if (!temperature)
error->all("Thermo keyword in variable requires "
error->all(FLERR,"Thermo keyword in variable requires "
"thermo to use/init temp");
if (update->whichflag == 0) {
if (temperature->invoked_scalar != update->ntimestep)
error->all("Compute used in variable thermo keyword between runs "
error->all(FLERR,"Compute used in variable thermo keyword between runs "
"is not current");
} else if (!(temperature->invoked_flag & INVOKED_SCALAR)) {
temperature->compute_scalar();
@ -1022,11 +1019,11 @@ int Thermo::evaluate_keyword(char *word, double *answer)
} else if (strcmp(word,"press") == 0) {
if (!pressure)
error->all("Thermo keyword in variable requires "
error->all(FLERR,"Thermo keyword in variable requires "
"thermo to use/init press");
if (update->whichflag == 0) {
if (pressure->invoked_scalar != update->ntimestep)
error->all("Compute used in variable thermo keyword between runs "
error->all(FLERR,"Compute used in variable thermo keyword between runs "
"is not current");
} else if (!(pressure->invoked_flag & INVOKED_SCALAR)) {
pressure->compute_scalar();
@ -1036,10 +1033,10 @@ int Thermo::evaluate_keyword(char *word, double *answer)
} else if (strcmp(word,"pe") == 0) {
if (!pe)
error->all("Thermo keyword in variable requires thermo to use/init pe");
error->all(FLERR,"Thermo keyword in variable requires thermo to use/init pe");
if (update->whichflag == 0) {
if (pe->invoked_scalar != update->ntimestep)
error->all("Compute used in variable thermo keyword between runs "
error->all(FLERR,"Compute used in variable thermo keyword between runs "
"is not current");
} else if (!(pe->invoked_flag & INVOKED_SCALAR)) {
pe->compute_scalar();
@ -1049,11 +1046,11 @@ int Thermo::evaluate_keyword(char *word, double *answer)
} else if (strcmp(word,"ke") == 0) {
if (!temperature)
error->all("Thermo keyword in variable requires "
error->all(FLERR,"Thermo keyword in variable requires "
"thermo to use/init temp");
if (update->whichflag == 0) {
if (temperature->invoked_scalar != update->ntimestep)
error->all("Compute used in variable thermo keyword between runs "
error->all(FLERR,"Compute used in variable thermo keyword between runs "
"is not current");
} else if (!(temperature->invoked_flag & INVOKED_SCALAR)) {
temperature->compute_scalar();
@ -1063,21 +1060,21 @@ int Thermo::evaluate_keyword(char *word, double *answer)
} else if (strcmp(word,"etotal") == 0) {
if (!pe)
error->all("Thermo keyword in variable requires thermo to use/init pe");
error->all(FLERR,"Thermo keyword in variable requires thermo to use/init pe");
if (update->whichflag == 0) {
if (pe->invoked_scalar != update->ntimestep)
error->all("Compute used in variable thermo keyword between runs "
error->all(FLERR,"Compute used in variable thermo keyword between runs "
"is not current");
} else if (!(pe->invoked_flag & INVOKED_SCALAR)) {
pe->compute_scalar();
pe->invoked_flag |= INVOKED_SCALAR;
}
if (!temperature)
error->all("Thermo keyword in variable requires "
error->all(FLERR,"Thermo keyword in variable requires "
"thermo to use/init temp");
if (update->whichflag == 0) {
if (temperature->invoked_scalar != update->ntimestep)
error->all("Compute used in variable thermo keyword between runs "
error->all(FLERR,"Compute used in variable thermo keyword between runs "
"is not current");
} else if (!(temperature->invoked_flag & INVOKED_SCALAR)) {
temperature->compute_scalar();
@ -1087,32 +1084,32 @@ int Thermo::evaluate_keyword(char *word, double *answer)
} else if (strcmp(word,"enthalpy") == 0) {
if (!pe)
error->all("Thermo keyword in variable requires thermo to use/init pe");
error->all(FLERR,"Thermo keyword in variable requires thermo to use/init pe");
if (update->whichflag == 0) {
if (pe->invoked_scalar != update->ntimestep)
error->all("Compute used in variable thermo keyword between runs "
error->all(FLERR,"Compute used in variable thermo keyword between runs "
"is not current");
} else if (!(pe->invoked_flag & INVOKED_SCALAR)) {
pe->compute_scalar();
pe->invoked_flag |= INVOKED_SCALAR;
}
if (!temperature)
error->all("Thermo keyword in variable requires "
error->all(FLERR,"Thermo keyword in variable requires "
"thermo to use/init temp");
if (update->whichflag == 0) {
if (temperature->invoked_scalar != update->ntimestep)
error->all("Compute used in variable thermo keyword between runs "
error->all(FLERR,"Compute used in variable thermo keyword between runs "
"is not current");
} else if (!(temperature->invoked_flag & INVOKED_SCALAR)) {
temperature->compute_scalar();
temperature->invoked_flag |= INVOKED_SCALAR;
}
if (!pressure)
error->all("Thermo keyword in variable requires "
error->all(FLERR,"Thermo keyword in variable requires "
"thermo to use/init press");
if (update->whichflag == 0) {
if (pressure->invoked_scalar != update->ntimestep)
error->all("Compute used in variable thermo keyword between runs "
error->all(FLERR,"Compute used in variable thermo keyword between runs "
"is not current");
} else if (!(pressure->invoked_flag & INVOKED_SCALAR)) {
pressure->compute_scalar();
@ -1122,81 +1119,81 @@ int Thermo::evaluate_keyword(char *word, double *answer)
} else if (strcmp(word,"evdwl") == 0) {
if (update->eflag_global != update->ntimestep)
error->all("Energy was not tallied on needed timestep");
error->all(FLERR,"Energy was not tallied on needed timestep");
if (!pe)
error->all("Thermo keyword in variable requires thermo to use/init pe");
error->all(FLERR,"Thermo keyword in variable requires thermo to use/init pe");
pe->invoked_flag |= INVOKED_SCALAR;
compute_evdwl();
} else if (strcmp(word,"ecoul") == 0) {
if (update->eflag_global != update->ntimestep)
error->all("Energy was not tallied on needed timestep");
error->all(FLERR,"Energy was not tallied on needed timestep");
if (!pe)
error->all("Thermo keyword in variable requires thermo to use/init pe");
error->all(FLERR,"Thermo keyword in variable requires thermo to use/init pe");
pe->invoked_flag |= INVOKED_SCALAR;
compute_ecoul();
} else if (strcmp(word,"epair") == 0) {
if (update->eflag_global != update->ntimestep)
error->all("Energy was not tallied on needed timestep");
error->all(FLERR,"Energy was not tallied on needed timestep");
if (!pe)
error->all("Thermo keyword in variable requires thermo to use/init pe");
error->all(FLERR,"Thermo keyword in variable requires thermo to use/init pe");
pe->invoked_flag |= INVOKED_SCALAR;
compute_epair();
} else if (strcmp(word,"ebond") == 0) {
if (update->eflag_global != update->ntimestep)
error->all("Energy was not tallied on needed timestep");
error->all(FLERR,"Energy was not tallied on needed timestep");
if (!pe)
error->all("Thermo keyword in variable requires thermo to use/init pe");
error->all(FLERR,"Thermo keyword in variable requires thermo to use/init pe");
pe->invoked_flag |= INVOKED_SCALAR;
compute_ebond();
} else if (strcmp(word,"eangle") == 0) {
if (update->eflag_global != update->ntimestep)
error->all("Energy was not tallied on needed timestep");
error->all(FLERR,"Energy was not tallied on needed timestep");
if (!pe)
error->all("Thermo keyword in variable requires thermo to use/init pe");
error->all(FLERR,"Thermo keyword in variable requires thermo to use/init pe");
pe->invoked_flag |= INVOKED_SCALAR;
compute_eangle();
} else if (strcmp(word,"edihed") == 0) {
if (update->eflag_global != update->ntimestep)
error->all("Energy was not tallied on needed timestep");
error->all(FLERR,"Energy was not tallied on needed timestep");
if (!pe)
error->all("Thermo keyword in variable requires thermo to use/init pe");
error->all(FLERR,"Thermo keyword in variable requires thermo to use/init pe");
pe->invoked_flag |= INVOKED_SCALAR;
compute_edihed();
} else if (strcmp(word,"eimp") == 0) {
if (update->eflag_global != update->ntimestep)
error->all("Energy was not tallied on needed timestep");
error->all(FLERR,"Energy was not tallied on needed timestep");
if (!pe)
error->all("Thermo keyword in variable requires thermo to use/init pe");
error->all(FLERR,"Thermo keyword in variable requires thermo to use/init pe");
pe->invoked_flag |= INVOKED_SCALAR;
compute_eimp();
} else if (strcmp(word,"emol") == 0) {
if (update->eflag_global != update->ntimestep)
error->all("Energy was not tallied on needed timestep");
error->all(FLERR,"Energy was not tallied on needed timestep");
if (!pe)
error->all("Thermo keyword in variable requires thermo to use/init pe");
error->all(FLERR,"Thermo keyword in variable requires thermo to use/init pe");
pe->invoked_flag |= INVOKED_SCALAR;
compute_emol();
} else if (strcmp(word,"elong") == 0) {
if (update->eflag_global != update->ntimestep)
error->all("Energy was not tallied on needed timestep");
error->all(FLERR,"Energy was not tallied on needed timestep");
if (!pe)
error->all("Thermo keyword in variable requires thermo to use/init pe");
error->all(FLERR,"Thermo keyword in variable requires thermo to use/init pe");
pe->invoked_flag |= INVOKED_SCALAR;
compute_elong();
} else if (strcmp(word,"etail") == 0) {
if (update->eflag_global != update->ntimestep)
error->all("Energy was not tallied on needed timestep");
error->all(FLERR,"Energy was not tallied on needed timestep");
if (!pe)
error->all("Thermo keyword in variable requires thermo to use/init pe");
error->all(FLERR,"Thermo keyword in variable requires thermo to use/init pe");
pe->invoked_flag |= INVOKED_SCALAR;
compute_etail();
@ -1218,24 +1215,24 @@ int Thermo::evaluate_keyword(char *word, double *answer)
else if (strcmp(word,"xlat") == 0) {
if (domain->lattice == NULL)
error->all("Thermo keyword in variable requires lattice be defined");
error->all(FLERR,"Thermo keyword in variable requires lattice be defined");
compute_xlat();
} else if (strcmp(word,"ylat") == 0) {
if (domain->lattice == NULL)
error->all("Thermo keyword in variable requires lattice be defined");
error->all(FLERR,"Thermo keyword in variable requires lattice be defined");
compute_ylat();
} else if (strcmp(word,"zlat") == 0) {
if (domain->lattice == NULL)
error->all("Thermo keyword in variable requires lattice be defined");
error->all(FLERR,"Thermo keyword in variable requires lattice be defined");
compute_zlat();
} else if (strcmp(word,"pxx") == 0) {
if (!pressure)
error->all("Thermo keyword in variable requires "
error->all(FLERR,"Thermo keyword in variable requires "
"thermo to use/init press");
if (update->whichflag == 0) {
if (pressure->invoked_vector != update->ntimestep)
error->all("Compute used in variable thermo keyword between runs "
error->all(FLERR,"Compute used in variable thermo keyword between runs "
"is not current");
} else if (!(pressure->invoked_flag & INVOKED_VECTOR)) {
pressure->compute_vector();
@ -1245,11 +1242,11 @@ int Thermo::evaluate_keyword(char *word, double *answer)
} else if (strcmp(word,"pyy") == 0) {
if (!pressure)
error->all("Thermo keyword in variable requires "
error->all(FLERR,"Thermo keyword in variable requires "
"thermo to use/init press");
if (update->whichflag == 0) {
if (pressure->invoked_vector != update->ntimestep)
error->all("Compute used in variable thermo keyword between runs "
error->all(FLERR,"Compute used in variable thermo keyword between runs "
"is not current");
} else if (!(pressure->invoked_flag & INVOKED_VECTOR)) {
pressure->compute_vector();
@ -1259,11 +1256,11 @@ int Thermo::evaluate_keyword(char *word, double *answer)
} else if (strcmp(word,"pzz") == 0) {
if (!pressure)
error->all("Thermo keyword in variable requires "
error->all(FLERR,"Thermo keyword in variable requires "
"thermo to use/init press");
if (update->whichflag == 0) {
if (pressure->invoked_vector != update->ntimestep)
error->all("Compute used in variable thermo keyword between runs "
error->all(FLERR,"Compute used in variable thermo keyword between runs "
"is not current");
} else if (!(pressure->invoked_flag & INVOKED_VECTOR)) {
pressure->compute_vector();
@ -1273,11 +1270,11 @@ int Thermo::evaluate_keyword(char *word, double *answer)
} else if (strcmp(word,"pxy") == 0) {
if (!pressure)
error->all("Thermo keyword in variable requires "
error->all(FLERR,"Thermo keyword in variable requires "
"thermo to use/init press");
if (update->whichflag == 0) {
if (pressure->invoked_vector != update->ntimestep)
error->all("Compute used in variable thermo keyword between runs "
error->all(FLERR,"Compute used in variable thermo keyword between runs "
"is not current");
} else if (!(pressure->invoked_flag & INVOKED_VECTOR)) {
pressure->compute_vector();
@ -1287,11 +1284,11 @@ int Thermo::evaluate_keyword(char *word, double *answer)
} else if (strcmp(word,"pxz") == 0) {
if (!pressure)
error->all("Thermo keyword in variable requires "
error->all(FLERR,"Thermo keyword in variable requires "
"thermo to use/init press");
if (update->whichflag == 0) {
if (pressure->invoked_vector != update->ntimestep)
error->all("Compute used in variable thermo keyword between runs "
error->all(FLERR,"Compute used in variable thermo keyword between runs "
"is not current");
} else if (!(pressure->invoked_flag & INVOKED_VECTOR)) {
pressure->compute_vector();
@ -1301,11 +1298,11 @@ int Thermo::evaluate_keyword(char *word, double *answer)
} else if (strcmp(word,"pyz") == 0) {
if (!pressure)
error->all("Thermo keyword in variable requires "
error->all(FLERR,"Thermo keyword in variable requires "
"thermo to use/init press");
if (update->whichflag == 0) {
if (pressure->invoked_vector != update->ntimestep)
error->all("Compute used in variable thermo keyword between runs "
error->all(FLERR,"Compute used in variable thermo keyword between runs "
"is not current");
} else if (!(pressure->invoked_flag & INVOKED_VECTOR)) {
pressure->compute_vector();