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

Description Usage Arguments Details Value Examples

View source: R/cell_S3.R

Description

This represents a crystal unit cell.

Usage

1
unit_cell(a = NULL, b = NULL, c = NULL, aa = NULL, bb = NULL, cc = NULL)

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.

Details

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

Value

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Create a monoclinic unit cell
uc <- unit_cell(10,30,15,90,60,90)
print(uc)

# Create a cubic cell (default)
uc <- unit_cell()
print(uc)

# Create a cubic cell with side 20
uc <- unit_cell(20)
print(uc)

# Create a tetragonal unit cell with sides 20 and 60
uc <- unit_cell(20,60)
print(uc)

# Create an orthogonal unit cell
uc <- unit_cell(40,15,30)
print(uc)

cry documentation built on May 3, 2021, 9:06 a.m.