695 |
|
RealType vij; |
696 |
|
Vector3d fij, fg, f1; |
697 |
|
tuple3<RealType, RealType, RealType> cuts; |
698 |
< |
RealType rCutSq; |
698 |
> |
RealType rCut, rCutSq, rListSq; |
699 |
|
bool in_switching_region; |
700 |
|
RealType sw, dswdr, swderiv; |
701 |
|
vector<int> atomListColumn, atomListRow; |
713 |
|
vector<int>::iterator ia, jb; |
714 |
|
|
715 |
|
int loopStart, loopEnd; |
716 |
< |
|
716 |
> |
|
717 |
> |
idat.rcut = &rCut; |
718 |
|
idat.vdwMult = &vdwMult; |
719 |
|
idat.electroMult = &electroMult; |
720 |
|
idat.pot = &workPot; |
747 |
|
if (update_nlist) { |
748 |
|
if (!usePeriodicBoundaryConditions_) |
749 |
|
Mat3x3d bbox = thermo->getBoundingBox(); |
750 |
< |
neighborList = fDecomp_->buildNeighborList(); |
750 |
> |
fDecomp_->buildNeighborList(neighborList_); |
751 |
|
} |
752 |
|
} |
753 |
|
|
754 |
< |
for (vector<pair<int, int> >::iterator it = neighborList.begin(); |
755 |
< |
it != neighborList.end(); ++it) { |
754 |
> |
for (vector<pair<int, int> >::iterator it = neighborList_.begin(); |
755 |
> |
it != neighborList_.end(); ++it) { |
756 |
|
|
757 |
|
cg1 = (*it).first; |
758 |
|
cg2 = (*it).second; |
759 |
|
|
760 |
< |
cuts = fDecomp_->getGroupCutoffs(cg1, cg2); |
760 |
> |
fDecomp_->getGroupCutoffs(cg1, cg2, rCut, rCutSq, rListSq); |
761 |
|
|
762 |
|
d_grp = fDecomp_->getIntergroupVector(cg1, cg2); |
763 |
|
|
764 |
< |
curSnapshot->wrapVector(d_grp); |
764 |
> |
// already wrapped in the getIntergroupVector call: |
765 |
> |
// curSnapshot->wrapVector(d_grp); |
766 |
|
rgrpsq = d_grp.lengthSquare(); |
765 |
– |
rCutSq = cuts.second; |
767 |
|
|
768 |
|
if (rgrpsq < rCutSq) { |
769 |
< |
idat.rcut = &cuts.first; |
769 |
> |
|
770 |
|
if (iLoop == PAIR_LOOP) { |
771 |
|
vij = 0.0; |
772 |
|
fij.zero(); |