research papers
Rotations and rotation matrices
^{a}MRC Laboratory of Molecular Biology, Hills Road, Cambridge CB2 2QH, England
^{*}Correspondence email: pre@mrclmb.cam.ac.uk
In
a model, described as a list of orthogonal coordinates, is to be moved into a new position and orientation. The orthogonal coordinate system also has to be related to the crystallographic system, which may not be orthogonal, and must be considered, which applies to coordinates expressed as fractions of the Elementary properties of rotation matrices and their representation as polar or Eulerian angles are discussed.Keywords: rotations and rotation matrices.
1. Introduction
In the search process implicit in International Tables for Crystallography, Volume B, notably in the article by Diamond (1993).
a known model structure is rotated and translated into all possible orientations and positions for comparison with diffraction data for an unknown structure. This needs a mathematical description of the rotation and translation operations. In a Cartesian coordinate system, translations are straightforward, but rotations are not and their description is often confusing for the novice. This paper tries to provide an elementary introduction to rotations. This material is discussed with much more rigour and much greater detail in many places, including mathematical textbooks and in several articles in2. Rotations and translations
The transformation of a positional vector x_{i} describing the ith atom in a molecule can be written as a multiplication of the vector by a rotation matrix R and addition of a translation vector t. For this purpose, we work in an orthogonal Cartesian system in ångströms: conversion to fractional crystallographic coordinates is discussed in §6. The new positional vector is then given by
for each atom i = 1, n, where
Translations are not usually confusing, except that the order of rotation and translation matters. Rotating then translating by a vector t is not the same as translating by a vector s then rotating: the rotation operation remains the same but the translation vector needs to be rotated,
i.e.
3. Rotation matrices
A rotation matrix transforms the set of coordinates representing a threedimensional object, in an orthogonal Cartesian frame, without changing its shape or size, i.e. the length of any vector and the angle between any pair of vectors are unchanged. Such a matrix is called orthonormal and has several properties which follow from this definition.
3.1. The columns of a rotation matrix are orthogonal unit vectors
A rotation matrix may transform any set of vectors, so we can consider transforming the three unit vectors along the x, y and z axes, which by definition are orthogonal to each other.
Since the starting vectors x, y, z are orthogonal and of unit length, then the resultant vectors r_{1}, r_{2}, r_{3} must be also; these are the columns of the rotation matrix R.
3.2. The transpose of a rotation matrix is its inverse
Premultiplying the rotation matrix R by its transpose R^{T} (in which the columns of R become the rows of R^{T}),
Since r_{1}, r_{2} and r_{3} are orthogonal unit vectors, then r_{1}·r_{1} = 1, r_{1}·r_{2} = 0 etc. (generally r_{i}·r_{j} = δ_{ij}), thus
hence R^{T} = R^{−1}, since this is the definition of an inverse matrix R^{−1}.
3.3. The rows of a rotation matrix are orthogonal unit vectors
This follows from §§3.1 and 3.2, since the inverse (transposed) matrix must also be a rotation matrix, representing a rotation in exactly the opposite direction.
3.4. The determinant of a rotation matrix = +1
The determinant of a matrix is the triple product of its column vectors, r_{1}·(r_{2} × r_{3}). This also corresponds to the volume of the parallelopiped with these vectors as edges. If the columns are orthogonal unit vectors, the determinant will be ±1. Considering the equation in §3.1, the volume of the parallelopiped defined by the unit matrix is +1, so for R to be a rotation matrix its determinant must also be +1. An orthogonal matrix with determinant −1 corresponds to an inversion: such a matrix may for example be obtained by interchanging any two columns or rows of a rotation matrix.
4. Rotations and angles
A rotational transformation is uniquely defined by a rotation matrix, but the natural expression of a rotation is as an angle; if we wish to enumerate all possible rotations for a systematic search, then angles are the usual way of doing this. However, a rotation may be expressed as angles in many different ways and this can be confusing. Within one program system it is not usually essential to understand the convention used, but it is essential when converting to another system. There are a number of programs available for converting conventions, including CONVROT (Urzhumtseva & Urzhumtsev, 1997) and ROTMAT from the CCP4 suite (Collaborative Computational Project, Number 4, 1994). Since the matrix itself is unique, conversions may be performed by generating the matrix from angles in one convention and decomposing the matrix into angles in the new convention.
In two dimensions, a single angle defines a rotation (Fig. 1a). We can write the transformation as a 2 × 2 matrix,
Note that this already implies a convention: that θ is measured from x towards y. As an alternative to rotating the object, we can consider rotating the coordinate frame by an equal amount in the opposite direction, i.e by −θ (Fig. 1b). In using angles produced by computer programs, it is important to know which convention the author has used.
Extending this to three dimensions, we can write down rotation matrices for rotations around the principal axes x, y, z,
5. Rotation angles in three dimensions
In three dimensions, we need three angles to describe a rotational transformation and to generate the corresponding rotation matrix, but this can be performed in many different ways. The different ways correspond to different starting points for measuring the angle, as in two dimensions, and also to alternative paths from the start point to the end point. Common angular descriptions fall into three classes.

