git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14745 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -243,15 +243,14 @@ compute_fcoul(const F_FLOAT& rsq, const int& i, const int&j,
|
||||
|
||||
const F_FLOAT r2inv = 1.0/rsq;
|
||||
const F_FLOAT rinv = sqrt(r2inv);
|
||||
F_FLOAT forcecoul, switch1, switch2;
|
||||
F_FLOAT forcecoul, switch1;
|
||||
|
||||
forcecoul = qqrd2e*qtmp*q(j) *rinv;
|
||||
|
||||
if (rsq > cut_coul_innersq) {
|
||||
switch1 = (cut_coulsq-rsq) * (cut_coulsq-rsq) *
|
||||
(cut_coulsq + 2.0*rsq - 3.0*cut_coul_innersq) / denom_coul;
|
||||
switch2 = 12.0*rsq * (cut_coulsq-rsq) * (rsq-cut_coul_innersq) / denom_coul;
|
||||
forcecoul *= switch1 + switch2;
|
||||
forcecoul *= switch1;
|
||||
}
|
||||
|
||||
return forcecoul * r2inv * factor_coul;
|
||||
|
||||
@ -125,9 +125,7 @@ void PairLJCharmmCoulCharmm::compute(int eflag, int vflag)
|
||||
if (rsq > cut_coul_innersq) {
|
||||
switch1 = (cut_coulsq-rsq) * (cut_coulsq-rsq) *
|
||||
(cut_coulsq + 2.0*rsq - 3.0*cut_coul_innersq) / denom_coul;
|
||||
switch2 = 12.0*rsq * (cut_coulsq-rsq) *
|
||||
(rsq-cut_coul_innersq) / denom_coul;
|
||||
forcecoul *= switch1 + switch2;
|
||||
forcecoul *= switch1;
|
||||
}
|
||||
} else forcecoul = 0.0;
|
||||
|
||||
@ -470,9 +468,7 @@ double PairLJCharmmCoulCharmm::single(int i, int j, int itype, int jtype,
|
||||
if (rsq > cut_coul_innersq) {
|
||||
switch1 = (cut_coulsq-rsq) * (cut_coulsq-rsq) *
|
||||
(cut_coulsq + 2.0*rsq - 3.0*cut_coul_innersq) / denom_coul;
|
||||
switch2 = 12.0*rsq * (cut_coulsq-rsq) *
|
||||
(rsq-cut_coul_innersq) / denom_coul;
|
||||
forcecoul *= switch1 + switch2;
|
||||
forcecoul *= switch1;
|
||||
}
|
||||
} else forcecoul = 0.0;
|
||||
|
||||
|
||||
@ -136,9 +136,7 @@ void PairLJCharmmCoulCharmmOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
if (rsq > cut_coul_innersq) {
|
||||
switch1 = (cut_coulsq-rsq) * (cut_coulsq-rsq) *
|
||||
(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;
|
||||
}
|
||||
forcecoul *= factor_coul;
|
||||
} else forcecoul = 0.0;
|
||||
|
||||
Reference in New Issue
Block a user