| 36 |
|
* [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). |
| 37 |
|
* [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). |
| 38 |
|
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). |
| 39 |
< |
* [4] Vardeman & Gezelter, in progress (2009). |
| 39 |
> |
* [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). |
| 40 |
> |
* [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). |
| 41 |
|
*/ |
| 42 |
|
#include "selection/SelectionManager.hpp" |
| 43 |
|
#include "visitors/OtherVisitor.hpp" |
| 45 |
|
#include "primitives/RigidBody.hpp" |
| 46 |
|
#include "primitives/Molecule.hpp" |
| 47 |
|
#include "brains/SimInfo.hpp" |
| 48 |
+ |
#include "brains/Thermo.hpp" |
| 49 |
+ |
|
| 50 |
|
namespace OpenMD { |
| 51 |
|
|
| 52 |
|
void WrappingVisitor::visit(Atom *atom) { |
| 79 |
|
|
| 80 |
|
Snapshot* currSnapshot = info->getSnapshotManager()->getCurrentSnapshot(); |
| 81 |
|
|
| 82 |
< |
for( atomInfo = atomData->beginAtomInfo(i); atomInfo; atomInfo = atomData->nextAtomInfo(i) ) { |
| 82 |
> |
for( atomInfo = atomData->beginAtomInfo(i); atomInfo; |
| 83 |
> |
atomInfo = atomData->nextAtomInfo(i) ) { |
| 84 |
> |
|
| 85 |
|
Vector3d newPos = atomInfo->pos - origin_; |
| 86 |
|
currSnapshot->wrapVector(newPos); |
| 87 |
|
atomInfo->pos = newPos; |
| 88 |
+ |
|
| 89 |
|
} |
| 90 |
|
} |
| 91 |
|
|
| 92 |
|
void WrappingVisitor::update() { |
| 93 |
|
if (useCom_){ |
| 94 |
< |
origin_ = info->getCom(); |
| 94 |
> |
Thermo thermo(info); |
| 95 |
> |
origin_ = thermo.getCom(); |
| 96 |
|
} |
| 97 |
|
} |
| 98 |
|
|