--- branches/development/src/brains/SimSnapshotManager.cpp 2010/07/09 23:08:25 1465 +++ branches/development/src/brains/SimSnapshotManager.cpp 2012/07/03 18:32:27 1764 @@ -36,7 +36,8 @@ * [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). * [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). - * [4] Vardeman & Gezelter, in progress (2009). + * [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). + * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). */ #include "brains/SimInfo.hpp" @@ -49,10 +50,11 @@ namespace OpenMD { int nAtoms = info_->getNAtoms(); int nRigidBodies = info_->getNRigidBodies(); - + int nCutoffGroups = info_->getNCutoffGroups(); + //allocate memory for snapshots - previousSnapshot_ = new Snapshot(nAtoms, nRigidBodies, storageLayout); - currentSnapshot_ = new Snapshot(nAtoms, nRigidBodies, storageLayout); + previousSnapshot_ = new Snapshot(nAtoms, nRigidBodies, nCutoffGroups, storageLayout); + currentSnapshot_ = new Snapshot(nAtoms, nRigidBodies, nCutoffGroups, storageLayout); } SimSnapshotManager::~SimSnapshotManager(){ @@ -65,6 +67,7 @@ namespace OpenMD { *previousSnapshot_ = *currentSnapshot_; currentSnapshot_->setID(currentSnapshot_->getID() + 1); + currentSnapshot_->clearDerivedProperties(); return true; }