5.1. Polar angles
Polar angles are perhaps easier to visualize than Eulerian angles, but are algebraically less convenient for many purposes. The convention described is that used by the CCP4 programs and others: rotate by an angle κ around an axis whose direction is defined by angles ω (sometimes called ψ) and φ (Fig. 2). The direction of the axis may also be written as the components of a unit vector, the direction cosines l, m and n,
The rotation matrix may be constructed by first rotating the rotation axis by −φ and −ω to put it along (say) the z axis, then rotating by κ around z, the finally rotating the axis back to its original position by ω and φ,
5.1.1. Decomposing a matrix into polar angles
The rotation angle κ can be derived from the trace, i.e. the sum of the diagonal elements,
In the general case, l, m and n, and hence φ and ω, can be calculated from the offdiagonal elements: R_{32} − R_{23} = 2lsinκ; R_{13} − R_{31} = 2msinκ; R_{21} − R_{12} = 2nsinκ. Note that the full range of rotations can be generated with angles κ, ω, φ either in the range −π < κ < π, 0 < ω < π/2, 0 < φ < 2π or in the range 0 < κ < π, 0 < ω < π, 0 < φ < 2π, since the same matrix is generated by (−κ, π − ω, π + φ) as from (κ, ω, φ). This decomposition does not work if sinκ = 0 (i.e. κ = 0 or π). If κ = 0, there is no rotation and φ and ω can take any value. If κ = π (180°), then the matrix simplifies to
and the offdiagonal elements are all zero for rotations of π around x, y or z. Note that for a rotation of π or 180°, the matrix is symmetric: this must be so, since a rotation by +π is identical to a rotation by −π, so the rotation matrix is the same as its inverse, i.e. R = R^{−1} = R^{T}.
All angular decompositions have special cases where some angles are indeterminate or where the simplest method of decomposition fails. This is typically when all offdiagonal terms are zero, i.e. either no rotation (the identity matrix) or a rotation of 180° around x, y or z.
5.2. Eulerian angles
Eulerian angles are algebraically simpler than polar angles, since we just rotate successively around three principal axes. For instance, the convention used in AMoRe (Navaza, 1994) and other CCP4 programs (Collaborative Computational Project, Number 4, 1994) is to rotate by γ around z, then by β around the new y, then by α around the new z again,
Note that if β = 0 or π, the central matrix is diagonal, so rotations about α and γ have exactly the same effect (or exactly opposite effect if β = π). In these cases, only the combination α + γ or α − γ is determined.
6. Interaction with crystallographic symmetry
When superimposing a known model on an unknown structure in a crystal, equivalent solutions will be found for each molecule in the crystal, but it is not always obvious from the angles which alternate solutions are equivalent by , in P3, there are three solutions equivalent by the three operations (x, y, z), (−y, x − y, z) and (y − x, −x, z). To combine these operators with the rotation matrices defining the solution, which work on orthogonal coordinates, we need the conversion matrices from orthogonal coordinates x_{o} to fractional coordinates x_{f} and its inverse, such that x_{f} = Fx_{o}. In the most common convention (x, y, z along a, c* × a, c*),
is expressed as operations working on fractional cell coordinates, which are referred to crystal axes which are not necessarily orthogonal. For example, in Fig. 3Then, if the rotation from the model to molecule 1 is given by R, the three solutions are given by R_{j} = F^{−1}S_{j}FR, for j = 1, 3, where S_{j} is the matrix corresponding to the jth operator, e.g.
in this case. Computer programs will usually identify solutions related by
or just present the user with a unique set.7. Noncrystallographic symmetry
Multiple solutions to a molecularreplacement search may also be produced by the combination of a crystallographic screw dyad and a noncrystallographic dyad creates a pure translation. The native should always be examined for noncrystallographic translations.
Unlike this is not generally known in advance, so no special relationship can be assumed. A common special case arises when a noncrystallographic rotation is parallel or nearly parallel to a crystallographic axis of the same order. In this case, the combination creates a noncrystallographic translation relating all atoms, which should be detectable in the native Either axis may contain a screw component. For example, in Fig. 48. Conclusions
Descriptions of rotations in terms of three angles can be confusing and in all conventions the angles have inconvenient properties of nonequivalence in the variables and singularities at certain points. Alternative descriptions exist in terms of variables other than angles, such as `rotation vectors' or quaternions; these may have advantages in some circumstances, but have been less commonly used than angle descriptions. Three alternative descriptions are discussed, for example, by Diamond (1993).
References
Collaborative Computational Project, Number 4 (1994). Acta Cryst. D50, 760–763. CrossRef IUCr Journals
Diamond, R. (1993). International Tables for Crystallography, Vol. B, edited by U. Schmueli, ch. 3.3. Dordrecht: Kluwer Academic Publishers.
Navaza, J. (1994). Acta Cryst. A50, 157–163. CrossRef CAS Web of Science IUCr Journals
Urzhumtseva, L. M. & Urzhumtsev, A. G. (1997). J. Appl. Cryst. 30, 402–410. CrossRef CAS Web of Science IUCr Journals
© International Union of Crystallography. Prior permission is not required to reproduce short quotations, tables and figures from this article, provided the original authors and source are cited. For more information, click here.