git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11789 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -56,8 +56,6 @@ int FixNVELine::setmask()
|
||||
|
||||
void FixNVELine::init()
|
||||
{
|
||||
int i,itype;
|
||||
|
||||
// error checks
|
||||
|
||||
avec = (AtomVecLine *) atom->style_match("line");
|
||||
@ -73,7 +71,7 @@ void FixNVELine::init()
|
||||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
for (i = 0; i < nlocal; i++)
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit) {
|
||||
if (line[i] < 0) error->one(FLERR,"Fix nve/line requires line particles");
|
||||
}
|
||||
@ -85,7 +83,7 @@ void FixNVELine::init()
|
||||
|
||||
void FixNVELine::initial_integrate(int vflag)
|
||||
{
|
||||
double dtfm,dtirotate,delx,dely,length,theta;
|
||||
double dtfm,dtirotate,length,theta;
|
||||
|
||||
AtomVecLine::Bonus *bonus = avec->bonus;
|
||||
int *line = atom->line;
|
||||
|
||||
@ -50,8 +50,6 @@ int FixNVETri::setmask()
|
||||
|
||||
void FixNVETri::init()
|
||||
{
|
||||
int i,itype;
|
||||
|
||||
// error checks
|
||||
|
||||
avec = (AtomVecTri *) atom->style_match("tri");
|
||||
@ -67,7 +65,7 @@ void FixNVETri::init()
|
||||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
for (i = 0; i < nlocal; i++)
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit) {
|
||||
if (tri[i] < 0) error->one(FLERR,"Fix nve/tri requires tri particles");
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ void PairLineLJ::compute(int eflag, int vflag)
|
||||
int ni,nj,npi,npj,ifirst,jfirst;
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair;
|
||||
double rsq,r2inv,r6inv,term1,term2,sig,sig3,forcelj;
|
||||
double xi[2],xj[2],fi[2],fj[2],dxi,dxj,dyi,dyj,ti,tj;
|
||||
double xi[2],xj[2],fi[2],fj[2],dxi,dxj,dyi,dyj;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
|
||||
evdwl = 0.0;
|
||||
@ -441,7 +441,6 @@ void PairLineLJ::discretize(int i, double sigma)
|
||||
memory->srealloc(discrete,dmax*sizeof(Discrete),"pair:discrete");
|
||||
}
|
||||
|
||||
double *x = atom->x[i];
|
||||
sigma = length/n;
|
||||
double delta;
|
||||
|
||||
|
||||
@ -176,7 +176,7 @@ void BodyNparticle::data_body(int ibonus, int ninteger, int ndouble,
|
||||
|
||||
// bonus->dvalue = sub-particle displacements in body frame
|
||||
|
||||
double delta[3],displace[3];
|
||||
double delta[3];
|
||||
|
||||
int j = 6;
|
||||
int k = 0;
|
||||
|
||||
@ -174,7 +174,6 @@ int ComputeBodyLocal::compute_body(int flag)
|
||||
|
||||
} else {
|
||||
ibonus = body[i];
|
||||
AtomVecBody::Bonus *bonus = &avec->bonus[ibonus];
|
||||
n = bptr->noutrow(ibonus);
|
||||
for (int j = 0; j < n; j++) {
|
||||
bptr->output(ibonus,j,values);
|
||||
|
||||
@ -108,8 +108,6 @@ void PairLubricate::compute(int eflag, int vflag)
|
||||
int nlocal = atom->nlocal;
|
||||
int newton_pair = force->newton_pair;
|
||||
|
||||
int overlaps = 0;
|
||||
|
||||
inum = list->inum;
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
@ -299,10 +297,6 @@ void PairLubricate::compute(int eflag, int vflag)
|
||||
|
||||
h_sep = r - 2.0*radi;
|
||||
|
||||
// check for overlaps
|
||||
|
||||
if (h_sep < 0.0) overlaps++;
|
||||
|
||||
// if less than the minimum gap use the minimum gap instead
|
||||
|
||||
if (r < cut_inner[itype][jtype])
|
||||
@ -445,16 +439,6 @@ void PairLubricate::compute(int eflag, int vflag)
|
||||
}
|
||||
}
|
||||
|
||||
// to DEBUG: set print_overlaps to 1
|
||||
|
||||
int print_overlaps = 0;
|
||||
if (print_overlaps) {
|
||||
int overlaps_all;
|
||||
MPI_Allreduce(&overlaps,&overlaps_all,1,MPI_INT,MPI_SUM,world);
|
||||
if (overlaps_all && comm->me == 0)
|
||||
printf("Number of overlaps = %d\n",overlaps);
|
||||
}
|
||||
|
||||
if (vflag_fdotr) virial_fdotr_compute();
|
||||
}
|
||||
|
||||
|
||||
@ -181,21 +181,17 @@ void PairLubricateU::compute(int eflag, int vflag)
|
||||
|
||||
void PairLubricateU::stage_one()
|
||||
{
|
||||
int i,j,ii,inum,itype;
|
||||
int i,j,ii,inum;
|
||||
|
||||
double **x = atom->x;
|
||||
double **v = atom->v;
|
||||
double **f = atom->f;
|
||||
double **omega = atom->omega;
|
||||
double **torque = atom->torque;
|
||||
double *radius = atom->radius;
|
||||
int *type = atom->type;
|
||||
|
||||
int newton_pair = force->newton_pair;
|
||||
int *ilist;
|
||||
|
||||
double radi;
|
||||
|
||||
inum = list->inum;
|
||||
ilist = list->ilist;
|
||||
|
||||
@ -358,9 +354,6 @@ void PairLubricateU::stage_one()
|
||||
|
||||
for (ii=0;ii<inum;ii++) {
|
||||
i = ilist[ii];
|
||||
itype = type[i];
|
||||
radi = radius[i];
|
||||
|
||||
v[i][0] = v[i][0] + gdot*x[i][1];
|
||||
omega[i][2] = omega[i][2] - gdot/2.0;
|
||||
}
|
||||
@ -390,19 +383,15 @@ void PairLubricateU::intermediates(int nall, double **xl)
|
||||
|
||||
void PairLubricateU::stage_two(double **x)
|
||||
{
|
||||
int i,j,ii,inum,itype;
|
||||
int i,j,ii,inum;
|
||||
double **v = atom->v;
|
||||
double **f = atom->f;
|
||||
double **omega = atom->omega;
|
||||
double **torque = atom->torque;
|
||||
double *radius = atom->radius;
|
||||
int *type = atom->type;
|
||||
|
||||
int newton_pair = force->newton_pair;
|
||||
int *ilist;
|
||||
|
||||
double radi;
|
||||
|
||||
inum = list->inum;
|
||||
ilist = list->ilist;
|
||||
|
||||
@ -553,9 +542,6 @@ void PairLubricateU::stage_two(double **x)
|
||||
|
||||
for (ii=0;ii<inum;ii++) {
|
||||
i = ilist[ii];
|
||||
itype = type[i];
|
||||
radi = radius[i];
|
||||
|
||||
v[i][0] = v[i][0] + gdot*x[i][1];
|
||||
omega[i][2] = omega[i][2] - gdot/2.0;
|
||||
}
|
||||
@ -570,7 +556,7 @@ void PairLubricateU::compute_Fh(double **x)
|
||||
{
|
||||
int i,j,ii,jj,inum,jnum,itype,jtype;
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz,fx,fy,fz;
|
||||
double rsq,r,h_sep,radi;
|
||||
double rsq,r,h_sep;
|
||||
double vr1,vr2,vr3,vnnr,vn1,vn2,vn3;
|
||||
double vt1,vt2,vt3;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
@ -585,8 +571,9 @@ void PairLubricateU::compute_Fh(double **x)
|
||||
int nghost = atom->nghost;
|
||||
int newton_pair = force->newton_pair;
|
||||
|
||||
double radi;
|
||||
|
||||
double vxmu2f = force->vxmu2f;
|
||||
int overlaps = 0;
|
||||
double vi[3],vj[3],wi[3],wj[3],xl[3],a_sq,a_sh;
|
||||
|
||||
inum = list->inum;
|
||||
@ -750,10 +737,6 @@ void PairLubricateU::compute_Fh(double **x)
|
||||
|
||||
h_sep = r - 2.0*radi;
|
||||
|
||||
// check for overlaps
|
||||
|
||||
if (h_sep < 0.0) overlaps++;
|
||||
|
||||
// If less than the minimum gap use the minimum gap instead
|
||||
|
||||
if (r < cut_inner[itype][jtype])
|
||||
@ -823,7 +806,6 @@ void PairLubricateU::compute_RU()
|
||||
int newton_pair = force->newton_pair;
|
||||
|
||||
double vxmu2f = force->vxmu2f;
|
||||
int overlaps = 0;
|
||||
double vi[3],vj[3],wi[3],wj[3],xl[3],a_sq,a_sh,a_pu;
|
||||
|
||||
inum = list->inum;
|
||||
@ -954,10 +936,6 @@ void PairLubricateU::compute_RU()
|
||||
|
||||
h_sep = r - 2.0*radi;
|
||||
|
||||
// check for overlaps
|
||||
|
||||
if(h_sep < 0.0) overlaps++;
|
||||
|
||||
// If less than the minimum gap use the minimum gap instead
|
||||
|
||||
if (r < cut_inner[itype][jtype])
|
||||
@ -1099,7 +1077,6 @@ void PairLubricateU::compute_RU(double **x)
|
||||
int newton_pair = force->newton_pair;
|
||||
|
||||
double vxmu2f = force->vxmu2f;
|
||||
int overlaps = 0;
|
||||
double vi[3],vj[3],wi[3],wj[3],xl[3],a_sq,a_sh,a_pu;
|
||||
|
||||
inum = list->inum;
|
||||
@ -1230,10 +1207,6 @@ void PairLubricateU::compute_RU(double **x)
|
||||
|
||||
h_sep = r - 2.0*radi;
|
||||
|
||||
// check for overlaps
|
||||
|
||||
if(h_sep < 0.0) overlaps++;
|
||||
|
||||
// If less than the minimum gap use the minimum gap instead
|
||||
|
||||
if (r < cut_inner[itype][jtype])
|
||||
@ -1376,8 +1349,7 @@ void PairLubricateU::compute_RE()
|
||||
int newton_pair = force->newton_pair;
|
||||
|
||||
double vxmu2f = force->vxmu2f;
|
||||
int overlaps = 0;
|
||||
double xl[3],a_sq,a_sh,a_pu;
|
||||
double xl[3],a_sq,a_sh;
|
||||
|
||||
inum = list->inum;
|
||||
ilist = list->ilist;
|
||||
@ -1421,10 +1393,6 @@ void PairLubricateU::compute_RE()
|
||||
|
||||
h_sep = r - 2.0*radi;
|
||||
|
||||
// check for overlaps
|
||||
|
||||
if(h_sep < 0.0) overlaps++;
|
||||
|
||||
// If less than the minimum gap use the minimum gap instead
|
||||
|
||||
if (r < cut_inner[itype][jtype])
|
||||
@ -1445,7 +1413,6 @@ void PairLubricateU::compute_RE()
|
||||
|
||||
if (flaglog) {
|
||||
a_sh = 6*MY_PI*mu*radi*(1.0/6.0*log(1/h_sep));
|
||||
a_pu = 8.0*MY_PI*mu*pow(radi,3.0)*(3.0/160.0*log(1.0/h_sep));
|
||||
}
|
||||
|
||||
// Relative velocity at the point of closest approach due to Ef only
|
||||
@ -1517,16 +1484,10 @@ void PairLubricateU::compute_RE()
|
||||
torque[j][1] -= vxmu2f*ty;
|
||||
torque[j][2] -= vxmu2f*tz;
|
||||
}
|
||||
|
||||
// NOTE No a_pu term needed as they add up to zero
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int print_overlaps = 0;
|
||||
if (print_overlaps && overlaps)
|
||||
printf("Number of overlaps=%d\n",overlaps);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
@ -1553,8 +1514,7 @@ void PairLubricateU::compute_RE(double **x)
|
||||
int newton_pair = force->newton_pair;
|
||||
|
||||
double vxmu2f = force->vxmu2f;
|
||||
int overlaps = 0;
|
||||
double xl[3],a_sq,a_sh,a_pu;
|
||||
double xl[3],a_sq,a_sh;
|
||||
|
||||
if (!flagHI) return;
|
||||
|
||||
@ -1598,10 +1558,6 @@ void PairLubricateU::compute_RE(double **x)
|
||||
|
||||
h_sep = r - 2.0*radi;
|
||||
|
||||
// check for overlaps
|
||||
|
||||
if(h_sep < 0.0) overlaps++;
|
||||
|
||||
// If less than the minimum gap use the minimum gap instead
|
||||
|
||||
if (r < cut_inner[itype][jtype])
|
||||
@ -1622,7 +1578,6 @@ void PairLubricateU::compute_RE(double **x)
|
||||
|
||||
if (flaglog) {
|
||||
a_sh = 6*MY_PI*mu*radi*(1.0/6.0*log(1/h_sep));
|
||||
a_pu = 8.0*MY_PI*mu*pow(radi,3.0)*(3.0/160.0*log(1.0/h_sep));
|
||||
}
|
||||
|
||||
// Relative velocity at the point of closest approach due to Ef only
|
||||
@ -1694,16 +1649,10 @@ void PairLubricateU::compute_RE(double **x)
|
||||
torque[j][1] -= vxmu2f*ty;
|
||||
torque[j][2] -= vxmu2f*tz;
|
||||
}
|
||||
|
||||
// NOTE No a_pu term needed as they add up to zero
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int print_overlaps = 0;
|
||||
if (print_overlaps && overlaps)
|
||||
printf("Number of overlaps=%d\n",overlaps);
|
||||
}
|
||||
|
||||
|
||||
@ -1829,13 +1778,12 @@ void PairLubricateU::init_style()
|
||||
// require that atom radii are identical within each type
|
||||
// require monodisperse system with same radii for all types
|
||||
|
||||
double radi, radtype;
|
||||
double radtype;
|
||||
for (int i = 1; i <= atom->ntypes; i++) {
|
||||
if (!atom->radius_consistency(i,radtype))
|
||||
error->all(FLERR,"Pair lubricateU requires monodisperse particles");
|
||||
if (i > 1 && radtype != rad)
|
||||
error->all(FLERR,"Pair lubricateU requires monodisperse particles");
|
||||
radi = radtype;
|
||||
}
|
||||
|
||||
// check for fix deform, if exists it must use "remap v"
|
||||
@ -2028,21 +1976,10 @@ void PairLubricateU::copy_vec_uo(int inum, double *xcg,
|
||||
double **v, double **omega)
|
||||
{
|
||||
int i,j,ii;
|
||||
int *ilist;
|
||||
int itype;
|
||||
double radi;
|
||||
double inertia;
|
||||
|
||||
double *rmass = atom->rmass;
|
||||
int *type = atom->type;
|
||||
|
||||
ilist = list->ilist;
|
||||
int *ilist = list->ilist;
|
||||
|
||||
for (ii=0;ii<inum;ii++) {
|
||||
i = ilist[ii];
|
||||
itype = type[i];
|
||||
radi = atom->radius[i];
|
||||
inertia = 0.4*rmass[i]*radi*radi;
|
||||
|
||||
for (j=0;j<3;j++) {
|
||||
v[i][j] = xcg[6*ii+j];
|
||||
|
||||
@ -154,7 +154,6 @@ void PairLubricateUPoly::iterate(double **x, int stage)
|
||||
|
||||
int inum = list->inum;
|
||||
int *ilist = list->ilist;
|
||||
int *type = atom->type;
|
||||
int newton_pair = force->newton_pair;
|
||||
|
||||
double alpha,beta;
|
||||
@ -164,7 +163,6 @@ void PairLubricateUPoly::iterate(double **x, int stage)
|
||||
double **v = atom->v;
|
||||
double **f = atom->f;
|
||||
double **omega = atom->omega;
|
||||
double **angmom = atom->angmom;
|
||||
double **torque = atom->torque;
|
||||
|
||||
// First compute R_FE*E
|
||||
@ -329,7 +327,6 @@ void PairLubricateUPoly::compute_Fh(double **x)
|
||||
int nlocal = atom->nlocal;
|
||||
int nghost = atom->nghost;
|
||||
int newton_pair = force->newton_pair;
|
||||
int overlaps = 0;
|
||||
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz,fx,fy,fz;
|
||||
double rsq,r,h_sep,radi,radj;
|
||||
@ -511,10 +508,6 @@ void PairLubricateUPoly::compute_Fh(double **x)
|
||||
|
||||
// Find the scalar resistances a_sq, a_sh and a_pu
|
||||
|
||||
// check for overlaps
|
||||
|
||||
if (h_sep < 0.0) overlaps++;
|
||||
|
||||
// If less than the minimum gap use the minimum gap instead
|
||||
|
||||
if (r < cut_inner[itype][jtype])
|
||||
@ -606,7 +599,6 @@ void PairLubricateUPoly::compute_RU(double **x)
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
int nghost = atom->nghost;
|
||||
int overlaps = 0;
|
||||
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz,fx,fy,fz,tx,ty,tz;
|
||||
double rsq,r,radi,radj,h_sep;
|
||||
@ -617,7 +609,6 @@ void PairLubricateUPoly::compute_RU(double **x)
|
||||
double **v = atom->v;
|
||||
double **f = atom->f;
|
||||
double **omega = atom->omega;
|
||||
double **angmom = atom->angmom;
|
||||
double **torque = atom->torque;
|
||||
double *radius = atom->radius;
|
||||
|
||||
@ -760,10 +751,6 @@ void PairLubricateUPoly::compute_RU(double **x)
|
||||
|
||||
h_sep = r - radi-radj;
|
||||
|
||||
// check for overlaps
|
||||
|
||||
if(h_sep < 0.0) overlaps++;
|
||||
|
||||
// If less than the minimum gap use the minimum gap instead
|
||||
|
||||
if (r < cut_inner[itype][jtype])
|
||||
@ -913,7 +900,6 @@ void PairLubricateUPoly::compute_RE(double **x)
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
|
||||
int *type = atom->type;
|
||||
int overlaps = 0;
|
||||
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz,fx,fy,fz,tx,ty,tz;
|
||||
double rsq,r,h_sep,radi,radj;
|
||||
@ -930,7 +916,6 @@ void PairLubricateUPoly::compute_RE(double **x)
|
||||
double vxmu2f = force->vxmu2f;
|
||||
double a_sq = 0.0;
|
||||
double a_sh = 0.0;
|
||||
double a_pu = 0.0;
|
||||
|
||||
if (!flagHI) return;
|
||||
|
||||
@ -976,10 +961,6 @@ void PairLubricateUPoly::compute_RE(double **x)
|
||||
|
||||
h_sep = r - radi-radj;
|
||||
|
||||
// check for overlaps
|
||||
|
||||
if (h_sep < 0.0) overlaps++;
|
||||
|
||||
// If less than the minimum gap use the minimum gap instead
|
||||
|
||||
if (r < cut_inner[itype][jtype])
|
||||
@ -1015,28 +996,6 @@ void PairLubricateUPoly::compute_RE(double **x)
|
||||
a_sh = pre[0]*((8.0*(beta[0][1]+beta[0][3])+4.0*beta[0][2])/15.0
|
||||
+(64.0-180.0*(beta[0][1]+beta[0][3])+232.0*beta[0][2]
|
||||
+64.0*beta[0][4])*h_sep_beta11/375.0)*log_h_sep_beta13;
|
||||
|
||||
a_pu = pre[1]*((0.4*beta[0][1]+0.1*beta[0][2])*beta[1][1]
|
||||
+(0.128-0.132*beta[0][1]+0.332*beta[0][2]
|
||||
+0.172*beta[0][3])*h_sep)*log_h_sep_beta13;
|
||||
|
||||
/*//a_sq = 6*MY_PI*mu*radi*(1.0/4.0/h_sep + 9.0/40.0*log(1/h_sep));
|
||||
a_sq = beta0*beta0/beta1/beta1/h_sep
|
||||
+(1.0+7.0*beta0+beta0*beta0)/5.0/pow(beta1,3)*lhsep;
|
||||
a_sq += (1.0+18.0*beta0-29.0*beta0*beta0+18.0*pow(beta0,3)
|
||||
+pow(beta0,4))/21.0/pow(beta1,4)*h_sep*lhsep;
|
||||
a_sq *= 6.0*MY_PI*mu*radi;
|
||||
|
||||
a_sh = 4.0*beta0*(2.0+beta0
|
||||
+2.0*beta0*beta0)/15.0/pow(beta1,3)*log(1.0/h_sep);
|
||||
a_sh += 4.0*(16.0-45.0*beta0+58.0*beta0*beta0-45.0*pow(beta0,3)
|
||||
+16.0*pow(beta0,4))/375.0/pow(beta1,4)*h_sep*log(1.0/h_sep);
|
||||
a_sh *= 6.0*MY_PI*mu*radi;
|
||||
|
||||
a_pu = beta0*(4.0+beta0)/10.0/beta1/beta1*log(1.0/h_sep);
|
||||
a_pu += (32.0-33.0*beta0+83.0*beta0*beta0
|
||||
+43.0*pow(beta0,3))/250.0/pow(beta1,3)*h_sep*log(1.0/h_sep);
|
||||
a_pu *= 8.0*MY_PI*mu*pow(radi,3);*/
|
||||
} else
|
||||
a_sq = pre[0]*(beta[0][1]*beta[0][1]/(beta[1][1]*beta[1][1]*h_sep));
|
||||
|
||||
@ -1098,15 +1057,10 @@ void PairLubricateUPoly::compute_RE(double **x)
|
||||
torque[i][1] -= vxmu2f*ty;
|
||||
torque[i][2] -= vxmu2f*tz;
|
||||
|
||||
// NOTE No a_pu term needed as they add up to zero
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int print_overlaps = 0;
|
||||
if (print_overlaps && overlaps)
|
||||
printf("Number of overlaps=%d\n",overlaps);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
|
||||
@ -93,8 +93,6 @@ void PairLubricatePoly::compute(int eflag, int vflag)
|
||||
int nlocal = atom->nlocal;
|
||||
int newton_pair = force->newton_pair;
|
||||
|
||||
int overlaps = 0;
|
||||
|
||||
inum = list->inum;
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
@ -285,10 +283,6 @@ void PairLubricatePoly::compute(int eflag, int vflag)
|
||||
|
||||
h_sep = r - radi-radj;
|
||||
|
||||
// check for overlaps
|
||||
|
||||
if (h_sep < 0.0) overlaps++;
|
||||
|
||||
// if less than the minimum gap use the minimum gap instead
|
||||
|
||||
if (r < cut_inner[itype][jtype])
|
||||
@ -429,16 +423,6 @@ void PairLubricatePoly::compute(int eflag, int vflag)
|
||||
omega[i][2] -= 0.5*h_rate[5];
|
||||
}
|
||||
}
|
||||
|
||||
// to DEBUG: set print_overlaps to 1
|
||||
|
||||
int print_overlaps = 0;
|
||||
if (print_overlaps) {
|
||||
int overlaps_all;
|
||||
MPI_Allreduce(&overlaps,&overlaps_all,1,MPI_INT,MPI_SUM,world);
|
||||
if (overlaps_all && comm->me == 0)
|
||||
printf("Number of overlaps = %d\n",overlaps);
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -38,7 +38,6 @@ class PairBeckGPU : public PairBeck {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairBornCoulLongGPU : public PairBornCoulLong {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairBornCoulWolfGPU : public PairBornCoulWolf {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairBornGPU : public PairBorn {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairBuckCoulCutGPU : public PairBuckCoulCut {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairBuckCoulLongGPU : public PairBuckCoulLong {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairBuckGPU : public PairBuck {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairColloidGPU : public PairColloid {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@ void PairCoulDSFGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
||||
int *ilist, int *numneigh,
|
||||
int **firstneigh)
|
||||
{
|
||||
int i,j,ii,jj,jnum,itype,jtype;
|
||||
int i,j,ii,jj,jnum;
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,ecoul,fpair;
|
||||
double r,rsq,r2inv,forcecoul,factor_coul;
|
||||
double prefactor,erfcc,erfcd,e_self,t;
|
||||
@ -210,7 +210,6 @@ void PairCoulDSFGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
double *q = atom->q;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
double *special_coul = force->special_coul;
|
||||
double qqrd2e = force->qqrd2e;
|
||||
@ -223,7 +222,6 @@ void PairCoulDSFGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
||||
xtmp = x[i][0];
|
||||
ytmp = x[i][1];
|
||||
ztmp = x[i][2];
|
||||
itype = type[i];
|
||||
jlist = firstneigh[i];
|
||||
jnum = numneigh[i];
|
||||
|
||||
@ -241,7 +239,6 @@ void PairCoulDSFGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
||||
dely = ytmp - x[j][1];
|
||||
delz = ztmp - x[j][2];
|
||||
rsq = delx*delx + dely*dely + delz*delz;
|
||||
jtype = type[j];
|
||||
|
||||
if (rsq < cut_coulsq) {
|
||||
r2inv = 1.0/rsq;
|
||||
|
||||
@ -38,7 +38,6 @@ class PairCoulDSFGPU : public PairCoulDSF {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -187,20 +187,19 @@ void PairCoulLongGPU::cpu_compute(int start, int inum, int eflag,
|
||||
int vflag, int *ilist, int *numneigh,
|
||||
int **firstneigh)
|
||||
{
|
||||
int i,j,ii,jj,jnum,itype,jtype,itable;
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair;
|
||||
int i,j,ii,jj,jnum,itable;
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,ecoul,fpair;
|
||||
double fraction,table;
|
||||
double r,r2inv,r6inv,forcecoul,forcelj,factor_coul,factor_lj;
|
||||
double r,r2inv,r6inv,forcecoul,factor_coul;
|
||||
double grij,expm2,prefactor,t,erfc;
|
||||
int *jlist;
|
||||
double rsq;
|
||||
|
||||
evdwl = ecoul = 0.0;
|
||||
ecoul = 0.0;
|
||||
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
double *q = atom->q;
|
||||
int *type = atom->type;
|
||||
double *special_coul = force->special_coul;
|
||||
double qqrd2e = force->qqrd2e;
|
||||
|
||||
@ -212,7 +211,6 @@ void PairCoulLongGPU::cpu_compute(int start, int inum, int eflag,
|
||||
xtmp = x[i][0];
|
||||
ytmp = x[i][1];
|
||||
ztmp = x[i][2];
|
||||
itype = type[i];
|
||||
jlist = firstneigh[i];
|
||||
jnum = numneigh[i];
|
||||
|
||||
@ -225,7 +223,6 @@ void PairCoulLongGPU::cpu_compute(int start, int inum, int eflag,
|
||||
dely = ytmp - x[j][1];
|
||||
delz = ztmp - x[j][2];
|
||||
rsq = delx*delx + dely*dely + delz*delz;
|
||||
jtype = type[j];
|
||||
|
||||
r2inv = 1.0/rsq;
|
||||
|
||||
|
||||
@ -38,7 +38,6 @@ class PairCoulLongGPU : public PairCoulLong {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairDPDGPU : public PairDPD {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairDPDTstatGPU : public PairDPDTstat {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -94,8 +94,7 @@ double PairEAMGPU::memory_usage()
|
||||
|
||||
void PairEAMGPU::compute(int eflag, int vflag)
|
||||
{
|
||||
int i,j,ii,jj,m,jnum,itype,jtype;
|
||||
double evdwl,*coeff;
|
||||
double evdwl;
|
||||
|
||||
evdwl = 0.0;
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
|
||||
@ -43,7 +43,6 @@ class PairEAMGPU : public PairEAM {
|
||||
protected:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
void *fp_pinned;
|
||||
bool fp_single;
|
||||
};
|
||||
|
||||
@ -172,7 +172,7 @@ void PairGaussGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
||||
int *ilist, int *numneigh, int **firstneigh) {
|
||||
int i,j,ii,jj,jnum,itype,jtype;
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair;
|
||||
double r,rsq,r2inv,forcelj,factor_lj;
|
||||
double rsq,r2inv,forcelj,factor_lj;
|
||||
int *jlist;
|
||||
|
||||
double **x = atom->x;
|
||||
@ -204,7 +204,6 @@ void PairGaussGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
||||
|
||||
if (rsq < cutsq[itype][jtype]) {
|
||||
r2inv = 1.0/rsq;
|
||||
r = sqrt(rsq);
|
||||
forcelj = - 2.0*a[itype][jtype]*b[itype][jtype] * rsq *
|
||||
exp(-b[itype][jtype]*rsq);
|
||||
fpair = factor_lj*forcelj*r2inv;
|
||||
|
||||
@ -38,7 +38,6 @@ class PairGaussGPU : public PairGauss {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairGayBerneGPU : public PairGayBerne {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
int quat_nmax;
|
||||
double **quat;
|
||||
};
|
||||
|
||||
@ -38,7 +38,6 @@ class PairLJ96CutGPU : public PairLJ96Cut {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairLJCharmmCoulLongGPU : public PairLJCharmmCoulLong {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairLJClass2CoulLongGPU : public PairLJClass2CoulLong {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairLJClass2GPU : public PairLJClass2 {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairLJCutCoulCutGPU : public PairLJCutCoulCut {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairLJCutCoulDebyeGPU : public PairLJCutCoulDebye {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairLJCutCoulDSFGPU : public PairLJCutCoulDSF {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairLJCutCoulLongGPU : public PairLJCutCoulLong {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairLJCutCoulMSMGPU : public PairLJCutCoulMSM {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairLJCutDipoleCutGPU : public PairLJCutDipoleCut {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairLJCutGPU : public PairLJCut {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairLJExpandGPU : public PairLJExpand {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairLJGromacsGPU : public PairLJGromacs {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -40,7 +40,6 @@ class PairLJSDKCoulLongGPU : public PairLJSDKCoulLong {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -186,9 +186,9 @@ void PairLJSDKGPU::cpu_compute(int start, int inum, int *ilist,
|
||||
const double * const * const x = atom->x;
|
||||
double * const * const f = atom->f;
|
||||
const int * const type = atom->type;
|
||||
const int nlocal = atom->nlocal;
|
||||
const double * const special_lj = force->special_lj;
|
||||
double fxtmp,fytmp,fztmp;
|
||||
evdwl=0.0;
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
|
||||
|
||||
@ -40,7 +40,6 @@ class PairLJSDKGPU : public PairLJSDK {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairLJSFDipoleSFGPU : public PairLJSFDipoleSF {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairMIECutGPU : public PairMIECut {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairMorseGPU : public PairMorse {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairRESquaredGPU : public PairRESquared {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
int quat_nmax;
|
||||
double **quat;
|
||||
};
|
||||
|
||||
@ -38,7 +38,6 @@ class PairSoftGPU : public PairSoft {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -39,7 +39,6 @@ class PairSWGPU : public PairSW {
|
||||
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairTableGPU : public PairTable {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairYukawaColloidGPU : public PairYukawaColloid {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,6 @@ class PairYukawaGPU : public PairYukawa {
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
int *gpulist;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ PairGranHertzHistory::PairGranHertzHistory(LAMMPS *lmp) :
|
||||
|
||||
void PairGranHertzHistory::compute(int eflag, int vflag)
|
||||
{
|
||||
int i,j,ii,jj,inum,jnum,itype,jtype;
|
||||
int i,j,ii,jj,inum,jnum;
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz,fx,fy,fz;
|
||||
double radi,radj,radsum,rsq,r,rinv,rsqinv;
|
||||
double vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3;
|
||||
@ -417,7 +417,6 @@ double PairGranHertzHistory::single(int i, int j, int itype, int jtype,
|
||||
// start from neighprev, since will typically be next neighbor
|
||||
// reset neighprev to 0 as necessary
|
||||
|
||||
int *jlist = list->firstneigh[i];
|
||||
int jnum = list->numneigh[i];
|
||||
int *touch = list->listgranhistory->firstneigh[i];
|
||||
double *allshear = list->listgranhistory->firstdouble[i];
|
||||
|
||||
@ -119,7 +119,6 @@ void EwaldDisp::init()
|
||||
for (int i=0; i<=EWALD_NORDER; ++i) // transcribe order
|
||||
if (ewald_order&(1<<i)) { // from pair_style
|
||||
int n[] = EWALD_NSUMS, k = 0;
|
||||
char str[128];
|
||||
switch (i) {
|
||||
case 1:
|
||||
k = 0; break;
|
||||
@ -767,7 +766,6 @@ void EwaldDisp::compute_force()
|
||||
double *ke, c[EWALD_NFUNCS] = {
|
||||
8.0*MY_PI*qscale/volume, 2.0*MY_PI*MY_PIS/(12.0*volume),
|
||||
2.0*MY_PI*MY_PIS/(192.0*volume), 8.0*MY_PI*mumurd2e/volume};
|
||||
double kt = 4.0*cube(g_ewald)/3.0/MY_PIS/c[3];
|
||||
int i, kx, ky, lbytes = (2*nbox+1)*sizeof(cvector), *type = atom->type;
|
||||
int func[EWALD_NFUNCS];
|
||||
|
||||
@ -1103,7 +1101,6 @@ void EwaldDisp::compute_virial_dipole()
|
||||
{
|
||||
if (!function[3]) return;
|
||||
if (!vflag_atom && !vflag_global) return;
|
||||
double test = 0.0;
|
||||
kvector *k;
|
||||
hvector *h, *nh;
|
||||
cvector *z = ekr_local;
|
||||
@ -1119,7 +1116,6 @@ void EwaldDisp::compute_virial_dipole()
|
||||
double *ke, c[EWALD_NFUNCS] = {
|
||||
8.0*MY_PI*qscale/volume, 2.0*MY_PI*MY_PIS/(12.0*volume),
|
||||
2.0*MY_PI*MY_PIS/(192.0*volume), 8.0*MY_PI*mumurd2e/volume};
|
||||
double kt = 4.0*cube(g_ewald)/3.0/MY_PIS/c[3];
|
||||
int i, kx, ky, lbytes = (2*nbox+1)*sizeof(cvector), *type = atom->type;
|
||||
int func[EWALD_NFUNCS];
|
||||
|
||||
|
||||
@ -79,18 +79,17 @@ void PairTIP4PLong::compute(int eflag, int vflag)
|
||||
int i,j,ii,jj,inum,jnum,itype,jtype,itable,key;
|
||||
int n,vlist[6];
|
||||
int iH1,iH2,jH1,jH2;
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul;
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,ecoul;
|
||||
double fraction,table;
|
||||
double delxOM, delyOM, delzOM;
|
||||
double r,r2inv,forcecoul,cforce;
|
||||
double factor_coul;
|
||||
double grij,expm2,prefactor,t,erfc,ddotf;
|
||||
double xiM[3],xjM[3],fO[3],fH[3],fd[3],f1[3],v[6],xH1[3],xH2[3];
|
||||
double grij,expm2,prefactor,t,erfc;
|
||||
double fO[3],fH[3],fd[3],v[6],xH1[3],xH2[3];
|
||||
double *x1,*x2;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
double rsq;
|
||||
|
||||
evdwl = ecoul = 0.0;
|
||||
ecoul = 0.0;
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = vflag_fdotr = 0;
|
||||
|
||||
@ -118,7 +117,6 @@ void PairTIP4PLong::compute(int eflag, int vflag)
|
||||
tagint *tag = atom->tag;
|
||||
int *type = atom->type;
|
||||
double *special_coul = force->special_coul;
|
||||
int newton_pair = force->newton_pair;
|
||||
double qqrd2e = force->qqrd2e;
|
||||
double cut_coulsqplus = (cut_coul+2.0*qdist) * (cut_coul+2.0*qdist);
|
||||
|
||||
|
||||
@ -294,7 +294,7 @@ double PPPMStagger::compute_qopt()
|
||||
double numerator,denominator;
|
||||
double u1,u2,u3,sqk;
|
||||
|
||||
int k,l,m,n,nx,ny,nz,kper,lper,mper;
|
||||
int k,l,m,nx,ny,nz,kper,lper,mper;
|
||||
|
||||
const int nbx = 2;
|
||||
const int nby = 2;
|
||||
@ -302,7 +302,6 @@ double PPPMStagger::compute_qopt()
|
||||
|
||||
const int twoorder = 2*order;
|
||||
|
||||
n = 0;
|
||||
for (m = nzlo_fft; m <= nzhi_fft; m++) {
|
||||
mper = m - nz_pppm*(2*m/nz_pppm);
|
||||
snz = square(sin(0.5*unitkz*mper*zprd_slab/nz_pppm));
|
||||
@ -381,13 +380,11 @@ double PPPMStagger::compute_qopt_ad()
|
||||
const double unitky = (MY_2PI/yprd);
|
||||
const double unitkz = (MY_2PI/zprd_slab);
|
||||
|
||||
double snx,sny,snz;
|
||||
double cnx,cny,cnz;
|
||||
double argx,argy,argz,wx,wy,wz,sx,sy,sz,qx,qy,qz;
|
||||
double sum1,sum2,sum3,sum4,sum5,sum6,dot2;
|
||||
double u1,u2,sqk;
|
||||
|
||||
int k,l,m,n,nx,ny,nz,kper,lper,mper;
|
||||
int k,l,m,nx,ny,nz,kper,lper,mper;
|
||||
|
||||
const int nbx = 2;
|
||||
const int nby = 2;
|
||||
@ -395,21 +392,14 @@ double PPPMStagger::compute_qopt_ad()
|
||||
|
||||
const int twoorder = 2*order;
|
||||
|
||||
n = 0;
|
||||
for (m = nzlo_fft; m <= nzhi_fft; m++) {
|
||||
mper = m - nz_pppm*(2*m/nz_pppm);
|
||||
snz = square(sin(0.5*unitkz*mper*zprd_slab/nz_pppm));
|
||||
cnz = cos(0.5*unitkz*mper*zprd_slab/nz_pppm);
|
||||
|
||||
for (l = nylo_fft; l <= nyhi_fft; l++) {
|
||||
lper = l - ny_pppm*(2*l/ny_pppm);
|
||||
sny = square(sin(0.5*unitky*lper*yprd/ny_pppm));
|
||||
cny = cos(0.5*unitky*lper*yprd/ny_pppm);
|
||||
|
||||
for (k = nxlo_fft; k <= nxhi_fft; k++) {
|
||||
kper = k - nx_pppm*(2*k/nx_pppm);
|
||||
snx = square(sin(0.5*unitkx*kper*xprd/nx_pppm));
|
||||
cnx = cos(0.5*unitkx*kper*xprd/nx_pppm);
|
||||
|
||||
sqk = square(unitkx*kper) + square(unitky*lper) + square(unitkz*mper);
|
||||
|
||||
|
||||
@ -655,7 +655,6 @@ void PairBOP::gneigh()
|
||||
{
|
||||
int i,ii;
|
||||
int *ilist,*numneigh;
|
||||
int **firstneigh;
|
||||
int nlocal = atom->nlocal;
|
||||
int nall = nlocal + atom->nghost;
|
||||
|
||||
@ -671,7 +670,6 @@ void PairBOP::gneigh()
|
||||
}
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
if(bop_step==0) {
|
||||
maxneigh=0;
|
||||
maxnall=0;
|
||||
@ -700,7 +698,7 @@ void PairBOP::gneigh()
|
||||
|
||||
void PairBOP::theta()
|
||||
{
|
||||
int i,j,k,ii,jj,kk;
|
||||
int i,j,ii,jj,kk;
|
||||
int itype,jtype,i12;
|
||||
int temp_ij,temp_ik,temp_ijk;
|
||||
int n,nlocal,nall,ks;
|
||||
@ -708,7 +706,7 @@ void PairBOP::theta()
|
||||
int *iilist;
|
||||
int **firstneigh;
|
||||
double rj2,rk2,rsq,ps;
|
||||
double rj1k1,rj2k2,rj2k1,rj1k2;
|
||||
double rj1k1,rj2k2;
|
||||
double **x = atom->x;
|
||||
int *type = atom->type;
|
||||
|
||||
@ -799,9 +797,6 @@ void PairBOP::theta()
|
||||
rk2=rij[temp_ik]*rij[temp_ik];
|
||||
rj1k1=rij[temp_ij]*rij[temp_ik];
|
||||
rj2k2=rj1k1*rj1k1;
|
||||
rj2k1=rj1k1*rij[temp_ij];
|
||||
rj1k2=rj1k1*rij[temp_ik];
|
||||
k=iilist[kk];
|
||||
if(temp_ijk>=cos_total) {
|
||||
error->one(FLERR,"Too many atom triplets for pair bop");
|
||||
}
|
||||
@ -858,14 +853,14 @@ void PairBOP::sigmaBo()
|
||||
int new1,new2,nlocal;
|
||||
int inum,*ilist,*iilist,*jlist,*klist,*kplist;
|
||||
int **firstneigh,*numneigh;
|
||||
int temp_ji,temp_ikp,temp_ki,temp_kkp;
|
||||
int temp_ji,temp_ikp,temp_kkp;
|
||||
int temp_ij,temp_ik,temp_jkp,temp_kk,temp_jk;
|
||||
int ang_ijkp,ang_ikkp,ang_jkpk,ang_kjkp;
|
||||
int ang_ijk,ang_ikj,ang_jikp,ang_jkkp;
|
||||
int ang_jik,ang_kikp;
|
||||
int nb_ij,nb_ik,nb_ikp;
|
||||
int nb_jk,nb_jkp,nb_kkp;
|
||||
int kp_nsearch,nsearch;
|
||||
int nsearch;
|
||||
int sig_flag,setting,ncmp,ks;
|
||||
int itype,jtype,ktype,kptype;
|
||||
int bt_i,bt_j,bt_ij;
|
||||
@ -952,7 +947,6 @@ void PairBOP::sigmaBo()
|
||||
j=iilist[jtmp];
|
||||
jlist=firstneigh[j];
|
||||
for(ki=0;ki<numneigh[j];ki++) {
|
||||
temp_ki=BOP_index[j]+ki;
|
||||
if(x[jlist[ki]][0]==x[i][0]) {
|
||||
if(x[jlist[ki]][1]==x[i][1]) {
|
||||
if(x[jlist[ki]][2]==x[i][2]) {
|
||||
@ -1039,7 +1033,6 @@ void PairBOP::sigmaBo()
|
||||
|
||||
klist=firstneigh[k];
|
||||
for(kNeii=0;kNeii<numneigh[k];kNeii++) {
|
||||
temp_ki=BOP_index[k]+kNeii;
|
||||
if(x[klist[kNeii]][0]==x[i][0]) {
|
||||
if(x[klist[kNeii]][1]==x[i][1]) {
|
||||
if(x[klist[kNeii]][2]==x[i][2]) {
|
||||
@ -1572,7 +1565,6 @@ void PairBOP::sigmaBo()
|
||||
}
|
||||
if(sig_flag==1) {
|
||||
for(nsearch=0;nsearch<numneigh[kp];nsearch++) {
|
||||
kp_nsearch=BOP_index[kp]+nsearch;
|
||||
ncmp=kplist[nsearch];
|
||||
if(x[ncmp][0]==x[j][0]) {
|
||||
if(x[ncmp][1]==x[j][1]) {
|
||||
@ -2402,7 +2394,7 @@ void PairBOP::sigmaBo_noa()
|
||||
int iij,ji,ki;
|
||||
int itmp,jtmp,ktmp,ltmp,mtmp;
|
||||
tagint i_tag,j_tag;
|
||||
int ngi,ngj,ngk,ngli,nglj,ngl;
|
||||
int ngi,ngj,ngk;
|
||||
int ngji,ngjk,nikj,ngki,ngkj;
|
||||
int njik,nijk,nikkp,nkp,nijkp;
|
||||
int nkikp,njikp,nk0,nkjkp,njkkp;
|
||||
@ -2410,7 +2402,7 @@ void PairBOP::sigmaBo_noa()
|
||||
int new1,new2,nlocal,nsearch;
|
||||
int inum,*ilist,*iilist,*jlist,*klist;
|
||||
int **firstneigh,*numneigh;
|
||||
int temp_ji,temp_ikp,temp_ki,temp_kkp;
|
||||
int temp_ji,temp_ikp,temp_kkp;
|
||||
int temp_ij,temp_ik,temp_jkp,temp_kk,temp_jk;
|
||||
int ang_ijkp,ang_ikkp,ang_kjkp;
|
||||
int ang_ijk,ang_ikj,ang_jikp,ang_jkkp;
|
||||
@ -2422,11 +2414,11 @@ void PairBOP::sigmaBo_noa()
|
||||
int kp_index,same_ikp,same_jkp;
|
||||
double AA,BB,CC,DD,EE1,FF;
|
||||
double AAC,BBC,CCC,DDC,EEC;
|
||||
double UT,bndtmp,UTcom;
|
||||
double UT,bndtmp;
|
||||
double amean,gmean0,gmean1,gmean2,ps;
|
||||
double gfactor1,gprime1,gsqprime;
|
||||
double gfactorsq,gfactor2,gprime2;
|
||||
double gfactorsq2,gsqprime2;
|
||||
double gfactorsq2;
|
||||
double gfactor3,gprime3,gfactor,rfactor;
|
||||
double rfactorrt,rfactor1rt,rfactor1;
|
||||
double rcm1,rcm2,gcm1,gcm2,gcm3;
|
||||
@ -2488,7 +2480,6 @@ void PairBOP::sigmaBo_noa()
|
||||
j=iilist[jtmp];
|
||||
jlist=firstneigh[j];
|
||||
for(ki=0;ki<numneigh[j];ki++) {
|
||||
temp_ki=BOP_index[j]+ki;
|
||||
if(x[jlist[ki]][0]==x[i][0]) {
|
||||
if(x[jlist[ki]][1]==x[i][1]) {
|
||||
if(x[jlist[ki]][2]==x[i][2]) {
|
||||
@ -2573,7 +2564,6 @@ void PairBOP::sigmaBo_noa()
|
||||
|
||||
klist=firstneigh[k];
|
||||
for(kNeii=0;kNeii<numneigh[k];kNeii++) {
|
||||
temp_ki=BOP_index[k]+kNeii;
|
||||
if(x[klist[kNeii]][0]==x[i][0]) {
|
||||
if(x[klist[kNeii]][1]==x[i][1]) {
|
||||
if(x[klist[kNeii]][2]==x[i][2]) {
|
||||
@ -2831,18 +2821,12 @@ void PairBOP::sigmaBo_noa()
|
||||
}
|
||||
if(jtmp<ltmp) {
|
||||
njikp=jtmp*(2*numneigh[i]-jtmp-1)/2+(ltmp-jtmp)-1;
|
||||
nglj=0;
|
||||
ngl=1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
njikp=ltmp*(2*numneigh[i]-ltmp-1)/2+(jtmp-ltmp)-1;
|
||||
nglj=1;
|
||||
ngl=0;
|
||||
}
|
||||
if(ktmp<ltmp) {
|
||||
nkikp=ktmp*(2*numneigh[i]-ktmp-1)/2+(ltmp-ktmp)-1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
nkikp=ltmp*(2*numneigh[i]-ltmp-1)/2+(ktmp-ltmp)-1;
|
||||
}
|
||||
ang_jikp=cos_index[i]+njikp;
|
||||
@ -2904,11 +2888,8 @@ void PairBOP::sigmaBo_noa()
|
||||
if(!same_ikp&&!same_jkp) {
|
||||
if(kNeii<ltmp) {
|
||||
nikkp=kNeii*(2*numneigh[k]-kNeii-1)/2+(ltmp-kNeii)-1;
|
||||
ngli=0;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
nikkp=ltmp*(2*numneigh[k]-ltmp-1)/2+(kNeii-ltmp)-1;
|
||||
ngli=1;
|
||||
}
|
||||
sig_flag=0;
|
||||
for(nsearch=0;nsearch<nSigBk[n];nsearch++) {
|
||||
@ -2940,7 +2921,6 @@ void PairBOP::sigmaBo_noa()
|
||||
+gmean2*amean*amean;
|
||||
gprime2=gmean1+2.0*gmean2*amean;
|
||||
gfactorsq2=gfactor2*gfactor2;
|
||||
gsqprime2=2.0*gfactor2*gprime2;
|
||||
gfactor=gfactorsq*gfactorsq2;
|
||||
rfactorrt=betaS[temp_ik]*betaS[temp_kkp];
|
||||
rfactor=rfactorrt*rfactorrt;
|
||||
@ -3076,13 +3056,8 @@ void PairBOP::sigmaBo_noa()
|
||||
}
|
||||
if(ji<ltmp) {
|
||||
nijkp=ji*(2*numneigh[j]-ji-1)/2+(ltmp-ji)-1;
|
||||
ngli=0;
|
||||
ngl=1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
nijkp=ltmp*(2*numneigh[j]-ltmp-1)/2+(ji-ltmp)-1;
|
||||
ngli=1;
|
||||
ngl=0;
|
||||
}
|
||||
if(ktmp<ltmp) {
|
||||
nkjkp=ktmp*(2*numneigh[j]-ktmp-1)/2+(ltmp-ktmp)-1;
|
||||
@ -3161,11 +3136,8 @@ void PairBOP::sigmaBo_noa()
|
||||
}
|
||||
if(kNeij<ltmp) {
|
||||
njkkp=kNeij*(2*numneigh[k]-kNeij-1)/2+(ltmp-kNeij)-1;
|
||||
nglj=0;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
njkkp=ltmp*(2*numneigh[k]-ltmp-1)/2+(kNeij-ltmp)-1;
|
||||
nglj=1;
|
||||
}
|
||||
sig_flag=0;
|
||||
for(nsearch=0;nsearch<nSigBk[n];nsearch++) {
|
||||
@ -3197,7 +3169,6 @@ void PairBOP::sigmaBo_noa()
|
||||
+gmean2*amean*amean;
|
||||
gprime2=gmean1+2.0*gmean2*amean;
|
||||
gfactorsq2=gfactor2*gfactor2;
|
||||
gsqprime2=2.0*gfactor2*gprime2;
|
||||
gfactor=gfactorsq*gfactorsq2;
|
||||
rfactorrt=betaS[temp_jk]*betaS[temp_kkp];
|
||||
rfactor=rfactorrt*rfactorrt;
|
||||
@ -3247,7 +3218,6 @@ void PairBOP::sigmaBo_noa()
|
||||
|
||||
bndtmp=(FF+sigma_delta[iij]*sigma_delta[iij])
|
||||
+sigma_c[iij]*AAC+small4;
|
||||
UTcom=-0.5*UT*UT*UT;
|
||||
psign=1.0;
|
||||
bndtmp0=1.0/sqrt(bndtmp);
|
||||
sigB1[n]=psign*betaS[temp_ij]*bndtmp0;
|
||||
@ -3390,11 +3360,11 @@ void PairBOP::sigmaBo_otf()
|
||||
int inum,*ilist,*iilist,*jlist,*klist,*kplist;
|
||||
int **firstneigh,*numneigh;
|
||||
int temp_ij,temp_ik,temp_jkp,temp_kk,temp_jk;
|
||||
int temp_ji,temp_kpj,temp_kkp;
|
||||
int temp_ikp,temp_kpk;
|
||||
int temp_ji,temp_kkp;
|
||||
int temp_ikp;
|
||||
int nb_ij,nb_ik,nb_ikp;
|
||||
int nb_jk,nb_jkp,nb_kkp;
|
||||
int kp_nsearch,nsearch;
|
||||
int nsearch;
|
||||
int sig_flag,setting,ncmp,ks;
|
||||
int itype,jtype,ktype,kptype;
|
||||
int bt_i,bt_j;
|
||||
@ -3418,22 +3388,16 @@ void PairBOP::sigmaBo_otf()
|
||||
double bndtmp1,bndtmp2,bndtmp3,bndtmp4,bndtmp5;
|
||||
double dis_ij[3],rsq_ij,r_ij;
|
||||
double betaS_ij,dBetaS_ij;
|
||||
double betaP_ij,dBetaP_ij;
|
||||
double dis_ik[3],rsq_ik,r_ik;
|
||||
double betaS_ik,dBetaS_ik;
|
||||
double betaP_ik,dBetaP_ik;
|
||||
double dis_ikp[3],rsq_ikp,r_ikp;
|
||||
double betaS_ikp,dBetaS_ikp;
|
||||
double betaP_ikp,dBetaP_ikp;
|
||||
double dis_jk[3],rsq_jk,r_jk;
|
||||
double betaS_jk,dBetaS_jk;
|
||||
double betaP_jk,dBetaP_jk;
|
||||
double dis_jkp[3],rsq_jkp,r_jkp;
|
||||
double betaS_jkp,dBetaS_jkp;
|
||||
double betaP_jkp,dBetaP_jkp;
|
||||
double dis_kkp[3],rsq_kkp,r_kkp;
|
||||
double betaS_kkp,dBetaS_kkp;
|
||||
double betaP_kkp,dBetaP_kkp;
|
||||
double cosAng_jik,dcA_jik[3][2];
|
||||
double cosAng_jikp,dcA_jikp[3][2];
|
||||
double cosAng_kikp,dcA_kikp[3][2];
|
||||
@ -3554,10 +3518,6 @@ void PairBOP::sigmaBo_otf()
|
||||
+pBetaS1[iij][ks-1])*ps+pBetaS[iij][ks-1];
|
||||
dBetaS_ij=(pBetaS6[iij][ks-1]*ps+pBetaS5[iij][ks-1])*ps
|
||||
+pBetaS4[iij][ks-1];
|
||||
betaP_ij=((pBetaP3[iij][ks-1]*ps+pBetaP2[iij][ks-1])*ps
|
||||
+pBetaP1[iij][ks-1])*ps+pBetaP[iij][ks-1];
|
||||
dBetaP_ij=(pBetaP6[iij][ks-1]*ps+pBetaP5[iij][ks-1])*ps
|
||||
+pBetaP4[iij][ks-1];
|
||||
nSigBk[n]=0;
|
||||
|
||||
//AA-EE1 are the components making up Eq. 30 (a)
|
||||
@ -3629,10 +3589,6 @@ void PairBOP::sigmaBo_otf()
|
||||
+pBetaS1[iik][ks-1])*ps+pBetaS[iik][ks-1];
|
||||
dBetaS_ik=(pBetaS6[iik][ks-1]*ps+pBetaS5[iik][ks-1])*ps
|
||||
+pBetaS4[iik][ks-1];
|
||||
betaP_ik=((pBetaP3[iik][ks-1]*ps+pBetaP2[iik][ks-1])*ps
|
||||
+pBetaP1[iik][ks-1])*ps+pBetaP[iik][ks-1];
|
||||
dBetaP_ik=(pBetaP6[iik][ks-1]*ps+pBetaP5[iik][ks-1])*ps
|
||||
+pBetaP4[iik][ks-1];
|
||||
|
||||
//find neighbor of i that is equal to k
|
||||
|
||||
@ -3792,7 +3748,6 @@ void PairBOP::sigmaBo_otf()
|
||||
//loop over neighbors of k
|
||||
|
||||
for(mtmp=0;mtmp<numneigh[k];mtmp++) {
|
||||
temp_kpj=BOP_index[k]+mtmp;
|
||||
kp2=klist[mtmp];
|
||||
if(x[kp2][0]==x[k][0]) {
|
||||
if(x[kp2][1]==x[k][1]) {
|
||||
@ -3834,10 +3789,6 @@ void PairBOP::sigmaBo_otf()
|
||||
+pBetaS1[ijkp][ks-1])*ps+pBetaS[ijkp][ks-1];
|
||||
dBetaS_jkp=(pBetaS6[ijkp][ks-1]*ps+pBetaS5[ijkp][ks-1])*ps
|
||||
+pBetaS4[ijkp][ks-1];
|
||||
betaP_jkp=((pBetaP3[ijkp][ks-1]*ps+pBetaP2[ijkp][ks-1])*ps
|
||||
+pBetaP1[ijkp][ks-1])*ps+pBetaP[ijkp][ks-1];
|
||||
dBetaP_jkp=(pBetaP6[ijkp][ks-1]*ps+pBetaP5[ijkp][ks-1])*ps
|
||||
+pBetaP4[ijkp][ks-1];
|
||||
cosAng_ijk=(-dis_ij[0]*dis_jk[0]-dis_ij[1]*dis_jk[1]
|
||||
-dis_ij[2]*dis_jk[2])/(r_ij*r_jk);
|
||||
dcA_ijk[0][0]=(dis_jk[0]*r_ij*r_jk-cosAng_ijk
|
||||
@ -3976,10 +3927,6 @@ void PairBOP::sigmaBo_otf()
|
||||
+pBetaS1[iikp][ks-1])*ps+pBetaS[iikp][ks-1];
|
||||
dBetaS_ikp=(pBetaS6[iikp][ks-1]*ps+pBetaS5[iikp][ks-1])*ps
|
||||
+pBetaS4[iikp][ks-1];
|
||||
betaP_ikp=((pBetaP3[iikp][ks-1]*ps+pBetaP2[iikp][ks-1])*ps
|
||||
+pBetaP1[iikp][ks-1])*ps+pBetaP[iikp][ks-1];
|
||||
dBetaP_ikp=(pBetaP6[iikp][ks-1]*ps+pBetaP5[iikp][ks-1])*ps
|
||||
+pBetaP4[iikp][ks-1];
|
||||
nb_ikp=nb_t;
|
||||
nb_t++;
|
||||
if(nb_t>nb_sg) {
|
||||
@ -4138,10 +4085,6 @@ void PairBOP::sigmaBo_otf()
|
||||
+pBetaS1[ikkp][ks-1])*ps+pBetaS[ikkp][ks-1];
|
||||
dBetaS_kkp=(pBetaS6[ikkp][ks-1]*ps+pBetaS5[ikkp][ks-1])*ps
|
||||
+pBetaS4[ikkp][ks-1];
|
||||
betaP_kkp=((pBetaP3[ikkp][ks-1]*ps+pBetaP2[ikkp][ks-1])*ps
|
||||
+pBetaP1[ikkp][ks-1])*ps+pBetaP[ikkp][ks-1];
|
||||
dBetaP_kkp=(pBetaP6[ikkp][ks-1]*ps+pBetaP5[ikkp][ks-1])*ps
|
||||
+pBetaP4[ikkp][ks-1];
|
||||
sig_flag=0;
|
||||
for(nsearch=0;nsearch<nSigBk[n];nsearch++) {
|
||||
ncmp=itypeSigBk[n][nsearch];
|
||||
@ -4257,7 +4200,6 @@ void PairBOP::sigmaBo_otf()
|
||||
same_jkpj=0;
|
||||
|
||||
for(kpNeij=0;kpNeij<numneigh[kp];kpNeij++) {
|
||||
temp_kpj=BOP_index[kp]+kpNeij;
|
||||
kpj=kplist[kpNeij];
|
||||
if(x[j][0]==x[kpj][0]) {
|
||||
if(x[j][1]==x[kpj][1]) {
|
||||
@ -4269,7 +4211,6 @@ void PairBOP::sigmaBo_otf()
|
||||
}
|
||||
}
|
||||
for(kpNeik=0;kpNeik<numneigh[kp];kpNeik++) {
|
||||
temp_kpk=BOP_index[kp]+kpNeik;
|
||||
kpk=kplist[kpNeik];
|
||||
if(x[k][0]==x[kpk][0]) {
|
||||
if(x[k][1]==x[kpk][1]) {
|
||||
@ -4296,7 +4237,6 @@ void PairBOP::sigmaBo_otf()
|
||||
}
|
||||
if(sig_flag==1) {
|
||||
for(nsearch=0;nsearch<numneigh[kp];nsearch++) {
|
||||
kp_nsearch=BOP_index[kp]+nsearch;
|
||||
ncmp=kplist[nsearch];
|
||||
if(x[ncmp][0]==x[j][0]) {
|
||||
if(x[ncmp][1]==x[j][1]) {
|
||||
@ -4344,10 +4284,6 @@ void PairBOP::sigmaBo_otf()
|
||||
+pBetaS1[ijkp][ks-1])*ps+pBetaS[ijkp][ks-1];
|
||||
dBetaS_jkp=(pBetaS6[ijkp][ks-1]*ps+pBetaS5[ijkp][ks-1])*ps
|
||||
+pBetaS4[ijkp][ks-1];
|
||||
betaP_jkp=((pBetaP3[ijkp][ks-1]*ps+pBetaP2[ijkp][ks-1])*ps
|
||||
+pBetaP1[ijkp][ks-1])*ps+pBetaP[ijkp][ks-1];
|
||||
dBetaP_jkp=(pBetaP6[ijkp][ks-1]*ps+pBetaP5[ijkp][ks-1])*ps
|
||||
+pBetaP4[ijkp][ks-1];
|
||||
dis_kkp[0]=x[kp][0]-x[k][0];
|
||||
dis_kkp[1]=x[kp][1]-x[k][1];
|
||||
dis_kkp[2]=x[kp][2]-x[k][2];
|
||||
@ -4366,10 +4302,6 @@ void PairBOP::sigmaBo_otf()
|
||||
+pBetaS1[ikkp][ks-1])*ps+pBetaS[ikkp][ks-1];
|
||||
dBetaS_kkp=(pBetaS6[ikkp][ks-1]*ps+pBetaS5[ikkp][ks-1])*ps
|
||||
+pBetaS4[ikkp][ks-1];
|
||||
betaP_kkp=((pBetaP3[ikkp][ks-1]*ps+pBetaP2[ikkp][ks-1])*ps
|
||||
+pBetaP1[ikkp][ks-1])*ps+pBetaP[ikkp][ks-1];
|
||||
dBetaP_kkp=(pBetaP6[ikkp][ks-1]*ps+pBetaP5[ikkp][ks-1])*ps
|
||||
+pBetaP4[ikkp][ks-1];
|
||||
cosAng_ijkp=(-dis_ij[0]*dis_jkp[0]-dis_ij[1]*dis_jkp[1]
|
||||
-dis_ij[2]*dis_jkp[2])/(r_ij*r_jkp);
|
||||
dcA_ijkp[0][0]=(dis_jkp[0]*r_ij*r_jkp-cosAng_ijkp
|
||||
@ -4430,7 +4362,6 @@ void PairBOP::sigmaBo_otf()
|
||||
nkp=nSigBk[n]-1;
|
||||
itypeSigBk[n][nkp]=kp;
|
||||
}
|
||||
temp_kpk=BOP_index[kp]+kpNeik;
|
||||
nb_jkp=nb_t;
|
||||
nb_t++;
|
||||
if(nb_t>nb_sg) {
|
||||
@ -4612,10 +4543,6 @@ void PairBOP::sigmaBo_otf()
|
||||
+pBetaS1[ijk][ks-1])*ps+pBetaS[ijk][ks-1];
|
||||
dBetaS_jk=(pBetaS6[ijk][ks-1]*ps+pBetaS5[ijk][ks-1])*ps
|
||||
+pBetaS4[ijk][ks-1];
|
||||
betaP_jk=((pBetaP3[ijk][ks-1]*ps+pBetaP2[ijk][ks-1])*ps
|
||||
+pBetaP1[ijk][ks-1])*ps+pBetaP[ijk][ks-1];
|
||||
dBetaP_jk=(pBetaP6[ijk][ks-1]*ps+pBetaP5[ijk][ks-1])*ps
|
||||
+pBetaP4[ijk][ks-1];
|
||||
cosAng_ijk=(-dis_ij[0]*dis_jk[0]-dis_ij[1]*dis_jk[1]
|
||||
-dis_ij[2]*dis_jk[2])/(r_ij*r_jk);
|
||||
dcA_ijk[0][0]=(dis_jk[0]*r_ij*r_jk-cosAng_ijk
|
||||
@ -4739,10 +4666,6 @@ void PairBOP::sigmaBo_otf()
|
||||
+pBetaS1[ijkp][ks-1])*ps+pBetaS[ijkp][ks-1];
|
||||
dBetaS_jkp=(pBetaS6[ijkp][ks-1]*ps+pBetaS5[ijkp][ks-1])*ps
|
||||
+pBetaS4[ijkp][ks-1];
|
||||
betaP_jkp=((pBetaP3[ijkp][ks-1]*ps+pBetaP2[ijkp][ks-1])*ps
|
||||
+pBetaP1[ijkp][ks-1])*ps+pBetaP[ijkp][ks-1];
|
||||
dBetaP_jkp=(pBetaP6[ijkp][ks-1]*ps+pBetaP5[ijkp][ks-1])*ps
|
||||
+pBetaP4[ijkp][ks-1];
|
||||
cosAng_ijkp=(-dis_ij[0]*dis_jkp[0]-dis_ij[1]*dis_jkp[1]
|
||||
-dis_ij[2]*dis_jkp[2])/(r_ij*r_jkp);
|
||||
dcA_ijkp[0][0]=(dis_jkp[0]*r_ij*r_jkp-cosAng_ijkp
|
||||
@ -4930,10 +4853,6 @@ void PairBOP::sigmaBo_otf()
|
||||
+pBetaS1[ikkp][ks-1])*ps+pBetaS[ikkp][ks-1];
|
||||
dBetaS_kkp=(pBetaS6[ikkp][ks-1]*ps+pBetaS5[ikkp][ks-1])*ps
|
||||
+pBetaS4[ikkp][ks-1];
|
||||
betaP_kkp=((pBetaP3[ikkp][ks-1]*ps+pBetaP2[ikkp][ks-1])*ps
|
||||
+pBetaP1[ikkp][ks-1])*ps+pBetaP[ikkp][ks-1];
|
||||
dBetaP_kkp=(pBetaP6[ikkp][ks-1]*ps+pBetaP5[ikkp][ks-1])*ps
|
||||
+pBetaP4[ikkp][ks-1];
|
||||
cosAng_jkkp=(-dis_jk[0]*dis_kkp[0]-dis_jk[1]*dis_kkp[1]
|
||||
-dis_jk[2]*dis_kkp[2])/(r_jk*r_kkp);
|
||||
dcA_jkkp[0][0]=(dis_kkp[0]*r_jk*r_kkp-cosAng_jkkp
|
||||
@ -5319,15 +5238,15 @@ void PairBOP::sigmaBo_noa_otf()
|
||||
int nsearch;
|
||||
int sig_flag,setting,ncmp,ks;
|
||||
int itype,jtype,ktype,kptype;
|
||||
int bt_i,bt_j,bt_ij;
|
||||
int bt_i,bt_j;
|
||||
int same_ikp,same_jkp,same_kpk;
|
||||
double AA,BB,CC,DD,EE,EE1,FF;
|
||||
double AAC,BBC,CCC,DDC,EEC,FFC,GGC;
|
||||
double UT,bndtmp,UTcom;
|
||||
double AA,BB,CC,DD,EE1,FF;
|
||||
double AAC,BBC,CCC,DDC,EEC;
|
||||
double UT,bndtmp;
|
||||
double amean,gmean0,gmean1,gmean2,ps;
|
||||
double gfactor1,gprime1,gsqprime;
|
||||
double gfactorsq,gfactor2,gprime2;
|
||||
double gfactorsq2,gsqprime2;
|
||||
double gfactorsq2;
|
||||
double gfactor3,gprime3,gfactor,rfactor;
|
||||
double rfactorrt,rfactor1rt,rfactor1;
|
||||
double rcm1,rcm2,gcm1,gcm2,gcm3;
|
||||
@ -5338,31 +5257,25 @@ void PairBOP::sigmaBo_noa_otf()
|
||||
double bndtmp1,bndtmp2;
|
||||
double dis_ij[3],rsq_ij,r_ij;
|
||||
double betaS_ij,dBetaS_ij;
|
||||
double betaP_ij,dBetaP_ij;
|
||||
double dis_ik[3],rsq_ik,r_ik;
|
||||
double betaS_ik,dBetaS_ik;
|
||||
double betaP_ik,dBetaP_ik;
|
||||
double dis_ikp[3],rsq_ikp,r_ikp;
|
||||
double betaS_ikp,dBetaS_ikp;
|
||||
double betaP_ikp,dBetaP_ikp;
|
||||
double betaS_ikp;
|
||||
double dis_jk[3],rsq_jk,r_jk;
|
||||
double betaS_jk,dBetaS_jk;
|
||||
double betaP_jk,dBetaP_jk;
|
||||
double dis_jkp[3],rsq_jkp,r_jkp;
|
||||
double betaS_jkp,dBetaS_jkp;
|
||||
double betaP_jkp,dBetaP_jkp;
|
||||
double dis_kkp[3],rsq_kkp,r_kkp;
|
||||
double betaS_kkp,dBetaS_kkp;
|
||||
double betaP_kkp,dBetaP_kkp;
|
||||
double betaS_kkp;
|
||||
double cosAng_jik,dcA_jik[3][2];
|
||||
double cosAng_jikp;
|
||||
double cosAng_kikp;
|
||||
double cosAng_ijk,dcA_ijk[3][2];
|
||||
double cosAng_ijkp,dcA_ijkp[3][2];
|
||||
double cosAng_kjkp,dcA_kjkp[3][2];
|
||||
double cosAng_ijkp;
|
||||
double cosAng_kjkp;
|
||||
double cosAng_ikj,dcA_ikj[3][2];
|
||||
double cosAng_ikkp;
|
||||
double cosAng_jkkp,dcA_jkkp[3][2];
|
||||
double cosAng_jkkp;
|
||||
|
||||
|
||||
double ftmp[3],xtmp[3];
|
||||
@ -5463,10 +5376,6 @@ void PairBOP::sigmaBo_noa_otf()
|
||||
+pBetaS1[iij][ks-1])*ps+pBetaS[iij][ks-1];
|
||||
dBetaS_ij=(pBetaS6[iij][ks-1]*ps+pBetaS5[iij][ks-1])*ps
|
||||
+pBetaS4[iij][ks-1];
|
||||
betaP_ij=((pBetaP3[iij][ks-1]*ps+pBetaP2[iij][ks-1])*ps
|
||||
+pBetaP1[iij][ks-1])*ps+pBetaP[iij][ks-1];
|
||||
dBetaP_ij=(pBetaP6[iij][ks-1]*ps+pBetaP5[iij][ks-1])*ps
|
||||
+pBetaP4[iij][ks-1];
|
||||
nSigBk[n]=0;
|
||||
|
||||
//AA-EE1 are the components making up Eq. 30 (a)
|
||||
@ -5475,7 +5384,6 @@ void PairBOP::sigmaBo_noa_otf()
|
||||
BB=0.0;
|
||||
CC=0.0;
|
||||
DD=0.0;
|
||||
EE=0.0;
|
||||
EE1=0.0;
|
||||
|
||||
//FF is the Beta_sigma^2 term
|
||||
@ -5538,10 +5446,6 @@ void PairBOP::sigmaBo_noa_otf()
|
||||
+pBetaS1[iik][ks-1])*ps+pBetaS[iik][ks-1];
|
||||
dBetaS_ik=(pBetaS6[iik][ks-1]*ps+pBetaS5[iik][ks-1])*ps
|
||||
+pBetaS4[iik][ks-1];
|
||||
betaP_ik=((pBetaP3[iik][ks-1]*ps+pBetaP2[iik][ks-1])*ps
|
||||
+pBetaP1[iik][ks-1])*ps+pBetaP[iik][ks-1];
|
||||
dBetaP_ik=(pBetaP6[iik][ks-1]*ps+pBetaP5[iik][ks-1])*ps
|
||||
+pBetaP4[iik][ks-1];
|
||||
|
||||
//find neighbor of i that is equal to k
|
||||
|
||||
@ -5727,10 +5631,6 @@ void PairBOP::sigmaBo_noa_otf()
|
||||
+pBetaS1[ijkp][ks-1])*ps+pBetaS[ijkp][ks-1];
|
||||
dBetaS_jkp=(pBetaS6[ijkp][ks-1]*ps+pBetaS5[ijkp][ks-1])*ps
|
||||
+pBetaS4[ijkp][ks-1];
|
||||
betaP_jkp=((pBetaP3[ijkp][ks-1]*ps+pBetaP2[ijkp][ks-1])*ps
|
||||
+pBetaP1[ijkp][ks-1])*ps+pBetaP[ijkp][ks-1];
|
||||
dBetaP_jkp=(pBetaP6[ijkp][ks-1]*ps+pBetaP5[ijkp][ks-1])*ps
|
||||
+pBetaP4[ijkp][ks-1];
|
||||
cosAng_ijk=(-dis_ij[0]*dis_jk[0]-dis_ij[1]*dis_jk[1]
|
||||
-dis_ij[2]*dis_jk[2])/(r_ij*r_jk);
|
||||
dcA_ijk[0][0]=(dis_jk[0]*r_ij*r_jk-cosAng_ijk
|
||||
@ -5866,12 +5766,6 @@ void PairBOP::sigmaBo_noa_otf()
|
||||
ps=1.0;
|
||||
betaS_ikp=((pBetaS3[iikp][ks-1]*ps+pBetaS2[iikp][ks-1])*ps
|
||||
+pBetaS1[iikp][ks-1])*ps+pBetaS[iikp][ks-1];
|
||||
dBetaS_ikp=(pBetaS6[iikp][ks-1]*ps+pBetaS5[iikp][ks-1])*ps
|
||||
+pBetaS4[iikp][ks-1];
|
||||
betaP_ikp=((pBetaP3[iikp][ks-1]*ps+pBetaP2[iikp][ks-1])*ps
|
||||
+pBetaP1[iikp][ks-1])*ps+pBetaP[iikp][ks-1];
|
||||
dBetaP_ikp=(pBetaP6[iikp][ks-1]*ps+pBetaP5[iikp][ks-1])*ps
|
||||
+pBetaP4[iikp][ks-1];
|
||||
gmean0=sigma_g0[jtype-1][itype-1][kptype-1];
|
||||
gmean1=sigma_g1[jtype-1][itype-1][kptype-1];
|
||||
gmean2=sigma_g2[jtype-1][itype-1][kptype-1];
|
||||
@ -5947,12 +5841,6 @@ void PairBOP::sigmaBo_noa_otf()
|
||||
ps=1.0;
|
||||
betaS_kkp=((pBetaS3[ikkp][ks-1]*ps+pBetaS2[ikkp][ks-1])*ps
|
||||
+pBetaS1[ikkp][ks-1])*ps+pBetaS[ikkp][ks-1];
|
||||
dBetaS_kkp=(pBetaS6[ikkp][ks-1]*ps+pBetaS5[ikkp][ks-1])*ps
|
||||
+pBetaS4[ikkp][ks-1];
|
||||
betaP_kkp=((pBetaP3[ikkp][ks-1]*ps+pBetaP2[ikkp][ks-1])*ps
|
||||
+pBetaP1[ikkp][ks-1])*ps+pBetaP[ikkp][ks-1];
|
||||
dBetaP_kkp=(pBetaP6[ikkp][ks-1]*ps+pBetaP5[ikkp][ks-1])*ps
|
||||
+pBetaP4[ikkp][ks-1];
|
||||
sig_flag=0;
|
||||
for(nsearch=0;nsearch<nSigBk[n];nsearch++) {
|
||||
ncmp=itypeSigBk[n][nsearch];
|
||||
@ -5981,7 +5869,6 @@ void PairBOP::sigmaBo_noa_otf()
|
||||
+gmean2*amean*amean;
|
||||
gprime2=gmean1+2.0*gmean2*amean;
|
||||
gfactorsq2=gfactor2*gfactor2;
|
||||
gsqprime2=2.0*gfactor2*gprime2;
|
||||
gfactor=gfactorsq*gfactorsq2;
|
||||
rfactorrt=betaS_ik*betaS_kkp;
|
||||
rfactor=rfactorrt*rfactorrt;
|
||||
@ -6057,10 +5944,6 @@ void PairBOP::sigmaBo_noa_otf()
|
||||
+pBetaS1[ijk][ks-1])*ps+pBetaS[ijk][ks-1];
|
||||
dBetaS_jk=(pBetaS6[ijk][ks-1]*ps+pBetaS5[ijk][ks-1])*ps
|
||||
+pBetaS4[ijk][ks-1];
|
||||
betaP_jk=((pBetaP3[ijk][ks-1]*ps+pBetaP2[ijk][ks-1])*ps
|
||||
+pBetaP1[ijk][ks-1])*ps+pBetaP[ijk][ks-1];
|
||||
dBetaP_jk=(pBetaP6[ijk][ks-1]*ps+pBetaP5[ijk][ks-1])*ps
|
||||
+pBetaP4[ijk][ks-1];
|
||||
cosAng_ijk=(-dis_ij[0]*dis_jk[0]-dis_ij[1]*dis_jk[1]
|
||||
-dis_ij[2]*dis_jk[2])/(r_ij*r_jk);
|
||||
dcA_ijk[0][0]=(dis_jk[0]*r_ij*r_jk-cosAng_ijk
|
||||
@ -6167,38 +6050,10 @@ void PairBOP::sigmaBo_noa_otf()
|
||||
+pBetaS1[ijkp][ks-1])*ps+pBetaS[ijkp][ks-1];
|
||||
dBetaS_jkp=(pBetaS6[ijkp][ks-1]*ps+pBetaS5[ijkp][ks-1])*ps
|
||||
+pBetaS4[ijkp][ks-1];
|
||||
betaP_jkp=((pBetaP3[ijkp][ks-1]*ps+pBetaP2[ijkp][ks-1])*ps
|
||||
+pBetaP1[ijkp][ks-1])*ps+pBetaP[ijkp][ks-1];
|
||||
dBetaP_jkp=(pBetaP6[ijkp][ks-1]*ps+pBetaP5[ijkp][ks-1])*ps
|
||||
+pBetaP4[ijkp][ks-1];
|
||||
cosAng_ijkp=(-dis_ij[0]*dis_jkp[0]-dis_ij[1]*dis_jkp[1]
|
||||
-dis_ij[2]*dis_jkp[2])/(r_ij*r_jkp);
|
||||
dcA_ijkp[0][0]=(dis_jkp[0]*r_ij*r_jkp-cosAng_ijkp
|
||||
*-dis_ij[0]*r_jkp*r_jkp)/(r_ij*r_ij*r_jkp*r_jkp);
|
||||
dcA_ijkp[1][0]=(dis_jkp[1]*r_ij*r_jkp-cosAng_ijkp
|
||||
*-dis_ij[1]*r_jkp*r_jkp)/(r_ij*r_ij*r_jkp*r_jkp);
|
||||
dcA_ijkp[2][0]=(dis_jkp[2]*r_ij*r_jkp-cosAng_ijkp
|
||||
*-dis_ij[2]*r_jkp*r_jkp)/(r_ij*r_ij*r_jkp*r_jkp);
|
||||
dcA_ijkp[0][1]=(-dis_ij[0]*r_ij*r_jkp-cosAng_ijkp
|
||||
*dis_jkp[0]*r_ij*r_ij)/(r_ij*r_ij*r_jkp*r_jkp);
|
||||
dcA_ijkp[1][1]=(-dis_ij[1]*r_ij*r_jkp-cosAng_ijkp
|
||||
*dis_jkp[1]*r_ij*r_ij)/(r_ij*r_ij*r_jkp*r_jkp);
|
||||
dcA_ijkp[2][1]=(-dis_ij[2]*r_ij*r_jkp-cosAng_ijkp
|
||||
*dis_jkp[2]*r_ij*r_ij)/(r_ij*r_ij*r_jkp*r_jkp);
|
||||
cosAng_kjkp=(dis_jk[0]*dis_jkp[0]+dis_jk[1]*dis_jkp[1]
|
||||
+dis_jk[2]*dis_jkp[2])/(r_jk*r_jkp);
|
||||
dcA_kjkp[0][0]=(dis_jkp[0]*r_jk*r_jkp-cosAng_kjkp
|
||||
*dis_jk[0]*r_jkp*r_jkp)/(r_jk*r_jk*r_jkp*r_jkp);
|
||||
dcA_kjkp[1][0]=(dis_jkp[1]*r_jk*r_jkp-cosAng_kjkp
|
||||
*dis_jk[1]*r_jkp*r_jkp)/(r_jk*r_jk*r_jkp*r_jkp);
|
||||
dcA_kjkp[2][0]=(dis_jkp[2]*r_jk*r_jkp-cosAng_kjkp
|
||||
*dis_jk[2]*r_jkp*r_jkp)/(r_jk*r_jk*r_jkp*r_jkp);
|
||||
dcA_kjkp[0][1]=(dis_jk[0]*r_jk*r_jkp-cosAng_kjkp
|
||||
*dis_jkp[0]*r_jk*r_jk)/(r_jk*r_jk*r_jkp*r_jkp);
|
||||
dcA_kjkp[1][1]=(dis_jk[1]*r_jk*r_jkp-cosAng_kjkp
|
||||
*dis_jkp[1]*r_jk*r_jk)/(r_jk*r_jk*r_jkp*r_jkp);
|
||||
dcA_kjkp[2][1]=(dis_jk[2]*r_jk*r_jkp-cosAng_kjkp
|
||||
*dis_jkp[2]*r_jk*r_jk)/(r_jk*r_jk*r_jkp*r_jkp);
|
||||
nb_jkp=nb_t;
|
||||
nb_t++;
|
||||
if(nb_t>nb_sg) {
|
||||
@ -6308,26 +6163,8 @@ void PairBOP::sigmaBo_noa_otf()
|
||||
ps=1.0;
|
||||
betaS_kkp=((pBetaS3[ikkp][ks-1]*ps+pBetaS2[ikkp][ks-1])*ps
|
||||
+pBetaS1[ikkp][ks-1])*ps+pBetaS[ikkp][ks-1];
|
||||
dBetaS_kkp=(pBetaS6[ikkp][ks-1]*ps+pBetaS5[ikkp][ks-1])*ps
|
||||
+pBetaS4[ikkp][ks-1];
|
||||
betaP_kkp=((pBetaP3[ikkp][ks-1]*ps+pBetaP2[ikkp][ks-1])*ps
|
||||
+pBetaP1[ikkp][ks-1])*ps+pBetaP[ikkp][ks-1];
|
||||
dBetaP_kkp=(pBetaP6[ikkp][ks-1]*ps+pBetaP5[ikkp][ks-1])*ps
|
||||
+pBetaP4[ikkp][ks-1];
|
||||
cosAng_jkkp=(-dis_jk[0]*dis_kkp[0]-dis_jk[1]*dis_kkp[1]
|
||||
-dis_jk[2]*dis_kkp[2])/(r_jk*r_kkp);
|
||||
dcA_jkkp[0][0]=(dis_kkp[0]*r_jk*r_kkp-cosAng_jkkp
|
||||
*-dis_jk[0]*r_kkp*r_kkp)/(r_jk*r_jk*r_kkp*r_kkp);
|
||||
dcA_jkkp[1][0]=(dis_kkp[1]*r_jk*r_kkp-cosAng_jkkp
|
||||
*-dis_jk[1]*r_kkp*r_kkp)/(r_jk*r_jk*r_kkp*r_kkp);
|
||||
dcA_jkkp[2][0]=(dis_kkp[2]*r_jk*r_kkp-cosAng_jkkp
|
||||
*-dis_jk[2]*r_kkp*r_kkp)/(r_jk*r_jk*r_kkp*r_kkp);
|
||||
dcA_jkkp[0][1]=(-dis_jk[0]*r_jk*r_kkp-cosAng_jkkp
|
||||
*dis_kkp[0]*r_jk*r_jk)/(r_jk*r_jk*r_kkp*r_kkp);
|
||||
dcA_jkkp[1][1]=(-dis_jk[1]*r_jk*r_kkp-cosAng_jkkp
|
||||
*dis_kkp[1]*r_jk*r_jk)/(r_jk*r_jk*r_kkp*r_kkp);
|
||||
dcA_jkkp[2][1]=(-dis_jk[2]*r_jk*r_kkp-cosAng_jkkp
|
||||
*dis_kkp[2]*r_jk*r_jk)/(r_jk*r_jk*r_kkp*r_kkp);
|
||||
nb_kkp=nb_t;
|
||||
nb_t++;
|
||||
if(nb_t>nb_sg) {
|
||||
@ -6346,7 +6183,6 @@ void PairBOP::sigmaBo_noa_otf()
|
||||
+gmean2*amean*amean;
|
||||
gprime2=gmean1+2.0*gmean2*amean;
|
||||
gfactorsq2=gfactor2*gfactor2;
|
||||
gsqprime2=2.0*gfactor2*gprime2;
|
||||
gfactor=gfactorsq*gfactorsq2;
|
||||
rfactorrt=betaS_jk*betaS_kkp;
|
||||
rfactor=rfactorrt*rfactorrt;
|
||||
@ -6400,15 +6236,10 @@ void PairBOP::sigmaBo_noa_otf()
|
||||
UT=EEC*FF+BBC+small3[iij];
|
||||
UT=1.0/sqrt(UT);
|
||||
|
||||
// FFC is slightly modified form of (a) Eq. 31
|
||||
// GGC is slightly modified form of (a) Eq. 32
|
||||
// bndtmp is a slightly modified form of (a) Eq. 30 and (b) Eq. 8
|
||||
|
||||
FFC=BBC*UT;
|
||||
GGC=EEC*UT;
|
||||
bndtmp=(FF+sigma_delta[iij]*sigma_delta[iij])
|
||||
+sigma_c[iij]*AAC+small4;
|
||||
UTcom=-0.5*UT*UT*UT;
|
||||
psign=1.0;
|
||||
bndtmp0=1.0/sqrt(bndtmp);
|
||||
sigB1[n]=psign*betaS_ij*bndtmp0;
|
||||
@ -6501,7 +6332,6 @@ void PairBOP::sigmaBo_noa_otf()
|
||||
for(m=0;m<nb_t;m++) {
|
||||
if((bt_sg[m].i>-1)&&(bt_sg[m].j>-1)) {
|
||||
temp_kk=bt_sg[m].temp;
|
||||
bt_ij=bt_sg[m].temp;
|
||||
bt_i=bt_sg[m].i;
|
||||
bt_j=bt_sg[m].j;
|
||||
xtmp[0]=x[bt_j][0]-x[bt_i][0];
|
||||
@ -6550,15 +6380,15 @@ void PairBOP::PiBo()
|
||||
int **firstneigh,*numneigh;
|
||||
int itype,jtype;
|
||||
int temp_ij,temp_ik,temp_ikp;
|
||||
int temp_ji,temp_jki,temp_jk,temp_jkp;
|
||||
int temp_jk,temp_jkp;
|
||||
int ang_jikp,ang_kikp,ang_ijk;
|
||||
int ang_ijkp,ang_kjkp,ang_jik;
|
||||
int nb_ij,nb_ik,nb_jk,nb_ikp,nb_jkp;
|
||||
int bt_ij,bt_i,bt_j;
|
||||
double AA,BB,CC,DD,EE,FF;
|
||||
double AA,BB,CC;
|
||||
double cosSq,sinFactor,cosFactor;
|
||||
double cosSq1,dotV,BBrt,AB1,AB2;
|
||||
double BBrtR,ABrtR,ABrtR1,ABrtR2;
|
||||
double BBrtR,ABrtR1,ABrtR2;
|
||||
double angFactor,angFactor1,angFactor2;
|
||||
double angFactor3,angFactor4,angRfactor;
|
||||
double dAngR1,dAngR2,agpdpr3;
|
||||
@ -6643,7 +6473,6 @@ void PairBOP::PiBo()
|
||||
BB=0.0;
|
||||
nPiBk[n]=0;
|
||||
for(ji=0;ji<numneigh[j];ji++) {
|
||||
temp_ji=BOP_index[j]+ji;
|
||||
if(x[jlist[ji]][0]==x[i][0]) {
|
||||
if(x[jlist[ji]][1]==x[i][1]) {
|
||||
if(x[jlist[ji]][2]==x[i][2]) {
|
||||
@ -6861,7 +6690,6 @@ void PairBOP::PiBo()
|
||||
//j is a neighbor of i and k is a neighbor of j and equal to i
|
||||
|
||||
for(ki=0;ki<numneigh[j];ki++) {
|
||||
temp_jki=BOP_index[j]+ki;
|
||||
k=jlist[ki];
|
||||
if(x[k][0]==x[i][0]) {
|
||||
if(x[k][1]==x[i][1]) {
|
||||
@ -7276,10 +7104,10 @@ void PairBOP::PiBo_otf()
|
||||
int temp_jk,temp_jkp;
|
||||
int nb_ij,nb_ik,nb_jk,nb_ikp,nb_jkp;
|
||||
int bt_i,bt_j;
|
||||
double AA,BB,CC,DD,EE,FF;
|
||||
double AA,BB,CC;
|
||||
double cosSq,sinFactor,cosFactor;
|
||||
double cosSq1,dotV,BBrt,AB1,AB2;
|
||||
double BBrtR,ABrtR,ABrtR1,ABrtR2;
|
||||
double BBrtR,ABrtR1,ABrtR2;
|
||||
double angFactor,angFactor1,angFactor2;
|
||||
double angFactor3,angFactor4,angRfactor;
|
||||
double dAngR1,dAngR2,agpdpr3;
|
||||
@ -9290,11 +9118,6 @@ double PairBOP::memory_usage()
|
||||
|
||||
void PairBOP::memory_theta_create()
|
||||
{
|
||||
int nlocal,nghost,nall;
|
||||
|
||||
nlocal = atom->nlocal;
|
||||
nghost = atom->nghost;
|
||||
nall = nlocal + nghost;
|
||||
if(maxneigh<8)
|
||||
neigh_ct=(maxneigh-1)*(maxneigh-1)*(maxneigh-1);
|
||||
else
|
||||
@ -9328,11 +9151,6 @@ void PairBOP::memory_theta_create()
|
||||
|
||||
void PairBOP::memory_theta_grow()
|
||||
{
|
||||
int nlocal,nghost,nall;
|
||||
|
||||
nlocal = atom->nlocal;
|
||||
nghost = atom->nghost;
|
||||
nall = nlocal + nghost;
|
||||
if(maxneigh<8)
|
||||
neigh_ct=(maxneigh-1)*(maxneigh-1)*(maxneigh-1);
|
||||
else
|
||||
|
||||
@ -622,7 +622,7 @@ void PairComb::read_file(char *file)
|
||||
|
||||
// strip comment, skip line if blank
|
||||
|
||||
if (ptr = strchr(line,'#')) *ptr = '\0';
|
||||
if ((ptr = strchr(line,'#'))) *ptr = '\0';
|
||||
nwords = atom->count_words(line);
|
||||
if (nwords == 0) continue;
|
||||
|
||||
@ -641,7 +641,7 @@ void PairComb::read_file(char *file)
|
||||
if (eof) break;
|
||||
MPI_Bcast(&n,1,MPI_INT,0,world);
|
||||
MPI_Bcast(line,n,MPI_CHAR,0,world);
|
||||
if (ptr = strchr(line,'#')) *ptr = '\0';
|
||||
if ((ptr = strchr(line,'#'))) *ptr = '\0';
|
||||
nwords = atom->count_words(line);
|
||||
}
|
||||
|
||||
@ -652,7 +652,7 @@ void PairComb::read_file(char *file)
|
||||
|
||||
nwords = 0;
|
||||
words[nwords++] = strtok(line," \t\n\r\f");
|
||||
while (words[nwords++] = strtok(NULL," \t\n\r\f")) continue;
|
||||
while ((words[nwords++] = strtok(NULL," \t\n\r\f"))) continue;
|
||||
|
||||
// ielement,jelement,kelement = 1st args
|
||||
// if all 3 args are in element list, then parse this line
|
||||
@ -2047,16 +2047,14 @@ void PairComb::unpack_reverse_comm(int n, int *list, double *buf)
|
||||
|
||||
void PairComb::Short_neigh()
|
||||
{
|
||||
int nj,itype,jtype,iparam_ij;
|
||||
int nj,itype,jtype;
|
||||
int inum,jnum,i,j,ii,jj;
|
||||
int *neighptrj,*ilist,*jlist,*numneigh;
|
||||
int **firstneigh;
|
||||
double xtmp,ytmp,ztmp,rr,rsq,delrj[3];
|
||||
double xtmp,ytmp,ztmp,rsq,delrj[3];
|
||||
|
||||
double **x = atom->x;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
int ntype = atom->ntypes;
|
||||
|
||||
if (atom->nmax > nmax) {
|
||||
memory->sfree(sht_first);
|
||||
|
||||
@ -331,7 +331,7 @@ void PairComb3::read_lib()
|
||||
fgets(s,maxlib,fp);
|
||||
nwords = 0;
|
||||
words1[nwords++] = strtok(s," \t\n\r\f");
|
||||
while (words1[nwords++] = strtok(NULL," \t\n\r\f"))continue;
|
||||
while ((words1[nwords++] = strtok(NULL," \t\n\r\f")))continue;
|
||||
ccutoff[0] = atof(words1[0]);
|
||||
ccutoff[1] = atof(words1[1]);
|
||||
ccutoff[2] = atof(words1[2]);
|
||||
@ -342,7 +342,7 @@ void PairComb3::read_lib()
|
||||
fgets(s,maxlib,fp);
|
||||
nwords = 0;
|
||||
words1[nwords++] = strtok(s," \t\n\r\f");
|
||||
while (words1[nwords++] = strtok(NULL," \t\n\r\f"))continue;
|
||||
while ((words1[nwords++] = strtok(NULL," \t\n\r\f")))continue;
|
||||
ch_a[0] = atof(words1[0]);
|
||||
ch_a[1] = atof(words1[1]);
|
||||
ch_a[2] = atof(words1[2]);
|
||||
@ -354,7 +354,7 @@ void PairComb3::read_lib()
|
||||
fgets(s,maxlib,fp);
|
||||
nwords = 0;
|
||||
words1[nwords++] = strtok(s," \t\n\r\f");
|
||||
while (words1[nwords++] = strtok(NULL," \t\n\r\f"))continue;
|
||||
while ((words1[nwords++] = strtok(NULL," \t\n\r\f")))continue;
|
||||
nsplpcn = atoi(words1[0]);
|
||||
nsplrad = atoi(words1[1]);
|
||||
nspltor = atoi(words1[2]);
|
||||
@ -362,7 +362,7 @@ void PairComb3::read_lib()
|
||||
fgets(s,maxlib,fp);
|
||||
nwords = 0;
|
||||
words1[nwords++] = strtok(s," \t\n\r\f");
|
||||
while (words1[nwords++] = strtok(NULL," \t\n\r\f"))continue;
|
||||
while ((words1[nwords++] = strtok(NULL," \t\n\r\f")))continue;
|
||||
maxx = atoi(words1[0]);
|
||||
maxy = atoi(words1[1]);
|
||||
maxz = atoi(words1[2]);
|
||||
@ -370,7 +370,7 @@ void PairComb3::read_lib()
|
||||
fgets(s,maxlib,fp);
|
||||
nwords = 0;
|
||||
words1[nwords++] = strtok(s," \t\n\r\f");
|
||||
while (words1[nwords++] = strtok(NULL," \t\n\r\f"))continue;
|
||||
while ((words1[nwords++] = strtok(NULL," \t\n\r\f")))continue;
|
||||
maxxc = atoi(words1[0]);
|
||||
maxyc = atoi(words1[1]);
|
||||
maxconj = atoi(words1[2]);
|
||||
@ -379,7 +379,7 @@ void PairComb3::read_lib()
|
||||
fgets(s,maxlib,fp);
|
||||
nwords = 0;
|
||||
words1[nwords++] = strtok(s," \t\n\r\f");
|
||||
while (words1[nwords++] = strtok(NULL," \t\n\r\f"))continue;
|
||||
while ((words1[nwords++] = strtok(NULL," \t\n\r\f")))continue;
|
||||
maxxcn[l] = atoi(words1[1]);
|
||||
vmaxxcn[l] = atof(words1[2]);
|
||||
dvmaxxcn[l] = atof(words1[3]);
|
||||
@ -388,14 +388,14 @@ void PairComb3::read_lib()
|
||||
fgets(s,maxlib,fp);
|
||||
nwords = 0;
|
||||
words1[nwords++] = strtok(s," \t\n\r\f");
|
||||
while (words1[nwords++] = strtok(NULL," \t\n\r\f"))continue;
|
||||
while ((words1[nwords++] = strtok(NULL," \t\n\r\f")))continue;
|
||||
ntab = atoi(words1[0]);
|
||||
|
||||
for (i=0; i<ntab+1; i++){
|
||||
fgets(s,maxlib,fp);
|
||||
nwords = 0;
|
||||
words1[nwords++] = strtok(s," \t\n\r\f");
|
||||
while (words1[nwords++] = strtok(NULL," \t\n\r\f"))continue;
|
||||
while ((words1[nwords++] = strtok(NULL," \t\n\r\f")))continue;
|
||||
pang[i] = atof(words1[1]);
|
||||
dpang[i] = atof(words1[2]);
|
||||
ddpang[i] = atof(words1[3]);
|
||||
@ -408,7 +408,7 @@ void PairComb3::read_lib()
|
||||
fgets(s,maxlib,fp);
|
||||
nwords = 0;
|
||||
words1[nwords++] = strtok(s," \t\n\r\f");
|
||||
while (words1[nwords++] = strtok(NULL," \t\n\r\f"))continue;
|
||||
while ((words1[nwords++] = strtok(NULL," \t\n\r\f")))continue;
|
||||
ll = atoi(words1[0])-1;
|
||||
ii = atoi(words1[1]);
|
||||
jj = atoi(words1[2]);
|
||||
@ -426,7 +426,7 @@ void PairComb3::read_lib()
|
||||
fgets(s,maxlib,fp);
|
||||
nwords = 0;
|
||||
words1[nwords++] = strtok(s," \t\n\r\f");
|
||||
while (words1[nwords++] = strtok(NULL," \t\n\r\f"))continue;
|
||||
while ((words1[nwords++] = strtok(NULL," \t\n\r\f")))continue;
|
||||
ll = atoi(words1[0])-1;
|
||||
ii = atoi(words1[1]);
|
||||
jj = atoi(words1[2]);
|
||||
@ -435,7 +435,7 @@ void PairComb3::read_lib()
|
||||
fgets(s,maxlib,fp);
|
||||
nwords = 0;
|
||||
words1[nwords++] = strtok(s," \t\n\r\f");
|
||||
while (words1[nwords++] = strtok(NULL," \t\n\r\f"))continue;
|
||||
while ((words1[nwords++] = strtok(NULL," \t\n\r\f")))continue;
|
||||
for(m=0; m<32 ; m++) {
|
||||
mm=iii*32+m;
|
||||
pcn_cubs[ll][ii][jj][kk][mm] = atof(words1[m]);
|
||||
@ -450,7 +450,7 @@ void PairComb3::read_lib()
|
||||
fgets(s,maxlib,fp);
|
||||
nwords = 0;
|
||||
words1[nwords++] = strtok(s," \t\n\r\f");
|
||||
while (words1[nwords++] = strtok(NULL," \t\n\r\f"))continue;
|
||||
while ((words1[nwords++] = strtok(NULL," \t\n\r\f")))continue;
|
||||
ll = atoi(words1[0])-1;
|
||||
ii = atoi(words1[1]);
|
||||
jj = atoi(words1[2]);
|
||||
@ -468,7 +468,7 @@ void PairComb3::read_lib()
|
||||
fgets(s,maxlib,fp);
|
||||
nwords = 0;
|
||||
words1[nwords++] = strtok(s," \t\n\r\f");
|
||||
while (words1[nwords++] = strtok(NULL," \t\n\r\f"))continue;
|
||||
while ((words1[nwords++] = strtok(NULL," \t\n\r\f")))continue;
|
||||
ll = atoi(words1[0])-1;
|
||||
ii = atoi(words1[1]);
|
||||
jj = atoi(words1[2]);
|
||||
@ -477,7 +477,7 @@ void PairComb3::read_lib()
|
||||
fgets(s,maxlib,fp);
|
||||
nwords = 0;
|
||||
words1[nwords++] = strtok(s," \t\n\r\f");
|
||||
while (words1[nwords++] = strtok(NULL," \t\n\r\f"))continue;
|
||||
while ((words1[nwords++] = strtok(NULL," \t\n\r\f")))continue;
|
||||
for(m=0; m<32 ; m++){
|
||||
mm=iii*32+m;
|
||||
rad_spl[ll][ii][jj][kk][mm] = atof(words1[m]);
|
||||
@ -492,7 +492,7 @@ void PairComb3::read_lib()
|
||||
fgets(s,maxlib,fp);
|
||||
nwords = 0;
|
||||
words1[nwords++] = strtok(s," \t\n\r\f");
|
||||
while (words1[nwords++] = strtok(NULL," \t\n\r\f"))continue;
|
||||
while ((words1[nwords++] = strtok(NULL," \t\n\r\f")))continue;
|
||||
ll = atoi(words1[0])-1;
|
||||
ii = atoi(words1[1]);
|
||||
jj = atoi(words1[2]);
|
||||
@ -510,7 +510,7 @@ void PairComb3::read_lib()
|
||||
fgets(s,maxlib,fp);
|
||||
nwords = 0;
|
||||
words1[nwords++] = strtok(s," \t\n\r\f");
|
||||
while (words1[nwords++] = strtok(NULL," \t\n\r\f"))continue;
|
||||
while ((words1[nwords++] = strtok(NULL," \t\n\r\f")))continue;
|
||||
ll = atoi(words1[0])-1;
|
||||
ii = atoi(words1[1]);
|
||||
jj = atoi(words1[2]);
|
||||
@ -519,7 +519,7 @@ void PairComb3::read_lib()
|
||||
fgets(s,maxlib,fp);
|
||||
nwords = 0;
|
||||
words1[nwords++] = strtok(s," \t\n\r\f");
|
||||
while (words1[nwords++] = strtok(NULL," \t\n\r\f"))continue;
|
||||
while ((words1[nwords++] = strtok(NULL," \t\n\r\f")))continue;
|
||||
for (m=0; m<32 ; m++){
|
||||
mm=iii*32+m;
|
||||
tor_spl[ll][ii][jj][kk][mm] = atof(words1[m]);
|
||||
@ -633,7 +633,7 @@ void PairComb3::read_file(char *file)
|
||||
|
||||
// strip comment, skip line if blank
|
||||
|
||||
if (ptr = strchr(line,'#')) *ptr = '\0';
|
||||
if ((ptr = strchr(line,'#'))) *ptr = '\0';
|
||||
|
||||
nwords = atom->count_words(line);
|
||||
if (nwords == 0) continue;
|
||||
@ -654,7 +654,7 @@ void PairComb3::read_file(char *file)
|
||||
if (eof) break;
|
||||
MPI_Bcast(&n,1,MPI_INT,0,world);
|
||||
MPI_Bcast(line,n,MPI_CHAR,0,world);
|
||||
if (ptr = strchr(line,'#')) *ptr = '\0';
|
||||
if ((ptr = strchr(line,'#'))) *ptr = '\0';
|
||||
nwords = atom->count_words(line);
|
||||
}
|
||||
if (nwords != params_per_line){
|
||||
@ -664,7 +664,7 @@ void PairComb3::read_file(char *file)
|
||||
|
||||
nwords = 0;
|
||||
words[nwords++] = strtok(line," \t\n\r\f");
|
||||
while (words[nwords++] = strtok(NULL," \t\n\r\f")) continue;
|
||||
while ((words[nwords++] = strtok(NULL," \t\n\r\f"))) continue;
|
||||
|
||||
// ielement,jelement,kelement = 1st args
|
||||
// if all 3 args are in element list, then parse this line
|
||||
|
||||
@ -766,7 +766,7 @@ void PairEAM::grab(FILE *fptr, int n, double *list)
|
||||
fgets(line,MAXLINE,fptr);
|
||||
ptr = strtok(line," \t\n\r\f");
|
||||
list[i++] = atof(ptr);
|
||||
while (ptr = strtok(NULL," \t\n\r\f")) list[i++] = atof(ptr);
|
||||
while ((ptr = strtok(NULL," \t\n\r\f"))) list[i++] = atof(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -153,7 +153,7 @@ void PairEAMAlloy::read_file(char *filename)
|
||||
char **words = new char*[file->nelements+1];
|
||||
nwords = 0;
|
||||
strtok(line," \t\n\r\f");
|
||||
while (words[nwords++] = strtok(NULL," \t\n\r\f")) continue;
|
||||
while ((words[nwords++] = strtok(NULL," \t\n\r\f"))) continue;
|
||||
|
||||
file->elements = new char*[file->nelements];
|
||||
for (int i = 0; i < file->nelements; i++) {
|
||||
|
||||
@ -153,7 +153,7 @@ void PairEAMFS::read_file(char *filename)
|
||||
char **words = new char*[file->nelements+1];
|
||||
nwords = 0;
|
||||
strtok(line," \t\n\r\f");
|
||||
while (words[nwords++] = strtok(NULL," \t\n\r\f")) continue;
|
||||
while ((words[nwords++] = strtok(NULL," \t\n\r\f"))) continue;
|
||||
|
||||
file->elements = new char*[file->nelements];
|
||||
for (int i = 0; i < file->nelements; i++) {
|
||||
|
||||
@ -368,7 +368,7 @@ void PairSW::read_file(char *file)
|
||||
|
||||
// strip comment, skip line if blank
|
||||
|
||||
if (ptr = strchr(line,'#')) *ptr = '\0';
|
||||
if ((ptr = strchr(line,'#'))) *ptr = '\0';
|
||||
nwords = atom->count_words(line);
|
||||
if (nwords == 0) continue;
|
||||
|
||||
@ -387,7 +387,7 @@ void PairSW::read_file(char *file)
|
||||
if (eof) break;
|
||||
MPI_Bcast(&n,1,MPI_INT,0,world);
|
||||
MPI_Bcast(line,n,MPI_CHAR,0,world);
|
||||
if (ptr = strchr(line,'#')) *ptr = '\0';
|
||||
if ((ptr = strchr(line,'#'))) *ptr = '\0';
|
||||
nwords = atom->count_words(line);
|
||||
}
|
||||
|
||||
@ -398,7 +398,7 @@ void PairSW::read_file(char *file)
|
||||
|
||||
nwords = 0;
|
||||
words[nwords++] = strtok(line," \t\n\r\f");
|
||||
while (words[nwords++] = strtok(NULL," \t\n\r\f")) continue;
|
||||
while ((words[nwords++] = strtok(NULL," \t\n\r\f"))) continue;
|
||||
|
||||
// ielement,jelement,kelement = 1st args
|
||||
// if all 3 args are in element list, then parse this line
|
||||
|
||||
@ -407,7 +407,7 @@ void PairTersoff::read_file(char *file)
|
||||
|
||||
// strip comment, skip line if blank
|
||||
|
||||
if (ptr = strchr(line,'#')) *ptr = '\0';
|
||||
if ((ptr = strchr(line,'#'))) *ptr = '\0';
|
||||
nwords = atom->count_words(line);
|
||||
if (nwords == 0) continue;
|
||||
|
||||
@ -426,7 +426,7 @@ void PairTersoff::read_file(char *file)
|
||||
if (eof) break;
|
||||
MPI_Bcast(&n,1,MPI_INT,0,world);
|
||||
MPI_Bcast(line,n,MPI_CHAR,0,world);
|
||||
if (ptr = strchr(line,'#')) *ptr = '\0';
|
||||
if ((ptr = strchr(line,'#'))) *ptr = '\0';
|
||||
nwords = atom->count_words(line);
|
||||
}
|
||||
|
||||
@ -437,7 +437,7 @@ void PairTersoff::read_file(char *file)
|
||||
|
||||
nwords = 0;
|
||||
words[nwords++] = strtok(line," \t\n\r\f");
|
||||
while (words[nwords++] = strtok(NULL," \t\n\r\f")) continue;
|
||||
while ((words[nwords++] = strtok(NULL," \t\n\r\f"))) continue;
|
||||
|
||||
// ielement,jelement,kelement = 1st args
|
||||
// if all 3 args are in element list, then parse this line
|
||||
|
||||
@ -87,7 +87,7 @@ void PairTersoffMOD::read_file(char *file)
|
||||
|
||||
// strip comment, skip line if blank
|
||||
|
||||
if (ptr = strchr(line,'#')) *ptr = '\0';
|
||||
if ((ptr = strchr(line,'#'))) *ptr = '\0';
|
||||
nwords = atom->count_words(line);
|
||||
if (nwords == 0) continue;
|
||||
|
||||
@ -106,7 +106,7 @@ void PairTersoffMOD::read_file(char *file)
|
||||
if (eof) break;
|
||||
MPI_Bcast(&n,1,MPI_INT,0,world);
|
||||
MPI_Bcast(line,n,MPI_CHAR,0,world);
|
||||
if (ptr = strchr(line,'#')) *ptr = '\0';
|
||||
if ((ptr = strchr(line,'#'))) *ptr = '\0';
|
||||
nwords = atom->count_words(line);
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ void PairTersoffMOD::read_file(char *file)
|
||||
|
||||
nwords = 0;
|
||||
words[nwords++] = strtok(line," \t\n\r\f");
|
||||
while (words[nwords++] = strtok(NULL," \t\n\r\f")) continue;
|
||||
while ((words[nwords++] = strtok(NULL," \t\n\r\f"))) continue;
|
||||
|
||||
// ielement,jelement,kelement = 1st args
|
||||
// if all 3 args are in element list, then parse this line
|
||||
|
||||
@ -104,7 +104,7 @@ void PairTersoffZBL::read_file(char *file)
|
||||
|
||||
// strip comment, skip line if blank
|
||||
|
||||
if (ptr = strchr(line,'#')) *ptr = '\0';
|
||||
if ((ptr = strchr(line,'#'))) *ptr = '\0';
|
||||
nwords = atom->count_words(line);
|
||||
if (nwords == 0) continue;
|
||||
|
||||
@ -123,7 +123,7 @@ void PairTersoffZBL::read_file(char *file)
|
||||
if (eof) break;
|
||||
MPI_Bcast(&n,1,MPI_INT,0,world);
|
||||
MPI_Bcast(line,n,MPI_CHAR,0,world);
|
||||
if (ptr = strchr(line,'#')) *ptr = '\0';
|
||||
if ((ptr = strchr(line,'#'))) *ptr = '\0';
|
||||
nwords = atom->count_words(line);
|
||||
}
|
||||
|
||||
@ -134,7 +134,7 @@ void PairTersoffZBL::read_file(char *file)
|
||||
|
||||
nwords = 0;
|
||||
words[nwords++] = strtok(line," \t\n\r\f");
|
||||
while (words[nwords++] = strtok(NULL," \t\n\r\f")) continue;
|
||||
while ((words[nwords++] = strtok(NULL," \t\n\r\f"))) continue;
|
||||
|
||||
// ielement,jelement,kelement = 1st args
|
||||
// if all 3 args are in element list, then parse this line
|
||||
|
||||
@ -185,7 +185,7 @@ void FixBondBreak::init()
|
||||
|
||||
void FixBondBreak::post_integrate()
|
||||
{
|
||||
int i,j,k,m,n,i1,i2,n1,n2,n3,type;
|
||||
int i,j,k,m,n,i1,i2,n1,n3,type;
|
||||
double delx,dely,delz,rsq;
|
||||
tagint *slist;
|
||||
|
||||
@ -511,7 +511,7 @@ void FixBondBreak::update_topology()
|
||||
|
||||
void FixBondBreak::rebuild_special(int m, tagint id1, tagint id2)
|
||||
{
|
||||
int i,j,n,n1,n2,n3,cn1,cn2,cn3;
|
||||
int i,j,n,n1,cn1,cn2,cn3;
|
||||
tagint *slist;
|
||||
|
||||
tagint *tag = atom->tag;
|
||||
|
||||
@ -520,7 +520,7 @@ void PairMEAM::read_files(char *globalfile, char *userfile)
|
||||
|
||||
// strip comment, skip line if blank
|
||||
|
||||
if (ptr = strchr(line,'#')) *ptr = '\0';
|
||||
if ((ptr = strchr(line,'#'))) *ptr = '\0';
|
||||
nwords = atom->count_words(line);
|
||||
if (nwords == 0) continue;
|
||||
|
||||
@ -539,7 +539,7 @@ void PairMEAM::read_files(char *globalfile, char *userfile)
|
||||
if (eof) break;
|
||||
MPI_Bcast(&n,1,MPI_INT,0,world);
|
||||
MPI_Bcast(line,n,MPI_CHAR,0,world);
|
||||
if (ptr = strchr(line,'#')) *ptr = '\0';
|
||||
if ((ptr = strchr(line,'#'))) *ptr = '\0';
|
||||
nwords = atom->count_words(line);
|
||||
}
|
||||
|
||||
@ -551,7 +551,7 @@ void PairMEAM::read_files(char *globalfile, char *userfile)
|
||||
|
||||
nwords = 0;
|
||||
words[nwords++] = strtok(line,"' \t\n\r\f");
|
||||
while (words[nwords++] = strtok(NULL,"' \t\n\r\f")) continue;
|
||||
while ((words[nwords++] = strtok(NULL,"' \t\n\r\f"))) continue;
|
||||
|
||||
// skip if element name isn't in element list
|
||||
|
||||
@ -676,7 +676,7 @@ void PairMEAM::read_files(char *globalfile, char *userfile)
|
||||
|
||||
// strip comment, skip line if blank
|
||||
|
||||
if (ptr = strchr(line,'#')) *ptr = '\0';
|
||||
if ((ptr = strchr(line,'#'))) *ptr = '\0';
|
||||
nparams = atom->count_words(line);
|
||||
if (nparams == 0) continue;
|
||||
|
||||
|
||||
@ -533,8 +533,6 @@ int FixGLD::pack_exchange(int i, double *buf)
|
||||
|
||||
int FixGLD::unpack_exchange(int nlocal, double *buf)
|
||||
{
|
||||
double **extra = atom->extra;
|
||||
|
||||
int m = 0;
|
||||
for (int k = 0; k < 3*prony_terms; k++) {
|
||||
s_gld[nlocal][k] = buf[m++];
|
||||
@ -612,7 +610,6 @@ int FixGLD::maxsize_restart()
|
||||
void FixGLD::init_s_gld()
|
||||
{
|
||||
int icoeff;
|
||||
int *type = atom->type;
|
||||
double eq_sdev=0.0;
|
||||
|
||||
// set kT to the temperature in mvvv units
|
||||
|
||||
@ -322,7 +322,7 @@ double AngleTable::single(int type, int i1, int i2, int i3)
|
||||
if (c < -1.0) c = -1.0;
|
||||
|
||||
double theta = acos(c);
|
||||
double u;
|
||||
double u=0.0;
|
||||
u_lookup(type,theta,u);
|
||||
return u;
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ void BondFENE::compute(int eflag, int vflag)
|
||||
double delx,dely,delz,ebond,fbond;
|
||||
double rsq,r0sq,rlogarg,sr2,sr6;
|
||||
|
||||
ebond = 0.0;
|
||||
ebond = sr6 = 0.0;
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = 0;
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ void BondFENEExpand::compute(int eflag, int vflag)
|
||||
double rsq,r0sq,rlogarg,sr2,sr6;
|
||||
double r,rshift,rshiftsq;
|
||||
|
||||
ebond = 0.0;
|
||||
ebond = sr6 = 0.0;
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = 0;
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@ void BondQuartic::compute(int eflag, int vflag)
|
||||
double delx,dely,delz,ebond,fbond,evdwl,fpair;
|
||||
double r,rsq,dr,r2,ra,rb,sr2,sr6;
|
||||
|
||||
ebond = evdwl = 0.0;
|
||||
ebond = evdwl = sr6 = 0.0;
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = 0;
|
||||
|
||||
|
||||
@ -552,7 +552,6 @@ int DumpAtomMPIIO::convert_string_omp(int n, double *mybuf)
|
||||
|
||||
int DumpAtomMPIIO::convert_image_omp(int n, double *mybuf)
|
||||
{
|
||||
MPI_Status mpiStatus;
|
||||
char **mpifh_buffer_line_per_thread;
|
||||
int mpifhStringCount;
|
||||
int *mpifhStringCountPerThread, *bufOffset, *bufRange, *bufLength;
|
||||
@ -643,7 +642,6 @@ int DumpAtomMPIIO::convert_image_omp(int n, double *mybuf)
|
||||
|
||||
int DumpAtomMPIIO::convert_noimage_omp(int n, double *mybuf)
|
||||
{
|
||||
MPI_Status mpiStatus;
|
||||
char **mpifh_buffer_line_per_thread;
|
||||
int mpifhStringCount;
|
||||
int *mpifhStringCountPerThread, *bufOffset, *bufRange, *bufLength;
|
||||
|
||||
@ -573,7 +573,6 @@ void DumpCustomMPIIO::write_string(int n, double *mybuf)
|
||||
|
||||
int DumpCustomMPIIO::convert_string_omp(int n, double *mybuf)
|
||||
{
|
||||
MPI_Status mpiStatus;
|
||||
char **mpifh_buffer_line_per_thread;
|
||||
int mpifhStringCount;
|
||||
int *mpifhStringCountPerThread, *bufOffset, *bufRange, *bufLength;
|
||||
|
||||
@ -315,7 +315,6 @@ void DumpXYZMPIIO::write_string(int n, double *mybuf)
|
||||
|
||||
int DumpXYZMPIIO::convert_string_omp(int n, double *mybuf)
|
||||
{
|
||||
MPI_Status mpiStatus;
|
||||
char **mpifh_buffer_line_per_thread;
|
||||
int mpifhStringCount;
|
||||
int *mpifhStringCountPerThread, *bufOffset, *bufRange, *bufLength;
|
||||
|
||||
@ -303,7 +303,6 @@ void FixPeriNeigh::setup(int vflag)
|
||||
double half_lc = 0.5*(domain->lattice->xlattice);
|
||||
double vfrac_scale;
|
||||
PairPeriLPS *pairlps = static_cast<PairPeriLPS*>(anypair);
|
||||
PairPeriPMB *pairpmb = static_cast<PairPeriPMB*>(anypair);
|
||||
PairPeriVES *pairves = static_cast<PairPeriVES*>(anypair);
|
||||
PairPeriEPS *paireps = static_cast<PairPeriEPS*>(anypair);
|
||||
|
||||
|
||||
@ -244,7 +244,7 @@ void AngleSDK::coeff(int narg, char **arg)
|
||||
|
||||
double k_one = force->numeric(FLERR,arg[1]);
|
||||
double theta0_one = force->numeric(FLERR,arg[2]);
|
||||
double repscale_one;
|
||||
double repscale_one=1.0;
|
||||
|
||||
// backward compatibility with old cg/cmm style input:
|
||||
// this had <lj_type> <epsilon> <sigma>
|
||||
|
||||
@ -779,7 +779,6 @@ void FixLbFluid::calc_fluidforce(void)
|
||||
MPI_Status statuses[20];
|
||||
double forceloc[3],force[3];
|
||||
double torqueloc[3],torque[3];
|
||||
int numrequests;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Zero out arrays
|
||||
@ -2531,8 +2530,6 @@ void FixLbFluid::update_periodic(int xstart, int xend, int ystart, int yend, int
|
||||
void FixLbFluid::streamout(void)
|
||||
{
|
||||
int i,j,k;
|
||||
double mass,massloc;
|
||||
double momentumloc[3],momentum[3];
|
||||
int istart,jstart,kstart;
|
||||
int iend,jend,kend;
|
||||
int w,iproc;
|
||||
|
||||
@ -68,7 +68,6 @@ FixLbPC::FixLbPC(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
int print_warning = 0;
|
||||
for(int j=0; j<nlocal; j++){
|
||||
if((mask[j] & groupbit) && !(mask[j] & groupbit_lb_fluid))
|
||||
error->one(FLERR,"can only use the lb/pc fix for an atom if also using the lb/fluid fix for that atom");
|
||||
|
||||
@ -455,7 +455,7 @@ int FixLbRigidPCSphere::setmask()
|
||||
|
||||
void FixLbRigidPCSphere::init()
|
||||
{
|
||||
int i,itype,ibody;
|
||||
int i,ibody;
|
||||
|
||||
// warn if more than one rigid fix
|
||||
|
||||
@ -649,7 +649,7 @@ void FixLbRigidPCSphere::init()
|
||||
void FixLbRigidPCSphere::setup(int vflag)
|
||||
{
|
||||
int i,n,ibody;
|
||||
double massone,radone;
|
||||
double massone;
|
||||
|
||||
// vcm = velocity of center-of-mass of each rigid body
|
||||
// fcm = force on center-of-mass of each rigid body
|
||||
@ -663,7 +663,6 @@ void FixLbRigidPCSphere::setup(int vflag)
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
imageint *image = atom->image;
|
||||
int *periodicity = domain->periodicity;
|
||||
|
||||
double unwrap[3];
|
||||
double dx,dy,dz;
|
||||
@ -761,12 +760,11 @@ void FixLbRigidPCSphere::initial_integrate(int vflag)
|
||||
{
|
||||
double dtfm;
|
||||
|
||||
int i,n,ibody;
|
||||
int i,ibody;
|
||||
|
||||
double massone,radone;
|
||||
double massone;
|
||||
double **x = atom->x;
|
||||
double **v = atom->v;
|
||||
double **f = atom->f;
|
||||
double *rmass = atom->rmass;
|
||||
double *mass = atom->mass;
|
||||
int *type = atom->type;
|
||||
@ -953,14 +951,12 @@ void FixLbRigidPCSphere::initial_integrate(int vflag)
|
||||
void FixLbRigidPCSphere::final_integrate()
|
||||
{
|
||||
int i,ibody;
|
||||
double xy,xz,yz;
|
||||
|
||||
// sum over atoms to get force and torque on rigid body
|
||||
double massone;
|
||||
imageint *image = atom->image;
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
double **v = atom->v;
|
||||
double *rmass = atom->rmass;
|
||||
double *mass = atom->mass;
|
||||
int *type = atom->type;
|
||||
@ -1565,7 +1561,7 @@ double FixLbRigidPCSphere::compute_array(int i, int j)
|
||||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
double **x = atom->x;
|
||||
int i,j,k,p,m;
|
||||
int i,k;
|
||||
int ix,iy,iz;
|
||||
int ixp,iyp,izp;
|
||||
double dx1,dy1,dz1;
|
||||
|
||||
@ -283,7 +283,5 @@ double AngleQuartic::single(int type, int i1, int i2, int i3)
|
||||
double dtheta2 = dtheta * dtheta;
|
||||
double dtheta3 = dtheta2 * dtheta;
|
||||
double dtheta4 = dtheta3 * dtheta;
|
||||
double tk = 2.0 * k2[type] * dtheta + 3.0 * k3[type] * dtheta2 +
|
||||
4.0 * k4[type] * dtheta3;
|
||||
return k2[type] * dtheta2 + k3[type] * dtheta3 + k4[type] * dtheta4;
|
||||
}
|
||||
|
||||
@ -58,13 +58,13 @@ DihedralCosineShiftExp::~DihedralCosineShiftExp()
|
||||
|
||||
void DihedralCosineShiftExp::compute(int eflag, int vflag)
|
||||
{
|
||||
int i1,i2,i3,i4,i,m,n,type;
|
||||
int i1,i2,i3,i4,n,type;
|
||||
double vb1x,vb1y,vb1z,vb2x,vb2y,vb2z,vb3x,vb3y,vb3z,vb2xm,vb2ym,vb2zm;
|
||||
double edihedral,f1[3],f2[3],f3[3],f4[3];
|
||||
double ax,ay,az,bx,by,bz,rasq,rbsq,rgsq,rg,rginv,ra2inv,rb2inv,rabinv;
|
||||
double df,df1,ddf1,fg,hg,fga,hgb,gaa,gbb;
|
||||
double df,fg,hg,fga,hgb,gaa,gbb;
|
||||
double dtfx,dtfy,dtfz,dtgx,dtgy,dtgz,dthx,dthy,dthz;
|
||||
double c,s,p,sx2,sy2,sz2;
|
||||
double c,s,sx2,sy2,sz2;
|
||||
double cccpsss,cssmscc,exp2;
|
||||
|
||||
edihedral = 0.0;
|
||||
|
||||
@ -75,22 +75,17 @@ void DihedralFourier::compute(int eflag, int vflag)
|
||||
double ax,ay,az,bx,by,bz,rasq,rbsq,rgsq,rg,rginv,ra2inv,rb2inv,rabinv;
|
||||
double df,df1_,ddf1_,fg,hg,fga,hgb,gaa,gbb;
|
||||
double dtfx,dtfy,dtfz,dtgx,dtgy,dtgz,dthx,dthy,dthz;
|
||||
double c,s,p,p_,sx2,sy2,sz2;
|
||||
int itype,jtype;
|
||||
double delx,dely,delz,rsq,r2inv,r6inv;
|
||||
double c,s,p_,sx2,sy2,sz2;
|
||||
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = 0;
|
||||
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
double *q = atom->q;
|
||||
int *atomtype = atom->type;
|
||||
int **dihedrallist = neighbor->dihedrallist;
|
||||
int ndihedrallist = neighbor->ndihedrallist;
|
||||
int nlocal = atom->nlocal;
|
||||
int newton_bond = force->newton_bond;
|
||||
double qqrd2e = force->qqrd2e;
|
||||
|
||||
for (n = 0; n < ndihedrallist; n++) {
|
||||
i1 = dihedrallist[n][0];
|
||||
@ -178,7 +173,7 @@ void DihedralFourier::compute(int eflag, int vflag)
|
||||
{
|
||||
m = multiplicity[type][j];
|
||||
p_ = 1.0;
|
||||
df1_ = 0.0;
|
||||
ddf1_ = df1_ = 0.0;
|
||||
|
||||
for (i = 0; i < m; i++) {
|
||||
ddf1_ = p_*c - df1_*s;
|
||||
|
||||
@ -622,7 +622,7 @@ void DihedralTable::compute(int eflag, int vflag)
|
||||
// ----- Step 3: Calculate the energy and force in the phi direction -----
|
||||
|
||||
// tabulated force & energy
|
||||
double u, m_du_dphi; //u = energy. m_du_dphi = "minus" du/dphi
|
||||
double u=0.0, m_du_dphi=0.0; //u = energy. m_du_dphi = "minus" du/dphi
|
||||
uf_lookup(type, phi, u, m_du_dphi);
|
||||
|
||||
if (eflag) edihedral = u;
|
||||
@ -696,7 +696,7 @@ double DihedralTable::single(int type, int i1, int i2, int i3, int i4)
|
||||
double phi = Phi(x[i1], x[i2], x[i3], x[i4], domain,
|
||||
vb12, vb23, vb34, n123, n234);
|
||||
|
||||
double u;
|
||||
double u=0.0;
|
||||
u_lookup(type, phi, u); //Calculate the energy, and store it in "u"
|
||||
|
||||
return u;
|
||||
|
||||
@ -238,7 +238,7 @@ void PairTersoffTable::compute(int eflag, int vflag)
|
||||
} // loop on J
|
||||
|
||||
|
||||
// loop over neighbours of atom i
|
||||
// loop over neighbors of atom i
|
||||
for (int neighbor_j = 0; neighbor_j < jnum; neighbor_j++) {
|
||||
|
||||
double dr_ij[3], r_ij, f_ij[3];
|
||||
@ -289,7 +289,7 @@ void PairTersoffTable::compute(int eflag, int vflag)
|
||||
|
||||
zeta = 0.0;
|
||||
|
||||
// first loop over neighbours of atom i except j - part 1/2
|
||||
// first loop over neighbors of atom i except j - part 1/2
|
||||
for (int neighbor_k = 0; neighbor_k < neighbor_j; neighbor_k++) {
|
||||
double dr_ik[3], r_ik;
|
||||
|
||||
@ -318,7 +318,7 @@ void PairTersoffTable::compute(int eflag, int vflag)
|
||||
|
||||
}
|
||||
|
||||
// first loop over neighbours of atom i except j - part 2/2
|
||||
// first loop over neighbors of atom i except j - part 2/2
|
||||
for (int neighbor_k = neighbor_j+1; neighbor_k < jnum; neighbor_k++) {
|
||||
double dr_ik[3], r_ik;
|
||||
|
||||
@ -384,7 +384,7 @@ void PairTersoffTable::compute(int eflag, int vflag)
|
||||
|
||||
factor_force_tot= 0.5*cutoffFunctionIJ*attractivePotential*betaZetaPowerDerivedIJK;
|
||||
|
||||
// second loop over neighbours of atom i except j, forces and virial only - part 1/2
|
||||
// second loop over neighbors of atom i except j, forces and virial only - part 1/2
|
||||
for (int neighbor_k = 0; neighbor_k < neighbor_j; neighbor_k++) {
|
||||
double dr_ik[3], r_ik, f_ik[3];
|
||||
|
||||
@ -449,7 +449,7 @@ void PairTersoffTable::compute(int eflag, int vflag)
|
||||
if (evflag) ev_tally3(i,j,k,evdwl,0.0,f_ij,f_ik,dr_ij,dr_ik);
|
||||
}
|
||||
|
||||
// second loop over neighbours of atom i except j, forces and virial only - part 2/2
|
||||
// second loop over neighbors of atom i except j, forces and virial only - part 2/2
|
||||
for (int neighbor_k = neighbor_j+1; neighbor_k < jnum; neighbor_k++) {
|
||||
double dr_ik[3], r_ik, f_ik[3];
|
||||
|
||||
|
||||
@ -94,6 +94,7 @@ void AngleCosineSquaredOMP::eval(int nfrom, int nto, ThrData * const thr)
|
||||
dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0];
|
||||
const int4_t * _noalias const anglelist = (int4_t *) neighbor->anglelist[0];
|
||||
const int nlocal = atom->nlocal;
|
||||
eangle = 0.0;
|
||||
|
||||
for (n = nfrom; n < nto; n++) {
|
||||
i1 = anglelist[n].a;
|
||||
|
||||
@ -184,7 +184,7 @@ void DihedralFourierOMP::eval(int nfrom, int nto, ThrData * const thr)
|
||||
for (j=0; j<nterms[type]; j++) {
|
||||
m = multiplicity[type][j];
|
||||
p_ = 1.0;
|
||||
df1_ = 0.0;
|
||||
ddf1_ = df1_ = 0.0;
|
||||
|
||||
for (i = 0; i < m; i++) {
|
||||
ddf1_ = p_*c - df1_*s;
|
||||
|
||||
@ -336,7 +336,7 @@ void DihedralTableOMP::eval(int nfrom, int nto, ThrData * const thr)
|
||||
// ----- Step 3: Calculate the energy and force in the phi direction -----
|
||||
|
||||
// tabulated force & energy
|
||||
double u, m_du_dphi; //u = energy. m_du_dphi = "minus" du/dphi
|
||||
double u=0.0, m_du_dphi=0.0; //u = energy. m_du_dphi = "minus" du/dphi
|
||||
|
||||
uf_lookup(type, phi, u, m_du_dphi);
|
||||
|
||||
|
||||
@ -82,7 +82,7 @@ void PairCoulWolfOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,ecoul,fpair;
|
||||
double rsq,forcecoul,factor_coul;
|
||||
double prefactor;
|
||||
double r,rexp;
|
||||
double r;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
double erfcc,erfcd,v_sh,dvdrr,e_self,e_shift,f_shift,qisq;
|
||||
|
||||
@ -91,7 +91,6 @@ void PairCoulWolfOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0];
|
||||
dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0];
|
||||
const double * _noalias const q = atom->q;
|
||||
const int * _noalias const type = atom->type;
|
||||
const int nlocal = atom->nlocal;
|
||||
const double * _noalias const special_coul = force->special_coul;
|
||||
const double qqrd2e = force->qqrd2e;
|
||||
|
||||
@ -98,6 +98,7 @@ void PairGayBerneOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
evdwl = 0.0;
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@ void PairNb3bHarmonicOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
int i,j,k,ii,jj,kk,jnum,jnumm1;
|
||||
tagint itag,jtag;
|
||||
int itype,jtype,ktype,ijparam,ikparam,ijkparam;
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair;
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl;
|
||||
double rsq,rsq1,rsq2;
|
||||
double delr1[3],delr2[3],fj[3],fk[3];
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
@ -83,7 +83,6 @@ void PairNb3bHarmonicOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0];
|
||||
const tagint * _noalias const tag = atom->tag;
|
||||
const int * _noalias const type = atom->type;
|
||||
const int nlocal = atom->nlocal;
|
||||
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
|
||||
@ -79,7 +79,7 @@ void PairTableOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair;
|
||||
double rsq,factor_lj,fraction,value,a,b;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
Table *tb;
|
||||
const Table *tb;
|
||||
|
||||
union_int_float_t rsq_lookup;
|
||||
int tlm1 = tablength - 1;
|
||||
|
||||
@ -227,7 +227,7 @@ void PairTersoffTableOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
} // loop on J
|
||||
|
||||
|
||||
// loop over neighbours of atom i
|
||||
// loop over neighbors of atom i
|
||||
for (int neighbor_j = 0; neighbor_j < jnum; neighbor_j++) {
|
||||
|
||||
double dr_ij[3], r_ij, f_ij[3];
|
||||
@ -278,7 +278,7 @@ void PairTersoffTableOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
|
||||
zeta = 0.0;
|
||||
|
||||
// first loop over neighbours of atom i except j - part 1/2
|
||||
// first loop over neighbors of atom i except j - part 1/2
|
||||
for (int neighbor_k = 0; neighbor_k < neighbor_j; neighbor_k++) {
|
||||
double dr_ik[3], r_ik;
|
||||
|
||||
@ -307,7 +307,7 @@ void PairTersoffTableOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
|
||||
}
|
||||
|
||||
// first loop over neighbours of atom i except j - part 2/2
|
||||
// first loop over neighbors of atom i except j - part 2/2
|
||||
for (int neighbor_k = neighbor_j+1; neighbor_k < jnum; neighbor_k++) {
|
||||
double dr_ik[3], r_ik;
|
||||
|
||||
@ -374,7 +374,7 @@ void PairTersoffTableOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
|
||||
factor_force_tot= 0.5*cutoffFunctionIJ*attractivePotential*betaZetaPowerDerivedIJK;
|
||||
|
||||
// second loop over neighbours of atom i except j, forces and virial only - part 1/2
|
||||
// second loop over neighbors of atom i except j, forces and virial only - part 1/2
|
||||
for (int neighbor_k = 0; neighbor_k < neighbor_j; neighbor_k++) {
|
||||
double dr_ik[3], r_ik, f_ik[3];
|
||||
|
||||
@ -440,7 +440,7 @@ void PairTersoffTableOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
if (VFLAG_ATOM) v_tally3_thr(i,j,k,f_ij,f_ik,dr_ij,dr_ik,thr);
|
||||
}
|
||||
|
||||
// second loop over neighbours of atom i except j, forces and virial only - part 2/2
|
||||
// second loop over neighbors of atom i except j, forces and virial only - part 2/2
|
||||
for (int neighbor_k = neighbor_j+1; neighbor_k < jnum; neighbor_k++) {
|
||||
double dr_ik[3], r_ik, f_ik[3];
|
||||
|
||||
|
||||
@ -124,7 +124,7 @@ void PairTersoffZBLOMP::read_file(char *file)
|
||||
|
||||
// strip comment, skip line if blank
|
||||
|
||||
if (ptr = strchr(line,'#')) *ptr = '\0';
|
||||
if ((ptr = strchr(line,'#'))) *ptr = '\0';
|
||||
nwords = atom->count_words(line);
|
||||
if (nwords == 0) continue;
|
||||
|
||||
@ -143,7 +143,7 @@ void PairTersoffZBLOMP::read_file(char *file)
|
||||
if (eof) break;
|
||||
MPI_Bcast(&n,1,MPI_INT,0,world);
|
||||
MPI_Bcast(line,n,MPI_CHAR,0,world);
|
||||
if (ptr = strchr(line,'#')) *ptr = '\0';
|
||||
if ((ptr = strchr(line,'#'))) *ptr = '\0';
|
||||
nwords = atom->count_words(line);
|
||||
}
|
||||
|
||||
@ -154,7 +154,7 @@ void PairTersoffZBLOMP::read_file(char *file)
|
||||
|
||||
nwords = 0;
|
||||
words[nwords++] = strtok(line," \t\n\r\f");
|
||||
while (words[nwords++] = strtok(NULL," \t\n\r\f")) continue;
|
||||
while ((words[nwords++] = strtok(NULL," \t\n\r\f"))) continue;
|
||||
|
||||
// ielement,jelement,kelement = 1st args
|
||||
// if all 3 args are in element list, then parse this line
|
||||
|
||||
@ -609,11 +609,11 @@ void PairReaxC::set_far_nbr( far_neighbor_data *fdest,
|
||||
|
||||
int PairReaxC::estimate_reax_lists()
|
||||
{
|
||||
int itr_i, itr_j, itr_g, i, j, g;
|
||||
int itr_i, itr_j, i, j;
|
||||
int nlocal, nghost, num_nbrs, num_marked;
|
||||
int *ilist, *jlist, *numneigh, **firstneigh, *marked;
|
||||
double d_sqr, g_d_sqr;
|
||||
rvec dvec, g_dvec;
|
||||
double d_sqr;
|
||||
rvec dvec;
|
||||
double *dist, **x;
|
||||
reax_list *far_nbrs;
|
||||
far_neighbor_data *far_list;
|
||||
@ -636,11 +636,9 @@ int PairReaxC::estimate_reax_lists()
|
||||
marked = (int*) calloc( system->N, sizeof(int) );
|
||||
dist = (double*) calloc( system->N, sizeof(double) );
|
||||
|
||||
int inum = list->inum;
|
||||
int gnum = list->gnum;
|
||||
int numall = inum + gnum;
|
||||
int numall = list->inum + list->gnum;
|
||||
|
||||
for( itr_i = 0; itr_i < inum+gnum; ++itr_i ){
|
||||
for( itr_i = 0; itr_i < numall; ++itr_i ){
|
||||
i = ilist[itr_i];
|
||||
marked[i] = 1;
|
||||
++num_marked;
|
||||
@ -666,12 +664,12 @@ int PairReaxC::estimate_reax_lists()
|
||||
|
||||
int PairReaxC::write_reax_lists()
|
||||
{
|
||||
int itr_i, itr_j, itr_g, i, j, g, flag;
|
||||
int itr_i, itr_j, i, j;
|
||||
int nlocal, nghost, num_nbrs;
|
||||
int *ilist, *jlist, *numneigh, **firstneigh, *marked;
|
||||
double d_sqr, g_d, g_d_sqr;
|
||||
rvec dvec, g_dvec;
|
||||
double *dist, **x, SMALL = 0.0001;
|
||||
double d_sqr;
|
||||
rvec dvec;
|
||||
double *dist, **x;
|
||||
reax_list *far_nbrs;
|
||||
far_neighbor_data *far_list;
|
||||
|
||||
@ -689,11 +687,9 @@ int PairReaxC::write_reax_lists()
|
||||
marked = (int*) calloc( system->N, sizeof(int) );
|
||||
dist = (double*) calloc( system->N, sizeof(double) );
|
||||
|
||||
int inum = list->inum;
|
||||
int gnum = list->gnum;
|
||||
int numall = inum + gnum;
|
||||
int numall = list->inum + list->gnum;
|
||||
|
||||
for( itr_i = 0; itr_i < inum+gnum; ++itr_i ){
|
||||
for( itr_i = 0; itr_i < numall; ++itr_i ){
|
||||
i = ilist[itr_i];
|
||||
marked[i] = 1;
|
||||
jlist = firstneigh[i];
|
||||
@ -775,8 +771,6 @@ double PairReaxC::memory_usage()
|
||||
bytes += 19.0 * system->total_cap * sizeof(real);
|
||||
bytes += 3.0 * system->total_cap * sizeof(int);
|
||||
|
||||
double mem1 = bytes;
|
||||
|
||||
// From reaxc_lists
|
||||
bytes += 2.0 * lists->n * sizeof(int);
|
||||
bytes += lists->num_intrs * sizeof(three_body_interaction_data);
|
||||
@ -796,8 +790,8 @@ double PairReaxC::memory_usage()
|
||||
|
||||
void PairReaxC::FindBond()
|
||||
{
|
||||
int i, ii, j, pj, nj, jtmp, jj;
|
||||
double bo_tmp, bo_cut, rij, rsq, r_tmp;
|
||||
int i, j, pj, nj;
|
||||
double bo_tmp, bo_cut, r_tmp;
|
||||
|
||||
bond_data *bo_ij;
|
||||
bo_cut = 0.10;
|
||||
|
||||
@ -141,7 +141,7 @@ void ComputeVoronoi::init()
|
||||
|
||||
void ComputeVoronoi::compute_peratom()
|
||||
{
|
||||
int i, j;
|
||||
int i;
|
||||
const double e = 0.01;
|
||||
|
||||
invoked_peratom = update->ntimestep;
|
||||
@ -182,7 +182,7 @@ void ComputeVoronoi::compute_peratom()
|
||||
syz = domain->yz/my;
|
||||
|
||||
// cutghost is in lamda coordinates for triclinic boxes, use subxx_lamda
|
||||
double *h = domain->h, cuttri[3];
|
||||
double *h = domain->h;
|
||||
sublo_bound[0] = h[0]*sublo_lamda[0] + h[5]*sublo_lamda[1] + h[4]*sublo_lamda[2] + boxlo[0];
|
||||
sublo_bound[1] = h[1]*sublo_lamda[1] + h[3]*sublo_lamda[2] + boxlo[1];
|
||||
sublo_bound[2] = h[2]*sublo_lamda[2] + boxlo[2];
|
||||
|
||||
@ -480,7 +480,7 @@ void Balance::dynamic_setup(char *str, int nitermax_in, double thresh_in)
|
||||
int Balance::dynamic()
|
||||
{
|
||||
int i,j,k,m,np,max;
|
||||
double *split;
|
||||
double *split = NULL;
|
||||
|
||||
// no balancing if no atoms
|
||||
|
||||
|
||||
@ -26,6 +26,8 @@ Body::Body(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
|
||||
int n = strlen(arg[0]) + 1;
|
||||
style = new char[n];
|
||||
strcpy(style,arg[0]);
|
||||
icp = NULL;
|
||||
dcp = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user