Added check for qeq and option to turn off check
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5172 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -154,7 +154,9 @@ void PairReaxC::allocate( )
|
||||
|
||||
void PairReaxC::settings(int narg, char **arg)
|
||||
{
|
||||
if (narg != 1) error->all("Illegal pair_style command");
|
||||
if (narg != 1 && narg != 3) error->all("Illegal pair_style command");
|
||||
|
||||
// read name of control file or use default controls
|
||||
|
||||
if (strcmp(arg[0],"NULL") == 0) {
|
||||
strcpy( control->sim_name, "simulate" );
|
||||
@ -176,6 +178,24 @@ void PairReaxC::settings(int narg, char **arg)
|
||||
out_control->angle_info = 0;
|
||||
} else Read_Control_File(arg[0], control, out_control);
|
||||
|
||||
// default values
|
||||
|
||||
qeqflag = 1;
|
||||
|
||||
// process optional keywords
|
||||
|
||||
int iarg = 1;
|
||||
|
||||
while (iarg < narg) {
|
||||
if (strcmp(arg[iarg],"checkqeq") == 0) {
|
||||
if (iarg+2 > narg) error->all("Illegal pair_style reax/c command");
|
||||
if (strcmp(arg[iarg+1],"yes") == 0) qeqflag = 1;
|
||||
else if (strcmp(arg[iarg+1],"no") == 0) qeqflag = 0;
|
||||
else error->all("Illegal pair_style reax/c command");
|
||||
iarg += 2;
|
||||
} else error->all("Illegal pair_style reax/c command");
|
||||
}
|
||||
|
||||
// LAMMPS is responsible for generating nbrs
|
||||
|
||||
control->reneighbor = 1;
|
||||
@ -231,8 +251,8 @@ void PairReaxC::init_style( )
|
||||
int iqeq;
|
||||
for (iqeq = 0; iqeq < modify->nfix; iqeq++)
|
||||
if (strcmp(modify->fix[iqeq]->style,"qeq/reax") == 0) break;
|
||||
if (iqeq == modify->nfix && comm->me == 0)
|
||||
error->warning("Pair reax/c requires use of fix qeq/reax");
|
||||
if (iqeq == modify->nfix && qeqflag == 1)
|
||||
error->all("Pair reax/c requires use of fix qeq/reax");
|
||||
|
||||
system->n = atom->nlocal;
|
||||
system->N = atom->nlocal + atom->nghost;
|
||||
|
||||
@ -51,6 +51,8 @@ class PairReaxC : public Pair {
|
||||
|
||||
double *chi,*eta,*gamma;
|
||||
|
||||
int qeqflag;
|
||||
|
||||
void allocate();
|
||||
void write_reax_atoms();
|
||||
void get_distance(rvec, rvec, double *, rvec *);
|
||||
|
||||
Reference in New Issue
Block a user