Unverified Commit f685a7cc authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

fix incorrect sign bug

parent 8fb356d9
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -35,8 +35,6 @@ PairMorseSmoothLinearOMP::PairMorseSmoothLinearOMP(LAMMPS *lmp) :
  respa_enable = 0;
}



/* ---------------------------------------------------------------------- */

void PairMorseSmoothLinearOMP::compute(int eflag, int vflag)
@@ -76,8 +74,6 @@ void PairMorseSmoothLinearOMP::compute(int eflag, int vflag)
  } // end of omp parallel region
}



template <int EVFLAG, int EFLAG, int NEWTON_PAIR>
void PairMorseSmoothLinearOMP::eval(int iifrom, int iito, ThrData * const thr)
{
@@ -129,7 +125,7 @@ void PairMorseSmoothLinearOMP::eval(int iifrom, int iito, ThrData * const thr)
        dexp = exp(-alpha[itype][jtype] * dr);

        fpartial = morse1[itype][jtype] * (dexp*dexp - dexp) / r;
        fpair = factor_lj * ( fpartial - der_at_cutoff[itype][jtype] / r);
        fpair = factor_lj * ( fpartial + der_at_cutoff[itype][jtype] / r);

        fxtmp += delx*fpair;
        fytmp += dely*fpair;
@@ -143,7 +139,7 @@ void PairMorseSmoothLinearOMP::eval(int iifrom, int iito, ThrData * const thr)
        if (EFLAG) {
          evdwl = d0[itype][jtype] * (dexp*dexp - 2.0*dexp) -
                  offset[itype][jtype];
          evdwl += ( r - cut[itype][jtype] ) * der_at_cutoff[itype][jtype];
          evdwl -= ( r - cut[itype][jtype] ) * der_at_cutoff[itype][jtype];
          evdwl *= factor_lj;
        }