--- trunk/src/brains/ForceManager.cpp 2012/08/22 02:28:28 1782 +++ trunk/src/brains/ForceManager.cpp 2012/11/05 19:41:28 1809 @@ -684,6 +684,8 @@ namespace OpenMD { RealType vpair; RealType dVdFQ1(0.0); RealType dVdFQ2(0.0); + Vector3d eField1(0.0); + Vector3d eField2(0.0); potVec longRangePotential(0.0); potVec workPot(0.0); potVec exPot(0.0); @@ -700,6 +702,8 @@ namespace OpenMD { idat.vpair = &vpair; idat.dVdFQ1 = &dVdFQ1; idat.dVdFQ2 = &dVdFQ2; + idat.eField1 = &eField1; + idat.eField2 = &eField2; idat.f1 = &f1; idat.sw = &sw; idat.shiftedPot = (cutoffMethod_ == SHIFTED_POTENTIAL) ? true : false; @@ -814,10 +818,13 @@ namespace OpenMD { fij += fg; if (atomListRow.size() == 1 && atomListColumn.size() == 1) { - stressTensor -= outProduct( *(idat.d), fg); - if (doHeatFlux_) - fDecomp_->addToHeatFlux(*(idat.d) * dot(fg, vel2)); - + if (!fDecomp_->skipAtomPair(atomListRow[0], + atomListColumn[0], + cg1, cg2)) { + stressTensor -= outProduct( *(idat.d), fg); + if (doHeatFlux_) + fDecomp_->addToHeatFlux(*(idat.d) * dot(fg, vel2)); + } } for (ia = atomListRow.begin();