The UnitCell class provides a representation of a crystal's unit cell.
#include <avogadro/core/unitcell.h>
|
| UnitCell (Real a, Real b, Real c, Real alpha, Real beta, Real gamma) |
|
| UnitCell (const Vector3 &a, const Vector3 &b, const Vector3 &c) |
|
| UnitCell (const Matrix3 &cellMatrix) |
|
| UnitCell (const UnitCell &other) |
|
UnitCell & | operator= (UnitCell other) |
|
Real | alpha () const |
|
Real | beta () const |
|
Real | gamma () const |
|
void | setCellParameters (Real a, Real b, Real c, Real alpha, Real beta, Real gamma) |
|
Real | volume () const |
|
Vector3 | imageOffset (int i, int j, int k) const |
|
const Matrix3 & | fractionalMatrix () const |
|
void | setFractionalMatrix (const Matrix3 &m) |
|
Vector3 | minimumImage (const Vector3 &v) const |
|
Real | distance (const Vector3 &v1, const Vector3 &v2) const |
|
|
Vector3 | aVector () const |
|
Vector3 | bVector () const |
|
Vector3 | cVector () const |
|
void | setAVector (const Vector3 &v) |
|
void | setBVector (const Vector3 &v) |
|
void | setCVector (const Vector3 &v) |
|
|
Real | a () const |
|
Real | b () const |
|
Real | c () const |
|
|
const Matrix3 & | cellMatrix () const |
|
void | setCellMatrix (const Matrix3 &m) |
|
|
Vector3 | toFractional (const Vector3 &cart) const |
|
void | toFractional (const Vector3 &cart, Vector3 &frac) const |
|
Vector3 | toCartesian (const Vector3 &frac) const |
|
void | toCartesian (const Vector3 &frac, Vector3 &cart) const |
|
|
Vector3 | wrapFractional (const Vector3 &frac) const |
|
void | wrapFractional (const Vector3 &frac, Vector3 &wrapped) const |
|
|
Vector3 | wrapCartesian (const Vector3 &cart) const |
|
void | wrapCartesian (const Vector3 &cart, Vector3 &wrapped) const |
|
Vector3 aVector |
( |
| ) |
const |
The lattice vector in the unit cell. Units: Angstrom
Vector3 bVector |
( |
| ) |
const |
The lattice vector in the unit cell. Units: Angstrom
Vector3 cVector |
( |
| ) |
const |
The lattice vector in the unit cell. Units: Angstrom
void setAVector |
( |
const Vector3 & |
v | ) |
|
The lattice vector in the unit cell. Units: Angstrom
void setBVector |
( |
const Vector3 & |
v | ) |
|
The lattice vector in the unit cell. Units: Angstrom
void setCVector |
( |
const Vector3 & |
v | ) |
|
The lattice vector in the unit cell. Units: Angstrom
The length of the lattice vector in the unit cell. Units: Angstrom
The length of the lattice vector in the unit cell. Units: Angstrom
The length of the lattice vector in the unit cell. Units: Angstrom
The angle (radians) between the 'b' and 'c' lattice vectors.
The angle (radians) between the 'c' and 'a' lattice vectors.
The angle (radians) between the 'a' and 'b' lattice vectors.
Set the cell parameters defining the unit cell. a, b, and c are in Angstrom, alpha, beta, and gamma are in radians.
The volume of the unit cell in cubic Angstroms.
Vector3 imageOffset |
( |
int |
i, |
|
|
int |
j, |
|
|
int |
k |
|
) |
| const |
- Returns
- A vector pointing to the origin of the translational image that is i images in the a() direction, j images in the b() direction, and k images in the c() direction.
const Matrix3 & cellMatrix |
( |
| ) |
const |
The cell matrix with lattice vectors as columns. Units: Angstrom
void setCellMatrix |
( |
const Matrix3 & |
m | ) |
|
The cell matrix with lattice vectors as columns. Units: Angstrom
const Matrix3 & fractionalMatrix |
( |
| ) |
const |
The matrix used to convert cartesian to fractional coordinates.
Vector3 toFractional |
( |
const Vector3 & |
cart | ) |
const |
Convert the cartesian coordinate cart to fractional (lattice) units.
void toFractional |
( |
const Vector3 & |
cart, |
|
|
Vector3 & |
frac |
|
) |
| const |
Convert the cartesian coordinate cart to fractional (lattice) units.
Vector3 toCartesian |
( |
const Vector3 & |
frac | ) |
const |
Convert the fractional (lattice) coordinate frac to cartesian units.
void toCartesian |
( |
const Vector3 & |
frac, |
|
|
Vector3 & |
cart |
|
) |
| const |
Convert the cartesian coordinate cart to fractional (lattice) units.
Vector3 wrapFractional |
( |
const Vector3 & |
frac | ) |
const |
Adjust the fractional (lattice) coordinate frac so that it lies within the unit cell.
void wrapFractional |
( |
const Vector3 & |
frac, |
|
|
Vector3 & |
wrapped |
|
) |
| const |
Adjust the fractional (lattice) coordinate frac so that it lies within the unit cell.
Vector3 wrapCartesian |
( |
const Vector3 & |
cart | ) |
const |
Adjust the cartesian coordinate cart so that it lies within the unit cell.
void wrapCartesian |
( |
const Vector3 & |
cart, |
|
|
Vector3 & |
wrapped |
|
) |
| const |
Adjust the cartesian coordinate cart so that it lies within the unit cell.
Vector3 minimumImageFractional |
( |
const Vector3 & |
v | ) |
|
|
static |
Find the minimum fractional image of a fractional vector v. A minimum image has all fractional coordinates between -0.5 and 0.5.
Vector3 minimumImage |
( |
const Vector3 & |
v | ) |
const |
Find the minimum image of a Cartesian vector v. A minimum image has all fractional coordinates between -0.5 and 0.5
Real distance |
( |
const Vector3 & |
v1, |
|
|
const Vector3 & |
v2 |
|
) |
| const |
Find the shortest distance between vectors v1 and v2.
The documentation for this class was generated from the following file: