ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/visitors/OtherVisitor.cpp
(Generate patch)

Comparing branches/development/src/visitors/OtherVisitor.cpp (file contents):
Revision 1465 by chuckv, Fri Jul 9 23:08:25 2010 UTC vs.
Revision 1764 by gezelter, Tue Jul 3 18:32:27 2012 UTC

# Line 36 | Line 36
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"
# Line 44 | Line 45
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) {
# Line 76 | Line 79 | namespace OpenMD {
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    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines