git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9172 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2013-01-02 16:15:05 +00:00
parent 8b0590ef6e
commit a67b94ddb7
2 changed files with 6 additions and 4 deletions

View File

@ -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 (; ineigh<ineighn; ++ineigh) { // loop over my atoms
i = *ineigh; fi = f0+3*i;
qri = qqrd2e*q[i];
memcpy(xi, x0+(i+(i<<1)), sizeof(vector));
cut_ljsqi = cut_ljsq[typei = type[i]];
lj1i = lj1[typei]; lj2i = lj2[typei];
jneighn = (jneigh = list->firstneigh[i])+list->numneigh[i];
for (; jneigh<jneighn; ++jneigh) { // loop over neighbors
j = *jneigh;
ni = sbmask(j);
@ -633,9 +632,11 @@ void PairLJLongCoulLong::compute_inner()
if ((rsq = vec_dot(d, d)) >= 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;

View File

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