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

Description Usage Arguments Details Value Examples

View source: R/cell_S3.R

Description

This represents a crystal reciprocal unit cell.

Usage

1
2
3
4
5
6
7
8
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.

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).

Value

An object of class "rec_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 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)

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