UnitCell type and associated function

type UnitCell

An UnitCell describe the bounding box of a system. It is represented by three base vectors of lengthes a, b and c; and the angles between these vectors are alpha, beta and gamma.

function UnitCell(ptr::Ptr{lib.CHFL_CELL})
An UnitCell describe the bounding box of a system. It is represented by three base vectors of lengthes a, b and c; and the angles between these vectors are alpha, beta and gamma.
function UnitCell(a::Number, b::Number, c::Number)
Create an UnitCell from the three lenghts, with all the angles equal to 90°.
function UnitCell(a::Number, b::Number, c::Number, α::Number, β::Number, γ::Number)
Create an UnitCell from the three lenghts and three angles.
function UnitCell(frame::Frame)
Get a copy of the UnitCell of a frame.
function CellShape(value)
function deepcopy(cell::UnitCell)
Make a deep copy of a cell.
function volume(cell::UnitCell)
Get the unit cell volume
function lengths(cell::UnitCell)
Get the three cell lenghts (a, b and c) in angstroms.
function set_lengths!(cell::UnitCell, a::Real, b::Real, c::Real)

Set the cell lenghts to a, b and c.

a, b and c should be in angstroms.

function angles(cell::UnitCell)
Get the three cell angles (alpha, beta and gamma) in degrees.
function set_angles!(cell::UnitCell, α::Real, β::Real, γ::Real)

Set the cell angles to α, β and γ.

α, β and γ should be in degrees.

function cell_matrix(cell::UnitCell)

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 |
function shape(cell::UnitCell)
Get the cell shape, as a CellShape value
function set_shape!(cell::UnitCell, shape::CellShape)
Set the cell shape to the given shape.
function wrap!(cell::UnitCell, vector::Vector{Float64})
Wrap a vector in the unit cell.
type CellShape

function CellShape(value)