ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/src/applications/simpleBuilder/MoLocator.cpp
(Generate patch)

Comparing trunk/OOPSE-3.0/src/applications/simpleBuilder/MoLocator.cpp (file contents):
Revision 1680 by tim, Tue Sep 28 23:24:25 2004 UTC vs.
Revision 1681 by tim, Thu Oct 28 22:26:32 2004 UTC

# Line 101 | Line 101 | void MoLocator::calcRefCoords( void ){
101      else{
102        currAtomMass = myFF->getAtomTypeMass(currAtomStamp->getType());
103        mass.push_back(currAtomMass);
104 <      coor.x = currAtomStamp->getPosX();
105 <      coor.y = currAtomStamp->getPosY();
106 <      coor.z = currAtomStamp->getPosZ();
104 >      coor.x() = currAtomStamp->getPosX();
105 >      coor.y() = currAtomStamp->getPosY();
106 >      coor.z() = currAtomStamp->getPosZ();
107        refCoords.push_back(coor);
108  
109      }
110    }
111  
112    for(int i = 0; i < nRigidBodies; i++){
113 <    coor.x = 0;
114 <    coor.y = 0;
115 <    coor.z = 0;
113 >    coor.x() = 0;
114 >    coor.y() = 0;
115 >    coor.z() = 0;
116      totMassInRb = 0;
117  
118      for(int j = 0; j < nAtomsInRb; j++){
# Line 120 | Line 120 | void MoLocator::calcRefCoords( void ){
120        currAtomMass = myFF->getAtomTypeMass(currAtomStamp->getType());
121        totMassInRb +=  currAtomMass;
122        
123 <      coor.x += currAtomStamp->getPosX() * currAtomMass;
124 <      coor.y += currAtomStamp->getPosY() * currAtomMass;
125 <      coor.z += currAtomStamp->getPosZ() * currAtomMass;
123 >      coor.x() += currAtomStamp->getPosX() * currAtomMass;
124 >      coor.y() += currAtomStamp->getPosY() * currAtomMass;
125 >      coor.z() += currAtomStamp->getPosZ() * currAtomMass;
126      }
127  
128      mass.push_back(totMassInRb);
# Line 133 | Line 133 | void MoLocator::calcRefCoords( void ){
133  
134    //calculate the reference center of mass
135    molMass = 0;
136 <  refMolCom.x = 0;
137 <  refMolCom.y = 0;
138 <  refMolCom.z = 0;
136 >  refMolCom.x() = 0;
137 >  refMolCom.y() = 0;
138 >  refMolCom.z() = 0;
139    
140    for(int i = 0; i < nIntegrableObjects; i++){
141      refMolCom += refCoords[i] * mass[i];
# Line 155 | Line 155 | void latVec2RotMat(const Vector3d& lv, double rotMat[3
155  
156    double theta, phi, psi;
157    
158 <  theta =acos(lv.z);
159 <  phi = atan2(lv.y, lv.x);
158 >  theta =acos(lv.z());
159 >  phi = atan2(lv.y(), lv.x());
160    psi = 0;
161  
162    rotMat[0][0] = (cos(phi) * cos(psi)) - (sin(phi) * cos(theta) * sin(psi));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines