Learn R Programming

Rpdb (version 2.0)

cell.volume: Volume of a Unit Cell

Description

Computes the volume of a unit cell.

Usage

cell.volume(...)

## S3 method for class 'cryst1': cell.volume(x, ...)

## S3 method for class 'pdb': cell.volume(x, ...)

Arguments

...
further arguments passed to or from other methods.
x
an R object containing unit cell parameters

Value

  • Return a single element numeric vector containing the volume of the unit cell in Angstrom cube.

Details

cell.volume is a generic function to compute the volume of a unit cell.

For objects of class cryst1, the cell.coords function is called to build a matrix containing the cartesian coordinates of the lattice vectors. Then, these vector are used to compute the volume of the unit cell.

For objects of class pdb, their cryst1 component is used.

See Also

cell.coords, cryst1, pdb

Examples

Run this code
x <- read.pdb(system.file("examples/PCBM_ODCB.pdb",package="Rpdb"))
cell.volume(x)

Run the code above in your browser using DataLab