--- trunk/src/brains/ForceManager.cpp 2014/10/31 18:40:40 2031 +++ trunk/src/brains/ForceManager.cpp 2014/11/01 14:12:16 2033 @@ -394,9 +394,6 @@ namespace OpenMD { switcher_->setSwitch(rSwitch_, rCut_); } - - - void ForceManager::initialize() { if (!info_->isTopologyDone()) { @@ -741,7 +738,8 @@ namespace OpenMD { idat.f1 = &f1; idat.sw = &sw; idat.shiftedPot = (cutoffMethod_ == SHIFTED_POTENTIAL) ? true : false; - idat.shiftedForce = (cutoffMethod_ == SHIFTED_FORCE || cutoffMethod_ == TAYLOR_SHIFTED) ? true : false; + idat.shiftedForce = (cutoffMethod_ == SHIFTED_FORCE || + cutoffMethod_ == TAYLOR_SHIFTED) ? true : false; idat.doParticlePot = doParticlePot_; idat.doElectricField = doElectricField_; idat.doSitePotential = doSitePotential_; @@ -765,7 +763,7 @@ namespace OpenMD { } for (vector >::iterator it = neighborList_.begin(); - it != neighborList_.end(); ++it) { + it != neighborList_.end(); ++it) { cg1 = (*it).first; cg2 = (*it).second; @@ -843,20 +841,6 @@ namespace OpenMD { } else { interactionMan_->doPair(idat); fDecomp_->unpackInteractionData(idat, atom1, atom2); - /* - if(atom1 == 971){ - cerr << "972: " << *(idat.dVdFQ1) << "\n"; - } - if(atom2 == 971){ - cerr << "972: " << *(idat.dVdFQ2) << "\n"; - } - if(atom1 == 766){ - cerr << "767: " << *(idat.dVdFQ1) << "\n"; - } - if(atom2 == 766){ - cerr << "767: " << *(idat.dVdFQ2) << "\n"; - } - */ vij += vpair; fij += f1; stressTensor -= outProduct( *(idat.d), f1); @@ -959,17 +943,7 @@ namespace OpenMD { if (info_->requiresSelfCorrection()) { for (unsigned int atom1 = 0; atom1 < info_->getNAtoms(); atom1++) { fDecomp_->fillSelfData(sdat, atom1); - /* - if(atom1 == 971 || atom1 == 766 || atom1 == 898){ - cout << "atom id: " << atom1 << "\tsdat.dVdFQ: " << *(sdat.dVdFQ) << "\n"; - } - */ interactionMan_->doSelfCorrection(sdat); - /* - if(atom1 == 971 || atom1 == 766 || atom1 == 898){ - cout << "\tsdat.dVdFQ: " << *(sdat.dVdFQ) << "\n"; - } - */ } } @@ -982,7 +956,7 @@ namespace OpenMD { curSnapshot->setLongRangePotential(longRangePotential); curSnapshot->setExcludedPotentials(*(fDecomp_->getExcludedSelfPotential()) + - *(fDecomp_->getExcludedPotential())); + *(fDecomp_->getExcludedPotential())); } @@ -1018,37 +992,37 @@ namespace OpenMD { if (info_->getSimParams()->getUseLongRangeCorrections()) { /* - RealType vol = curSnapshot->getVolume(); - RealType Elrc(0.0); - RealType Wlrc(0.0); + RealType vol = curSnapshot->getVolume(); + RealType Elrc(0.0); + RealType Wlrc(0.0); - set::iterator i; - set::iterator j; + set::iterator i; + set::iterator j; - RealType n_i, n_j; - RealType rho_i, rho_j; - pair LRI; + RealType n_i, n_j; + RealType rho_i, rho_j; + pair LRI; - for (i = atomTypes_.begin(); i != atomTypes_.end(); ++i) { + for (i = atomTypes_.begin(); i != atomTypes_.end(); ++i) { n_i = RealType(info_->getGlobalCountOfType(*i)); rho_i = n_i / vol; for (j = atomTypes_.begin(); j != atomTypes_.end(); ++j) { - n_j = RealType(info_->getGlobalCountOfType(*j)); - rho_j = n_j / vol; + n_j = RealType(info_->getGlobalCountOfType(*j)); + rho_j = n_j / vol; - LRI = interactionMan_->getLongRangeIntegrals( (*i), (*j) ); + LRI = interactionMan_->getLongRangeIntegrals( (*i), (*j) ); - Elrc += n_i * rho_j * LRI.first; - Wlrc -= rho_i * rho_j * LRI.second; + Elrc += n_i * rho_j * LRI.first; + Wlrc -= rho_i * rho_j * LRI.second; } - } - Elrc *= 2.0 * NumericConstant::PI; - Wlrc *= 2.0 * NumericConstant::PI; + } + Elrc *= 2.0 * NumericConstant::PI; + Wlrc *= 2.0 * NumericConstant::PI; - RealType lrp = curSnapshot->getLongRangePotential(); - curSnapshot->setLongRangePotential(lrp + Elrc); - stressTensor += Wlrc * SquareMatrix3::identity(); - curSnapshot->setStressTensor(stressTensor); + RealType lrp = curSnapshot->getLongRangePotential(); + curSnapshot->setLongRangePotential(lrp + Elrc); + stressTensor += Wlrc * SquareMatrix3::identity(); + curSnapshot->setStressTensor(stressTensor); */ }