Skip to contents

Given the cell parameters, this function returns a matrix for transforming fractional to orthogonal coordinates, corresponding to the second choice in Giacovazzo's book.

Usage

xtal_mat02(a, b, c, aa, bb, cc)

Arguments

a

A real number. One of the unit cell's side lengths, in angstroms.

b

A real number. One of the unit cell's side lengths, in angstroms.

c

A real number. One of the unit cell's side lengths, in angstroms.

aa

A real number. One of the unit cell's angles, in degrees.

bb

A real number. One of the unit cell's angles, in degrees.

cc

A real number. One of the unit cell's angles, in degrees.

Value

A \(3\times \)$ matrix \(M\) that transforms a \(3\times 1\) vector of fractional coordinates into a \(3\times 1\) vector of orthogonal coordinates.

Examples

# Fractional coordinates
Xf = c(0.1,0.4,0.8)

# Orthorombic unit cell
M = xtal_mat02(10,40,20,90,90,90)

# Cartesian coordinates
Xc = M%*%Xf