fix factor 0.5 bug in lj/charmm/coul/charmm/implicit/omp

This commit is contained in:
Axel Kohlmeyer 2020-05-31 07:19:36 -04:00
parent eb60b049fc
commit f7a0f6671c
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 1 additions and 2 deletions

View File

@ -125,7 +125,6 @@ void PairLJCharmmCoulCharmmImplicitOMP::eval(int iifrom, int iito, ThrData * con
dely = ytmp - x[j].y;
delz = ztmp - x[j].z;
rsq = delx*delx + dely*dely + delz*delz;
jtype = type[j];
if (rsq < cut_bothsq) {
r2inv = 1.0/rsq;
@ -137,7 +136,7 @@ void PairLJCharmmCoulCharmmImplicitOMP::eval(int iifrom, int iito, ThrData * con
(cut_coulsq + 2.0*rsq - 3.0*cut_coul_innersq) * invdenom_coul;
switch2 = 12.0*rsq * (cut_coulsq-rsq) *
(rsq-cut_coul_innersq) * invdenom_coul;
forcecoul *= switch1 + switch2;
forcecoul *= switch1 + 0.5*switch2;
}
forcecoul *= factor_coul;
} else forcecoul = 0.0;