| 35 |
|
* |
| 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). |
| 38 |
> |
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008). |
| 39 |
|
* [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). |
| 40 |
|
* [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). |
| 41 |
|
*/ |
| 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); |
| 123 |
– |
|
| 123 |
|
rot(axes1, axes1) = cosAngle; |
| 124 |
|
rot(axes2, axes2) = cosAngle; |
| 125 |
|
|