Learn R Programming

cry (version 0.5.2)

rec_unit_cell: Constructor for an S3 object of class "rec_unit_cell.

Description

This represents a crystal reciprocal unit cell.

Usage

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

Value

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

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.

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

Run this code
# Create a monoclinic reciprocal unit cell
ruc <- unit_cell(0.115,0.033,0.077,90,120,90)
print(ruc)

# Create a cubic cell (default)
ruc <- rec_unit_cell()
print(ruc)

# Create a reciprocal cubic cell with side 1/20
ruc <- rec_unit_cell(1/20)
print(ruc)

# Create a reciprocal tetragonal unit cell with sides 1/20 and 1/60
ruc <- rec_unit_cell(1/20,1/60)
print(ruc)

# Create a reciprocal orthogonal unit cell
ruc <- rec_unit_cell(1/40,1/15,1/30)
print(ruc)

Run the code above in your browser using DataLab