Commit cc5def9f authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1722 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent bd543a2b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -441,7 +441,8 @@ double PairLJCharmmCoulCharmm::single(int i, int j, int itype, int jtype,
				      double factor_coul, double factor_lj,
				      double &fforce)
{
  double r2inv,r6inv,switch1,switch2,forcecoul,forcelj,phicoul,philj;
  double r2inv,r6inv,forcecoul,forcelj,phicoul,philj;
  double switch1,switch2;

  r2inv = 1.0/rsq;
  if (rsq < cut_coulsq) {
@@ -454,6 +455,7 @@ double PairLJCharmmCoulCharmm::single(int i, int j, int itype, int jtype,
      forcecoul *= switch1 + switch2;
    }
  } else forcecoul = 0.0;

  if (rsq < cut_ljsq) {
    r6inv = r2inv*r2inv*r2inv;
    forcelj = r6inv * (lj1[itype][jtype]*r6inv - lj2[itype][jtype]);
@@ -466,6 +468,7 @@ double PairLJCharmmCoulCharmm::single(int i, int j, int itype, int jtype,
      forcelj = forcelj*switch1 + philj*switch2;
    }
  } else forcelj = 0.0;

  fforce = (factor_coul*forcecoul + factor_lj*forcelj) * r2inv;

  double eng = 0.0;
+6 −4
Original line number Diff line number Diff line
@@ -67,8 +67,8 @@ void PairLJSmooth::compute(int eflag, int vflag)
{
  int i,j,ii,jj,inum,jnum,itype,jtype;
  double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair;
  double rsq,r2inv,r6inv,r,forcelj,factor_lj;
  double t,tsq,fskin;
  double rsq,r2inv,r6inv,forcelj,factor_lj;
  double r,t,tsq,fskin;
  int *ilist,*jlist,*numneigh,**firstneigh;
  
  evdwl = 0.0;
@@ -203,7 +203,8 @@ void PairLJSmooth::settings(int narg, char **arg)
  cut_inner_global = atof(arg[0]);
  cut_global = atof(arg[1]);

  if (cut_inner_global <= 0.0) error->all("Illegal pair_style command");
  if (cut_inner_global <= 0.0 || cut_inner_global > cut_global)
    error->all("Illegal pair_style command");

  // reset cutoffs that have been explicitly set

@@ -242,7 +243,8 @@ void PairLJSmooth::coeff(int narg, char **arg)
    cut_one = atof(arg[5]);
  }

  if (cut_inner_one <= 0.0) error->all("Incorrect args for pair coefficients");
  if (cut_inner_one <= 0.0 || cut_inner_one > cut_one)
    error->all("Incorrect args for pair coefficients");

  int count = 0;
  for (int i = ilo; i <= ihi; i++) {