Learn R Programming

cry (version 0.5.2)

xtal_mat02: Matrix for cell orthogonalisation (second choice)

Description

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)

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.

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.

Examples

Run this code
# 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

Run the code above in your browser using DataLab