--- branches/development/src/parallel/ForceDecomposition.cpp 2011/06/16 22:00:08 1583 +++ branches/development/src/parallel/ForceDecomposition.cpp 2011/08/18 20:18:19 1613 @@ -89,7 +89,9 @@ namespace OpenMD { void ForceDecomposition::fillSelfData(SelfData &sdat, int atom1) { - sdat.atype = ff_->getAtomType(idents[atom1]); + sdat.atype = atypesLocal[atom1]; + + sdat.pot = &embeddingPot; // Still Missing skippedCharge if (storageLayout_ & DataStorage::dslElectroFrame) { @@ -112,6 +114,10 @@ namespace OpenMD { sdat.dfrhodrho = &(snap_->atomData.functionalDerivative[atom1]); } + if (storageLayout_ & DataStorage::dslSkippedCharge) { + sdat.skippedCharge = &(snap_->atomData.skippedCharge[atom1]); + } + if (storageLayout_ & DataStorage::dslParticlePot) { sdat.particlePot = &(snap_->atomData.particlePot[atom1]); } @@ -124,10 +130,7 @@ namespace OpenMD { // if we have changed the group identities or haven't set up the // saved positions we automatically will need a neighbor list update: - if ( saved_CG_positions_.size() != nGroups ) { - cerr << "build because size\n"; - return true; - } + if ( saved_CG_positions_.size() != nGroups ) return true; RealType dispmax = 0.0; Vector3d disp; @@ -146,12 +149,9 @@ namespace OpenMD { dispmax = 2.0 * sqrt (3.0 * dispmax * dispmax); - if (dispmax > skinThickness_) { - cerr << "build because movement\n"; + if (dispmax > skinThickness_) return (dispmax > skinThickness_); - } else { - cerr << "not rebuilding\n"; - } + return false; } }