Computes the Cartesian coordinates of lattice vectors.
Usage
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)
Arguments
...
arguments passed to methods.
abc
a length 3 numeric vector containing the length of the a, b and c lattice vectors.
abg
a length 3 numeric vector containing the angles (degrees) between the a, b and c lattice vectors (alpha, beta, gamma).
digits
an integer used to round the returned matrix.
x
an R object containing lattice parameters.
Value
A 3x3 matrix containing the Cartesian coordinates of lattice vectors arranged by columns.
Details
These functions compute 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.