--- branches/development/src/primitives/Atom.cpp 2011/11/22 20:38:56 1665 +++ branches/development/src/primitives/Atom.cpp 2012/05/22 21:55:31 1715 @@ -40,12 +40,21 @@ * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). */ +#include #include "primitives/Atom.hpp" +#include "types/FluctuatingChargeAdapter.hpp" + namespace OpenMD { Atom::Atom(AtomType* at) : StuntDouble(otAtom, &Snapshot::atomData), atomType_(at) { mass_ = at->getMass(); + if (at->isFluctuatingCharge()) { + FluctuatingChargeAdapter fca = FluctuatingChargeAdapter(at); + chargeMass_ = fca.getChargeMass(); + } else { + chargeMass_ = INFINITY; + } } Mat3x3d Atom::getI() {