calculate_cell_volume: S3 generic to compute cell volume

Description Usage Arguments Value Examples

View source: R/cry_generics_S3.R

Description

The volume of a unit cell and a reciprocal unit cell can be calculated starting from specific objects, files, etc.

Usage

1

Arguments

x

An object used to select a method. Either an object of class unit_cell or an object of class rec_unit_cell.

...

Further arguments passed to or from other methods.

Value

V A real number. The volume (in angstroms^3 or angstroms^-3) of the input unit cell or reciprocal unit cell.

Examples

1
2
3
4
5
6
7
8
# Calculate the volume of a unit cell
uc <- unit_cell(20)
V <- calculate_cell_volume(uc)

# Calculate the volume of the corresponding reciprocal cell
ruc <- create_rec_unit_cell(uc)
Vrec <- calculate_cell_volume(ruc)
V*Vrec  # Should be 1!

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