Commit 7d858516 authored by athomps's avatar athomps
Browse files

Fixed error in lj/gromacs

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6818 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent d0efe701
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -134,9 +134,9 @@ void PairLJGromacs::compute(int eflag, int vflag)

	if (eflag) {
	  evdwl = r6inv * (lj3[itype][jtype]*r6inv - lj4[itype][jtype]); 
	  evdwl += ljsw5[itype][jtype];
          if (rsq > cut_inner_sq[itype][jtype]) {
            eswitch = t*t*t*(ljsw3[itype][jtype] + ljsw4[itype][jtype]*t) + 
	      ljsw5[itype][jtype];
            eswitch = t*t*t*(ljsw3[itype][jtype] + ljsw4[itype][jtype]*t);
            evdwl += eswitch;
          }
	  evdwl *= factor_lj;
@@ -410,9 +410,9 @@ double PairLJGromacs::single(int i, int j, int itype, int jtype,
  fforce = factor_lj*forcelj*r2inv;

  philj = r6inv * (lj3[itype][jtype]*r6inv - lj4[itype][jtype]);
  philj += ljsw5[itype][jtype];
  if (rsq > cut_inner_sq[itype][jtype]) {
    phiswitch = t*t*t*(ljsw3[itype][jtype] + ljsw4[itype][jtype]*t) + 
      ljsw5[itype][jtype];
    phiswitch = t*t*t*(ljsw3[itype][jtype] + ljsw4[itype][jtype]*t);
    philj += phiswitch;
  }

+4 −4
Original line number Diff line number Diff line
@@ -162,10 +162,10 @@ void PairLJGromacsCoulGromacs::compute(int eflag, int vflag)
	  } else ecoul = 0.0;
	  if (rsq < cut_ljsq) {
	    evdwl = r6inv * (lj3[itype][jtype]*r6inv - lj4[itype][jtype]);
	    evdwl += ljsw5[itype][jtype];
            if (rsq > cut_lj_innersq) {
              eswitch = tlj*tlj*tlj * 
	      (ljsw3[itype][jtype] + ljsw4[itype][jtype]*tlj) +
	      ljsw5[itype][jtype];
		(ljsw3[itype][jtype] + ljsw4[itype][jtype]*tlj);
              evdwl += eswitch;
            }
	    evdwl *= factor_lj;
@@ -474,10 +474,10 @@ double PairLJGromacsCoulGromacs::single(int i, int j, int itype, int jtype,

  if (rsq < cut_ljsq) {
    philj = r6inv * (lj3[itype][jtype]*r6inv - lj4[itype][jtype]);
    philj += ljsw5[itype][jtype];
    if (rsq > cut_lj_innersq) {
      phiswitch = tlj*tlj*tlj * 
	(ljsw3[itype][jtype] + ljsw4[itype][jtype]*tlj) +
	ljsw5[itype][jtype];
	(ljsw3[itype][jtype] + ljsw4[itype][jtype]*tlj);
      philj += phiswitch;
    }
    eng += factor_lj*philj;