Unverified Commit 9bc1da64 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

pair style gauss does not apply special_bonds

parent 7e5e741e
Loading
Loading
Loading
Loading
+3 −11
Original line number Diff line number Diff line
@@ -80,8 +80,7 @@ template <int EVFLAG, int EFLAG, int NEWTON_PAIR>
double PairGaussOMP::eval(int iifrom, int iito, ThrData * const thr)
{
  int i,j,ii,jj,jnum,itype,jtype;
  double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair;
  double rsq,r2inv,forcelj,factor_lj;
  double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair,rsq;
  int *ilist,*jlist,*numneigh,**firstneigh;
  int occ = 0;

@@ -91,7 +90,6 @@ double PairGaussOMP::eval(int iifrom, int iito, ThrData * const thr)
  dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0];
  const int * _noalias const type = atom->type;
  const int nlocal = atom->nlocal;
  const double * _noalias const special_lj = force->special_lj;
  double fxtmp,fytmp,fztmp;

  ilist = list->ilist;
@@ -113,7 +111,6 @@ double PairGaussOMP::eval(int iifrom, int iito, ThrData * const thr)

    for (jj = 0; jj < jnum; jj++) {
      j = jlist[jj];
      factor_lj = special_lj[sbmask(j)];
      j &= NEIGHMASK;

      delx = xtmp - x[j].x;
@@ -129,10 +126,7 @@ double PairGaussOMP::eval(int iifrom, int iito, ThrData * const thr)
        if (eflag_global && rsq < 0.5/b[itype][jtype]) occ++;

      if (rsq < cutsq[itype][jtype]) {
        r2inv = 1.0/rsq;
        forcelj = - 2.0*a[itype][jtype]*b[itype][jtype] * sqrt(rsq) *
          exp(-b[itype][jtype]*rsq);
        fpair = factor_lj*forcelj*r2inv;
        fpair = -2.0*a[itype][jtype]*b[itype][jtype]*exp(-b[itype][jtype]*rsq);

        fxtmp += delx*fpair;
        fytmp += dely*fpair;
@@ -143,11 +137,9 @@ double PairGaussOMP::eval(int iifrom, int iito, ThrData * const thr)
          f[j].z -= delz*fpair;
        }

        if (EFLAG) {
        if (EFLAG)
          evdwl = -(a[itype][jtype]*exp(-b[itype][jtype]*rsq) -
                    offset[itype][jtype]);
          evdwl *= factor_lj;
        }

        if (EVFLAG) ev_tally_thr(this, i,j,nlocal,NEWTON_PAIR,
                                 evdwl,0.0,fpair,delx,dely,delz,thr);