--- trunk/src/parallel/ForceDecomposition.cpp 2013/06/16 15:15:42 1879 +++ trunk/src/parallel/ForceDecomposition.cpp 2014/02/28 13:25:13 1971 @@ -39,12 +39,14 @@ * [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). */ -#include "parallel/ForceDecomposition.hpp" -#include "math/Vector3.hpp" + #ifdef IS_MPI #include #endif +#include "parallel/ForceDecomposition.hpp" +#include "math/Vector3.hpp" + using namespace std; namespace OpenMD { @@ -98,7 +100,8 @@ namespace OpenMD { void ForceDecomposition::fillSelfData(SelfData &sdat, int atom1) { - sdat.atype = atypesLocal[atom1]; + //sdat.atype = atypesLocal[atom1]; + sdat.atid = idents[atom1]; sdat.pot = &embeddingPot; sdat.excludedPot = &excludedSelfPot; @@ -140,7 +143,7 @@ namespace OpenMD { } if (storageLayout_ & DataStorage::dslFlucQForce) { - sdat.dVdFQ = &(snap_->atomData.flucQFrc[atom1]); + sdat.flucQfrc = &(snap_->atomData.flucQFrc[atom1]); } } @@ -165,7 +168,8 @@ namespace OpenMD { } #ifdef IS_MPI - MPI::COMM_WORLD.Allreduce(&dispmax, &dispmax, 1, MPI::REALTYPE, MPI::MAX); + MPI_Allreduce(MPI_IN_PLACE, &dispmax, 1, MPI_REALTYPE, MPI_MAX, + MPI_COMM_WORLD); #endif // a conservative test of list skin crossings