cell.coords(...)
## S3 method for class 'default':
cell.coords(abc, abg = c(90, 90, 90), digits = 3, ...)
## S3 method for class 'cryst1':
cell.coords(x, digits = 3, \dots)
## S3 method for class 'pdb':
cell.coords(x, digits = 3, \dots)cell.volume(...)
## S3 method for class 'cryst1':
cell.volume(x, ...)
## S3 method for class 'pdb':
cell.volume(x, ...)
cell.density(...)
## S3 method for class 'default':
cell.density(masses, volume, ...)
## S3 method for class 'pdb':
cell.density(x, ...)
cell.coords
returns a 3x3 matrix containing the Cartesian coordinates of lattice vectors arranged by columns.
cell.volume
returns a single element numeric vector containing the volume of the unit cell in Angstrom cube.
cell.density
returns a single element numeric vector containing the density of the unit cell in g.cm-3.cell.coords
is a generic function which computes a 3x3 matrix whose columns contrain the Cartesian coordinates of lattice vectors.
The 'a' and 'b' vectors are assumed to be respectively along the x-axis and in the xy-plane.
The default method takes directly the lattice parameters as arguments.
For objects of class cryst1
the lattice parameters are first extracted from the object and then the default method is called.
For objects of class pdb
the lattice parameters are extracted from their cryst1
component and the default method is called.cell.volume
is a generic function to compute the volume of a unit cell.
For objects of class cryst1
component is used.
cell.density
is a generic function to compute the density of a unit cell.
For objects of class cell.volume
function on the cryst1
component of the toSymbols
function and their masses are taken from the elements
data set.
Finally the density is calculated using the sum of the atomic masses and the volume of the unit cell.
cryst1
, pdb
, xyz2abc
x <- read.pdb(system.file("examples/PCBM_ODCB.pdb",package="Rpdb"))
cell.volume(x)
cell.density(x)
cell.coords(x)
Run the code above in your browser using DataLab