Rotations and rotation matrices
In molecular replacement, 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 crystallographic symmetry must be considered, which applies to coordinates expressed as fractions of the unit cell. Elementary properties of rotation matrices and their representation as polar or Eulerian angles are discussed.
Keywords: rotations and rotation matrices.
In the search process implicit in molecular replacement, 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 in International Tables for Crystallography, Volume B, notably in the article by Diamond (1993).
The transformation of a positional vector xi 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,
A rotation matrix transforms the set of coordinates representing a three-dimensional 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.
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 r1, r2, r3 must be also; these are the columns of the rotation matrix R.
Premultiplying the rotation matrix R by its transpose RT (in which the columns of R become the rows of RT),
Since r1, r2 and r3 are orthogonal unit vectors, then r1·r1 = 1, r1·r2 = 0 etc. (generally ri·rj = δij), thus
hence RT = R−1, since this is the definition of an inverse matrix R−1.
The determinant of a matrix is the triple product of its column vectors, r1·(r2 × r3). 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.
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.
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,
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.
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 φ,
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 off-diagonal elements: R32 − R23 = 2lsinκ; R13 − R31 = 2msinκ; R21 − R12 = 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 off-diagonal 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 = RT.
All angular decompositions have special cases where some angles are indeterminate or where the simplest method of decomposition fails. This is typically when all off-diagonal terms are zero, i.e. either no rotation (the identity matrix) or a rotation of 180° around x, y or z.
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.
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 crystallographic symmetry. Crystallographic symmetry is expressed as operations working on fractional cell coordinates, which are referred to crystal axes which are not necessarily orthogonal. For example, in Fig. 3, in space group P3, there are three solutions equivalent by the three crystallographic symmetry 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 xo to fractional coordinates xf and its inverse, such that xf = Fxo. In the most common convention (x, y, z along a, c* × a, c*),
Then, if the rotation from the model to molecule 1 is given by R, the three solutions are given by Rj = F−1SjFR, for j = 1, 3, where Sj is the matrix corresponding to the jth crystallographic symmetry operator, e.g.
in this case. Computer programs will usually identify solutions related by crystallographic symmetry or just present the user with a unique set.
Multiple solutions to a molecular-replacement search may also be produced by non-crystallographic symmetry. Unlike crystallographic symmetry, this is not generally known in advance, so no special relationship can be assumed. A common special case arises when a non-crystallographic rotation is parallel or nearly parallel to a crystallographic axis of the same order. In this case, the combination creates a non-crystallographic translation relating all atoms, which should be detectable in the native Patterson function. Either axis may contain a screw component. For example, in Fig. 4 the combination of a crystallographic screw dyad and a non-crystallographic dyad creates a pure translation. The native Patterson function should always be examined for non-crystallographic translations.
Descriptions of rotations in terms of three angles can be confusing and in all conventions the angles have inconvenient properties of non-equivalence 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).
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.