UnitCell

Chemfiles.UnitCell — Type

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.CellShape — Type

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.UnitCell — Type
UnitCell(lengths::Vector{Float64}) -> UnitCell
UnitCell(
    lengths::Vector{Float64},
    angles::Vector{Float64}
) -> UnitCell

Create an UnitCell from the given lengths and angles.

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

Create an UnitCell from the given 3x3 cell matrix.

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

Get the three cell angles in degrees.

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

Get the three cell lengths in angstroms.

source
Chemfiles.matrix — Method
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.shape — Method
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