| 174 |
|
bend_set* theBends; |
| 175 |
|
torsion_set* theTorsions; |
| 176 |
|
|
| 177 |
– |
|
| 177 |
|
//init the forceField paramters |
| 178 |
|
|
| 179 |
|
the_ff->readParams(); |
| 181 |
|
|
| 182 |
|
// init the atoms |
| 183 |
|
|
| 184 |
+ |
double phi, theta, psi; |
| 185 |
+ |
double sux, suy, suz; |
| 186 |
+ |
double Axx, Axy, Axz, Ayx, Ayy, Ayz, Azx, Azy, Azz; |
| 187 |
|
double ux, uy, uz, u, uSqr; |
| 188 |
|
|
| 189 |
|
for (k = 0; k < nInfo; k++){ |
| 220 |
|
info[k].n_oriented++; |
| 221 |
|
molInfo.myAtoms[j] = dAtom; |
| 222 |
|
|
| 223 |
< |
ux = currentAtom->getOrntX(); |
| 224 |
< |
uy = currentAtom->getOrntY(); |
| 225 |
< |
uz = currentAtom->getOrntZ(); |
| 223 |
> |
// Directional Atoms have standard unit vectors which are oriented |
| 224 |
> |
// in space using the three Euler angles. We assume the standard |
| 225 |
> |
// unit vector was originally along the z axis below. |
| 226 |
> |
|
| 227 |
> |
phi = currentAtom->getEulerPhi(); |
| 228 |
> |
theta = currentAtom->getEulerTheta(); |
| 229 |
> |
psi = currentAtom->getEulerPsi(); |
| 230 |
> |
|
| 231 |
> |
Axx = (cos(phi) * cos(psi)) - (sin(phi) * cos(theta) * sin(psi)); |
| 232 |
> |
Axy = (sin(phi) * cos(psi)) + (cos(phi) * cos(theta) * sin(psi)); |
| 233 |
> |
Axz = sin(theta) * sin(psi); |
| 234 |
> |
|
| 235 |
> |
Ayx = -(cos(phi) * sin(psi)) - (sin(phi) * cos(theta) * cos(psi)); |
| 236 |
> |
Ayy = -(sin(phi) * sin(psi)) + (cos(phi) * cos(theta) * cos(psi)); |
| 237 |
> |
Ayz = sin(theta) * cos(psi); |
| 238 |
> |
|
| 239 |
> |
Azx = sin(phi) * sin(theta); |
| 240 |
> |
Azy = -cos(phi) * sin(theta); |
| 241 |
> |
Azz = cos(theta); |
| 242 |
> |
|
| 243 |
> |
sux = 0.0; |
| 244 |
> |
suy = 0.0; |
| 245 |
> |
suz = 1.0; |
| 246 |
|
|
| 247 |
+ |
ux = (Axx * sux) + (Ayx * suy) + (Azx * suz); |
| 248 |
+ |
uy = (Axy * sux) + (Ayy * suy) + (Azy * suz); |
| 249 |
+ |
uz = (Axz * sux) + (Ayz * suy) + (Azz * suz); |
| 250 |
+ |
|
| 251 |
|
uSqr = (ux * ux) + (uy * uy) + (uz * uz); |
| 252 |
|
|
| 253 |
|
u = sqrt(uSqr); |