forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11829 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
c62e2a91c4
commit
f461504c93
|
@ -515,8 +515,6 @@ double PairTriLJ::init_one(int i, int j)
|
|||
void PairTriLJ::discretize(int i, double sigma,
|
||||
double *c1, double *c2, double *c3)
|
||||
{
|
||||
double c1c2[3],c2c3[3],c1c3[3];
|
||||
|
||||
double centroid[3],dc1[3],dc2[3],dc3[3];
|
||||
|
||||
centroid[0] = (c1[0] + c2[0] + c3[0]) / 3.0;
|
||||
|
|
|
@ -78,7 +78,7 @@ void FixWallColloid::wall_particle(int m, int which, double coord)
|
|||
{
|
||||
double delta,delta2,rinv,r2inv,r4inv,r8inv,fwall;
|
||||
double r2,rinv2,r2inv2,r4inv2;
|
||||
double r3,rinv3,r2inv3,r4inv3,r6inv3;
|
||||
double r3,rinv3,r2inv3,r4inv3;
|
||||
double rad,rad2,rad4,rad8,diam,new_coeff2;
|
||||
double eoffset;
|
||||
|
||||
|
@ -129,7 +129,6 @@ void FixWallColloid::wall_particle(int m, int which, double coord)
|
|||
rinv3 = 1.0/r3;
|
||||
r2inv3 = rinv3*rinv3;
|
||||
r4inv3 = r2inv3*r2inv3;
|
||||
r6inv3 = r4inv3*r2inv3;
|
||||
ewall[0] += coeff3[m]*((-3.5*diam+delta)*r4inv2*r2inv2*rinv2
|
||||
+ (3.5*diam+delta)*r4inv3*r2inv3*rinv3) -
|
||||
coeff4[m]*((diam*delta-r2*r3*(log(-r2)-log(r3)))*
|
||||
|
@ -145,7 +144,6 @@ void FixWallColloid::wall_particle(int m, int which, double coord)
|
|||
rinv3 = 1.0/r3;
|
||||
r2inv3 = rinv3*rinv3;
|
||||
r4inv3 = r2inv3*r2inv3;
|
||||
r6inv3 = r4inv3*r2inv3;
|
||||
eoffset = coeff3[m]*((-3.5*diam+cutoff[m])*r4inv2*r2inv2*rinv2
|
||||
+ (3.5*diam+cutoff[m])*r4inv3*r2inv3*rinv3) -
|
||||
coeff4[m]*((diam*cutoff[m]-r2*r3*(log(-r2)-log(r3)))*
|
||||
|
|
|
@ -42,7 +42,7 @@ void PairYukawaColloid::compute(int eflag, int vflag)
|
|||
{
|
||||
int i,j,ii,jj,inum,jnum,itype,jtype;
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair,radi,radj;
|
||||
double rsq,r2inv,r,rinv,screening,forceyukawa,factor;
|
||||
double rsq,r,rinv,screening,forceyukawa,factor;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
|
||||
evdwl = 0.0;
|
||||
|
@ -87,7 +87,6 @@ void PairYukawaColloid::compute(int eflag, int vflag)
|
|||
radj = radius[j];
|
||||
|
||||
if (rsq < cutsq[itype][jtype]) {
|
||||
r2inv = 1.0/rsq;
|
||||
r = sqrt(rsq);
|
||||
rinv = 1.0/r;
|
||||
screening = exp(-kappa*(r-(radi+radj)));
|
||||
|
@ -166,9 +165,8 @@ double PairYukawaColloid::single(int i, int j, int itype, int jtype,
|
|||
double factor_coul, double factor_lj,
|
||||
double &fforce)
|
||||
{
|
||||
double r2inv,r,rinv,screening,forceyukawa,phi;
|
||||
double r,rinv,screening,forceyukawa,phi;
|
||||
|
||||
r2inv = 1.0/rsq;
|
||||
r = sqrt(rsq);
|
||||
rinv = 1.0/r;
|
||||
screening = exp(-kappa*(r-(rad[itype]+rad[jtype])));
|
||||
|
|
|
@ -84,7 +84,6 @@ void PairBrownian::compute(int eflag, int vflag)
|
|||
else evflag = vflag_fdotr = 0;
|
||||
|
||||
double **x = atom->x;
|
||||
double **v = atom->v;
|
||||
double **f = atom->f;
|
||||
double **torque = atom->torque;
|
||||
double *radius = atom->radius;
|
||||
|
@ -464,13 +463,12 @@ void PairBrownian::init_style()
|
|||
"Pair brownian needs newton pair on for "
|
||||
"momentum conservation");
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
|
||||
// insure all particles are finite-size
|
||||
// for pair hybrid, should limit test to types using the pair style
|
||||
|
||||
double *radius = atom->radius;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
|
|
|
@ -70,7 +70,6 @@ void PairBrownianPoly::compute(int eflag, int vflag)
|
|||
else evflag = vflag_fdotr = 0;
|
||||
|
||||
double **x = atom->x;
|
||||
double **v = atom->v;
|
||||
double **f = atom->f;
|
||||
double **torque = atom->torque;
|
||||
double *radius = atom->radius;
|
||||
|
@ -340,7 +339,6 @@ void PairBrownianPoly::init_style()
|
|||
// for pair hybrid, should limit test to types using the pair style
|
||||
|
||||
double *radius = atom->radius;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
|
|
|
@ -210,9 +210,8 @@ void PairBornCoulLongGPU::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;
|
||||
int i,j,ii,jj,jnum,itype,jtype;
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair;
|
||||
double fraction,table;
|
||||
double r,rexp,r2inv,r6inv,forcecoul,forceborn,factor_coul,factor_lj;
|
||||
double grij,expm2,prefactor,t,erfc;
|
||||
int *jlist;
|
||||
|
|
|
@ -203,9 +203,8 @@ void PairBuckCoulLongGPU::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;
|
||||
int i,j,ii,jj,jnum,itype,jtype;
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair;
|
||||
double fraction,table;
|
||||
double r,rexp,r2inv,r6inv,forcecoul,forcebuck,factor_coul,factor_lj;
|
||||
double grij,expm2,prefactor,t,erfc;
|
||||
int *jlist;
|
||||
|
|
|
@ -338,7 +338,7 @@ double PairDPDTstatGPU::memory_usage()
|
|||
void PairDPDTstatGPU::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 xtmp,ytmp,ztmp,delx,dely,delz,fpair;
|
||||
double vxtmp,vytmp,vztmp,delvx,delvy,delvz;
|
||||
double rsq,r,rinv,dot,wd,randnum,factor_dpd;
|
||||
int *jlist;
|
||||
|
|
|
@ -94,18 +94,13 @@ double PairEAMGPU::memory_usage()
|
|||
|
||||
void PairEAMGPU::compute(int eflag, int vflag)
|
||||
{
|
||||
double evdwl;
|
||||
|
||||
evdwl = 0.0;
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = vflag_fdotr = eflag_global = eflag_atom = 0;
|
||||
|
||||
int nlocal = atom->nlocal;
|
||||
int newton_pair = force->newton_pair;
|
||||
|
||||
// compute density on each atom on GPU
|
||||
|
||||
int nall = atom->nlocal + atom->nghost;
|
||||
int nlocal = atom->nlocal;
|
||||
int nall = nlocal + atom->nghost;
|
||||
int inum, host_start, inum_dev;
|
||||
|
||||
bool success = true;
|
||||
|
|
|
@ -214,13 +214,12 @@ void PairLJSDKCoulLongGPU::cpu_compute(int start, int inum, int *ilist,
|
|||
{
|
||||
int i,j,ii,jj;
|
||||
double qtmp,xtmp,ytmp,ztmp;
|
||||
double r,rsq,r2inv,r6inv,forcecoul,forcelj,factor_coul,factor_lj;
|
||||
double r2inv,forcecoul,forcelj,factor_coul,factor_lj;
|
||||
|
||||
const double * const * const x = atom->x;
|
||||
double * const * const f = atom->f;
|
||||
const double * const q = atom->q;
|
||||
const int * const type = atom->type;
|
||||
const int nlocal = atom->nlocal;
|
||||
const double * const special_coul = force->special_coul;
|
||||
const double * const special_lj = force->special_lj;
|
||||
const double qqrd2e = force->qqrd2e;
|
||||
|
|
|
@ -447,13 +447,12 @@ void FixPour::pre_exchange()
|
|||
|
||||
int success;
|
||||
double radtmp,delx,dely,delz,rsq,radsum,rn,h;
|
||||
double coord[3],xcm[3];
|
||||
double coord[3];
|
||||
|
||||
int nfix = modify->nfix;
|
||||
Fix **fix = modify->fix;
|
||||
|
||||
AtomVec *avec = atom->avec;
|
||||
double denstmp,vxtmp,vytmp,vztmp;
|
||||
double denstmp;
|
||||
double *sublo = domain->sublo;
|
||||
double *subhi = domain->subhi;
|
||||
|
||||
|
@ -707,11 +706,6 @@ int FixPour::overlap(int i)
|
|||
if (mode == ATOM) delta = atom->radius[i] + radius_max;
|
||||
else delta = atom->radius[i] + onemol->molradius;
|
||||
|
||||
double *boxlo = domain->boxlo;
|
||||
double *boxhi = domain->boxhi;
|
||||
double *prd = domain->prd;
|
||||
int *periodicity = domain->periodicity;
|
||||
|
||||
double *x = atom->x[i];
|
||||
|
||||
if (domain->dimension == 3) {
|
||||
|
|
|
@ -41,7 +41,7 @@ PairGranHooke::PairGranHooke(LAMMPS *lmp) : PairGranHookeHistory(lmp)
|
|||
|
||||
void PairGranHooke::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;
|
||||
|
@ -235,7 +235,7 @@ double PairGranHooke::single(int i, int j, int itype, int jtype, double rsq,
|
|||
double vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3,wr1,wr2,wr3;
|
||||
double vtr1,vtr2,vtr3,vrel;
|
||||
double mi,mj,meff,damp,ccel;
|
||||
double fn,fs,ft,fs1,fs2,fs3;
|
||||
double fn,fs,ft;
|
||||
|
||||
double *radius = atom->radius;
|
||||
radi = radius[i];
|
||||
|
|
|
@ -86,7 +86,7 @@ PairGranHookeHistory::~PairGranHookeHistory()
|
|||
|
||||
void PairGranHookeHistory::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;
|
||||
|
@ -712,7 +712,6 @@ double PairGranHookeHistory::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];
|
||||
|
|
|
@ -83,11 +83,10 @@ void PairLJCutTIP4PLong::compute(int eflag, int vflag)
|
|||
int iH1,iH2,jH1,jH2;
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul;
|
||||
double fraction,table;
|
||||
double delxOM, delyOM, delzOM;
|
||||
double r,r2inv,r6inv,forcecoul,forcelj,cforce;
|
||||
double factor_coul,factor_lj;
|
||||
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;
|
||||
|
|
|
@ -221,11 +221,6 @@ void PairLJLongCoulLong::coeff(int narg, char **arg)
|
|||
|
||||
void PairLJLongCoulLong::init_style()
|
||||
{
|
||||
const char *style1[] =
|
||||
{"ewald", "ewald/n", "pppm", "pppm_disp", "pppm_disp/tip4p", NULL};
|
||||
const char *style6[] = {"ewald/n", "pppm_disp", "pppm_disp/tip4p", NULL};
|
||||
int i;
|
||||
|
||||
// require an atom style with charge defined
|
||||
|
||||
if (!atom->q_flag && (ewald_order&(1<<1)))
|
||||
|
|
|
@ -84,9 +84,9 @@ void PairLJLongTIP4PLong::compute(int eflag, int vflag)
|
|||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul;
|
||||
double fraction,table;
|
||||
double r,r2inv,forcecoul,forcelj,cforce;
|
||||
double factor_coul,factor_lj;
|
||||
double factor_coul;
|
||||
double grij,expm2,prefactor,t,erfc;
|
||||
double xiM[3],xjM[3],fO[3],fH[3],fd[3],v[6],xH1[3],xH2[3];// f1[3];
|
||||
double fO[3],fH[3],fd[3],v[6],xH1[3],xH2[3];// f1[3];
|
||||
double *x1,*x2;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
double rsq;
|
||||
|
@ -126,7 +126,7 @@ void PairLJLongTIP4PLong::compute(int eflag, int vflag)
|
|||
|
||||
int order1 = ewald_order&(1<<1), order6 = ewald_order&(1<<6);
|
||||
int ni;
|
||||
double *cut_ljsqi, *lj1i, *lj2i, *lj3i, *lj4i, *offseti;
|
||||
double *lj1i, *lj2i, *lj3i, *lj4i, *offseti;
|
||||
double g2 = g_ewald_6*g_ewald_6, g6 = g2*g2*g2, g8 = g6*g2;
|
||||
|
||||
inum = list->inum;
|
||||
|
@ -172,7 +172,6 @@ void PairLJLongTIP4PLong::compute(int eflag, int vflag)
|
|||
for (jj = 0; jj < jnum; jj++) {
|
||||
j = jlist[jj];
|
||||
ni = sbmask(j);
|
||||
factor_lj = special_lj[sbmask(j)];
|
||||
factor_coul = special_coul[sbmask(j)];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
|
@ -460,13 +459,11 @@ void PairLJLongTIP4PLong::compute(int eflag, int vflag)
|
|||
|
||||
void PairLJLongTIP4PLong::compute_inner()
|
||||
{
|
||||
int i,j,ii,jj,inum,jnum,itype,jtype,itable;
|
||||
int i,j,ii,jj,inum,jnum,itype,jtype;
|
||||
int iH1,iH2,jH1,jH2;
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul;
|
||||
double r,r2inv,forcecoul,forcelj,cforce;
|
||||
double factor_coul,factor_lj;
|
||||
double grij,expm2,prefactor,t,erfc;
|
||||
double xiM[3],xjM[3],fO[3],fH[3],fd[3],v[6],xH1[3],xH2[3];// f1[3];
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz;
|
||||
double r2inv,forcecoul,forcelj,cforce;
|
||||
double fO[3],fH[3],fd[3];// f1[3];
|
||||
double *x1,*x2;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
double rsq, qri;
|
||||
|
@ -504,13 +501,12 @@ void PairLJLongTIP4PLong::compute_inner()
|
|||
int *type = atom->type;
|
||||
double *special_coul = force->special_coul;
|
||||
double *special_lj = force->special_lj;
|
||||
int newton_pair = force->newton_pair;
|
||||
double qqrd2e = force->qqrd2e;
|
||||
double cut_coulsqplus = (cut_coul+2.0*qdist)*(cut_coul+2.0*qdist);
|
||||
|
||||
int order1 = ewald_order&(1<<1);
|
||||
int ni;
|
||||
double *cut_ljsqi, *lj1i, *lj2i, *lj3i, *lj4i, *offseti;
|
||||
double *lj1i, *lj2i;
|
||||
|
||||
inum = listinner->inum;
|
||||
ilist = listinner->ilist;
|
||||
|
@ -549,14 +545,11 @@ void PairLJLongTIP4PLong::compute_inner()
|
|||
|
||||
jlist = firstneigh[i];
|
||||
jnum = numneigh[i];
|
||||
offseti = offset[itype];
|
||||
lj1i = lj1[itype]; lj2i = lj2[itype]; lj3i = lj3[itype]; lj4i = lj4[itype];
|
||||
lj1i = lj1[itype]; lj2i = lj2[itype];
|
||||
|
||||
for (jj = 0; jj < jnum; jj++) {
|
||||
j = jlist[jj];
|
||||
ni = sbmask(j);
|
||||
factor_lj = special_lj[sbmask(j)];
|
||||
factor_coul = special_coul[sbmask(j)];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
delx = xtmp - x[j][0];
|
||||
|
@ -719,13 +712,11 @@ void PairLJLongTIP4PLong::compute_inner()
|
|||
|
||||
void PairLJLongTIP4PLong::compute_middle()
|
||||
{
|
||||
int i,j,ii,jj,inum,jnum,itype,jtype,itable;
|
||||
int i,j,ii,jj,inum,jnum,itype,jtype;
|
||||
int iH1,iH2,jH1,jH2;
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul;
|
||||
double r,r2inv,forcecoul,forcelj,cforce;
|
||||
double factor_coul,factor_lj;
|
||||
double grij,expm2,prefactor,t,erfc;
|
||||
double xiM[3],xjM[3],fO[3],fH[3],fd[3],v[6],xH1[3],xH2[3];// f1[3];
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz;
|
||||
double r2inv,forcecoul,forcelj,cforce;
|
||||
double fO[3],fH[3],fd[3];
|
||||
double *x1,*x2;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
double rsq,qri;
|
||||
|
@ -746,8 +737,6 @@ void PairLJLongTIP4PLong::compute_middle()
|
|||
// initialize hneigh[0] to -1 on steps when reneighboring occurred
|
||||
// initialize hneigh[2] to 0 every step
|
||||
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
double **f = atom->f;
|
||||
double **x = atom->x;
|
||||
double *q = atom->q;
|
||||
|
@ -755,14 +744,12 @@ void PairLJLongTIP4PLong::compute_middle()
|
|||
int *type = atom->type;
|
||||
double *special_coul = force->special_coul;
|
||||
double *special_lj = force->special_lj;
|
||||
int newton_pair = force->newton_pair;
|
||||
double qqrd2e = force->qqrd2e;
|
||||
double cut_coulsqplus = (cut_coul+2.0*qdist)*(cut_coul+2.0*qdist);
|
||||
|
||||
int order1 = ewald_order&(1<<1);
|
||||
int ni;
|
||||
double *cut_ljsqi, *lj1i, *lj2i, *lj3i, *lj4i, *offseti;
|
||||
double g2 = g_ewald_6*g_ewald_6, g6 = g2*g2*g2, g8 = g6*g2;
|
||||
double *lj1i, *lj2i;
|
||||
|
||||
inum = listmiddle->inum;
|
||||
ilist = listmiddle->ilist;
|
||||
|
@ -801,14 +788,11 @@ void PairLJLongTIP4PLong::compute_middle()
|
|||
|
||||
jlist = firstneigh[i];
|
||||
jnum = numneigh[i];
|
||||
offseti = offset[itype];
|
||||
lj1i = lj1[itype]; lj2i = lj2[itype]; lj3i = lj3[itype]; lj4i = lj4[itype];
|
||||
lj1i = lj1[itype]; lj2i = lj2[itype];
|
||||
|
||||
for (jj = 0; jj < jnum; jj++) {
|
||||
j = jlist[jj];
|
||||
ni = sbmask(j);
|
||||
factor_lj = special_lj[sbmask(j)];
|
||||
factor_coul = special_coul[sbmask(j)];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
delx = xtmp - x[j][0];
|
||||
|
@ -979,16 +963,13 @@ void PairLJLongTIP4PLong::compute_middle()
|
|||
|
||||
void PairLJLongTIP4PLong::compute_outer(int eflag, int vflag)
|
||||
{
|
||||
int i,j,ii,jj,inum,jnum,itype,jtype,itable;
|
||||
int i,j,ii,jj,inum,jnum,itype,jtype;
|
||||
int n,vlist[6];
|
||||
int key;
|
||||
int iH1,iH2,jH1,jH2;
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul;
|
||||
double fraction,table;
|
||||
double r,r2inv,forcecoul,forcelj,cforce, respa_coul, respa_lj, frespa,fvirial;
|
||||
double factor_coul,factor_lj;
|
||||
double grij,expm2,prefactor,t,erfc;
|
||||
double xiM[3],xjM[3],fO[3],fH[3],fd[3],v[6],xH1[3],xH2[3];// f1[3];
|
||||
double r2inv,forcecoul,forcelj,cforce, respa_coul, respa_lj, frespa,fvirial;
|
||||
double fO[3],fH[3],fd[3],v[6],xH1[3],xH2[3];// f1[3];
|
||||
double *x1,*x2;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
double rsq,qri;
|
||||
|
@ -1030,7 +1011,7 @@ void PairLJLongTIP4PLong::compute_outer(int eflag, int vflag)
|
|||
|
||||
int order1 = ewald_order&(1<<1), order6 = ewald_order&(1<<6);
|
||||
int ni;
|
||||
double *cut_ljsqi, *lj1i, *lj2i, *lj3i, *lj4i, *offseti;
|
||||
double *lj1i, *lj2i, *lj3i, *lj4i, *offseti;
|
||||
double g2 = g_ewald_6*g_ewald_6, g6 = g2*g2*g2, g8 = g6*g2;
|
||||
|
||||
double cut_in_off = cut_respa[2];
|
||||
|
@ -1084,8 +1065,6 @@ void PairLJLongTIP4PLong::compute_outer(int eflag, int vflag)
|
|||
for (jj = 0; jj < jnum; jj++) {
|
||||
j = jlist[jj];
|
||||
ni = sbmask(j);
|
||||
factor_lj = special_lj[sbmask(j)];
|
||||
factor_coul = special_coul[sbmask(j)];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
delx = xtmp - x[j][0];
|
||||
|
|
|
@ -114,12 +114,7 @@ void remap_3d(FFT_SCALAR *in, FFT_SCALAR *out, FFT_SCALAR *buf,
|
|||
|
||||
} else {
|
||||
if (plan->commringlen > 0) {
|
||||
MPI_Status status;
|
||||
int i,isend,irecv;
|
||||
FFT_SCALAR *scratch;
|
||||
|
||||
if (plan->memory == 0) scratch = buf;
|
||||
else scratch = plan->scratch;
|
||||
int isend,irecv;
|
||||
|
||||
// create send and recv buffers for alltoallv collective
|
||||
|
||||
|
@ -180,9 +175,9 @@ void remap_3d(FFT_SCALAR *in, FFT_SCALAR *out, FFT_SCALAR *buf,
|
|||
}
|
||||
}
|
||||
|
||||
int mpirc = MPI_Alltoallv(packedSendBuffer, sendcnts, sdispls,
|
||||
MPI_FFT_SCALAR, packedRecvBuffer, rcvcnts,
|
||||
rdispls, MPI_FFT_SCALAR, plan->comm);
|
||||
MPI_Alltoallv(packedSendBuffer, sendcnts, sdispls,
|
||||
MPI_FFT_SCALAR, packedRecvBuffer, rcvcnts,
|
||||
rdispls, MPI_FFT_SCALAR, plan->comm);
|
||||
|
||||
// unpack the data from the recv buffer into out
|
||||
|
||||
|
|
|
@ -318,8 +318,6 @@ void PairAIREBO::REBO_neigh()
|
|||
|
||||
double **x = atom->x;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
int nall = nlocal + atom->nghost;
|
||||
|
||||
if (atom->nmax > maxlocal) {
|
||||
maxlocal = atom->nmax;
|
||||
|
|
|
@ -1844,13 +1844,12 @@ void PairComb::qfo_direct(int inty, int mr1, int mr2, int mr3,
|
|||
void PairComb::qfo_field(Param *param, double rsq,double iq,double jq,
|
||||
double &fqij, double &fqjj)
|
||||
{
|
||||
double r,r5,r6,rc,rc5,rc6;
|
||||
double r,r5,rc,rc5,rc6;
|
||||
double cmi1,cmi2,cmj1,cmj2,rf5;
|
||||
|
||||
fqij = fqjj = 0.0;
|
||||
r = sqrt(rsq);
|
||||
r5 = r*r*r*r*r;
|
||||
r6 = r5 * r;
|
||||
rc = param->lcut;
|
||||
rc5 = rc*rc*rc*rc*rc;
|
||||
rc6 = rc5 * rc;
|
||||
|
@ -1871,7 +1870,7 @@ void PairComb::qfo_field(Param *param, double rsq,double iq,double jq,
|
|||
void PairComb::qfo_short(Param *param, int i, int j, double rsq,
|
||||
double iq, double jq, double &fqij, double &fqjj)
|
||||
{
|
||||
double r,tmp_fc,tmp_fc_d,tmp_exp1,tmp_exp2;
|
||||
double r,tmp_fc,tmp_exp1,tmp_exp2;
|
||||
double bigA,Asi,Asj,vrcs;
|
||||
double romi = param->addrep,rrcs = param->bigr + param->bigd;
|
||||
double qi,qj,Di,Dj,bigB,Bsi,Bsj;
|
||||
|
@ -1881,7 +1880,7 @@ void PairComb::qfo_short(Param *param, int i, int j, double rsq,
|
|||
double romie = param->romiga;
|
||||
double romib = param->romigb;
|
||||
double ca1,ca2,ca3,ca4;
|
||||
double rslp,rslp2,rslp4,arr1,arr2,fc2j,fc3j,fcp2j,fcp3j;
|
||||
double rslp,rslp2,rslp4,arr1,arr2,fc2j,fc3j;
|
||||
|
||||
qi = iq; qj = jq; r = sqrt(rsq);
|
||||
Di = Dj = Asi = Asj = bigA = Bsi = Bsj = bigB = 0.0;
|
||||
|
@ -1890,7 +1889,6 @@ void PairComb::qfo_short(Param *param, int i, int j, double rsq,
|
|||
caj = cbj = vrcs = cfqr = cfqs = 0.0;
|
||||
|
||||
tmp_fc = comb_fc(r,param);
|
||||
tmp_fc_d = comb_fc_d(r,param);
|
||||
tmp_exp1 = exp(-param->rlm1 * r);
|
||||
tmp_exp2 = exp(-param->rlm2 * r);
|
||||
bij = bbij[i][j]; //comb_bij(zeta_ij,param);
|
||||
|
@ -1898,8 +1896,6 @@ void PairComb::qfo_short(Param *param, int i, int j, double rsq,
|
|||
arr1 = 2.22850; arr2 = 1.89350;
|
||||
fc2j = comb_fc2(r);
|
||||
fc3j = comb_fc3(r);
|
||||
fcp2j = comb_fc2_d(r);
|
||||
fcp3j = comb_fc3_d(r);
|
||||
|
||||
vrcs = 0.0;
|
||||
if (romi > 0.0) {
|
||||
|
@ -2047,14 +2043,13 @@ void PairComb::unpack_reverse_comm(int n, int *list, double *buf)
|
|||
|
||||
void PairComb::Short_neigh()
|
||||
{
|
||||
int nj,itype,jtype;
|
||||
int nj;
|
||||
int inum,jnum,i,j,ii,jj;
|
||||
int *neighptrj,*ilist,*jlist,*numneigh;
|
||||
int **firstneigh;
|
||||
double xtmp,ytmp,ztmp,rsq,delrj[3];
|
||||
|
||||
double **x = atom->x;
|
||||
int *type = atom->type;
|
||||
|
||||
if (atom->nmax > nmax) {
|
||||
memory->sfree(sht_first);
|
||||
|
@ -2077,7 +2072,6 @@ void PairComb::Short_neigh()
|
|||
|
||||
for (ii = 0; ii < inum; ii++) {
|
||||
i = ilist[ii];
|
||||
itype = type[i];
|
||||
|
||||
nj = 0;
|
||||
neighptrj = ipage->vget();
|
||||
|
@ -2092,7 +2086,6 @@ void PairComb::Short_neigh()
|
|||
for (jj = 0; jj < jnum; jj++) {
|
||||
j = jlist[jj];
|
||||
j &= NEIGHMASK;
|
||||
jtype = type[j];
|
||||
|
||||
delrj[0] = xtmp - x[j][0];
|
||||
delrj[1] = ytmp - x[j][1];
|
||||
|
|
|
@ -259,8 +259,6 @@ void PairLCBOP::SR_neigh()
|
|||
int *neighptr;
|
||||
|
||||
double **x = atom->x;
|
||||
int nlocal = atom->nlocal;
|
||||
int nall = nlocal + atom->nghost;
|
||||
|
||||
if (atom->nmax > maxlocal) { // ensure ther is enough space
|
||||
maxlocal = atom->nmax; // for atoms and ghosts allocated
|
||||
|
@ -360,7 +358,7 @@ void PairLCBOP::FSR(int eflag, int vflag)
|
|||
double delx,dely,delz,fpair,xtmp,ytmp,ztmp;
|
||||
double r_sq,rijmag,f_c_ij,df_c_ij;
|
||||
double VR,dVRdi,VA,Bij,dVAdi,dVA;
|
||||
double d_f_c_ij,del[3];
|
||||
double del[3];
|
||||
int *ilist,*SR_neighs;
|
||||
|
||||
double **x = atom->x;
|
||||
|
@ -451,7 +449,7 @@ void PairLCBOP::FSR(int eflag, int vflag)
|
|||
|
||||
void PairLCBOP::FLR(int eflag, int vflag)
|
||||
{
|
||||
int i,j,jj,m,ii;
|
||||
int i,j,jj,ii;
|
||||
tagint itag,jtag;
|
||||
double delx,dely,delz,fpair,xtmp,ytmp,ztmp;
|
||||
double r_sq,rijmag,f_c_ij,df_c_ij;
|
||||
|
@ -556,7 +554,7 @@ void PairLCBOP::FNij( int i, int j, double factor, double **f, int vflag_atom )
|
|||
if( riksq > r_1*r_1 ) { // && riksq < r_2*r_2, if second condition not fulfilled neighbor would not be in the list
|
||||
double rikmag = sqrt(riksq);
|
||||
double df_c_ik;
|
||||
double f_c_ik = f_c( rikmag, r_1, r_2, &df_c_ik );
|
||||
f_c( rikmag, r_1, r_2, &df_c_ik );
|
||||
|
||||
// F = factor*df_c_ik*(-grad rikmag)
|
||||
// grad_i rikmag = \vec{rik} /rikmag
|
||||
|
@ -967,7 +965,7 @@ double PairLCBOP::F_conj( double N_ij, double N_ji, double N_conj_ij, double *dF
|
|||
|
||||
void PairLCBOP::read_file(char *filename)
|
||||
{
|
||||
int i,j,k,l,limit;
|
||||
int i,k,l;
|
||||
char s[MAXLINE];
|
||||
|
||||
MPI_Comm_rank(world,&me);
|
||||
|
|
|
@ -623,7 +623,7 @@ void FixBondCreate::check_ghosts()
|
|||
|
||||
void FixBondCreate::update_topology()
|
||||
{
|
||||
int i,j,k,n,influence,influenced,found;
|
||||
int i,j,k,n,influence,influenced;
|
||||
tagint id1,id2;
|
||||
tagint *slist;
|
||||
|
||||
|
@ -887,7 +887,7 @@ void FixBondCreate::create_angles(int m)
|
|||
|
||||
void FixBondCreate::create_dihedrals(int m)
|
||||
{
|
||||
int i,j,k,n,i1local,i2local,i3local,n1,n2,n3,n4;
|
||||
int i,j,k,n,i1local,i2local,i3local,n1,n2,n3;
|
||||
tagint i1,i2,i3,i4;
|
||||
tagint *s1list,*s2list,*s3list;
|
||||
|
||||
|
|
|
@ -118,11 +118,9 @@ PairMEAM::~PairMEAM()
|
|||
void PairMEAM::compute(int eflag, int vflag)
|
||||
{
|
||||
int i,j,ii,n,inum_half,errorflag;
|
||||
double evdwl;
|
||||
int *ilist_half,*numneigh_half,**firstneigh_half;
|
||||
int *numneigh_full,**firstneigh_full;
|
||||
|
||||
evdwl = 0.0;
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = vflag_fdotr = eflag_global = vflag_global =
|
||||
eflag_atom = vflag_atom = 0;
|
||||
|
|
|
@ -200,7 +200,7 @@ double ComputeTI::compute_scalar()
|
|||
else jt = ilo[m];
|
||||
for (; jt <=ihi[m];jt++) {
|
||||
if ((force->pair->tail_flag)&&(force->pair->setflag[it][jt])) {
|
||||
double cut = force->pair->init_one(it,jt);
|
||||
force->pair->init_one(it,jt);
|
||||
eng += force->pair->etail_ij;
|
||||
}
|
||||
if (it !=jt) eng += force->pair->etail_ij;
|
||||
|
|
|
@ -106,7 +106,6 @@ void PairTIP4PCut::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;
|
||||
|
||||
inum = list->inum;
|
||||
|
|
|
@ -89,8 +89,8 @@ void PairPeriEPS::compute(int eflag, int vflag)
|
|||
int i,j,ii,jj,inum,jnum,itype,jtype;
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz;
|
||||
double xtmp0,ytmp0,ztmp0,delx0,dely0,delz0,rsq0;
|
||||
double rsq,r,dr,dr1,rk,rkNew,evdwl,fpair,fbond;
|
||||
double ed,fbondElastoPlastic,fbondFinal;
|
||||
double rsq,r,dr,rk,rkNew,evdwl,fpair,fbond;
|
||||
double fbondElastoPlastic,fbondFinal;
|
||||
double deltalambda,edpNp1;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
double d_ij,delta,stretch;
|
||||
|
@ -104,7 +104,6 @@ void PairPeriEPS::compute(int eflag, int vflag)
|
|||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
double timestepsize = update->dt;
|
||||
double *vfrac = atom->vfrac;
|
||||
double *s0 = atom->s0;
|
||||
double **x0 = atom->x0;
|
||||
|
@ -259,7 +258,7 @@ void PairPeriEPS::compute(int eflag, int vflag)
|
|||
// first = true if this is first neighbor of particle i
|
||||
|
||||
bool first;
|
||||
double omega_minus, omega_plus, omega;
|
||||
double omega_minus, omega_plus;
|
||||
|
||||
for (i = 0; i < nlocal; i++) {
|
||||
xtmp = x[i][0];
|
||||
|
@ -717,17 +716,13 @@ double PairPeriEPS::compute_DeviatoricForceStateNorm(int i)
|
|||
double xtmp,ytmp,ztmp,delx,dely,delz;
|
||||
double xtmp0,ytmp0,ztmp0,delx0,dely0,delz0;
|
||||
double rsq,r,dr;
|
||||
double delta;
|
||||
double tdtrial;
|
||||
double norm = 0.0;
|
||||
|
||||
double **x = atom->x;
|
||||
int *type = atom->type;
|
||||
double **x0 = atom->x0;
|
||||
double *s0 = atom->s0;
|
||||
int nlocal = atom->nlocal;
|
||||
double *vfrac = atom->vfrac;
|
||||
double vfrac_scale = 1.0;
|
||||
|
||||
double lc = domain->lattice->xlattice;
|
||||
double half_lc = 0.5*lc;
|
||||
|
@ -795,8 +790,6 @@ double PairPeriEPS::compute_DeviatoricForceStateNorm(int i)
|
|||
double omega_plus = influence_function(-1.0*delx0,-1.0*dely0,-1.0*delz0);
|
||||
double omega_minus = influence_function(delx0,dely0,delz0);
|
||||
|
||||
double stretch = dr / r0[i][jj];
|
||||
|
||||
tdtrial = ( 15 * shearmodulus[itype][itype]) *
|
||||
((omega_plus * theta[i] / wvolume[i]) +
|
||||
( omega_minus * theta[j] / wvolume[j] ) ) * (ed - edPNP1);
|
||||
|
|
|
@ -91,7 +91,7 @@ void PairPeriVES::compute(int eflag, int vflag)
|
|||
int i,j,ii,jj,inum,jnum,itype,jtype;
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz;
|
||||
double xtmp0,ytmp0,ztmp0,delx0,dely0,delz0,rsq0;
|
||||
double rsq,r,dr,dr1,rk,evdwl,fpair,fbond;
|
||||
double rsq,r,dr,rk,evdwl,fpair,fbond;
|
||||
double deltaed,fbondViscoElastic,fbondFinal;
|
||||
double decay,betai,lambdai,edbNp1,rkNew;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
|
|
|
@ -58,7 +58,7 @@ PRD::PRD(LAMMPS *lmp) : Pointers(lmp) {}
|
|||
|
||||
void PRD::command(int narg, char **arg)
|
||||
{
|
||||
int flag,ireplica;
|
||||
int ireplica;
|
||||
|
||||
// error checks
|
||||
|
||||
|
@ -773,7 +773,7 @@ void PRD::replicate(int ireplica)
|
|||
{
|
||||
int nreplica = universe->nworlds;
|
||||
int nprocs_universe = universe->nprocs;
|
||||
int i,m,flag,commflag;
|
||||
int i,m;
|
||||
|
||||
if (nreplica == nprocs_universe) {
|
||||
MPI_Bcast(atom->image,atom->nlocal,MPI_INT,ireplica,comm_replica);
|
||||
|
@ -856,17 +856,17 @@ void PRD::options(int narg, char **arg)
|
|||
while (iarg < narg) {
|
||||
if (strcmp(arg[iarg],"min") == 0) {
|
||||
if (iarg+5 > narg) error->all(FLERR,"Illegal prd command");
|
||||
etol = atof(arg[iarg+1]);
|
||||
ftol = atof(arg[iarg+2]);
|
||||
maxiter = atoi(arg[iarg+3]);
|
||||
maxeval = atoi(arg[iarg+4]);
|
||||
etol = force->numeric(FLERR,arg[iarg+1]);
|
||||
ftol = force->numeric(FLERR,arg[iarg+2]);
|
||||
maxiter = force->inumeric(FLERR,arg[iarg+3]);
|
||||
maxeval = force->inumeric(FLERR,arg[iarg+4]);
|
||||
if (maxiter < 0) error->all(FLERR,"Illegal prd command");
|
||||
iarg += 5;
|
||||
|
||||
} else if (strcmp(arg[iarg],"temp") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal prd command");
|
||||
temp_flag = 1;
|
||||
temp_dephase = atof(arg[iarg+1]);
|
||||
temp_dephase = force->numeric(FLERR,arg[iarg+1]);
|
||||
if (temp_dephase <= 0.0) error->all(FLERR,"Illegal prd command");
|
||||
iarg += 2;
|
||||
|
||||
|
|
|
@ -645,7 +645,7 @@ int FixShake::dof(int igroup)
|
|||
void FixShake::find_clusters()
|
||||
{
|
||||
int i,j,m,n,imol,iatom;
|
||||
int flag,flag_all,messtag,loop,nbuf,nbufmax,size;
|
||||
int flag,flag_all,nbuf,size;
|
||||
tagint tagprev;
|
||||
double massone;
|
||||
tagint *buf;
|
||||
|
|
|
@ -185,7 +185,7 @@ void FixWallPiston::initial_integrate(int vflag)
|
|||
|
||||
void FixWallPiston::post_integrate()
|
||||
{
|
||||
double xlo, xhi, ylo, yhi, zlo, zhi;
|
||||
double zlo;
|
||||
|
||||
double **x = atom->x;
|
||||
double **v = atom->v;
|
||||
|
|
|
@ -75,8 +75,6 @@ static int inthash_lookup(void *tptr, int key);
|
|||
static int inthash_insert(inthash_t *tptr, int key, int data);
|
||||
/* delete the hash table */
|
||||
static void inthash_destroy(inthash_t *tptr);
|
||||
/* adapted sort for in-place sorting of map indices. */
|
||||
static void id_sort(int *idmap, int left, int right);
|
||||
|
||||
/************************************************************************
|
||||
* integer hash code:
|
||||
|
@ -239,44 +237,6 @@ void inthash_destroy(inthash_t *tptr) {
|
|||
}
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* integer list sort code:
|
||||
************************************************************************/
|
||||
|
||||
/* sort for integer map. initial call id_sort(idmap, 0, natoms - 1); */
|
||||
static void id_sort(int *idmap, int left, int right)
|
||||
{
|
||||
int pivot, l_hold, r_hold;
|
||||
|
||||
l_hold = left;
|
||||
r_hold = right;
|
||||
pivot = idmap[left];
|
||||
|
||||
while (left < right) {
|
||||
while ((idmap[right] >= pivot) && (left < right))
|
||||
right--;
|
||||
if (left != right) {
|
||||
idmap[left] = idmap[right];
|
||||
left++;
|
||||
}
|
||||
while ((idmap[left] <= pivot) && (left < right))
|
||||
left++;
|
||||
if (left != right) {
|
||||
idmap[right] = idmap[left];
|
||||
right--;
|
||||
}
|
||||
}
|
||||
idmap[left] = pivot;
|
||||
pivot = left;
|
||||
left = l_hold;
|
||||
right = r_hold;
|
||||
|
||||
if (left < pivot)
|
||||
id_sort(idmap, left, pivot-1);
|
||||
if (right > pivot)
|
||||
id_sort(idmap, pivot+1, right);
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
|
|
@ -71,9 +71,9 @@ ComputeTempPartialCuda::ComputeTempPartialCuda(LAMMPS *lmp, int narg, char **arg
|
|||
tempflag = 1;
|
||||
tempbias = 1;
|
||||
|
||||
xflag = atoi(arg[3]);
|
||||
yflag = atoi(arg[4]);
|
||||
zflag = atoi(arg[5]);
|
||||
xflag = force->inumeric(FLERR,arg[3]);
|
||||
yflag = force->inumeric(FLERR,arg[4]);
|
||||
zflag = force->inumeric(FLERR,arg[5]);
|
||||
if (zflag && domain->dimension == 2)
|
||||
error->all(FLERR,"Compute temp/partial cannot use vz for 2d systemx");
|
||||
|
||||
|
|
|
@ -867,7 +867,7 @@ void PairEffCut::init_style()
|
|||
// add hook to minimizer for eradius and erforce
|
||||
|
||||
if (update->whichflag == 2)
|
||||
int ignore = update->minimize->request(this,1,0.01);
|
||||
update->minimize->request(this,1,0.01);
|
||||
|
||||
// make sure to use the appropriate timestep when using real units
|
||||
|
||||
|
@ -878,7 +878,7 @@ void PairEffCut::init_style()
|
|||
|
||||
// need a half neigh list and optionally a granular history neigh list
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
|
@ -314,9 +314,6 @@ inline void ElecElecElec(double rc, double re1, double re2,
|
|||
|
||||
re = sqrt(re1 * re1 + re2 * re2);
|
||||
|
||||
double ratio;
|
||||
ratio = rc / re;
|
||||
|
||||
/* constants: sqrt(2), 2 / sqrt(pi) */
|
||||
a = coeff_a / re;
|
||||
arc = a * rc;
|
||||
|
@ -369,7 +366,7 @@ inline void ElecCoreCore(double q, double rc, double re1, double re2,
|
|||
{
|
||||
double a, arc, re;
|
||||
double coeff_a;
|
||||
double E, dEdr, f, fre, df;
|
||||
double E, dEdr, f, df;
|
||||
|
||||
coeff_a = 1.4142135623730951;
|
||||
|
||||
|
@ -379,7 +376,6 @@ inline void ElecCoreCore(double q, double rc, double re1, double re2,
|
|||
|
||||
f = ierfoverx1(arc, &df);
|
||||
dEdr = -q * a * a * df;
|
||||
fre = q * a * (f + arc * df) / (re * re);
|
||||
E = q * a * f;
|
||||
|
||||
*ecoul += E;
|
||||
|
|
|
@ -205,8 +205,6 @@ void FixSMD::smd_tether()
|
|||
r = sqrt(dx*dx + dy*dy + dz*dz);
|
||||
if (styleflag & SMD_CVEL) {
|
||||
if(r > SMALL) {
|
||||
double fsign;
|
||||
fsign = (v_smd<0.0) ? -1.0 : 1.0;
|
||||
dr = r - r0 - r_old;
|
||||
fx = k_smd*dx*dr/r;
|
||||
fy = k_smd*dy*dr/r;
|
||||
|
|
|
@ -114,9 +114,8 @@ void ImproperFourier::addone(const int &i1,const int &i2,const int &i3,const int
|
|||
const double &vb2x, const double &vb2y, const double &vb2z,
|
||||
const double &vb3x, const double &vb3y, const double &vb3z)
|
||||
{
|
||||
int n;
|
||||
double eimproper,f1[3],f2[3],f3[3],f4[3];
|
||||
double domega,c,c2,a,s,projhfg,dhax,dhay,dhaz,dahx,dahy,dahz,cotphi;
|
||||
double c,c2,a,s,projhfg,dhax,dhay,dhaz,dahx,dahy,dahz,cotphi;
|
||||
double ax,ay,az,ra2,rh2,ra,rh,rar,rhr,arx,ary,arz,hrx,hry,hrz;
|
||||
|
||||
double **x = atom->x;
|
||||
|
|
|
@ -219,7 +219,7 @@ void PairCoulDiel::init_style()
|
|||
if (!atom->q_flag)
|
||||
error->all(FLERR,"Pair style coul/diel requires atom attribute q");
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
neighbor->request(this);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
|
@ -73,7 +73,6 @@ void PairLJShiftedForce::compute(int eflag, int vflag)
|
|||
double **f = atom->f;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
int nall = nlocal + atom->nghost;
|
||||
double *special_lj = force->special_lj;
|
||||
int newton_pair = force->newton_pair;
|
||||
|
||||
|
|
|
@ -39,8 +39,6 @@ using namespace FixConst;
|
|||
void FixShearHistoryOMP::pre_exchange()
|
||||
{
|
||||
|
||||
const int nlocal = atom->nlocal;
|
||||
const int nghost = atom->nghost;
|
||||
const int nthreads = comm->nthreads;
|
||||
maxtouch = 0;
|
||||
|
||||
|
|
|
@ -180,15 +180,13 @@ void MSMOMP::direct_eval(const int nn)
|
|||
icz += nzlo_inn;
|
||||
icy += nylo_inn;
|
||||
icx += nxlo_inn;
|
||||
|
||||
|
||||
const int kmax = zper ? nzhi_direct : MIN(nzhi_direct,betazn - icz);
|
||||
const int jmin = yper ? nylo_direct : MAX(nylo_direct,alphan - icy);
|
||||
const int jmax = yper ? nyhi_direct : MIN(nyhi_direct,betayn - icy);
|
||||
const int imin = xper ? nxlo_direct : MAX(nxlo_direct,alphan - icx);
|
||||
const int imax = xper ? nxhi_direct : MIN(nxhi_direct,betaxn - icx);
|
||||
|
||||
const double qtmp = qgridn[icz][icy][icx]; // charge on center grid point
|
||||
|
||||
esum = 0.0;
|
||||
if (VFLAG_GLOBAL || VFLAG_ATOM)
|
||||
v0sum = v1sum = v2sum = v3sum = v4sum = v5sum = 0.0;
|
||||
|
@ -357,8 +355,7 @@ void MSMOMP::direct_peratom(const int nn)
|
|||
const int yper = domain->yperiodic;
|
||||
const int xper = domain->xperiodic;
|
||||
|
||||
const int n=nn;
|
||||
int i,ifrom,ito,tid,icx,icy,icz,ix,iy,iz,k;
|
||||
int i,icx,icy,icz,ix,iy,iz,k;
|
||||
|
||||
|
||||
for (i = 0; i < inum; ++i) {
|
||||
|
@ -371,7 +368,7 @@ void MSMOMP::direct_peratom(const int nn)
|
|||
icz += nzlo_inn;
|
||||
icy += nylo_inn;
|
||||
icx += nxlo_inn;
|
||||
|
||||
|
||||
const int kmax = zper ? nzhi_direct : MIN(nzhi_direct,betazn - icz);
|
||||
const int jmin = yper ? nylo_direct : MAX(nylo_direct,alphan - icy);
|
||||
const int jmax = yper ? nyhi_direct : MIN(nyhi_direct,betayn - icy);
|
||||
|
|
|
@ -567,12 +567,11 @@ void PairCombOMP::Short_neigh_thr()
|
|||
#pragma omp parallel default(none)
|
||||
#endif
|
||||
{
|
||||
int nj,npntj,*neighptrj;
|
||||
int iparam_ij,*ilist,*jlist,*numneigh,**firstneigh;
|
||||
int nj,*neighptrj;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
int jnum,i,j,ii,jj;
|
||||
double xtmp,ytmp,ztmp,rsq,delrj[3];
|
||||
double **x = atom->x;
|
||||
int *type = atom->type;
|
||||
|
||||
const int inum = list->inum;
|
||||
ilist = list->ilist;
|
||||
|
|
|
@ -152,7 +152,7 @@ void PairEAMAlloyOMP::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++) {
|
||||
|
|
|
@ -152,7 +152,7 @@ void PairEAMFSOMP::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++) {
|
||||
|
|
|
@ -78,8 +78,8 @@ void PairEDIPOMP::compute(int eflag, int vflag)
|
|||
template <int EVFLAG, int EFLAG, int VFLAG_ATOM>
|
||||
void PairEDIPOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
{
|
||||
int i,j,k,ii,inum,jnum;
|
||||
int itype,jtype,ktype,ijparam,ikparam,ijkparam;
|
||||
int i,j,k,ii,jnum;
|
||||
int itype,jtype,ktype,ijparam,ikparam;
|
||||
double xtmp,ytmp,ztmp,evdwl;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
register int preForceCoord_counter;
|
||||
|
@ -115,7 +115,6 @@ void PairEDIPOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
double exp3B_ik;
|
||||
double exp3BDerived_ik;
|
||||
double qFunction;
|
||||
double qFunctionDerived;
|
||||
double tauFunction;
|
||||
double tauFunctionDerived;
|
||||
double expMinusBetaZeta_iZeta_i;
|
||||
|
@ -152,7 +151,6 @@ void PairEDIPOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
const int * _noalias const type = atom->type;
|
||||
const int nlocal = atom->nlocal;
|
||||
|
||||
inum = list->inum;
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
|
@ -283,8 +281,6 @@ void PairEDIPOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
tauFunctionDerived = interpolY1 + (interpolY2 - interpolY1) *
|
||||
(interpolTMP-interpolIDX);
|
||||
|
||||
qFunctionDerived = -mu * qFunction;
|
||||
|
||||
forceModCoord_factor = 2.0 * beta * zeta_i * expMinusBetaZeta_iZeta_i;
|
||||
|
||||
forceModCoord = 0.0;
|
||||
|
@ -358,7 +354,6 @@ void PairEDIPOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
k &= NEIGHMASK;
|
||||
ktype = map[type[k]];
|
||||
ikparam = elem2param[itype][ktype][ktype];
|
||||
ijkparam = elem2param[itype][jtype][ktype];
|
||||
|
||||
dr_ik[0] = x[k].x - xtmp;
|
||||
dr_ik[1] = x[k].y - ytmp;
|
||||
|
|
|
@ -132,6 +132,7 @@ void PairGranHertzHistoryOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
for (ii = iifrom; ii < iito; ++ii) {
|
||||
|
||||
i = ilist[ii];
|
||||
itype = type[i];
|
||||
xtmp = x[i][0];
|
||||
ytmp = x[i][1];
|
||||
ztmp = x[i][2];
|
||||
|
@ -145,6 +146,7 @@ void PairGranHertzHistoryOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
for (jj = 0; jj < jnum; jj++) {
|
||||
j = jlist[jj];
|
||||
j &= NEIGHMASK;
|
||||
jtype = type[j];
|
||||
|
||||
delx = xtmp - x[j][0];
|
||||
dely = ytmp - x[j][1];
|
||||
|
@ -201,8 +203,8 @@ void PairGranHertzHistoryOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
mi = rmass[i];
|
||||
mj = rmass[j];
|
||||
} else {
|
||||
mi = mass[type[i]];
|
||||
mj = mass[type[j]];
|
||||
mi = mass[itype];
|
||||
mj = mass[jtype];
|
||||
}
|
||||
if (fix_rigid) {
|
||||
if (mass_rigid[i] > 0.0) mi = mass_rigid[i];
|
||||
|
|
|
@ -715,22 +715,21 @@ void PairLJLongTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
const double * const q = atom->q;
|
||||
const int * const type = atom->type;
|
||||
const int nlocal = atom->nlocal;
|
||||
const int nall = nlocal + atom->nghost;
|
||||
const double * const special_coul = force->special_coul;
|
||||
const double * const special_lj = force->special_lj;
|
||||
const double qqrd2e = force->qqrd2e;
|
||||
const double cut_coulsqplus = (cut_coul+2.0*qdist)*(cut_coul+2.0*qdist);
|
||||
|
||||
int i,j,ii,jj,inum,jnum,itype,jtype,itable;
|
||||
int i,j,ii,jj,jnum,itype,jtype,itable;
|
||||
int n,vlist[6];
|
||||
int key;
|
||||
int iH1,iH2,jH1,jH2;
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul;
|
||||
double fraction,table;
|
||||
double r,r2inv,forcecoul,forcelj,cforce;
|
||||
double factor_coul,factor_lj;
|
||||
double factor_coul;
|
||||
double grij,expm2,prefactor,t,erfc;
|
||||
double xiM[3],xjM[3],fO[3],fH[3],fd[3],v[6],xH1[3],xH2[3];// f1[3];
|
||||
double fO[3],fH[3],fd[3],v[6],xH1[3],xH2[3];
|
||||
dbl3_t x1,x2;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
double rsq;
|
||||
|
@ -738,13 +737,13 @@ void PairLJLongTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
evdwl = ecoul = 0.0;
|
||||
|
||||
int ni;
|
||||
double *cut_ljsqi, *lj1i, *lj2i, *lj3i, *lj4i, *offseti;
|
||||
double *lj1i, *lj2i, *lj3i, *lj4i, *offseti;
|
||||
double g2 = g_ewald_6*g_ewald_6, g6 = g2*g2*g2, g8 = g6*g2;
|
||||
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
|
||||
for (ii = iifrom; ii < iito; ++ii) {
|
||||
|
@ -783,7 +782,6 @@ void PairLJLongTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
for (jj = 0; jj < jnum; jj++) {
|
||||
j = jlist[jj];
|
||||
ni = sbmask(j);
|
||||
factor_lj = special_lj[sbmask(j)];
|
||||
factor_coul = special_coul[sbmask(j)];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
|
@ -792,7 +790,7 @@ void PairLJLongTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
delz = ztmp - x[j].z;
|
||||
rsq = delx*delx + dely*dely + delz*delz;
|
||||
jtype = type[j];
|
||||
|
||||
|
||||
if (rsq < cut_ljsq[itype][jtype]) { // lj
|
||||
r2inv = 1.0/rsq;
|
||||
if (ORDER6) { // long-range lj
|
||||
|
@ -810,7 +808,7 @@ void PairLJLongTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
register double f = special_lj[ni], t = rn*(1.0-f);
|
||||
forcelj = f*(rn *= rn)*lj1i[jtype]-
|
||||
g8*(((6.0*a2+6.0)*a2+3.0)*a2+1.0)*x2*rsq+t*lj2i[jtype];
|
||||
if (EFLAG)
|
||||
if (EFLAG)
|
||||
evdwl = f*rn*lj3i[jtype]-g6*((a2+1.0)*a2+0.5)*x2+t*lj4i[jtype];
|
||||
}
|
||||
}
|
||||
|
@ -857,12 +855,12 @@ void PairLJLongTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
evdwl,0.0,forcelj,delx,dely,delz,thr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// adjust rsq and delxyz for off-site O charge(s)
|
||||
// ADDITIONAL REQEUST REQUIRED HERE!!!!!
|
||||
|
||||
if (rsq < cut_coulsqplus) {
|
||||
if (itype == typeO || jtype == typeO) {
|
||||
if (itype == typeO || jtype == typeO) {
|
||||
if (jtype == typeO) {
|
||||
if (hneigh_thr[j].a < 0) {
|
||||
hneigh_thr[j].a = jH1 = atom->map(atom->tag[j] + 1);
|
||||
|
@ -890,7 +888,7 @@ void PairLJLongTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
}
|
||||
|
||||
// test current rsq against cutoff and compute Coulombic force
|
||||
|
||||
|
||||
if (rsq < cut_coulsq && ORDER1) {
|
||||
r2inv = 1.0 / rsq;
|
||||
if (!CTABLE || rsq <= tabinnersq) {
|
||||
|
@ -902,7 +900,7 @@ void PairLJLongTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
prefactor = qqrd2e * qtmp*q[j]/r;
|
||||
forcecoul = prefactor * (erfc + EWALD_F*grij*expm2);
|
||||
if (factor_coul < 1.0) {
|
||||
forcecoul -= (1.0-factor_coul)*prefactor;
|
||||
forcecoul -= (1.0-factor_coul)*prefactor;
|
||||
}
|
||||
} else {
|
||||
union_int_float_t rsq_lookup;
|
||||
|
@ -1020,7 +1018,7 @@ void PairLJLongTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
|
||||
fH[0] = 0.5 * alpha * fd[0];
|
||||
fH[1] = 0.5 * alpha * fd[1];
|
||||
fH[2] = 0.5 * alpha * fd[2];
|
||||
fH[2] = 0.5 * alpha * fd[2];
|
||||
|
||||
f[j][0] += fO[0];
|
||||
f[j][1] += fO[1];
|
||||
|
@ -1059,7 +1057,7 @@ void PairLJLongTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
}
|
||||
if (factor_coul < 1.0) ecoul -= (1.0-factor_coul)*prefactor;
|
||||
} else ecoul = 0.0;
|
||||
|
||||
|
||||
if (EVFLAG) ev_tally_list_thr(this,key,vlist,v,ecoul,alpha,thr);
|
||||
}
|
||||
}
|
||||
|
@ -1071,17 +1069,15 @@ void PairLJLongTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr)
|
|||
|
||||
void PairLJLongTIP4PLongOMP::eval_inner(int iifrom, int iito, ThrData * const thr)
|
||||
{
|
||||
double r, rsq, r2inv, forcecoul = 0.0, forcelj, cforce, fpair;
|
||||
double rsq, r2inv, forcecoul = 0.0, forcelj, cforce;
|
||||
|
||||
const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0];
|
||||
double * const * const f = thr->get_f();
|
||||
const double * const q = atom->q;
|
||||
const int * const type = atom->type;
|
||||
const int nlocal = atom->nlocal;
|
||||
const double * const special_coul = force->special_coul;
|
||||
const double * const special_lj = force->special_lj;
|
||||
const double qqrd2e = force->qqrd2e;
|
||||
const int newton_pair = force->newton_pair;
|
||||
const double cut_coulsqplus = (cut_coul+2.0*qdist)*(cut_coul+2.0*qdist);
|
||||
|
||||
const double cut_out_on = cut_respa[0];
|
||||
|
@ -1091,26 +1087,23 @@ void PairLJLongTIP4PLongOMP::eval_inner(int iifrom, int iito, ThrData * const th
|
|||
const double cut_out_on_sq = cut_out_on*cut_out_on;
|
||||
const double cut_out_off_sq = cut_out_off*cut_out_off;
|
||||
|
||||
int *jneigh, *jneighn, typei, typej, ni;
|
||||
int ni;
|
||||
const int order1 = (ewald_order|(ewald_off^-1))&(1<<1);
|
||||
double qri;
|
||||
vector xi, d;
|
||||
|
||||
int i,j,ii,jj,inum,jnum,itype,jtype,itable;
|
||||
int i,j,ii,jj,jnum,itype,jtype;
|
||||
int iH1,iH2,jH1,jH2;
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul;
|
||||
double factor_coul,factor_lj;
|
||||
double grij,expm2,prefactor,t,erfc;
|
||||
double xiM[3],xjM[3],fO[3],fH[3],fd[3],v[6],xH1[3],xH2[3];// f1[3];
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz;
|
||||
double fO[3],fH[3],fd[3];
|
||||
dbl3_t x1,x2;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
|
||||
double *cut_ljsqi, *lj1i, *lj2i, *lj3i, *lj4i, *offseti;
|
||||
double *lj1i, *lj2i;
|
||||
|
||||
ilist = listinner->ilist;
|
||||
numneigh = listinner->numneigh;
|
||||
firstneigh = listinner->firstneigh;
|
||||
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
|
||||
for (ii = iifrom; ii < iito; ++ii) {
|
||||
|
@ -1143,14 +1136,11 @@ void PairLJLongTIP4PLongOMP::eval_inner(int iifrom, int iito, ThrData * const th
|
|||
|
||||
jlist = firstneigh[i];
|
||||
jnum = numneigh[i];
|
||||
offseti = offset[itype];
|
||||
lj1i = lj1[itype]; lj2i = lj2[itype]; lj3i = lj3[itype]; lj4i = lj4[itype];
|
||||
lj1i = lj1[itype]; lj2i = lj2[itype];
|
||||
|
||||
for (jj = 0; jj < jnum; jj++) {
|
||||
j = jlist[jj];
|
||||
ni = sbmask(j);
|
||||
factor_lj = special_lj[sbmask(j)];
|
||||
factor_coul = special_coul[sbmask(j)];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
delx = xtmp - x[j].x;
|
||||
|
@ -1158,7 +1148,7 @@ void PairLJLongTIP4PLongOMP::eval_inner(int iifrom, int iito, ThrData * const th
|
|||
delz = ztmp - x[j].z;
|
||||
rsq = delx*delx + dely*dely + delz*delz;
|
||||
jtype = type[j];
|
||||
|
||||
|
||||
if (rsq < cut_ljsq[itype][jtype] && rsq < cut_out_off_sq ) { // lj
|
||||
r2inv = 1.0/rsq;
|
||||
register double rn = r2inv*r2inv*r2inv;
|
||||
|
@ -1182,12 +1172,12 @@ void PairLJLongTIP4PLongOMP::eval_inner(int iifrom, int iito, ThrData * const th
|
|||
f[j][2] -= delz*forcelj;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// adjust rsq and delxyz for off-site O charge(s)
|
||||
// ADDITIONAL REQEUST REQUIRED HERE!!!!!
|
||||
|
||||
if (rsq < cut_coulsqplus && order1) {
|
||||
if (itype == typeO || jtype == typeO) {
|
||||
if (itype == typeO || jtype == typeO) {
|
||||
if (jtype == typeO) {
|
||||
if (hneigh_thr[j].a < 0) {
|
||||
hneigh_thr[j].a = jH1 = atom->map(atom->tag[j] + 1);
|
||||
|
@ -1215,7 +1205,7 @@ void PairLJLongTIP4PLongOMP::eval_inner(int iifrom, int iito, ThrData * const th
|
|||
}
|
||||
|
||||
// test current rsq against cutoff and compute Coulombic force
|
||||
|
||||
|
||||
if (rsq < cut_coulsq && rsq < cut_out_off_sq) {
|
||||
r2inv = 1.0 / rsq;
|
||||
qri = qqrd2e*qtmp;
|
||||
|
@ -1289,7 +1279,7 @@ void PairLJLongTIP4PLongOMP::eval_inner(int iifrom, int iito, ThrData * const th
|
|||
|
||||
fH[0] = 0.5 * alpha * fd[0];
|
||||
fH[1] = 0.5 * alpha * fd[1];
|
||||
fH[2] = 0.5 * alpha * fd[2];
|
||||
fH[2] = 0.5 * alpha * fd[2];
|
||||
|
||||
f[j][0] += fO[0];
|
||||
f[j][1] += fO[1];
|
||||
|
@ -1313,19 +1303,17 @@ void PairLJLongTIP4PLongOMP::eval_inner(int iifrom, int iito, ThrData * const th
|
|||
|
||||
void PairLJLongTIP4PLongOMP::eval_middle(int iifrom, int iito, ThrData * const thr)
|
||||
{
|
||||
double r, rsq, r2inv, forcecoul,forcelj, cforce, fpair;
|
||||
double rsq, r2inv, forcecoul,forcelj, cforce;
|
||||
|
||||
const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0];
|
||||
double * const * const f = thr->get_f();
|
||||
const double * const q = atom->q;
|
||||
const int * const type = atom->type;
|
||||
const int nlocal = atom->nlocal;
|
||||
const double * const special_coul = force->special_coul;
|
||||
const double * const special_lj = force->special_lj;
|
||||
const double qqrd2e = force->qqrd2e;
|
||||
|
||||
const double cut_coulsqplus = (cut_coul+2.0*qdist)*(cut_coul+2.0*qdist);
|
||||
const int newton_pair = force->newton_pair;
|
||||
const int order1 = (ewald_order|(ewald_off^-1))&(1<<1);
|
||||
|
||||
const double cut_in_off = cut_respa[0];
|
||||
|
@ -1340,24 +1328,21 @@ void PairLJLongTIP4PLongOMP::eval_middle(int iifrom, int iito, ThrData * const t
|
|||
const double cut_out_on_sq = cut_out_on*cut_out_on;
|
||||
const double cut_out_off_sq = cut_out_off*cut_out_off;
|
||||
|
||||
int i,j,ii,jj,inum,jnum,itype,jtype,itable;
|
||||
int i,j,ii,jj,jnum,itype,jtype;
|
||||
int iH1,iH2,jH1,jH2;
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul;
|
||||
double factor_coul,factor_lj;
|
||||
double grij,expm2,prefactor,t,erfc;
|
||||
double xiM[3],xjM[3],fO[3],fH[3],fd[3],v[6],xH1[3],xH2[3];// f1[3];
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz;
|
||||
double fO[3],fH[3],fd[3];
|
||||
dbl3_t x1,x2;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
double qri;
|
||||
|
||||
int ni;
|
||||
double *cut_ljsqi, *lj1i, *lj2i, *lj3i, *lj4i, *offseti;
|
||||
double g2 = g_ewald_6*g_ewald_6, g6 = g2*g2*g2, g8 = g6*g2;
|
||||
double *lj1i, *lj2i;
|
||||
|
||||
ilist = listmiddle->ilist;
|
||||
numneigh = listmiddle->numneigh;
|
||||
firstneigh = listmiddle->firstneigh;
|
||||
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
|
||||
for (ii = iifrom; ii < iito; ++ii) {
|
||||
|
@ -1390,14 +1375,11 @@ void PairLJLongTIP4PLongOMP::eval_middle(int iifrom, int iito, ThrData * const t
|
|||
|
||||
jlist = firstneigh[i];
|
||||
jnum = numneigh[i];
|
||||
offseti = offset[itype];
|
||||
lj1i = lj1[itype]; lj2i = lj2[itype]; lj3i = lj3[itype]; lj4i = lj4[itype];
|
||||
lj1i = lj1[itype]; lj2i = lj2[itype];
|
||||
|
||||
for (jj = 0; jj < jnum; jj++) {
|
||||
j = jlist[jj];
|
||||
ni = sbmask(j);
|
||||
factor_lj = special_lj[sbmask(j)];
|
||||
factor_coul = special_coul[sbmask(j)];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
delx = xtmp - x[j].x;
|
||||
|
@ -1405,7 +1387,7 @@ void PairLJLongTIP4PLongOMP::eval_middle(int iifrom, int iito, ThrData * const t
|
|||
delz = ztmp - x[j].z;
|
||||
rsq = delx*delx + dely*dely + delz*delz;
|
||||
jtype = type[j];
|
||||
|
||||
|
||||
if (rsq < cut_ljsq[itype][jtype] && rsq >= cut_in_off_sq && rsq <= cut_out_off_sq ) { // lj
|
||||
r2inv = 1.0/rsq;
|
||||
register double rn = r2inv*r2inv*r2inv;
|
||||
|
@ -1433,12 +1415,12 @@ void PairLJLongTIP4PLongOMP::eval_middle(int iifrom, int iito, ThrData * const t
|
|||
f[j][2] -= delz*forcelj;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// adjust rsq and delxyz for off-site O charge(s)
|
||||
// ADDITIONAL REQEUST REQUIRED HERE!!!!!
|
||||
|
||||
if (rsq < cut_coulsqplus && order1) {
|
||||
if (itype == typeO || jtype == typeO) {
|
||||
if (itype == typeO || jtype == typeO) {
|
||||
if (jtype == typeO) {
|
||||
if (hneigh_thr[j].a < 0) {
|
||||
hneigh_thr[j].a = jH1 = atom->map(atom->tag[j] + 1);
|
||||
|
@ -1466,7 +1448,7 @@ void PairLJLongTIP4PLongOMP::eval_middle(int iifrom, int iito, ThrData * const t
|
|||
}
|
||||
|
||||
// test current rsq against cutoff and compute Coulombic force
|
||||
|
||||
|
||||
if (rsq < cut_coulsq && rsq >= cut_in_off_sq && rsq <= cut_out_off_sq) {
|
||||
r2inv = 1.0 / rsq;
|
||||
qri = qqrd2e*qtmp;
|
||||
|
@ -1544,7 +1526,7 @@ void PairLJLongTIP4PLongOMP::eval_middle(int iifrom, int iito, ThrData * const t
|
|||
|
||||
fH[0] = 0.5 * alpha * fd[0];
|
||||
fH[1] = 0.5 * alpha * fd[1];
|
||||
fH[2] = 0.5 * alpha * fd[2];
|
||||
fH[2] = 0.5 * alpha * fd[2];
|
||||
|
||||
f[j][0] += fO[0];
|
||||
f[j][1] += fO[1];
|
||||
|
@ -1570,7 +1552,7 @@ template < const int EVFLAG, const int EFLAG,
|
|||
const int NEWTON_PAIR, const int CTABLE, const int LJTABLE, const int ORDER1, const int ORDER6 >
|
||||
void PairLJLongTIP4PLongOMP::eval_outer(int iifrom, int iito, ThrData * const thr)
|
||||
{
|
||||
double evdwl,ecoul,fvirial,fpair;
|
||||
double evdwl,ecoul,fvirial;
|
||||
evdwl = ecoul = 0.0;
|
||||
|
||||
const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0];
|
||||
|
@ -1583,28 +1565,25 @@ void PairLJLongTIP4PLongOMP::eval_outer(int iifrom, int iito, ThrData * const th
|
|||
const double qqrd2e = force->qqrd2e;
|
||||
const double cut_coulsqplus = (cut_coul+2.0*qdist)*(cut_coul+2.0*qdist);
|
||||
|
||||
int i,j,ii,jj,inum,jnum,itype,jtype,itable;
|
||||
int i,j,ii,jj,jnum,itype,jtype;
|
||||
int n,vlist[6];
|
||||
int key;
|
||||
int iH1,iH2,jH1,jH2;
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz;
|
||||
double fraction,table;
|
||||
double r,r2inv,forcecoul,forcelj,cforce, respa_coul, respa_lj, frespa;
|
||||
double factor_coul,factor_lj;
|
||||
double grij,expm2,prefactor,t,erfc;
|
||||
double xiM[3],xjM[3],fO[3],fH[3],fd[3],v[6],xH1[3],xH2[3];// f1[3];
|
||||
double r2inv,forcecoul,forcelj,cforce, respa_coul, respa_lj, frespa;
|
||||
double fO[3],fH[3],fd[3],v[6],xH1[3],xH2[3];
|
||||
dbl3_t x1,x2;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
double rsq,qri;
|
||||
int respa_flag;
|
||||
|
||||
|
||||
int ni;
|
||||
double *cut_ljsqi, *lj1i, *lj2i, *lj3i, *lj4i, *offseti;
|
||||
double *lj1i, *lj2i, *lj3i, *lj4i, *offseti;
|
||||
double g2 = g_ewald_6*g_ewald_6, g6 = g2*g2*g2, g8 = g6*g2;
|
||||
|
||||
const double cut_in_off = cut_respa[2];
|
||||
const double cut_in_on = cut_respa[3];
|
||||
|
||||
|
||||
const double cut_in_diff = cut_in_on - cut_in_off;
|
||||
const double cut_in_off_sq = cut_in_off*cut_in_off;
|
||||
const double cut_in_on_sq = cut_in_on*cut_in_on;
|
||||
|
@ -1612,7 +1591,7 @@ void PairLJLongTIP4PLongOMP::eval_outer(int iifrom, int iito, ThrData * const th
|
|||
ilist = listouter->ilist;
|
||||
numneigh = listouter->numneigh;
|
||||
firstneigh = listouter->firstneigh;
|
||||
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
|
||||
for (ii = iifrom; ii < iito; ++ii) {
|
||||
|
@ -1652,8 +1631,6 @@ void PairLJLongTIP4PLongOMP::eval_outer(int iifrom, int iito, ThrData * const th
|
|||
for (jj = 0; jj < jnum; jj++) {
|
||||
j = jlist[jj];
|
||||
ni = sbmask(j);
|
||||
factor_lj = special_lj[sbmask(j)];
|
||||
factor_coul = special_coul[sbmask(j)];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
delx = xtmp - x[j].x;
|
||||
|
@ -1661,7 +1638,7 @@ void PairLJLongTIP4PLongOMP::eval_outer(int iifrom, int iito, ThrData * const th
|
|||
delz = ztmp - x[j].z;
|
||||
rsq = delx*delx + dely*dely + delz*delz;
|
||||
jtype = type[j];
|
||||
|
||||
|
||||
respa_coul = 0;
|
||||
respa_lj = 0;
|
||||
if (rsq < cut_ljsq[itype][jtype]) { // lj
|
||||
|
@ -1730,7 +1707,7 @@ void PairLJLongTIP4PLongOMP::eval_outer(int iifrom, int iito, ThrData * const th
|
|||
f[j][0] -= delx*forcelj;
|
||||
f[j][1] -= dely*forcelj;
|
||||
f[j][2] -= delz*forcelj;
|
||||
|
||||
|
||||
if (EVFLAG) {
|
||||
fvirial = forcelj + respa_lj*r2inv;
|
||||
ev_tally_thr(this,i,j,nlocal,/*newton_pair = */ 1,
|
||||
|
@ -1738,12 +1715,12 @@ void PairLJLongTIP4PLongOMP::eval_outer(int iifrom, int iito, ThrData * const th
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// adjust rsq and delxyz for off-site O charge(s)
|
||||
// ADDITIONAL REQEUST REQUIRED HERE!!!!!
|
||||
|
||||
if (rsq < cut_coulsqplus) {
|
||||
if (itype == typeO || jtype == typeO) {
|
||||
if (itype == typeO || jtype == typeO) {
|
||||
if (jtype == typeO) {
|
||||
if (hneigh_thr[j].a < 0) {
|
||||
hneigh_thr[j].a = jH1 = atom->map(atom->tag[j] + 1);
|
||||
|
@ -1818,7 +1795,7 @@ void PairLJLongTIP4PLongOMP::eval_outer(int iifrom, int iito, ThrData * const th
|
|||
ecoul = qiqj*(etable[k]+f*detable[k]-t.f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cforce = forcecoul * r2inv;
|
||||
fvirial = (forcecoul + respa_coul) * r2inv;
|
||||
|
@ -1932,7 +1909,7 @@ void PairLJLongTIP4PLongOMP::eval_outer(int iifrom, int iito, ThrData * const th
|
|||
|
||||
fH[0] = 0.5 * alpha * fd[0];
|
||||
fH[1] = 0.5 * alpha * fd[1];
|
||||
fH[2] = 0.5 * alpha * fd[2];
|
||||
fH[2] = 0.5 * alpha * fd[2];
|
||||
|
||||
f[j][0] += fO[0];
|
||||
f[j][1] += fO[1];
|
||||
|
@ -1958,7 +1935,7 @@ void PairLJLongTIP4PLongOMP::eval_outer(int iifrom, int iito, ThrData * const th
|
|||
|
||||
fH[0] = 0.5 * alpha * fd[0];
|
||||
fH[1] = 0.5 * alpha * fd[1];
|
||||
fH[2] = 0.5 * alpha * fd[2];
|
||||
fH[2] = 0.5 * alpha * fd[2];
|
||||
|
||||
domain->closest_image(&x[j].x,&x[jH1].x,xH1);
|
||||
domain->closest_image(&x[j].x,&x[jH2].x,xH2);
|
||||
|
@ -1974,7 +1951,7 @@ void PairLJLongTIP4PLongOMP::eval_outer(int iifrom, int iito, ThrData * const th
|
|||
vlist[n++] = jH1;
|
||||
vlist[n++] = jH2;
|
||||
}
|
||||
|
||||
|
||||
if (EVFLAG) ev_tally_list_thr(this,key,vlist,v,ecoul,alpha,thr);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "error.h"
|
||||
#include "fix_omp.h"
|
||||
#include "force.h"
|
||||
#include "neighbor.h"
|
||||
#include "memory.h"
|
||||
#include "math_const.h"
|
||||
#include "math_special.h"
|
||||
|
|
|
@ -60,8 +60,6 @@ void PPPMDispTIP4POMP::allocate()
|
|||
{
|
||||
PPPMDispTIP4P::allocate();
|
||||
|
||||
const int nthreads = comm->nthreads;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none)
|
||||
#endif
|
||||
|
@ -78,7 +76,7 @@ void PPPMDispTIP4POMP::allocate()
|
|||
}
|
||||
if (function[1] + function[2]) {
|
||||
ThrData * thr = fix->get_thr(tid);
|
||||
thr->init_pppm_disp(order_6,memory);
|
||||
thr->init_pppm_disp(order_6,memory);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -136,12 +134,11 @@ void PPPMDispTIP4POMP::compute_gf()
|
|||
double unitky = (2.0*MY_PI/yprd);
|
||||
double unitkz = (2.0*MY_PI/zprd_slab);
|
||||
|
||||
int tid,nn,nnfrom,nnto,nx,ny,nz,k,l,m;
|
||||
int tid,nn,nnfrom,nnto,k,l,m;
|
||||
int kper,lper,mper;
|
||||
double snx,sny,snz,snx2,sny2,snz2;
|
||||
double sqk;
|
||||
double argx,argy,argz,wx,wy,wz,sx,sy,sz,qx,qy,qz;
|
||||
double sum1,dot1,dot2;
|
||||
double numerator,denominator;
|
||||
|
||||
const int nnx = nxhi_fft-nxlo_fft+1;
|
||||
|
@ -191,7 +188,7 @@ void PPPMDispTIP4POMP::compute_gf()
|
|||
|
||||
if (sqk != 0.0) {
|
||||
numerator = 4.0*MY_PI/sqk;
|
||||
denominator = gf_denom(snx2,sny2,snz2, gf_b, order);
|
||||
denominator = gf_denom(snx2,sny2,snz2, gf_b, order);
|
||||
greensfn[nn] = numerator*sx*sy*sz*wx*wy*wz/denominator;
|
||||
} else greensfn[nn] = 0.0;
|
||||
}
|
||||
|
@ -258,7 +255,7 @@ void PPPMDispTIP4POMP::compute_gf_6()
|
|||
argz = 0.5*qz*zprd_slab/nz_pppm_6;
|
||||
if (argz != 0.0) wz = pow(sin(argz)/argz,order_6);
|
||||
wz *= wz;
|
||||
|
||||
|
||||
for (l = nylo_fft_6; l <= nyhi_fft_6; l++) {
|
||||
lper = l - ny_pppm_6*(2*l/ny_pppm_6);
|
||||
qy = unitky*lper;
|
||||
|
@ -285,10 +282,10 @@ void PPPMDispTIP4POMP::compute_gf_6()
|
|||
argx = 0.5*qx*xprd/nx_pppm_6;
|
||||
if (argx != 0.0) wx = pow(sin(argx)/argx,order_6);
|
||||
wx *= wx;
|
||||
|
||||
|
||||
sqk = pow(qx,2.0) + pow(qy,2.0) + pow(qz,2.0);
|
||||
|
||||
denominator = gf_denom(snx2,sny2,snz2, gf_b_6, order_6);
|
||||
denominator = gf_denom(snx2,sny2,snz2, gf_b_6, order_6);
|
||||
rtsqk = sqrt(sqk);
|
||||
term = (1-2*sqk*inv2ew*inv2ew)*sx*sy*sz +
|
||||
2*sqk*rtsqk*inv2ew*inv2ew*inv2ew*rtpi*erfc(rtsqk*inv2ew);
|
||||
|
@ -418,7 +415,6 @@ void PPPMDispTIP4POMP::particle_map(double dxinv, double dyinv,
|
|||
// no local atoms => nothing to do
|
||||
if (atom->nlocal == 0) return;
|
||||
|
||||
const int * _noalias const type = atom->type;
|
||||
const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0];
|
||||
int3_t * _noalias const p2g = (int3_t *) part2grid[0];
|
||||
const double boxlox = boxlo[0];
|
||||
|
@ -526,7 +522,7 @@ void PPPMDispTIP4POMP::make_rho_c()
|
|||
const int ny = p2g[i].b;
|
||||
const int nz = p2g[i].t;
|
||||
|
||||
// pre-screen whether this atom will ever come within
|
||||
// pre-screen whether this atom will ever come within
|
||||
// reach of the data segement this thread is updating.
|
||||
if ( ((nz+nlower-nzlo_out)*ix*iy >= jto)
|
||||
|| ((nz+nupper-nzlo_out+1)*ix*iy < jfrom) ) continue;
|
||||
|
@ -618,7 +614,7 @@ void PPPMDispTIP4POMP::make_rho_g()
|
|||
const int ny = p2g[i].b;
|
||||
const int nz = p2g[i].t;
|
||||
|
||||
// pre-screen whether this atom will ever come within
|
||||
// pre-screen whether this atom will ever come within
|
||||
// reach of the data segement this thread is updating.
|
||||
if ( ((nz+nlower_6-nzlo_out_6)*ix*iy >= jto)
|
||||
|| ((nz+nupper_6-nzlo_out_6+1)*ix*iy < jfrom) ) continue;
|
||||
|
@ -720,7 +716,7 @@ void PPPMDispTIP4POMP::make_rho_a()
|
|||
const int ny = p2g[i].b;
|
||||
const int nz = p2g[i].t;
|
||||
|
||||
// pre-screen whether this atom will ever come within
|
||||
// pre-screen whether this atom will ever come within
|
||||
// reach of the data segement this thread is updating.
|
||||
if ( ((nz+nlower_6-nzlo_out_6)*ix*iy >= jto)
|
||||
|| ((nz+nupper_6-nzlo_out_6+1)*ix*iy < jfrom) ) continue;
|
||||
|
@ -1026,7 +1022,6 @@ void PPPMDispTIP4POMP::fieldforce_g_ik()
|
|||
// ek = 3 components of E-field on particle
|
||||
|
||||
const double * const * const x = atom->x;
|
||||
const double qqrd2e = force->qqrd2e;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none)
|
||||
|
@ -1681,7 +1676,7 @@ void PPPMDispTIP4POMP::fieldforce_a_peratom()
|
|||
|
||||
// this if protects against having more threads than local atoms
|
||||
if (ifrom < nlocal) {
|
||||
for (int i = ifrom; i < ito; i++) {
|
||||
for (i = ifrom; i < ito; i++) {
|
||||
|
||||
nx = part2grid_6[i][0];
|
||||
ny = part2grid_6[i][1];
|
||||
|
@ -1776,20 +1771,20 @@ void PPPMDispTIP4POMP::fieldforce_a_peratom()
|
|||
lj6 = B[7*type]*0.5;
|
||||
|
||||
if (eflag_atom)
|
||||
eatom[i] += u0*lj0 + u1*lj1 + u2*lj2 +
|
||||
eatom[i] += u0*lj0 + u1*lj1 + u2*lj2 +
|
||||
u3*lj3 + u4*lj4 + u5*lj5 + u6*lj6;
|
||||
if (vflag_atom) {
|
||||
vatom[i][0] += v00*lj0 + v01*lj1 + v02*lj2 + v03*lj3 +
|
||||
vatom[i][0] += v00*lj0 + v01*lj1 + v02*lj2 + v03*lj3 +
|
||||
v04*lj4 + v05*lj5 + v06*lj6;
|
||||
vatom[i][1] += v10*lj0 + v11*lj1 + v12*lj2 + v13*lj3 +
|
||||
vatom[i][1] += v10*lj0 + v11*lj1 + v12*lj2 + v13*lj3 +
|
||||
v14*lj4 + v15*lj5 + v16*lj6;
|
||||
vatom[i][2] += v20*lj0 + v21*lj1 + v22*lj2 + v23*lj3 +
|
||||
vatom[i][2] += v20*lj0 + v21*lj1 + v22*lj2 + v23*lj3 +
|
||||
v24*lj4 + v25*lj5 + v26*lj6;
|
||||
vatom[i][3] += v30*lj0 + v31*lj1 + v32*lj2 + v33*lj3 +
|
||||
vatom[i][3] += v30*lj0 + v31*lj1 + v32*lj2 + v33*lj3 +
|
||||
v34*lj4 + v35*lj5 + v36*lj6;
|
||||
vatom[i][4] += v40*lj0 + v41*lj1 + v42*lj2 + v43*lj3 +
|
||||
vatom[i][4] += v40*lj0 + v41*lj1 + v42*lj2 + v43*lj3 +
|
||||
v44*lj4 + v45*lj5 + v46*lj6;
|
||||
vatom[i][5] += v50*lj0 + v51*lj1 + v52*lj2 + v53*lj3 +
|
||||
vatom[i][5] += v50*lj0 + v51*lj1 + v52*lj2 + v53*lj3 +
|
||||
v54*lj4 + v55*lj5 + v56*lj6;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -608,7 +608,7 @@ int FixQEqReax::CG( double *b, double *x )
|
|||
{
|
||||
int i, j, imax;
|
||||
double tmp, alpha, beta, b_norm;
|
||||
double sig_old, sig_new, sig0;
|
||||
double sig_old, sig_new;
|
||||
|
||||
imax = 200;
|
||||
|
||||
|
@ -622,7 +622,6 @@ int FixQEqReax::CG( double *b, double *x )
|
|||
|
||||
b_norm = parallel_norm( b, n );
|
||||
sig_new = parallel_dot( r, d, n );
|
||||
sig0 = sig_new;
|
||||
|
||||
for( i = 1; i < imax && sqrt(sig_new) / b_norm > tolerance; ++i ) {
|
||||
comm->forward_comm_fix(this); //Dist_vector( d );
|
||||
|
|
|
@ -486,17 +486,15 @@ AtomCoord chAnchor(AtomCoord in1, AtomCoord in2)
|
|||
|
||||
void FixReaxCSpecies::FindMolecule ()
|
||||
{
|
||||
int i,j,ii,jj,inum,jnum,n,itype,jtype,itag,jtag,loop,looptot;
|
||||
int i,j,ii,jj,inum,itype,jtype,loop,looptot;
|
||||
int change,done,anychange;
|
||||
int *mask = atom->mask;
|
||||
int *ilist, *jlist, *numneigh, **firstneigh;
|
||||
int *ilist;
|
||||
double bo_tmp,bo_cut;
|
||||
double **spec_atom = f_SPECBOND->array_atom;
|
||||
|
||||
inum = reaxc->list->inum;
|
||||
ilist = reaxc->list->ilist;
|
||||
numneigh = reaxc->list->numneigh;
|
||||
firstneigh = reaxc->list->firstneigh;
|
||||
|
||||
for (ii = 0; ii < inum; ii++) {
|
||||
i = ilist[ii];
|
||||
|
@ -568,7 +566,7 @@ void FixReaxCSpecies::SortMolecule(int &Nmole)
|
|||
memory->destroy(molmap);
|
||||
molmap = NULL;
|
||||
|
||||
int m, n, idlo, idhi;
|
||||
int n, idlo, idhi;
|
||||
int *mask =atom->mask;
|
||||
int lo = ntotal;
|
||||
int hi = -ntotal;
|
||||
|
@ -636,8 +634,7 @@ void FixReaxCSpecies::SortMolecule(int &Nmole)
|
|||
|
||||
void FixReaxCSpecies::FindSpecies(int Nmole, int &Nspec)
|
||||
{
|
||||
int inum, *ilist;
|
||||
int i, j, k, l, m, n, itype, cid;
|
||||
int k, l, m, n, itype, cid;
|
||||
int flag_identity, flag_mol, flag_spec;
|
||||
int flag_tmp;
|
||||
int *mask =atom->mask;
|
||||
|
|
|
@ -804,7 +804,7 @@ void BO( reax_system *system, control_params *control, simulation_data *data,
|
|||
storage *workspace, reax_list **lists, output_controls *out_control )
|
||||
{
|
||||
int i, j, pj, type_i, type_j;
|
||||
int start_i, end_i, sym_index, num_bonds;
|
||||
int start_i, end_i, sym_index;
|
||||
real val_i, Deltap_i, Deltap_boc_i;
|
||||
real val_j, Deltap_j, Deltap_boc_j;
|
||||
real f1, f2, f3, f4, f5, f4f5, exp_f4, exp_f5;
|
||||
|
@ -833,7 +833,6 @@ void BO( reax_system *system, control_params *control, simulation_data *data,
|
|||
// Num_Entries(i, bonds), sizeof(bond_data), compare_bonds );
|
||||
#endif
|
||||
|
||||
num_bonds = 0;
|
||||
p_boc1 = system->reax_param.gp.l[0];
|
||||
p_boc2 = system->reax_param.gp.l[1];
|
||||
|
||||
|
@ -1172,20 +1171,9 @@ void BO( reax_system *system, control_params *control, simulation_data *data,
|
|||
workspace->Delta_lp_temp[j] = sbp_j->nlp_opt - workspace->nlp_temp[j];
|
||||
workspace->dDelta_lp_temp[j] = workspace->Clp[j];
|
||||
}
|
||||
|
||||
//fprintf( stderr, "%d\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\n",
|
||||
//j, workspace->Delta[j], workspace->Delta_e[j], workspace->Delta_boc[j],
|
||||
//workspace->nlp[j], system->reaxprm.sbp[type_j].nlp_opt,
|
||||
//workspace->Delta_lp[j], workspace->Clp[j], workspace->dDelta_lp[j] );
|
||||
|
||||
//fprintf( stdout, "%d(%d) %24.15f\n",
|
||||
// j, workspace->bond_mark[j], workspace->total_bond_order[j] );
|
||||
}
|
||||
|
||||
//Print_Bonds( system, bonds, "pbonds.out" );
|
||||
|
||||
#if defined(TEST_ENERGIES) || defined(TEST_FORCES)
|
||||
fprintf( stderr, "Number of bonds: %d\n", num_bonds );
|
||||
Print_Bond_List( system, control, data, lists, out_control);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -237,10 +237,10 @@ int Init_Lookup_Tables( reax_system *system, control_params *control,
|
|||
|
||||
/* fill in the lookup table entries for existing atom types.
|
||||
only lower half should be enough. */
|
||||
for( i = 0; i < num_atom_types; ++i )
|
||||
if( aggregated[i] )
|
||||
for( i = 0; i < num_atom_types; ++i ) {
|
||||
if( aggregated[i] ) {
|
||||
//for( j = 0; j < num_atom_types; ++j )
|
||||
for( j = i; j < num_atom_types; ++j )
|
||||
for( j = i; j < num_atom_types; ++j ) {
|
||||
if( aggregated[j] ) {
|
||||
LR[i][j].xmin = 0;
|
||||
LR[i][j].xmax = control->nonb_cut;
|
||||
|
@ -305,11 +305,12 @@ int Init_Lookup_Tables( reax_system *system, control_params *control,
|
|||
Natural_Cubic_Spline( &h[1], &fCEclmb[1],
|
||||
&(LR[i][j].CEclmb[1]), control->tabulate+1,
|
||||
comm );
|
||||
}
|
||||
else{
|
||||
} else{
|
||||
LR[i][j].n = 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
free(h);
|
||||
free(fh);
|
||||
free(fvdw);
|
||||
|
|
|
@ -51,18 +51,17 @@ void Atom_Energy( reax_system *system, control_params *control,
|
|||
real exp_ovun2n, exp_ovun6, exp_ovun8;
|
||||
real inv_exp_ovun1, inv_exp_ovun2, inv_exp_ovun2n, inv_exp_ovun8;
|
||||
real e_un, CEunder1, CEunder2, CEunder3, CEunder4;
|
||||
real p_lp1, p_lp2, p_lp3;
|
||||
real p_lp2, p_lp3;
|
||||
real p_ovun2, p_ovun3, p_ovun4, p_ovun5, p_ovun6, p_ovun7, p_ovun8;
|
||||
real eng_tmp, f_tmp;
|
||||
real eng_tmp;
|
||||
|
||||
single_body_parameters *sbp_i, *sbp_j;
|
||||
single_body_parameters *sbp_i;
|
||||
two_body_parameters *twbp;
|
||||
bond_data *pbond;
|
||||
bond_order_data *bo_ij;
|
||||
reax_list *bonds = (*lists) + BONDS;
|
||||
|
||||
/* Initialize parameters */
|
||||
p_lp1 = system->reax_param.gp.l[15];
|
||||
p_lp3 = system->reax_param.gp.l[5];
|
||||
p_ovun3 = system->reax_param.gp.l[32];
|
||||
p_ovun4 = system->reax_param.gp.l[31];
|
||||
|
@ -161,7 +160,6 @@ void Atom_Energy( reax_system *system, control_params *control,
|
|||
j = bonds->select.bond_list[pj].nbr;
|
||||
type_j = system->my_atoms[j].type;
|
||||
bo_ij = &(bonds->select.bond_list[pj].bo_data);
|
||||
sbp_j = &(system->reax_param.sbp[ type_j ]);
|
||||
twbp = &(system->reax_param.tbp[ type_i ][ type_j ]);
|
||||
|
||||
sum_ovun1 += twbp->p_ovun1 * twbp->De_s * bo_ij->BO;
|
||||
|
@ -221,7 +219,6 @@ void Atom_Energy( reax_system *system, control_params *control,
|
|||
/* tally into per-atom energy */
|
||||
if( system->pair_ptr->evflag) {
|
||||
eng_tmp = e_ov + e_un;
|
||||
f_tmp = CEover3 + CEunder3;
|
||||
system->pair_ptr->ev_tally(i,i,system->n,1,eng_tmp,0.0,0.0,0.0,0.0,0.0);
|
||||
}
|
||||
|
||||
|
|
|
@ -131,7 +131,6 @@ int Write_Header( reax_system *system, control_params *control,
|
|||
output_controls *out_control, mpi_datatypes *mpi_data )
|
||||
{
|
||||
int num_hdr_lines, my_hdr_lines, buffer_req;
|
||||
MPI_Status status;
|
||||
char ensembles[ens_N][25] = { "NVE", "NVT", "fully flexible NPT",
|
||||
"semi isotropic NPT", "isotropic NPT" };
|
||||
char reposition[3][25] = { "fit to periodic box", "CoM to center of box",
|
||||
|
@ -339,7 +338,7 @@ int Write_Header( reax_system *system, control_params *control,
|
|||
mpi_data->world, system->my_rank,
|
||||
my_hdr_lines, num_hdr_lines );
|
||||
MPI_File_write_all( out_control->trj, out_control->buffer,
|
||||
num_hdr_lines, mpi_data->header_line, &status );
|
||||
num_hdr_lines, mpi_data->header_line, MPI_STATUS_IGNORE );
|
||||
out_control->trj_offset = (num_hdr_lines) * HEADER_LINE_LEN;
|
||||
}
|
||||
else {
|
||||
|
@ -549,7 +548,6 @@ int Write_Frame_Header( reax_system *system, control_params *control,
|
|||
mpi_datatypes *mpi_data )
|
||||
{
|
||||
int me, num_frm_hdr_lines, my_frm_hdr_lines, buffer_req;
|
||||
MPI_Status status;
|
||||
|
||||
me = system->my_rank;
|
||||
/* frame header lengths */
|
||||
|
@ -670,7 +668,7 @@ int Write_Frame_Header( reax_system *system, control_params *control,
|
|||
me, my_frm_hdr_lines, num_frm_hdr_lines );
|
||||
|
||||
MPI_File_write_all(out_control->trj, out_control->buffer, my_frm_hdr_lines,
|
||||
mpi_data->header_line, &status);
|
||||
mpi_data->header_line, MPI_STATUS_IGNORE);
|
||||
out_control->trj_offset += (num_frm_hdr_lines) * HEADER_LINE_LEN;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -475,7 +475,7 @@ int AtomVecMeso::pack_border_vel(int n, int *list, double *buf, int pbc_flag,
|
|||
int *pbc)
|
||||
{
|
||||
int i,j,m;
|
||||
double dx,dy,dz,dvx,dvy,dvz;
|
||||
double dx,dy,dz;
|
||||
|
||||
m = 0;
|
||||
if (pbc_flag == 0) {
|
||||
|
@ -527,9 +527,6 @@ int AtomVecMeso::pack_border_vel(int n, int *list, double *buf, int pbc_flag,
|
|||
buf[m++] = vest[j][2];
|
||||
}
|
||||
} else {
|
||||
dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4];
|
||||
dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3];
|
||||
dvz = pbc[2]*h_rate[2];
|
||||
for (i = 0; i < n; i++) {
|
||||
j = list[i];
|
||||
buf[m++] = x[j][0] + dx;
|
||||
|
|
|
@ -66,7 +66,7 @@ void PairSPHRhoSum::init_style() {
|
|||
void PairSPHRhoSum::compute(int eflag, int vflag) {
|
||||
int i, j, ii, jj, jnum, itype, jtype;
|
||||
double xtmp, ytmp, ztmp, delx, dely, delz;
|
||||
double r, rsq, imass, h, ih, ihsq;
|
||||
double rsq, imass, h, ih, ihsq;
|
||||
int *jlist;
|
||||
double wf;
|
||||
// neighbor list variables
|
||||
|
|
|
@ -227,12 +227,6 @@ void ComputeVoronoi::buildCells()
|
|||
// setup bounds for voro++ domain for orthogonal and triclinic simulation boxes
|
||||
if( domain->triclinic ) {
|
||||
// triclinic box: embed parallelepiped into orthogonal voro++ domain
|
||||
double mx, my, sxy,sxz,syz;
|
||||
mx = (boxhi[0]-boxlo[0])/(subhi[0]-sublo[0]);
|
||||
my = (boxhi[1]-boxlo[1])/(subhi[1]-sublo[1]);
|
||||
sxy = domain->xy/mx;
|
||||
sxz = domain->xz/mx;
|
||||
syz = domain->yz/my;
|
||||
|
||||
// cutghost is in lamda coordinates for triclinic boxes, use subxx_lamda
|
||||
double *h = domain->h, cuttri[3];
|
||||
|
|
|
@ -360,7 +360,7 @@ static int *buf = NULL;
|
|||
static int magicints[] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
8, 10, 12, 16, 20, 25, 32, 40, 50, 64,
|
||||
80, 101, 128, 161, 203, 256, 322, 406, IMGMAX, 645,
|
||||
80, 101, 128, 161, 203, 256, 322, 406, 512, 645,
|
||||
812, 1024, 1290, 1625, 2048, 2580, 3250, 4096, 5060, 6501,
|
||||
8192, 10321, 13003, 16384, 20642, 26007, 32768, 41285, 52015, 65536,
|
||||
82570, 104031, 131072, 165140, 208063, 262144, 330280, 416127,
|
||||
|
@ -371,7 +371,7 @@ static int magicints[] = {
|
|||
|
||||
#define FIRSTIDX 9
|
||||
/* note that magicints[FIRSTIDX-1] == 0 */
|
||||
#define LASTIDX (sizeof(magicints) / sizeof(*magicints))
|
||||
#define LASTIDX (sizeof(magicints) / sizeof(int) - 1 )
|
||||
|
||||
/*__________________________________________________________________________
|
||||
|
|
||||
|
|
|
@ -63,7 +63,7 @@ void DeleteBonds::command(int narg, char **arg)
|
|||
|
||||
// set style and which = type value
|
||||
|
||||
int style;
|
||||
int style = -1;
|
||||
if (strcmp(arg[1],"multi") == 0) style = MULTI;
|
||||
else if (strcmp(arg[1],"atom") == 0) style = ATOM;
|
||||
else if (strcmp(arg[1],"bond") == 0) style = BOND;
|
||||
|
|
|
@ -44,6 +44,8 @@ enum{INT,DOUBLE,STRING,BIGINT}; // same as in DumpCustom
|
|||
DumpCFG::DumpCFG(LAMMPS *lmp, int narg, char **arg) :
|
||||
DumpCustom(lmp, narg, arg)
|
||||
{
|
||||
multifile_override = 0;
|
||||
|
||||
if (narg < 10 ||
|
||||
strcmp(arg[5],"mass") != 0 || strcmp(arg[6],"type") != 0 ||
|
||||
(strcmp(arg[7],"xs") != 0 && strcmp(arg[7],"xsu") != 0) ||
|
||||
|
@ -115,7 +117,7 @@ DumpCFG::~DumpCFG()
|
|||
|
||||
void DumpCFG::init_style()
|
||||
{
|
||||
if (multifile == 0)
|
||||
if (multifile == 0 && !multifile_override)
|
||||
error->all(FLERR,"Dump cfg requires one snapshot per file");
|
||||
|
||||
DumpCustom::init_style();
|
||||
|
|
|
@ -26,6 +26,8 @@ namespace LAMMPS_NS {
|
|||
|
||||
class DumpCFG : public DumpCustom {
|
||||
public:
|
||||
int multifile_override; // used by write_dump command
|
||||
|
||||
DumpCFG(class LAMMPS *, int, char **);
|
||||
virtual ~DumpCFG();
|
||||
|
||||
|
|
Loading…
Reference in New Issue