# Rodrigues’ rotation formula

I’m taking a structural informatics course this semester, and this is my first in-depth exposure to working with biomolecular structures. The class’ first assignment was to download a specific PDB file, parse the atom coordinates, and determine all sorts of bond lengths, bond angles, and torsion angles. This required me to review concepts I haven’t used much since linear algebra and multivariable calculus, but all in all this part wasn’t too hard.

The last part of the assignment was a kicker though. I had to select the 30th residue in the protein, set two of its dihredral angles to 0º (effectively rotating the remaining portion of the structure along bonds between backbone atoms), and recompute the new atomic coordinates. I had no idea where to start!

One of the other student’s in the class mentioned Rodrigues’ rotation formula, and after looking into things, it seemed to be the answer to our question. In a general sense, if you want to rotate given a vector $\vec{v}$ by an angle of $\theta$ degrees about an axis of rotation defined by the vector $\vec{k}$, then the new rotated vector can be computed as follows.

$\vec{v}_{\text{rot}} = \vec{v} \cos{\theta} + (\vec{k} \times \vec{v})\sin{\theta} + \vec{k}(\vec{k} \cdot \vec{v})(1 - \cos{\theta})$

In the context of the homework assignment, $\vec{k}$ is the bond around which I’m rotating (N-CA for $\phi$, CA-C for $\psi$), $\theta$ is the angle I need to set to 0 ($\phi$ or $\psi$), and the rotation is applied to the coordinate vector $\vec{v}$ for each subsequent atom affected by the rotation.