# Specifying Rotations

Specify a rotation by a sequence of one or more substrings separated by commas,

  rot1[,rot2][...]


Each substring rot1, rot2, … is a rotation around a particular axis and has the syntax

  (<i>x</i>,<i>y</i>,<i>z</i>)<i>angle</i>


angle is the size of the rotation, in radians; x, y, and z are three real numbers specifying the rotation axis. There should be no spaces in the string.

Rotations are taken to be passive (vectors remain fixed and the reference frame rotates). Thus a rotation +π/2 around z maps x−y, y → +x, and zz.

Each of the successive elementary rotations rot2, … specifies a rotation about the new coordinate system. Euler angles are defined as a sequence of three rotations, the first about z by angle α, the second about the new y axis by angle β; the third about the new z axis by angle γ.

Let R1 be a rotation by −π/2 around z. R1 maps xy, y → −x, and zz. Call this rotated system Reference frame 1.

Consider next R2, a rotation by +π/2 around y; it maps xz and z → −x. If it is performed after R1, it rotates around the new y, or the original x. The combined rotation then maps xy, y→−z, and z→−x .

Example:

For the three Euler angles α=π/4, β=π/2, and γ=π/3, the ROT tag in an input file would read

  ROT=(0,0,1)pi/4,(0,1,0)pi/2,(0,0,1)pi/3


You can use as a the following strings as shorthand:
x: = shorthand for (1,0,0)
y: = shorthand for (0,1,0)
z: = shorthand for (0,0,1)

The mcx utility will make the 3×3 rotation matrix for a particular rotation. In the preceding example, try mcx -rot=z:pi/4,y:pi/2,z:pi/3.

Below are two instances of rotations, especially useful for cubic systems:

  z:pi/4,y:acos(1/sqrt(3))  &larr; Rotates <i>z</i> &rarr; (1,1,1)
z:-pi/4,y:pi/2            &larr; Rotates <i>z</i>&rarr;(1,-1,0), <i>y</i>&rarr;(1,1,0), <i>x</i>&rarr;<i>z</i>.


#### Rotations in Space groups

Elements of a crystallographic space groups consist of a translation part a in addition to a rotation part R. In general a point r gets mapped into

r′ = R r + a

The Questaal codes have an additional syntax for space groups. Only a limited number of rotations is possible in crystallographic lattices, so the format defining the rotation part is a little different. The translation part gets appended to rotation part in one of the following forms:  :(x1,x2,x3)  or alternatively  ::(p1,p2,p3)  with the double ‘::’. The first defines the translation in Cartesian coordinates; the second as fractional multiples of lattice vectors.

Example: Co is hcp with c/a=1.632993. Writing the basis as

SITE    ATOM=A XPOS=1/3 -1/3 1/2
ATOM=A XPOS= 0 0 0


generators of the space group read in either of the two equivalent forms

i*r3z:(-1*sqrt(3)/6,-1/2,-0.8164966) r2z:(-1*sqrt(3)/6,-1/2,0.8164966) r2x
i*r3z::(1/3,-1/3,-1/2) r2z::(1/3,-1/3,1/2) r2x


#### Explicit rotation matrix for Euler angles

The rotation about Euler angles (α, β, γ) can be written

z:<i>&alpha;</i>,y:<i>&beta;</i>,z:<i>&gamma;</i>


This corresponds to the three elementary rotations

Here $c_1$ and $s_1$ are $\cos(\alpha)$ and $\sin(\alpha)$; similarly for ($c_2$, $s_2$) and ($c_3$, $s_3$).

The rotation matrix constructed from Euler angles $\alpha,\,\beta,\,\gamma$ is then

It is the transpose of the rotation matrix given in Wikipedia, which refers to active rotations.