UnitCell

Chemfiles.UnitCellType

A UnitCell describes the bounding box of a system. It is represented by a 3x3 matrix containing the base vectors a, b and c.

source
Chemfiles.CellShapeType

The possible shape for an unit cell are:

  • Chemfiles.Orthorhombic for unit cells with the three angles are 90°.
  • Chemfiles.Triclinic for unit cells where the three angles may not be 90°.
  • Chemfiles.Infinite for unit cells without boundaries.
source
Chemfiles.UnitCellType
UnitCell(lengths::Vector{Float64}) -> UnitCell
UnitCell(
    lengths::Vector{Float64},
    angles::Vector{Float64}
) -> UnitCell

Create an UnitCell from the given lengths and angles.

source
Chemfiles.UnitCellMethod
UnitCell(matrix::Matrix{Float64}) -> UnitCell

Create an UnitCell from the given 3x3 cell matrix.

source
Chemfiles.anglesMethod
angles(cell::UnitCell) -> Vector{Float64}

Get the three cell angles in degrees.

source
Chemfiles.lengthsMethod
lengths(cell::UnitCell) -> Vector{Float64}

Get the three cell lengths in angstroms.

source
Chemfiles.matrixMethod
matrix(cell::UnitCell) -> Matrix{Float64}

Get the cell matricial representation, i.e. the representation of the three base vectors as:

    | a_x   b_x   c_x |
    |  0    b_y   c_y |
    |  0     0    c_z |
source
Chemfiles.set_angles!Method
set_angles!(cell::UnitCell, angles::Vector{Float64})

Set the cell angles to the given values. The angles should be in degrees.

source
Chemfiles.set_lengths!Method
set_lengths!(cell::UnitCell, lengths::Vector{Float64})

Set the cell lengths to the given values. The lengths should be in angstroms.

source
Chemfiles.shapeMethod
shape(cell::UnitCell) -> CellShape

Get the cell shape, as a CellShape value.

source
Chemfiles.wrap!Method
wrap!(
    cell::UnitCell,
    vector::Vector{Float64}
) -> Vector{Float64}

Wrap a vector in the unit cell.

source