Fixed error in lj/gromacs

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6818 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
athomps 2011-08-26 00:17:54 +00:00
parent d0efe70181
commit 7d85851607
2 changed files with 8 additions and 8 deletions

View File

@ -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;
}

View File

@ -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;