fix whitespace (again)
This commit is contained in:
@ -406,7 +406,7 @@ int ComputePropertyLocal::count_pairs(int allflag, int forceflag)
|
||||
|
||||
// itag = jtag is possible for long cutoffs that include images of self
|
||||
// do not need triclinic logic here b/c neighbor list itself is correct
|
||||
|
||||
|
||||
if (newton_pair == 0 && j >= nlocal) {
|
||||
jtag = tag[j];
|
||||
if (itag > jtag) {
|
||||
|
||||
@ -88,28 +88,28 @@ void NPairHalfBinNewtonTri::build(NeighList *list)
|
||||
// cannot use I/J exact coord comparision
|
||||
// b/c transforming orthog -> lambda -> orthog for ghost atoms
|
||||
// with an added PBC offset can shift all 3 coords by epsilon
|
||||
|
||||
|
||||
ibin = atom2bin[i];
|
||||
for (k = 0; k < nstencil; k++) {
|
||||
for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) {
|
||||
|
||||
if (j <= i) continue;
|
||||
if (j >= nlocal) {
|
||||
jtag = tag[j];
|
||||
if (itag > jtag) {
|
||||
if ((itag+jtag) % 2 == 0) continue;
|
||||
} else if (itag < jtag) {
|
||||
if ((itag+jtag) % 2 == 1) continue;
|
||||
} else {
|
||||
if (fabs(x[j][2]-ztmp) > delta) {
|
||||
if (x[j][2] < ztmp) continue;
|
||||
} else if (fabs(x[j][1]-ytmp) > delta) {
|
||||
if (x[j][1] < ytmp) continue;
|
||||
} else {
|
||||
if (x[j][0] < xtmp) continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (j <= i) continue;
|
||||
if (j >= nlocal) {
|
||||
jtag = tag[j];
|
||||
if (itag > jtag) {
|
||||
if ((itag+jtag) % 2 == 0) continue;
|
||||
} else if (itag < jtag) {
|
||||
if ((itag+jtag) % 2 == 1) continue;
|
||||
} else {
|
||||
if (fabs(x[j][2]-ztmp) > delta) {
|
||||
if (x[j][2] < ztmp) continue;
|
||||
} else if (fabs(x[j][1]-ytmp) > delta) {
|
||||
if (x[j][1] < ytmp) continue;
|
||||
} else {
|
||||
if (x[j][0] < xtmp) continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
jtype = type[j];
|
||||
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
||||
|
||||
@ -91,11 +91,11 @@ void NPairHalfMultiNewtonTri::build(NeighList *list)
|
||||
ibin = atom2bin[i];
|
||||
|
||||
// loop through stencils for all collections
|
||||
|
||||
|
||||
for (jcollection = 0; jcollection < ncollections; jcollection++) {
|
||||
|
||||
// if same collection use own bin
|
||||
|
||||
|
||||
if (icollection == jcollection) jbin = ibin;
|
||||
else jbin = coord2bin(x[i], jcollection);
|
||||
|
||||
@ -109,60 +109,60 @@ void NPairHalfMultiNewtonTri::build(NeighList *list)
|
||||
// cannot use I/J exact coord comparision
|
||||
// b/c transforming orthog -> lambda -> orthog for ghost atoms
|
||||
// with an added PBC offset can shift all 3 coords by epsilon
|
||||
|
||||
|
||||
s = stencil_multi[icollection][jcollection];
|
||||
ns = nstencil_multi[icollection][jcollection];
|
||||
|
||||
for (k = 0; k < ns; k++) {
|
||||
js = binhead_multi[jcollection][jbin + s[k]];
|
||||
for (j = js; j >= 0; j = bins[j]) {
|
||||
|
||||
// if same size (same collection), exclude half of interactions
|
||||
|
||||
if (cutcollectionsq[icollection][icollection] ==
|
||||
cutcollectionsq[jcollection][jcollection]) {
|
||||
if (j >= nlocal) {
|
||||
jtag = tag[j];
|
||||
if (itag > jtag) {
|
||||
if ((itag+jtag) % 2 == 0) continue;
|
||||
} else if (itag < jtag) {
|
||||
if ((itag+jtag) % 2 == 1) continue;
|
||||
} else {
|
||||
if (fabs(x[j][2]-ztmp) > delta) {
|
||||
if (x[j][2] < ztmp) continue;
|
||||
} else if (fabs(x[j][1]-ytmp) > delta) {
|
||||
if (x[j][1] < ytmp) continue;
|
||||
} else {
|
||||
if (x[j][0] < xtmp) continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
js = binhead_multi[jcollection][jbin + s[k]];
|
||||
for (j = js; j >= 0; j = bins[j]) {
|
||||
|
||||
jtype = type[j];
|
||||
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
||||
// if same size (same collection), exclude half of interactions
|
||||
|
||||
delx = xtmp - x[j][0];
|
||||
dely = ytmp - x[j][1];
|
||||
delz = ztmp - x[j][2];
|
||||
rsq = delx*delx + dely*dely + delz*delz;
|
||||
if (cutcollectionsq[icollection][icollection] ==
|
||||
cutcollectionsq[jcollection][jcollection]) {
|
||||
if (j >= nlocal) {
|
||||
jtag = tag[j];
|
||||
if (itag > jtag) {
|
||||
if ((itag+jtag) % 2 == 0) continue;
|
||||
} else if (itag < jtag) {
|
||||
if ((itag+jtag) % 2 == 1) continue;
|
||||
} else {
|
||||
if (fabs(x[j][2]-ztmp) > delta) {
|
||||
if (x[j][2] < ztmp) continue;
|
||||
} else if (fabs(x[j][1]-ytmp) > delta) {
|
||||
if (x[j][1] < ytmp) continue;
|
||||
} else {
|
||||
if (x[j][0] < xtmp) continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (rsq <= cutneighsq[itype][jtype]) {
|
||||
if (molecular != Atom::ATOMIC) {
|
||||
if (!moltemplate)
|
||||
which = find_special(special[i],nspecial[i],tag[j]);
|
||||
else if (imol >= 0)
|
||||
which = find_special(onemols[imol]->special[iatom],
|
||||
onemols[imol]->nspecial[iatom],
|
||||
tag[j]-tagprev);
|
||||
else which = 0;
|
||||
if (which == 0) neighptr[n++] = j;
|
||||
else if (domain->minimum_image_check(delx,dely,delz))
|
||||
neighptr[n++] = j;
|
||||
else if (which > 0) neighptr[n++] = j ^ (which << SBBITS);
|
||||
} else neighptr[n++] = j;
|
||||
}
|
||||
}
|
||||
jtype = type[j];
|
||||
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
||||
|
||||
delx = xtmp - x[j][0];
|
||||
dely = ytmp - x[j][1];
|
||||
delz = ztmp - x[j][2];
|
||||
rsq = delx*delx + dely*dely + delz*delz;
|
||||
|
||||
if (rsq <= cutneighsq[itype][jtype]) {
|
||||
if (molecular != Atom::ATOMIC) {
|
||||
if (!moltemplate)
|
||||
which = find_special(special[i],nspecial[i],tag[j]);
|
||||
else if (imol >= 0)
|
||||
which = find_special(onemols[imol]->special[iatom],
|
||||
onemols[imol]->nspecial[iatom],
|
||||
tag[j]-tagprev);
|
||||
else which = 0;
|
||||
if (which == 0) neighptr[n++] = j;
|
||||
else if (domain->minimum_image_check(delx,dely,delz))
|
||||
neighptr[n++] = j;
|
||||
else if (which > 0) neighptr[n++] = j ^ (which << SBBITS);
|
||||
} else neighptr[n++] = j;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -102,22 +102,22 @@ void NPairHalfMultiOldNewtonTri::build(NeighList *list)
|
||||
jtype = type[j];
|
||||
if (cutsq[jtype] < distsq[k]) continue;
|
||||
|
||||
if (j >= nlocal) {
|
||||
jtag = tag[j];
|
||||
if (itag > jtag) {
|
||||
if ((itag+jtag) % 2 == 0) continue;
|
||||
} else if (itag < jtag) {
|
||||
if ((itag+jtag) % 2 == 1) continue;
|
||||
} else {
|
||||
if (fabs(x[j][2]-ztmp) > delta) {
|
||||
if (x[j][2] < ztmp) continue;
|
||||
} else if (fabs(x[j][1]-ytmp) > delta) {
|
||||
if (x[j][1] < ytmp) continue;
|
||||
} else {
|
||||
if (x[j][0] < xtmp) continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (j >= nlocal) {
|
||||
jtag = tag[j];
|
||||
if (itag > jtag) {
|
||||
if ((itag+jtag) % 2 == 0) continue;
|
||||
} else if (itag < jtag) {
|
||||
if ((itag+jtag) % 2 == 1) continue;
|
||||
} else {
|
||||
if (fabs(x[j][2]-ztmp) > delta) {
|
||||
if (x[j][2] < ztmp) continue;
|
||||
} else if (fabs(x[j][1]-ytmp) > delta) {
|
||||
if (x[j][1] < ytmp) continue;
|
||||
} else {
|
||||
if (x[j][0] < xtmp) continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
||||
|
||||
|
||||
@ -118,24 +118,24 @@ void NPairHalfRespaBinNewtonTri::build(NeighList *list)
|
||||
ibin = atom2bin[i];
|
||||
for (k = 0; k < nstencil; k++) {
|
||||
for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) {
|
||||
|
||||
if (j <= i) continue;
|
||||
if (j >= nlocal) {
|
||||
jtag = tag[j];
|
||||
if (itag > jtag) {
|
||||
if ((itag+jtag) % 2 == 0) continue;
|
||||
} else if (itag < jtag) {
|
||||
if ((itag+jtag) % 2 == 1) continue;
|
||||
} else {
|
||||
if (fabs(x[j][2]-ztmp) > delta) {
|
||||
if (x[j][2] < ztmp) continue;
|
||||
} else if (fabs(x[j][1]-ytmp) > delta) {
|
||||
if (x[j][1] < ytmp) continue;
|
||||
} else {
|
||||
if (x[j][0] < xtmp) continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (j <= i) continue;
|
||||
if (j >= nlocal) {
|
||||
jtag = tag[j];
|
||||
if (itag > jtag) {
|
||||
if ((itag+jtag) % 2 == 0) continue;
|
||||
} else if (itag < jtag) {
|
||||
if ((itag+jtag) % 2 == 1) continue;
|
||||
} else {
|
||||
if (fabs(x[j][2]-ztmp) > delta) {
|
||||
if (x[j][2] < ztmp) continue;
|
||||
} else if (fabs(x[j][1]-ytmp) > delta) {
|
||||
if (x[j][1] < ytmp) continue;
|
||||
} else {
|
||||
if (x[j][0] < xtmp) continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
jtype = type[j];
|
||||
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
||||
|
||||
@ -101,23 +101,23 @@ void NPairHalfSizeBinNewtonTri::build(NeighList *list)
|
||||
for (k = 0; k < nstencil; k++) {
|
||||
for (j = binhead[ibin+stencil[k]]; j >= 0; j = bins[j]) {
|
||||
|
||||
if (j <= i) continue;
|
||||
if (j >= nlocal) {
|
||||
jtag = tag[j];
|
||||
if (itag > jtag) {
|
||||
if ((itag+jtag) % 2 == 0) continue;
|
||||
} else if (itag < jtag) {
|
||||
if ((itag+jtag) % 2 == 1) continue;
|
||||
} else {
|
||||
if (fabs(x[j][2]-ztmp) > delta) {
|
||||
if (x[j][2] < ztmp) continue;
|
||||
} else if (fabs(x[j][1]-ytmp) > delta) {
|
||||
if (x[j][1] < ytmp) continue;
|
||||
} else {
|
||||
if (x[j][0] < xtmp) continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (j <= i) continue;
|
||||
if (j >= nlocal) {
|
||||
jtag = tag[j];
|
||||
if (itag > jtag) {
|
||||
if ((itag+jtag) % 2 == 0) continue;
|
||||
} else if (itag < jtag) {
|
||||
if ((itag+jtag) % 2 == 1) continue;
|
||||
} else {
|
||||
if (fabs(x[j][2]-ztmp) > delta) {
|
||||
if (x[j][2] < ztmp) continue;
|
||||
} else if (fabs(x[j][1]-ytmp) > delta) {
|
||||
if (x[j][1] < ytmp) continue;
|
||||
} else {
|
||||
if (x[j][0] < xtmp) continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (exclude && exclusion(i,j,type[i],type[j],mask,molecule)) continue;
|
||||
|
||||
|
||||
@ -98,11 +98,11 @@ void NPairHalfSizeMultiNewtonTri::build(NeighList *list)
|
||||
ibin = atom2bin[i];
|
||||
|
||||
// loop through stencils for all collections
|
||||
|
||||
|
||||
for (jcollection = 0; jcollection < ncollections; jcollection++) {
|
||||
|
||||
// if same collection use own bin
|
||||
|
||||
|
||||
if (icollection == jcollection) jbin = ibin;
|
||||
else jbin = coord2bin(x[i], jcollection);
|
||||
|
||||
@ -119,61 +119,61 @@ void NPairHalfSizeMultiNewtonTri::build(NeighList *list)
|
||||
ns = nstencil_multi[icollection][jcollection];
|
||||
|
||||
for (k = 0; k < ns; k++) {
|
||||
js = binhead_multi[jcollection][jbin + s[k]];
|
||||
for (j = js; j >= 0; j = bins[j]) {
|
||||
js = binhead_multi[jcollection][jbin + s[k]];
|
||||
for (j = js; j >= 0; j = bins[j]) {
|
||||
|
||||
// if same size (same collection), exclude half of interactions
|
||||
|
||||
// if same size (same collection), exclude half of interactions
|
||||
|
||||
if (cutcollectionsq[icollection][icollection] ==
|
||||
cutcollectionsq[jcollection][jcollection]) {
|
||||
if (j >= nlocal) {
|
||||
jtag = tag[j];
|
||||
if (itag > jtag) {
|
||||
if ((itag+jtag) % 2 == 0) continue;
|
||||
} else if (itag < jtag) {
|
||||
if ((itag+jtag) % 2 == 1) continue;
|
||||
} else {
|
||||
if (fabs(x[j][2]-ztmp) > delta) {
|
||||
if (x[j][2] < ztmp) continue;
|
||||
} else if (fabs(x[j][1]-ytmp) > delta) {
|
||||
if (x[j][1] < ytmp) continue;
|
||||
} else {
|
||||
if (x[j][0] < xtmp) continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
cutcollectionsq[jcollection][jcollection]) {
|
||||
if (j >= nlocal) {
|
||||
jtag = tag[j];
|
||||
if (itag > jtag) {
|
||||
if ((itag+jtag) % 2 == 0) continue;
|
||||
} else if (itag < jtag) {
|
||||
if ((itag+jtag) % 2 == 1) continue;
|
||||
} else {
|
||||
if (fabs(x[j][2]-ztmp) > delta) {
|
||||
if (x[j][2] < ztmp) continue;
|
||||
} else if (fabs(x[j][1]-ytmp) > delta) {
|
||||
if (x[j][1] < ytmp) continue;
|
||||
} else {
|
||||
if (x[j][0] < xtmp) continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
jtype = type[j];
|
||||
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
||||
|
||||
delx = xtmp - x[j][0];
|
||||
dely = ytmp - x[j][1];
|
||||
delz = ztmp - x[j][2];
|
||||
rsq = delx*delx + dely*dely + delz*delz;
|
||||
radsum = radi + radius[j];
|
||||
cutdistsq = (radsum+skin) * (radsum+skin);
|
||||
|
||||
if (rsq <= cutdistsq) {
|
||||
jh = j;
|
||||
if (history && rsq < radsum*radsum)
|
||||
jh = jh ^ mask_history;
|
||||
|
||||
if (molecular != Atom::ATOMIC) {
|
||||
if (!moltemplate)
|
||||
which = find_special(special[i],nspecial[i],tag[j]);
|
||||
else if (imol >= 0)
|
||||
which = find_special(onemols[imol]->special[iatom],
|
||||
onemols[imol]->nspecial[iatom],
|
||||
tag[j]-tagprev);
|
||||
else which = 0;
|
||||
if (which == 0) neighptr[n++] = jh;
|
||||
else if (domain->minimum_image_check(delx,dely,delz))
|
||||
neighptr[n++] = jh;
|
||||
else if (which > 0) neighptr[n++] = jh ^ (which << SBBITS);
|
||||
} else neighptr[n++] = jh;
|
||||
}
|
||||
}
|
||||
delx = xtmp - x[j][0];
|
||||
dely = ytmp - x[j][1];
|
||||
delz = ztmp - x[j][2];
|
||||
rsq = delx*delx + dely*dely + delz*delz;
|
||||
radsum = radi + radius[j];
|
||||
cutdistsq = (radsum+skin) * (radsum+skin);
|
||||
|
||||
if (rsq <= cutdistsq) {
|
||||
jh = j;
|
||||
if (history && rsq < radsum*radsum)
|
||||
jh = jh ^ mask_history;
|
||||
|
||||
if (molecular != Atom::ATOMIC) {
|
||||
if (!moltemplate)
|
||||
which = find_special(special[i],nspecial[i],tag[j]);
|
||||
else if (imol >= 0)
|
||||
which = find_special(onemols[imol]->special[iatom],
|
||||
onemols[imol]->nspecial[iatom],
|
||||
tag[j]-tagprev);
|
||||
else which = 0;
|
||||
if (which == 0) neighptr[n++] = jh;
|
||||
else if (domain->minimum_image_check(delx,dely,delz))
|
||||
neighptr[n++] = jh;
|
||||
else if (which > 0) neighptr[n++] = jh ^ (which << SBBITS);
|
||||
} else neighptr[n++] = jh;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -108,23 +108,23 @@ void NPairHalfSizeMultiOldNewtonTri::build(NeighList *list)
|
||||
jtype = type[j];
|
||||
if (cutsq[jtype] < distsq[k]) continue;
|
||||
|
||||
if (j <= i) continue;
|
||||
if (j >= nlocal) {
|
||||
jtag = tag[j];
|
||||
if (itag > jtag) {
|
||||
if ((itag+jtag) % 2 == 0) continue;
|
||||
} else if (itag < jtag) {
|
||||
if ((itag+jtag) % 2 == 1) continue;
|
||||
} else {
|
||||
if (fabs(x[j][2]-ztmp) > delta) {
|
||||
if (x[j][2] < ztmp) continue;
|
||||
} else if (fabs(x[j][1]-ytmp) > delta) {
|
||||
if (x[j][1] < ytmp) continue;
|
||||
} else {
|
||||
if (x[j][0] < xtmp) continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (j <= i) continue;
|
||||
if (j >= nlocal) {
|
||||
jtag = tag[j];
|
||||
if (itag > jtag) {
|
||||
if ((itag+jtag) % 2 == 0) continue;
|
||||
} else if (itag < jtag) {
|
||||
if ((itag+jtag) % 2 == 1) continue;
|
||||
} else {
|
||||
if (fabs(x[j][2]-ztmp) > delta) {
|
||||
if (x[j][2] < ztmp) continue;
|
||||
} else if (fabs(x[j][1]-ytmp) > delta) {
|
||||
if (x[j][1] < ytmp) continue;
|
||||
} else {
|
||||
if (x[j][0] < xtmp) continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ void NPairHalffullNewtonTrim::build(NeighList *list)
|
||||
for (jj = 0; jj < jnum; jj++) {
|
||||
joriginal = jlist[jj];
|
||||
j = joriginal & NEIGHMASK;
|
||||
|
||||
|
||||
if (j < nlocal) {
|
||||
if (i > j) continue;
|
||||
} else if (triclinic) {
|
||||
|
||||
@ -33,7 +33,7 @@ void NStencilHalfBin3dTri::create()
|
||||
// with an added PBC offset can shift all 3 coords by epsilon
|
||||
// thus for an I/J owned/ghost pair, the xyz coords
|
||||
// and bin assignments can be different on I proc vs J proc
|
||||
|
||||
|
||||
nstencil = 0;
|
||||
|
||||
for (k = -sz; k <= sz; k++)
|
||||
|
||||
Reference in New Issue
Block a user