Commit 904609a7 authored by Markus Hoehnerbach's avatar Markus Hoehnerbach
Browse files

Fixed issue with switching function derivative in PairAIREBO::FLJ

Since we compute dvdw as d vdw / d rij, we have to also compute
dslw as d slw / d rij. Currently, we compute -1/r d slw/d rij,
which leads to incorrect results when the two are later combined.
Alternatively, one could also modify dvdw to be -1/r d vdw/d rij,
which would be a more standard way to do LJ calculations, but this
way seems more consistent.
parent fc3505fa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -753,7 +753,7 @@ void PairAIREBO::FLJ(int eflag, int vflag)
        tee = drij / swidth;
        tee2 = tee*tee;
        slw = 1.0 - tee2 * (3.0 - 2.0 * tee);
        dslw = 6.0 * tee * (1.0 - tee) / rij / swidth;
        dslw = -6.0 * tee * (1.0 - tee) / swidth;
      } else {
        slw = 1.0;
        dslw = 0.0;