--- trunk/src/brains/SimSnapshotManager.cpp 2009/11/25 20:02:06 1390 +++ branches/development/src/brains/SimSnapshotManager.cpp 2013/02/20 15:39:39 1850 @@ -35,8 +35,9 @@ * * [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). + * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008). + * [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; }