From a67b94ddb7535d11f7c6a41b8ef89f5e9d3a2ea5 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Wed, 2 Jan 2013 16:15:05 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9172 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/KSPACE/pair_lj_long_coul_long.cpp | 9 +++++---- src/kspace.cpp | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/KSPACE/pair_lj_long_coul_long.cpp b/src/KSPACE/pair_lj_long_coul_long.cpp index 8f7eb79c8d..b7d5d930ff 100644 --- a/src/KSPACE/pair_lj_long_coul_long.cpp +++ b/src/KSPACE/pair_lj_long_coul_long.cpp @@ -598,9 +598,11 @@ void PairLJLongCoulLong::compute_inner() int newton_pair = force->newton_pair; double qqrd2e = force->qqrd2e; + double cut_out_on = cut_respa[0]; double cut_out_off = cut_respa[1]; + double cut_out_diff = cut_out_off - cut_out_on; double cut_out_on_sq = cut_out_on*cut_out_on; double cut_out_off_sq = cut_out_off*cut_out_off; @@ -611,15 +613,12 @@ void PairLJLongCoulLong::compute_inner() vector xi, d; ineighn = (ineigh = list->ilist)+list->inum; - for (; ineighfirstneigh[i])+list->numneigh[i]; - for (; jneigh= cut_out_off_sq) continue; r2inv = 1.0/rsq; - if (order1 && (rsq < cut_coulsq)) // coulombic + if (order1 && (rsq < cut_coulsq)) { // coulombic + qri = qqrd2e*q[i]; force_coul = ni == 0 ? qri*q[j]*sqrt(r2inv) : qri*q[j]*sqrt(r2inv)*special_coul[ni]; + } if (rsq < cut_ljsqi[typej = type[j]]) { // lennard-jones register double rn = r2inv*r2inv*r2inv; diff --git a/src/kspace.cpp b/src/kspace.cpp index 0642e519b1..9cbe1c71cd 100644 --- a/src/kspace.cpp +++ b/src/kspace.cpp @@ -316,6 +316,7 @@ void KSpace::modify_params(int narg, char **arg) } else if (strcmp(arg[iarg],"order/disp") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal kspace_modify command"); order_6 = atoi(arg[iarg+1]); + iarg += 2; } else if (strcmp(arg[iarg],"minorder") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal kspace_modify command"); minorder = atoi(arg[iarg+1]);