UnitCell

This is a Python binding to the C++ class Mantid::Geometry::UnitCell. The methods on this class follow naming conventions for parameters as defined in the International Tables for Crystallography.

class mantid.geometry.UnitCell((object)arg1)
__init__((object)arg1) → None :
Default constructor, with a=b=c=1 \rm{\AA}, \alpha = \beta = \gamma = 90^\circ
__init__( (object)self, (UnitCell)other) -> None :
Copy constructor for creating a new unit cell.
__init__( (object)self, (float)_a, (float)_b, (float)_c) -> None :
Constructor using a, b, c (in \rm{\AA}), \alpha=\beta=\gamma=90^\circ
__init__( (object)self, (float)_a, (float)_b, (float)_c, (float)_alpha, (float)_beta, (float)_gamma [, (int)Unit=0]) -> None :
Constructor using a, b, c (in \rm{\AA}), \alpha, \beta, \gamma (in degrees or radians). The optional parameter Unit controls the units for the angles, and can have the value of Degrees or Radians. By default Unit = Degrees.
a((UnitCell)self) → float :

Returns the length of the a direction of the unit cell in \rm{\AA}.

a1((UnitCell)self) → float :

Returns the length of the a_{1} = a direction of the unit cell. This is an alias for a().

a2((UnitCell)self) → float :

Returns the length of the a_{2} = b direction of the unit cell. This is an alias for b().

a3((UnitCell)self) → float :

Returns the length of the a_{2} = c direction of the unit cell. This is an alias for c().

alpha((UnitCell)self) → float :

Returns the \alpha angle for this unit cell in degrees.

alpha1((UnitCell)self) → float :

Returns the \alpha_{1} = \alpha angle of the unit cell in radians. See also alpha().

alpha2((UnitCell)self) → float :

Returns the \alpha_{2} = \beta angle of the unit cell in radians. See also beta().

alpha3((UnitCell)self) → float :

Returns the \alpha_{3} = \gamma angle of the unit cell in radians. See also gamma().

alphastar((UnitCell)self) → float :

Returns the reciprocal \alpha angle for this unit cell in degrees.

astar((UnitCell)self) → float :

Returns the length of the reciprocal a direction for this unit cell in reciprocal \rm{\AA}.

b((UnitCell)self) → float :

Returns the length of the b direction of the unit cell in \rm{\AA}.

b1((UnitCell)self) → float :

Returns the length of the b_{1} = a^{*} direction of the unit cell. This is an alias for astar().

b2((UnitCell)self) → float :

Returns the length of the b_{2} = b^{*} direction of the unit cell. This is an alias for bstar().

b3((UnitCell)self) → float :

Returns the length of the b_{3} = c^{*} direction of the unit cell. This is an alias for cstar().

beta((UnitCell)self) → float :

Returns the \beta angle for this unit cell in degrees.

beta1((UnitCell)self) → float :

Returns the \beta_{1} = \alpha^{*} angle of the unit cell in radians. See also alphastar().

beta2((UnitCell)self) → float :

Returns the \beta_{2} = \beta^{*} angle of the unit cell in radians. See also betastar().

beta3((UnitCell)self) → float :

Returns the \beta_{3} = \gamma^{*} angle of the unit cell in radians. See also gammastar().

betastar((UnitCell)self) → float :

Returns the \beta^{*} angle for this unit cell in degrees.

bstar((UnitCell)self) → float :

Returns the length of the b^{*} direction for this unit cell in reciprocal \rm{\AA}.

c((UnitCell)self) → float :

Returns the length of the c direction of the unit cell in \rm{\AA}.

cstar((UnitCell)self) → float :

Returns the length of the c^{*} direction for this unit cell in reciprocal \rm{\AA}.

d((UnitCell)self, (float)h, (float)k, (float)l) → float :
Returns d-spacing for a given H, K, L coordinate in \rm{\AA}.
d( (UnitCell)self, (V3D)hkl) -> float :
Returns d-spacing for a given H, K, L coordinate in \rm{\AA}.
dstar((UnitCell)self, (float)h, (float)k, (float)l) → float :

Returns d^{*} = 1/d for a given H, K, L coordinate in \rm{\AA}^{3}.

errora((UnitCell)self) → float :

Returns the error in the a unit cell length.

erroralpha((UnitCell)self[, (int)Unit=0]) → float :

Returns the error in the \alpha angle of the unit cell.

errorb((UnitCell)self) → float :

Returns the error in the b unit cell length.

errorbeta((UnitCell)self[, (int)Unit=0]) → float :

Returns the error in \beta angle of the unit cell.

errorc((UnitCell)self) → float :

Returns the error in the c unit cell length.

errorgamma((UnitCell)self[, (int)Unit=0]) → float :

Returns the error in \gamma angle of the unit cell.

gamma((UnitCell)self) → float :

Returns the \gamma angle for this unit cell in degrees.

gammastar((UnitCell)self) → float :

Returns the \gamma^{*} angle for this unit cell in degrees.

getB((UnitCell)self) → numpy.ndarray :

Returns the B matrix for this unit cell. This will be in a right-handed coordinate system and using the Busing-Levy convention. This will return a numpy.ndarray with shape (3,3).

getBinv((UnitCell)self) → numpy.ndarray :

Returns the inverse of the B matrix for this unit cell.This will return a numpy.ndarray with shape (3,3). See also getB().

getG((UnitCell)self) → numpy.ndarray :

Returns the metric tensor for the unit cell. This will return a numpy.ndarray with shape (3,3).

getGstar((UnitCell)self) → numpy.ndarray :

Returns the metric tensor for the reciprocal unit cell. This will return a numpy.ndarray with shape (3,3).

getMaxOrder((UnitCell)self) → int :

Returns the number of modulation vectors. This will return an int.

getModHKL((UnitCell)self) → numpy.ndarray :

Returns the ModHKL matrix for this unit cell. This will be in a right-handed coordinate system and using the Busing-Levy convention. This will return a numpy.ndarray with shape (3,3).

recAngle((UnitCell)self, (float)h1, (float)k1, (float)l1, (float)h2, (float)k2, (float)l2[, (int)Unit=0]) → float :

Returns the angle in reciprocal space between vectors given by (h_1, k_1, l_1) and (h_2, k_2, l_2) (in degrees or radians). The optional parameter Unit controls the units for the angles, and can have the value of Degrees or Radians. By default Unit = Degrees

recVolume((UnitCell)self) → float :

Return the volume of the reciprocal unit cell (in \rm{\AA}^{-3})

recalculateFromGstar((UnitCell)self, (object)NewGstar) → None :

Recalculate the unit cell parameters from a metric tensor. This method accepts a numpy.ndarray with shape (3,3).

set((UnitCell)self, (float)_a, (float)_b, (float)_c, (float)_alpha, (float)_beta, (float)_gamma[, (int)Unit=0]) → None :

Set the parameters of the unit cell. Angles can be set in eitherdegrees or radians using the Unit parameter (0 = degrees, 1 = radians)

setError((UnitCell)self, (float)_aerr, (float)_berr, (float)_cerr, (float)_alphaerr, (float)_betaerr, (float)_gammaerr[, (int)Unit=0]) → None :

Set the errors in the unit cell parameters.

setErrora((UnitCell)self, (float)_aerr) → None :

Set the error in the length of the a direction of the unit cell.

setErroralpha((UnitCell)self, (float)_alphaerr[, (int)Unit=0]) → None :

Set the error in the \alpha angle of the unit cell.

setErrorb((UnitCell)self, (float)_berr) → None :

Set the error in the length of the b direction of the unit cell.

setErrorbeta((UnitCell)self, (float)_betaerr[, (int)Unit=0]) → None :

Set the error in the \beta angle of the unit cell using the Unit parameter.

setErrorc((UnitCell)self, (float)_cerr) → None :

Set the error in the length of the c direction of the unit cell.

setErrorgamma((UnitCell)self, (float)_gammaerr[, (int)Unit=0]) → None :

Set the error in the \gamma angle of the unit cell using the Unit parameter.

seta((UnitCell)self, (float)_a) → None :

Set the length of the a direction of the unit cell.

setalpha((UnitCell)self, (float)_alpha[, (int)Unit=0]) → None :

Set the \alpha angle of the unit cell. The angle can be set either in degrees or radians using the Unit parameter.

setb((UnitCell)self, (float)_b) → None :

Set the length of the b direction of the unit cell.

setbeta((UnitCell)self, (float)_beta[, (int)Unit=0]) → None :

Set the \beta angle of the unit cell. The angle can be set either in degrees or radians using the Unit parameter.

setc((UnitCell)self, (float)_c) → None :

Set the length of the c direction of the unit cell.

setgamma((UnitCell)self, (float)_gamma[, (int)Unit=0]) → None :

Set the \gamma angle of the unit cell. The angle can be set either in degrees or radians using the Unit parameter.

volume((UnitCell)self) → float :

Return the volume of the unit cell (in \rm{\AA}{^3})