| 327 |
|
double pos[3]; // position place holders |
| 328 |
|
double vel[3]; // velocity placeholders |
| 329 |
|
double q[4]; // the quaternions |
| 330 |
< |
double jx, jy, jz; // angular velocity placeholders; |
| 330 |
> |
double ji[3]; // angular velocity placeholders; |
| 331 |
|
double qSqr, qLength; // needed to normalize the quaternion vector. |
| 332 |
|
|
| 333 |
|
Atom **atoms = simnfo->atoms; |
| 490 |
|
c_in_name, n_atoms, atomIndex ); |
| 491 |
|
return strdup( painCave.errMsg ); |
| 492 |
|
} |
| 493 |
< |
jx = atof( foo ); |
| 493 |
> |
ji[0] = atof( foo ); |
| 494 |
|
|
| 495 |
|
foo = strtok(NULL, " ,;\t"); |
| 496 |
|
if(foo == NULL){ |
| 500 |
|
c_in_name, n_atoms, atomIndex ); |
| 501 |
|
return strdup( painCave.errMsg ); |
| 502 |
|
} |
| 503 |
< |
jy = atof(foo ); |
| 503 |
> |
ji[1] = atof(foo ); |
| 504 |
|
|
| 505 |
|
foo = strtok(NULL, " ,;\t"); |
| 506 |
|
if(foo == NULL){ |
| 510 |
|
c_in_name, n_atoms, atomIndex ); |
| 511 |
|
return strdup( painCave.errMsg ); |
| 512 |
|
} |
| 513 |
< |
jz = atof( foo ); |
| 513 |
> |
ji[2] = atof( foo ); |
| 514 |
|
|
| 515 |
|
dAtom = ( DirectionalAtom* )atoms[atomIndex]; |
| 516 |
|
|
| 528 |
|
|
| 529 |
|
// add the angular velocities |
| 530 |
|
|
| 531 |
< |
dAtom->setJx( jx ); |
| 532 |
< |
dAtom->setJy( jy ); |
| 533 |
< |
dAtom->setJz( jz ); |
| 531 |
> |
dAtom->setJ( ji ); |
| 532 |
|
} |
| 533 |
|
|
| 534 |
|
// add the positions and velocities to the atom |