--- branches/development/src/brains/Thermo.cpp 2012/05/24 20:59:54 1723 +++ branches/development/src/brains/Thermo.cpp 2012/06/21 19:26:46 1760 @@ -112,23 +112,9 @@ namespace OpenMD { RealType Thermo::getPotential() { RealType potential = 0.0; - Snapshot* curSnapshot = info_->getSnapshotManager()->getCurrentSnapshot(); - RealType shortRangePot_local = curSnapshot->statData[Stats::SHORT_RANGE_POTENTIAL] ; - - // Get total potential for entire system from MPI. - -#ifdef IS_MPI - - MPI_Allreduce(&shortRangePot_local, &potential, 1, MPI_REALTYPE, MPI_SUM, - MPI_COMM_WORLD); - potential += curSnapshot->statData[Stats::LONG_RANGE_POTENTIAL]; -#else - - potential = shortRangePot_local + curSnapshot->statData[Stats::LONG_RANGE_POTENTIAL]; - -#endif // is_mpi - + Snapshot* curSnapshot = info_->getSnapshotManager()->getCurrentSnapshot(); + potential = curSnapshot->getShortRangePotential() + curSnapshot->getLongRangePotential(); return potential; } @@ -174,7 +160,7 @@ namespace OpenMD { #endif //is_mpi - kinetic = kinetic * 0.5 / PhysicalConstants::energyConvert; + kinetic = kinetic * 0.5; return ( 2.0 * kinetic) / (info_->getNFluctuatingCharges()* PhysicalConstants::kb ); }