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

@ -50,15 +50,12 @@ using namespace LAMMPS_NS;
#define MIN_CAP 50
#define MIN_NBRS 100
#define MIN(A,B) ((A) < (B)) ? (A) : (B)
#define MAX(A,B) ((A) > (B)) ? (A) : (B)
/* ---------------------------------------------------------------------- */
FixQEqReax::FixQEqReax(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
{
if (narg != 8) error->all("Illegal fix qeq/reax command");
if (narg != 8) error->all(FLERR,"Illegal fix qeq/reax command");
nevery = atoi(arg[3]);
swa = atof(arg[4]);
@ -148,13 +145,13 @@ void FixQEqReax::pertype_parameters(char *arg)
if (strcmp(arg,"reax/c") == 0) {
reaxflag = 1;
Pair *pair = force->pair_match("reax/c",1);
if (pair == NULL) error->all("No pair reax/c for fix qeq/reax");
if (pair == NULL) error->all(FLERR,"No pair reax/c for fix qeq/reax");
int tmp;
chi = (double *) pair->extract("chi",tmp);
eta = (double *) pair->extract("eta",tmp);
gamma = (double *) pair->extract("gamma",tmp);
if (chi == NULL || eta == NULL || gamma == NULL)
error->all("Fix qeq/reax could not extract params from pair reax/c");
error->all(FLERR,"Fix qeq/reax could not extract params from pair reax/c");
return;
}
@ -171,17 +168,17 @@ void FixQEqReax::pertype_parameters(char *arg)
if (comm->me == 0) {
if ((pf = fopen(arg,"r")) == NULL)
error->one("Fix qeq/reax parameter file could not be found");
error->one(FLERR,"Fix qeq/reax parameter file could not be found");
for (i = 1; i <= ntypes && !feof(pf); i++) {
fscanf(pf,"%d %lg %lg %lg",&itype,&v1,&v2,&v3);
if (itype < 1 || itype > ntypes)
error->one("Fix qeq/reax invalid atom type in param file");
error->one(FLERR,"Fix qeq/reax invalid atom type in param file");
chi[itype] = v1;
eta[itype] = v2;
gamma[itype] = v3;
}
if (i <= ntypes) error->one("Invalid param file for fix qeq/reax");
if (i <= ntypes) error->one(FLERR,"Invalid param file for fix qeq/reax");
fclose(pf);
}
@ -287,7 +284,7 @@ void FixQEqReax::reallocate_matrix()
void FixQEqReax::init()
{
if (!atom->q_flag) error->all("Fix qeq/reax requires atom attribute q");
if (!atom->q_flag) error->all(FLERR,"Fix qeq/reax requires atom attribute q");
// need a half neighbor list w/ Newton off
// built whenever re-neighboring occurs
@ -333,11 +330,11 @@ void FixQEqReax::init_taper()
double d7, swa2, swa3, swb2, swb3;
if (fabs(swa) > 0.01 && comm->me == 0)
error->warning("Fix qeq/reax has non-zero lower Taper radius cutoff");
error->warning(FLERR,"Fix qeq/reax has non-zero lower Taper radius cutoff");
if (swb < 0)
error->all( "Fix qeq/reax has negative upper Taper radius cutoff");
error->all(FLERR, "Fix qeq/reax has negative upper Taper radius cutoff");
else if (swb < 5 && comm->me == 0)
error->warning("Fix qeq/reax has very low Taper radius cutoff");
error->warning(FLERR,"Fix qeq/reax has very low Taper radius cutoff");
d7 = pow( swb - swa, 7 );
swa2 = SQR( swa );
@ -536,8 +533,8 @@ void FixQEqReax::compute_H()
char str[128];
sprintf(str,"H matrix size has been exceeded: m_fill=%d H.m=%d\n",
m_fill, H.m );
error->warning(str);
error->all("Fix qeq/reax has insufficient QEq matrix size");
error->warning(FLERR,str);
error->all(FLERR,"Fix qeq/reax has insufficient QEq matrix size");
}
}
@ -606,7 +603,7 @@ int FixQEqReax::CG( double *b, double *x )
}
if (i >= 100 && comm->me == 0)
error->warning("Fix qeq/reax CG convergence failed");
error->warning(FLERR,"Fix qeq/reax CG convergence failed");
return i;
}