Skip to contents

This represents a crystal reciprocal unit cell.

Usage

rec_unit_cell(
  ar = NULL,
  br = NULL,
  cr = NULL,
  aar = NULL,
  bbr = NULL,
  ccr = NULL
)

Arguments

ar

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

br

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

cr

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

aar

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

bbr

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

ccr

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

Value

An object of class "rec_unit_cell". It is a named list of length 6 whose last three slots are of "angle" class.

Details

The constructor can be used with less than the full set of six input parameters, to create reciprocal unit cells for the cubic, tetragonal and orthogonal systems. Objects of "rec_unit_cell" class can also be created with no parameters (default to a reciprocal cubic cell of side length 0.1 1/angstroms).

Examples

# Create a monoclinic reciprocal unit cell
ruc <- unit_cell(0.115,0.033,0.077,90,120,90)
print(ruc)
#> This is an object of class 'unit_cell'
#> Its sides are:
#>        0.115 ,      0.033 ,      0.077    angstroms.
#> Its angles are:
#>       90.000 ,    120.000 ,     90.000    degrees.

# Create a cubic cell (default)
ruc <- rec_unit_cell()
print(ruc)
#> This is an object of class 'rec_unit_cell'
#> Its sides are:
#>        0.100 ,      0.100 ,      0.100    1/angstroms.
#> Its angles are:
#>       90.000 ,     90.000 ,     90.000    degrees.

# Create a reciprocal cubic cell with side 1/20
ruc <- rec_unit_cell(1/20)
print(ruc)
#> This is an object of class 'rec_unit_cell'
#> Its sides are:
#>        0.050 ,      0.050 ,      0.050    1/angstroms.
#> Its angles are:
#>       90.000 ,     90.000 ,     90.000    degrees.

# Create a reciprocal tetragonal unit cell with sides 1/20 and 1/60
ruc <- rec_unit_cell(1/20,1/60)
print(ruc)
#> This is an object of class 'rec_unit_cell'
#> Its sides are:
#>        0.050 ,      0.050 ,      0.017    1/angstroms.
#> Its angles are:
#>       90.000 ,     90.000 ,     90.000    degrees.

# Create a reciprocal orthogonal unit cell
ruc <- rec_unit_cell(1/40,1/15,1/30)
print(ruc)
#> This is an object of class 'rec_unit_cell'
#> Its sides are:
#>        0.025 ,      0.067 ,      0.033    1/angstroms.
#> Its angles are:
#>       90.000 ,     90.000 ,     90.000    degrees.