| 128 | 
  | 
 | 
| 129 | 
  | 
    } | 
| 130 | 
  | 
     | 
| 131 | 
< | 
    double  shortRangePotential = 0.0; | 
| 131 | 
> | 
 | 
| 132 | 
> | 
    double bondPotential = 0.0; | 
| 133 | 
> | 
    double bendPotential = 0.0; | 
| 134 | 
> | 
    double torsionPotential = 0.0; | 
| 135 | 
> | 
 | 
| 136 | 
  | 
    for (mol = info_->beginMolecule(mi); mol != NULL; mol = info_->nextMolecule(mi)) { | 
| 133 | 
– | 
      shortRangePotential += mol->getPotential(); | 
| 134 | 
– | 
    } | 
| 137 | 
  | 
 | 
| 138 | 
+ | 
      for (bond = mol->beginBond(bondIter); bond != NULL; bond = mol->nextBond(bondIter)) { | 
| 139 | 
+ | 
          bondPotential += bond->getPotential(); | 
| 140 | 
+ | 
      } | 
| 141 | 
+ | 
 | 
| 142 | 
+ | 
      for (bend = mol->beginBend(bendIter); bend != NULL; bend = mol->nextBend(bendIter)) { | 
| 143 | 
+ | 
          bendPotential += bend->getPotential(); | 
| 144 | 
+ | 
      } | 
| 145 | 
+ | 
 | 
| 146 | 
+ | 
      for (torsion = mol->beginTorsion(torsionIter); torsion != NULL; torsion = mol->nextTorsion(torsionIter)) { | 
| 147 | 
+ | 
          torsionPotential += torsion->getPotential(); | 
| 148 | 
+ | 
      } | 
| 149 | 
+ | 
 | 
| 150 | 
+ | 
    }     | 
| 151 | 
+ | 
 | 
| 152 | 
+ | 
    double  shortRangePotential = bondPotential + bendPotential + torsionPotential;     | 
| 153 | 
  | 
    Snapshot* curSnapshot = info_->getSnapshotManager()->getCurrentSnapshot(); | 
| 154 | 
  | 
    curSnapshot->statData[Stats::SHORT_RANGE_POTENTIAL] = shortRangePotential; | 
| 155 | 
+ | 
    curSnapshot->statData[Stats::BOND_POTENTIAL] = bondPotential; | 
| 156 | 
+ | 
    curSnapshot->statData[Stats::BEND_POTENTIAL] = bendPotential; | 
| 157 | 
+ | 
    curSnapshot->statData[Stats::DIHEDRAL_POTENTIAL] = torsionPotential; | 
| 158 | 
+ | 
     | 
| 159 | 
  | 
  } | 
| 160 | 
  | 
 | 
| 161 | 
  | 
  void ForceManager::calcLongRangeInteraction(bool needPotential, bool needStress) { | 
| 242 | 
  | 
    //store the tau and long range potential     | 
| 243 | 
  | 
    curSnapshot->statData[Stats::LONG_RANGE_POTENTIAL] = lrPot; | 
| 244 | 
  | 
    //  curSnapshot->statData[Stats::LONG_RANGE_POTENTIAL] = longRangePotential; | 
| 245 | 
+ | 
    curSnapshot->statData[Stats::VANDERWAALS_POTENTIAL] = longRangePotential[VDW_POT];  | 
| 246 | 
+ | 
    curSnapshot->statData[Stats::ELECTROSTATIC_POTENTIAL] = longRangePotential[ELECTROSTATIC_POT]; | 
| 247 | 
+ | 
 | 
| 248 | 
  | 
    curSnapshot->statData.setTau(tau); | 
| 249 | 
  | 
  } | 
| 250 | 
  | 
 |