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

Comparing branches/development/src/visitors/AtomVisitor.cpp (file contents):
Revision 1465 by chuckv, Fri Jul 9 23:08:25 2010 UTC vs.
Revision 1814 by gezelter, Tue Nov 27 21:13:48 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  
43   #include <cstring>
44   #include "visitors/AtomVisitor.hpp"
45   #include "primitives/DirectionalAtom.hpp"
46   #include "primitives/RigidBody.hpp"
47 + #include "types/MultipoleAdapter.hpp"
48 + #include "types/GayBerneAdapter.hpp"
49  
50   namespace OpenMD {
51    void BaseAtomVisitor::visit(RigidBody *rb) {
# Line 82 | Line 85 | namespace OpenMD {
85      Vector3d  vel;
86      Vector3d  frc;
87      Vector3d  u;
85    RealType  c;
88  
89      if (isVisited(atom))
90        return;
# Line 125 | Line 127 | namespace OpenMD {
127      Vector3d  vel;
128      Vector3d  frc;
129      Vector3d  u;
128    RealType  c;
130  
131      if (isVisited(datom))
132        return;
# Line 133 | Line 134 | namespace OpenMD {
134      pos = datom->getPos();
135      vel = datom->getVel();
136      frc = datom->getFrc();
137 <    if (datom->getAtomType()->isGayBerne()) {
138 <        u = datom->getA().transpose()*V3Z;        
139 <    } else if (datom->getAtomType()->isMultipole()) {
140 <        u = datom->getElectroFrame().getColumn(2);
137 >
138 >    GayBerneAdapter gba = GayBerneAdapter(datom->getAtomType());
139 >    MultipoleAdapter ma = MultipoleAdapter(datom->getAtomType());
140 >    
141 >    if (gba.isGayBerne()) {
142 >      u = datom->getA().transpose()*V3Z;        
143 >    } else if (ma.isDipole()) {
144 >      u = datom->getDipole();
145 >    } else if (ma.isQuadrupole()) {
146 >      u = datom->getQuadrupole().getColumn(2);
147      }
148      atomData = new AtomData;
149      atomData->setID("ATOMDATA");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines