| 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 "DLM.hpp" |
| 78 |
|
|
| 79 |
|
// rotate about the z-axis |
| 80 |
|
angle = dt * ji[2] / I(2, 2); |
| 80 |
– |
sd->addZangle(angle); |
| 81 |
|
rotateStep( 0, 1, angle, ji, A); |
| 82 |
|
|
| 83 |
|
// rotate about the y-axis |
| 108 |
|
RotMat3x3d rot = RotMat3x3d::identity(); // initalize rot as a unit matrix |
| 109 |
|
|
| 110 |
|
// use a small angle aproximation for sin and cosine |
| 111 |
< |
/* |
| 111 |
> |
|
| 112 |
|
angleSqr = angle * angle; |
| 113 |
|
angleSqrOver4 = angleSqr / 4.0; |
| 114 |
|
top = 1.0 - angleSqrOver4; |
| 116 |
|
|
| 117 |
|
cosAngle = top / bottom; |
| 118 |
|
sinAngle = angle / bottom; |
| 119 |
< |
*/ |
| 119 |
> |
|
| 120 |
|
// or don't use the small angle approximation: |
| 121 |
< |
cosAngle = cos(angle); |
| 122 |
< |
sinAngle = sin(angle); |
| 121 |
> |
//cosAngle = cos(angle); |
| 122 |
> |
//sinAngle = sin(angle); |
| 123 |
|
|
| 124 |
|
rot(axes1, axes1) = cosAngle; |
| 125 |
|
rot(axes2, axes2) = cosAngle; |