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

Comparing:
trunk/src/visitors/AtomVisitor.cpp (file contents), Revision 1455 by gezelter, Thu Jun 24 20:44:18 2010 UTC vs.
branches/development/src/visitors/AtomVisitor.cpp (file contents), Revision 1665 by gezelter, Tue Nov 22 20:38:56 2011 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>
# Line 79 | Line 80 | namespace OpenMD {
80      AtomData *atomData;
81      AtomInfo *atomInfo;
82      Vector3d  pos;
83 <    
83 >    Vector3d  vel;
84 >    Vector3d  frc;
85 >    Vector3d  u;
86 >    RealType  c;
87 >
88      if (isVisited(atom))
89        return;
90      
# Line 89 | Line 94 | namespace OpenMD {
94      atomData->setID("ATOMDATA");
95      
96      pos = atom->getPos();
97 +    vel = atom->getVel();
98 +    frc = atom->getFrc();
99      atomInfo->atomTypeName = atom->getType();
100      atomInfo->pos[0] = pos[0];
101      atomInfo->pos[1] = pos[1];
102      atomInfo->pos[2] = pos[2];
103 <    atomInfo->dipole[0] = 0.0;
104 <    atomInfo->dipole[1] = 0.0;
105 <    atomInfo->dipole[2] = 0.0;
103 >    atomInfo->vel[0] = vel[0];
104 >    atomInfo->vel[1] = vel[1];
105 >    atomInfo->vel[2] = vel[2];
106 >    atomInfo->hasVelocity = true;
107 >    atomInfo->frc[0] = frc[0];
108 >    atomInfo->frc[1] = frc[1];
109 >    atomInfo->frc[2] = frc[2];
110 >    atomInfo->hasForce = true;
111 >    atomInfo->vec[0] = 0.0;
112 >    atomInfo->vec[1] = 0.0;
113 >    atomInfo->vec[2] = 0.0;
114      
115      atomData->addAtomInfo(atomInfo);
116      
# Line 108 | Line 123 | namespace OpenMD {
123      AtomData *atomData;
124      AtomInfo *atomInfo;
125      Vector3d  pos;
126 +    Vector3d  vel;
127 +    Vector3d  frc;
128      Vector3d  u;
129 +    RealType  c;
130  
131      if (isVisited(datom))
132        return;
133 <
133 >    
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()) {
# Line 127 | Line 147 | namespace OpenMD {
147      atomInfo->pos[0] = pos[0];
148      atomInfo->pos[1] = pos[1];
149      atomInfo->pos[2] = pos[2];
150 <    atomInfo->dipole[0] = u[0];
151 <    atomInfo->dipole[1] = u[1];
152 <    atomInfo->dipole[2] = u[2];
150 >    atomInfo->vel[0] = vel[0];
151 >    atomInfo->vel[1] = vel[1];
152 >    atomInfo->vel[2] = vel[2];
153 >    atomInfo->hasVelocity = true;
154 >    atomInfo->frc[0] = frc[0];
155 >    atomInfo->frc[1] = frc[1];
156 >    atomInfo->frc[2] = frc[2];
157 >    atomInfo->hasForce = true;
158 >    atomInfo->vec[0] = u[0];
159 >    atomInfo->vec[1] = u[1];
160 >    atomInfo->vec[2] = u[2];
161 >    atomInfo->hasVector = true;
162  
163      atomData->addAtomInfo(atomInfo);
164  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines