| 393 | 
  | 
    switcher_->setSwitchType(sft_); | 
| 394 | 
  | 
    switcher_->setSwitch(rSwitch_, rCut_); | 
| 395 | 
  | 
  } | 
| 396 | 
– | 
 | 
| 397 | 
– | 
 | 
| 396 | 
  | 
 | 
| 399 | 
– | 
   | 
| 397 | 
  | 
  void ForceManager::initialize() { | 
| 398 | 
  | 
 | 
| 399 | 
  | 
    if (!info_->isTopologyDone()) { | 
| 738 | 
  | 
    idat.f1 = &f1; | 
| 739 | 
  | 
    idat.sw = &sw; | 
| 740 | 
  | 
    idat.shiftedPot = (cutoffMethod_ == SHIFTED_POTENTIAL) ? true : false; | 
| 741 | 
< | 
    idat.shiftedForce = (cutoffMethod_ == SHIFTED_FORCE || cutoffMethod_ == TAYLOR_SHIFTED) ? true : false; | 
| 741 | 
> | 
    idat.shiftedForce = (cutoffMethod_ == SHIFTED_FORCE || | 
| 742 | 
> | 
                         cutoffMethod_ == TAYLOR_SHIFTED) ? true : false; | 
| 743 | 
  | 
    idat.doParticlePot = doParticlePot_; | 
| 744 | 
  | 
    idat.doElectricField = doElectricField_; | 
| 745 | 
  | 
    idat.doSitePotential = doSitePotential_; | 
| 763 | 
  | 
      } | 
| 764 | 
  | 
 | 
| 765 | 
  | 
      for (vector<pair<int, int> >::iterator it = neighborList_.begin();  | 
| 766 | 
< | 
             it != neighborList_.end(); ++it) { | 
| 766 | 
> | 
           it != neighborList_.end(); ++it) { | 
| 767 | 
  | 
                 | 
| 768 | 
  | 
        cg1 = (*it).first; | 
| 769 | 
  | 
        cg2 = (*it).second; | 
| 956 | 
  | 
    curSnapshot->setLongRangePotential(longRangePotential); | 
| 957 | 
  | 
     | 
| 958 | 
  | 
    curSnapshot->setExcludedPotentials(*(fDecomp_->getExcludedSelfPotential()) + | 
| 959 | 
< | 
                                         *(fDecomp_->getExcludedPotential())); | 
| 959 | 
> | 
                                       *(fDecomp_->getExcludedPotential())); | 
| 960 | 
  | 
 | 
| 961 | 
  | 
  } | 
| 962 | 
  | 
 | 
| 992 | 
  | 
     | 
| 993 | 
  | 
    if (info_->getSimParams()->getUseLongRangeCorrections()) { | 
| 994 | 
  | 
      /* | 
| 995 | 
< | 
      RealType vol = curSnapshot->getVolume(); | 
| 996 | 
< | 
      RealType Elrc(0.0); | 
| 997 | 
< | 
      RealType Wlrc(0.0); | 
| 998 | 
< | 
 | 
| 999 | 
< | 
      set<AtomType*>::iterator i; | 
| 1000 | 
< | 
      set<AtomType*>::iterator j; | 
| 995 | 
> | 
        RealType vol = curSnapshot->getVolume(); | 
| 996 | 
> | 
        RealType Elrc(0.0); | 
| 997 | 
> | 
        RealType Wlrc(0.0); | 
| 998 | 
> | 
 | 
| 999 | 
> | 
        set<AtomType*>::iterator i; | 
| 1000 | 
> | 
        set<AtomType*>::iterator j; | 
| 1001 | 
  | 
     | 
| 1002 | 
< | 
      RealType n_i, n_j; | 
| 1003 | 
< | 
      RealType rho_i, rho_j; | 
| 1004 | 
< | 
      pair<RealType, RealType> LRI; | 
| 1002 | 
> | 
        RealType n_i, n_j; | 
| 1003 | 
> | 
        RealType rho_i, rho_j; | 
| 1004 | 
> | 
        pair<RealType, RealType> LRI; | 
| 1005 | 
  | 
       | 
| 1006 | 
< | 
      for (i = atomTypes_.begin(); i != atomTypes_.end(); ++i) { | 
| 1006 | 
> | 
        for (i = atomTypes_.begin(); i != atomTypes_.end(); ++i) { | 
| 1007 | 
  | 
        n_i = RealType(info_->getGlobalCountOfType(*i)); | 
| 1008 | 
  | 
        rho_i = n_i /  vol; | 
| 1009 | 
  | 
        for (j = atomTypes_.begin(); j != atomTypes_.end(); ++j) { | 
| 1010 | 
< | 
          n_j = RealType(info_->getGlobalCountOfType(*j)); | 
| 1011 | 
< | 
          rho_j = n_j / vol; | 
| 1010 | 
> | 
        n_j = RealType(info_->getGlobalCountOfType(*j)); | 
| 1011 | 
> | 
        rho_j = n_j / vol; | 
| 1012 | 
  | 
           | 
| 1013 | 
< | 
          LRI = interactionMan_->getLongRangeIntegrals( (*i), (*j) ); | 
| 1013 | 
> | 
        LRI = interactionMan_->getLongRangeIntegrals( (*i), (*j) ); | 
| 1014 | 
  | 
 | 
| 1015 | 
< | 
          Elrc += n_i   * rho_j * LRI.first; | 
| 1016 | 
< | 
          Wlrc -= rho_i * rho_j * LRI.second; | 
| 1015 | 
> | 
        Elrc += n_i   * rho_j * LRI.first; | 
| 1016 | 
> | 
        Wlrc -= rho_i * rho_j * LRI.second; | 
| 1017 | 
  | 
        } | 
| 1018 | 
< | 
      } | 
| 1019 | 
< | 
      Elrc *= 2.0 * NumericConstant::PI; | 
| 1020 | 
< | 
      Wlrc *= 2.0 * NumericConstant::PI; | 
| 1018 | 
> | 
        } | 
| 1019 | 
> | 
        Elrc *= 2.0 * NumericConstant::PI; | 
| 1020 | 
> | 
        Wlrc *= 2.0 * NumericConstant::PI; | 
| 1021 | 
  | 
 | 
| 1022 | 
< | 
      RealType lrp = curSnapshot->getLongRangePotential(); | 
| 1023 | 
< | 
      curSnapshot->setLongRangePotential(lrp + Elrc); | 
| 1024 | 
< | 
      stressTensor += Wlrc * SquareMatrix3<RealType>::identity(); | 
| 1025 | 
< | 
      curSnapshot->setStressTensor(stressTensor); | 
| 1022 | 
> | 
        RealType lrp = curSnapshot->getLongRangePotential(); | 
| 1023 | 
> | 
        curSnapshot->setLongRangePotential(lrp + Elrc); | 
| 1024 | 
> | 
        stressTensor += Wlrc * SquareMatrix3<RealType>::identity(); | 
| 1025 | 
> | 
        curSnapshot->setStressTensor(stressTensor); | 
| 1026 | 
  | 
      */ | 
| 1027 | 
  | 
      | 
| 1028 | 
  | 
    } |