### Coordinate system transformation

Atomic position coordinates (X,Y,Z) in a PDB ATOM or HETATM record are listed in a right handed, Cartesian (orthonormal) coordinate system (axes ) in Å.

`ATOM    367  O   VAL A  47     -22.742  -1.823  28.183  1.00 23.68           `
`--------------------------------- X ------ Y ----- Z -------------`
` `
` `

X, Y, and Z are converted into fractional crystallographic coordinates (x,y,z) in order to perform crystallographic operations, and inversely, geometric computations are more easily performed in Cartesian space. In orthonormal systems (cubic, tetragonal, and orthorhombic) the coordinate transformation reduces to a simple division of the coordinate values by the corresponding cell constants. For example, x=X/a,  and X=ax.

In the case of a generic oblique crystallographic system, the transformation is described by a matrix operation:

Let the atomic positions be described by a Cartesian coordinate vector X

and the fractional coordinate vector in the crystallographic system be x

With the systems having the same origin the operation reduces to  and its inversion to, with  the deorthogonalization matrix, and its inverse the orthogonalization matrix. There are multiple choices of M depending on the order and selection of the axis rotations. The following convention is followed by PDB (and most crystallographic programs):

• Cartesian axis is collinear with crystallographic axis .
•  is collinear with .
• is collinear with  (or with c*, see formula xxx).

Using the above convention,

with

or

The deorthogonalization matrix, , can be obtained by inversion of following Cramer’s rule

and reduces to