UnitCell class¶

class
chemfiles.
CellShape
¶ Available cell shapes in Chemfiles:
CellType.Orthorhombic
: for cells where the three angles are 90°;CellType.Triclinic
: for cells where the three angles may not be 90°;CellType.Infinite
: for cells without periodic boundary conditions;

class
chemfiles.
UnitCell
(a, b, c, alpha=90.0, beta=90.0, gamma=90.0)¶ An
UnitCell
represent the box containing the atoms, and its periodicity.An unit cell is fully represented by three lenghts (a, b, c); and three angles (alpha, beta, gamma). The angles are stored in degrees, and the lenghts in Angstroms. The cell angles are defined as follow: alpha is the angles between the cell vectors b and c; beta as the angle between a and c; and gamma as the angle between a and b.
A cell also has a matricial representation, by projecting the three base vector into an orthonormal base. We choose to represent such matrix as an upper triangular matrix:
 a_x b_x c_x   0 b_y c_y   0 0 c_z 
Create a new
UnitCell
with cell lenghts ofa
,b
andc
, and cell anglesalpha
,beta
andgamma
.If alpha, beta and gamma are equal to 90.0, the new unit cell shape is
CellShape.Orthorhombic
. Else it isCellShape.Infinite
.