<< Chapter < Page | Chapter >> Page > |
Where and are the matrices of left and right eigenvectors, respectively, of the covariance matrix . This formula ensures that is orthonormal (the reader should carry out the high-level matrix multiplication and verify this fact).
The only remaining detail to take care of is to make sure that is a proper rotation, as discussed before. It could indeed happen that if its rows/columns do not make up a right-handed system. When this happens, we need to compromise between two goals: maximizing and respecting the constraint that . Therefore, we need to settle for the second largest value of . It is easy to see what the second largest value is; since:
then the second largest value occurs when and . Now, we have that cannot be the identity matrix as before, but instead it has the lower-right corner set to -1. Now we finally have a unified way to represent the solution. If , is the identity; otherwise, it has a -1 as its last element. Finally, these facts can be expressed in a single formula for the optimal rotation by stating:
where . In the light of the preceding derivation, all the facts that have been presented as a proof can be succinctly put as an algorithm for computing the optimal rotation to align two data sets and :
Another way of solving the optimal rotation for the purposes of computing the lRMSD between two conformations is to use quaternions . These provide a very compact way of representing rotations (only 4 numbers as compared to 9 or 16 for a rotation matrix) and are extremely easy to normalize after performing operations on them. Next, a general introduction to quaternions is given, and then they will be used to compute the optimal rotation between two point sets.
Quaternions are an extension of complex numbers. Recall that complex numbers are numbers of the form a + bi, where a and b are real numbers and i is the canonical imaginary number, equal to the square root of -1. Quaternions add two more imaginary numbers, j and k. These numbers are related by the set of equalities in the following figure: These equalities give rise to some unusual properties, especially with respect to multiplication.
Given this definition of i, j, and k, we can now define a quaternion. Based on the definitions of i, j and k, we can also derive rules for addition and multiplication of quaternions. Assume we have two quaternions, p and q, defined as follows: Addition of p and q is fairly intuitive: The dot product and magnitude of a quaternion also closely resemble those operations for vectors. Note that a unit quaternion is a quaternion with magnitude 1 under this definition: Multiplication, however, is not, due to the definitions of i, j, and k: Quaternion multiplication also has two equivalent matrix forms which will become relevant later in the derivation of the alignment method: These useful properties of quaternion multiplication can be derived easily using the matrix form for multiplication, or they can be proved by carrying out the products:
Notification Switch
Would you like to follow the 'Geometric methods in structural computational biology' conversation and receive update notifications?