Angle of rotation around arbitrary axis from matrix

213 Views Asked by At

I would like to know if it's possible to determine the angle of rotation around an arbitrary axis from a 3D rotation matrix. If so, how do I calculate that angle?

From my understanding, any rotation matrix can be thought of as a single rotation around a specific axis determined from the matrix (I know this generally, but I am not entirely sure how to calculate it). Otherwise, it is also a combination of rotations from the three standard axes. However, I want to determine the angle of rotation around an arbitrary axis.

For some context on my project, I am trying to calculate the angle of rotation around this arbitrary axis when I align two identical proteins. The software I use can calculate a 4x4 matrix, \begin{bmatrix} R & R & R & T \\ R & R & R & T \\ R & R & R & T \\ 0 & 0 & 0 & 1 \end{bmatrix} for this alignment procedure, which minimizes the RMSD between corresponding atom coordinates in the proteins. This is also how I'm getting my rotation matrix, $R_e$.

This is my procedure so far; I move one of the protein by the translational component of the matrix. Then, I generate a new orthonormal basis, $B$, that includes a unit vector in the direction of the arbitrary axis which I want to calculate the angle of rotation around. I then convert the rotation matrix using $B^{-1}$$R_eB$. After this step, I am lost conceptually.

I can try estimating the rotation by using a procedure similar to the Rodrigues' rotation formula, where a take an arbitrary atom's coordinate and find the vector between the coordinate vector and its projection on the arbitrary rotation axis. I do the same after applying $R_e$ and calculate the angle between the vectors. My concern is that method isn't the most accurate.