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++){ |
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); |
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]; |
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)); |