| Top |
| UnitCell * | cell_new () |
| UnitCell * | cell_new_from_cell () |
| UnitCell * | cell_new_from_direct_axes () |
| UnitCell * | cell_new_from_parameters () |
| UnitCell * | cell_new_from_reciprocal_axes () |
| void | cell_free () |
| int | cell_get_cartesian () |
| int | cell_get_parameters () |
| int | cell_get_reciprocal () |
| char | cell_get_centering () |
| LatticeType | cell_get_lattice_type () |
| char | cell_get_unique_axis () |
| int | cell_has_parameters () |
| void | cell_set_cartesian () |
| void | cell_set_parameters () |
| void | cell_set_reciprocal () |
| void | cell_set_centering () |
| void | cell_set_lattice_type () |
| void | cell_set_unique_axis () |
| UnitCell * | cell_transform () |
| UnitCell * | cell_transform_inverse () |
| void | tfn_combine () |
| UnitCellTransformation * | tfn_identity () |
| UnitCellTransformation * | tfn_from_intmat () |
| UnitCellTransformation * | tfn_inverse () |
| void | tfn_print () |
| double * | tfn_vector () |
| void | tfn_free () |
| const char * | cell_rep () |
UnitCell * cell_new_from_direct_axes (struct rvec as,struct rvec bs,struct rvec cs);
UnitCell * cell_new_from_parameters (double a,double b,double c,double alpha,double beta,double gamma);
UnitCell * cell_new_from_reciprocal_axes (struct rvec as,struct rvec bs,struct rvec cs);
void
cell_free (UnitCell *cell);
Frees a UnitCell, and all internal resources concerning that cell.
int cell_get_cartesian (UnitCell *cell,double *ax,double *ay,double *az,double *bx,double *by,double *bz,double *cx,double *cy,double *cz);
int cell_get_parameters (UnitCell *cell,double *a,double *b,double *c,double *alpha,double *beta,double *gamma);
int cell_get_reciprocal (UnitCell *cell,double *asx,double *asy,double *asz,double *bsx,double *bsy,double *bsz,double *csx,double *csy,double *csz);
void cell_set_cartesian (UnitCell *cell,double ax,double ay,double az,double bx,double by,double bz,double cx,double cy,double cz);
void cell_set_parameters (UnitCell *cell,double a,double b,double c,double alpha,double beta,double gamma);
void cell_set_reciprocal (UnitCell *cell,double asx,double asy,double asz,double bsx,double bsy,double bsz,double csx,double csy,double csz);
UnitCell * cell_transform (UnitCell *cell,UnitCellTransformation *t);
Applies t
to cell
. Note that the lattice type, centering and unique axis
information will not be preserved.
UnitCell * cell_transform_inverse (UnitCell *cell,UnitCellTransformation *t);
Applies the inverse of t
to cell
.
void tfn_combine (UnitCellTransformation *t,double *na,double *nb,double *nc);
Updates t
such that it represents its previous transformation followed by
a new transformation, corresponding to letting a = naa*a + nab*b + nac*c.
Likewise, a = nba*a + nbb*b + nbc*c and c = nca*a + ncb*b + ncc*c.
UnitCellTransformation *
tfn_inverse (UnitCellTransformation *t);
Calculates the inverse of t
. That is, if you apply cell_transform() to a
UnitCell using t
, and then apply cell_transform() to the result using
tfn_inverse(t
) instead of t
, you will recover the same lattice vectors
(but note that the lattice type, centering and unique axis information will
be lost).
double * tfn_vector (double a,double b,double c);
This is a convenience function to use when sending vectors to tfn_combine():
tfn_combine(tfn, tfn_vector(1,0,0),
tfn_vector(0,2,0),
tfn_vector(0,0,1));
typedef struct _unitcell UnitCell;
This data structure is opaque. You must use the available accessor functions to read and write its contents.
An enumeration of the possible lattice types: triclinic, monoclinic, orthorhombic, tetragonal, rhombohedral, hexagonal and cubic.
typedef struct _unitcelltransformation UnitCellTransformation;
This opaque data structure represents a tranformation of a unit cell, such as a rotation or a centering operation.