Skip to contents

Calculates resolution, given the Miller indices

Usage

hkl_to_reso(h, k, l, a, b, c, aa, bb, cc)

Arguments

h

An integer, A Miller index.

k

An integer, A Miller index.

l

An integer, A Miller index.

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 positive, real number. The resolution associated with (h,k,l), in angstroms.

Examples

datadir <- system.file("extdata",package="cry")
fname <- file.path(datadir,"1dei_phases.mtz")
hdr <- readMTZHeader(fname,message=FALSE)
#> Warning: truncating string with embedded nuls
ucell <- hdr$CELL
reso1 <- hkl_to_reso(1,0,0,ucell[1],ucell[2],ucell[3],ucell[4],ucell[5],ucell[6])
print(reso1)  # Low resolution
#> [1] 57.4
reso2 <- hkl_to_reso(20,20,20,ucell[1],ucell[2],ucell[3],ucell[4],ucell[5],ucell[6])
reso2  # High resolution
#> [1] 0.9981333