Handling of unit cells, cell parameters and reciprocal axis matrices.
|
Functions
|
|
|
|
|
CellFromABC
|
CellFromABC (
a,
b,
c,
alpha,
beta,
gamma,
)
Return a Cell() object corresponding to the given unit cell
parameters, with a standard orientation() |
|
|
CellFromFile
|
CellFromFile (
filename,
wavelength=None,
standardize=1,
hardware=None,
axcrit=None,
transformtrigonal=1,
pointgroup=None,
bravaistype=None,
)
Read a unit-cell file, and return a Cell() object.
The only argument that is obligatory is the filename. Based on the
filename, this routine will run similar functions from other modules
that can read a unit cell from a ".rmat" file or a denzo ".x" file.
It is useful to either specify a hardware object, or at the very
least a wavelength, as many methods of the Cell will not work without
them.
All the other arguments are hints to control the cell standardization
algorithm. Since ".rmat" files can contain the standardized cell,
these options might be ignored in some cases (but any discrepancies
normally result in warning messages. |
|
|
CellInCanvas
|
CellInCanvas (
cell,
canvas,
normalize=1,
)
Draw the direct and reciprocal cell vectors into the given canvas.
If normalize==1, all vectors are drawn with unit lengths. If
normalize==0, all vectors are drawn with relative lengths. |
|
|
CrystalSystem
|
CrystalSystem (
a,
b,
c,
alpha,
beta,
gamma,
)
Return the name of the highest crystal system that is
compatible with the given cell parameters, by comparing
angles and lengths with fixed tolerances |
|
|
DenzoRotatedMatrix
|
DenzoRotatedMatrix (
a,
b,
c,
alpha,
beta,
gamma,
xrot,
yrot,
zrot,
)
Returns an Rmat containing the given unit cell and
orientation, given in denzo parameters. |
|
|
FakeCell
|
FakeCell ( hardware=None )
Return a cubic Cell() with a,b,c=100 |
|
|
LowSpaceGroup
|
LowSpaceGroup (
a,
b,
c,
alpha,
beta,
gamma,
bravais='P',
)
Return the lowest-symmetry space group that is compatible with the
lattice symmetry exposed by the 6 given cell parameters and has
the given Bravais type. |
|
|
StdCrystalSystem
|
StdCrystalSystem (
a,
b,
c,
alpha,
beta,
gamma,
)
Returns the name of the highest crystal system compatible with
the given 6 cell parameters. |
|
|
VolumeSigma
|
VolumeSigma (
a,
b,
c,
al,
be,
ga,
)
Given cell parameters each with their standard deviation,
calculate the unit cell volume and its standard deviation
Each of the parameters should be a 2-tuple of (value, sigma),
and the return value is also (volume, sigma) |
|
|
bldmat
|
bldmat (
v1,
v2,
v3,
)
Builds a matrix from 3 columnar vectors |
|
|
celvolume
|
celvolume ( cel )
Calculate the cell volume given 6 cell parameters as a 6-tuple |
|
|
splitmat
|
splitmat ( m )
Split a matrix into its 3 columns |
|
|
vec_reduce
|
vec_reduce (
a,
b,
c,
)
Given three non-coplanar lattice vectors a,b,c; calculate three
shortest possible non-coplanar lattice vectors using a Buerger cell
reduction. Return as a 3-tuple a,b,c from shortest to longest. |
|
Classes
|
|
| CommandLineCell | Class to convert command line arguments and many defaults into a Cell object | | ModulatedCell | A specialized Cell() class for modulated structures. This is only | | NonModulatedCell | Store a unit cell orientation and perform operations on it. | | error | Unit cell error class |
|
|