Commit dc6ff70f authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6868 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent f9b08962
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -50,11 +50,11 @@ PairYukawa::~PairYukawa()
void PairYukawa::compute(int eflag, int vflag)
{
  int i,j,ii,jj,inum,jnum,itype,jtype;
  double xtmp,ytmp,ztmp,delx,dely,delz,ecoul,fpair;
  double rsq,r2inv,r,rinv,screening,forceyukawa,factor_coul;
  double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair;
  double rsq,r2inv,r,rinv,screening,forceyukawa,factor;
  int *ilist,*jlist,*numneigh,**firstneigh;

  ecoul = 0.0;
  evdwl = 0.0;
  if (eflag || vflag) ev_setup(eflag,vflag);
  else evflag = vflag_fdotr = 0;

@@ -62,7 +62,7 @@ void PairYukawa::compute(int eflag, int vflag)
  double **f = atom->f;
  int *type = atom->type;
  int nlocal = atom->nlocal;
  double *special_coul = force->special_coul;
  double *special_lj = force->special_lj;
  int newton_pair = force->newton_pair;

  inum = list->inum;
@@ -83,7 +83,7 @@ void PairYukawa::compute(int eflag, int vflag)

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

      delx = xtmp - x[j][0];
@@ -99,7 +99,7 @@ void PairYukawa::compute(int eflag, int vflag)
	screening = exp(-kappa*r);
	forceyukawa = a[itype][jtype] * screening * (kappa + rinv);

	fpair = factor_coul*forceyukawa * r2inv;
	fpair = factor*forceyukawa * r2inv;

	f[i][0] += delx*fpair;
	f[i][1] += dely*fpair;
@@ -111,12 +111,12 @@ void PairYukawa::compute(int eflag, int vflag)
	}

	if (eflag) {
	  ecoul = a[itype][jtype] * screening * rinv - offset[itype][jtype];
	  ecoul *= factor_coul;
	  evdwl = a[itype][jtype] * screening * rinv - offset[itype][jtype];
	  evdwl *= factor;
	}

	if (evflag) ev_tally(i,j,nlocal,newton_pair,
			     0.0,ecoul,fpair,delx,dely,delz);
			     evdwl,0.0,fpair,delx,dely,delz);
      }
    }
  }
@@ -309,8 +309,8 @@ double PairYukawa::single(int i, int j, int itype, int jtype, double rsq,
  rinv = 1.0/r;
  screening = exp(-kappa*r);
  forceyukawa = a[itype][jtype] * screening * (kappa + rinv);
  fforce = factor_coul*forceyukawa * r2inv;
  fforce = factor_lj*forceyukawa * r2inv;

  phi = a[itype][jtype] * screening * rinv - offset[itype][jtype];
  return factor_coul*phi;
  return factor_lj*phi;
}