Public API

Contents

Index

Public interface

Lattice

Missing docstring.

Missing docstring for CrystalSystem. Check Documenter's build log for details.

Missing docstring.

Missing docstring for Triclinic. Check Documenter's build log for details.

Missing docstring.

Missing docstring for Monoclinic. Check Documenter's build log for details.

Missing docstring.

Missing docstring for Orthorhombic. Check Documenter's build log for details.

Missing docstring.

Missing docstring for Tetragonal. Check Documenter's build log for details.

Missing docstring.

Missing docstring for Cubic. Check Documenter's build log for details.

Missing docstring.

Missing docstring for Trigonal. Check Documenter's build log for details.

Missing docstring.

Missing docstring for Hexagonal. Check Documenter's build log for details.

Missing docstring.

Missing docstring for Centering. Check Documenter's build log for details.

Missing docstring.

Missing docstring for BaseCentering. Check Documenter's build log for details.

Missing docstring.

Missing docstring for Primitive. Check Documenter's build log for details.

Missing docstring.

Missing docstring for BodyCentering. Check Documenter's build log for details.

Missing docstring.

Missing docstring for FaceCentering. Check Documenter's build log for details.

Missing docstring.

Missing docstring for RhombohedralCentering. Check Documenter's build log for details.

Missing docstring.

Missing docstring for BaseCentering. Check Documenter's build log for details.

Missing docstring.

Missing docstring for Bravais. Check Documenter's build log for details.

CrystallographyBase.LatticeType
Lattice(data::AbstractMatrix)

Construct a Lattice from a matrix.

Note

The basis vectors of the matrix are stored as columns.

Lattice(𝐚::AbstractVector, 𝐛::AbstractVector, 𝐜::AbstractVector)

Construct a Lattice from three basis vectors.

Lattice(basisvectors::AbstractVector{<:AbstractVector})

Construct a Lattice from a vector of three basis vectors.

Lattice(a, b, c, α, β, γ; axis = :a)

Construct a Lattice from the six cell parameters.

The default convention we used here is that edge vector 𝐚 in the positive x-axis direction, edge vector 𝐛 in the x-y plane with a positive y-axis component, and edge vector 𝐜 with a positive z-axis component in the Cartesian system. See Wikipedia. You can also choose axis = :c.

Lattice(cell::Cell)

Get the lattice of a Cell.

Lattice(g::MetricTensor)

Construct a Lattice from a MetricTensor.

Missing docstring.

Missing docstring for centering. Check Documenter's build log for details.

Missing docstring.

Missing docstring for crystalsystem. Check Documenter's build log for details.

Missing docstring.

Missing docstring for basis_vectors. Check Documenter's build log for details.

Missing docstring.

Missing docstring for cellparameters. Check Documenter's build log for details.

CrystallographyBase.supercellFunction
supercell(lattice::Lattice, repfactors::AbstractMatrix{<:Integer})
supercell(lattice::Lattice, repfactors::AbstractVector{<:Integer})
supercell(lattice::Lattice, repfactor::Integer)

Create a supercell from lattice.

supercell(cell::Cell, repfactors::AbstractMatrix{<:Integer})
supercell(cell::Cell, repfactors::AbstractVector{<:Integer})
supercell(cell::Cell, repfactor::Integer)

Create a supercell from cell.

Note

Currently, only integral replications are supported.

Reciprocal space

Note that we take $2pi$ as $1$, not the solid-state physics convention.

CrystallographyBase.ReciprocalLatticeType
ReciprocalLattice(data::MMatrix)

Construct a ReciprocalLattice.

Warning

You should not use this function directly, always use reciprocal of a Lattice.

Missing docstring.

Missing docstring for inv. Check Documenter's build log for details.

Missing docstring.

Missing docstring for reciprocal_mesh. Check Documenter's build log for details.

Miller and Miller–Bravais indices

Missing docstring.

Missing docstring for Miller. Check Documenter's build log for details.

Missing docstring.

Missing docstring for MillerBravais. Check Documenter's build log for details.

Missing docstring.

Missing docstring for ReciprocalMiller. Check Documenter's build log for details.

Missing docstring.

Missing docstring for ReciprocalMillerBravais. Check Documenter's build log for details.

Missing docstring.

Missing docstring for family. Check Documenter's build log for details.

Missing docstring.

Missing docstring for @m_str. Check Documenter's build log for details.

Metric tensor

CrystallographyBase.MetricTensorType
MetricTensor(𝐚::AbstractVector, 𝐛::AbstractVector, 𝐜::AbstractVector)

Generate a MetricTensor from the three basis vectors.

MetricTensor(lattice::Lattice)

Generate a MetricTensor from a Lattice.

MetricTensor(a, b, c, α, β, γ)

Generate a MetricTensor from the six cell parameters.

Missing docstring.

Missing docstring for directioncosine. Check Documenter's build log for details.

Missing docstring.

Missing docstring for directionangle. Check Documenter's build log for details.

CrystallographyBase.distanceFunction
distance(𝐚::AbstractVector, g::MetricTensor, 𝐛::AbstractVector)

Get the distance between two coordinates using a MetricTensor.

Missing docstring.

Missing docstring for interplanar_spacing. Check Documenter's build log for details.

Transformations

CrystallographyBase.CartesianFromFractionalType
CartesianFromFractional(lattice::Union{Lattice,ReciprocalLattice})
CartesianFromFractional(a, b, c, α, β, γ)

Get the transformation from fractional coordinates to Cartesian coordinates.

CrystallographyBase.FractionalFromCartesianType
FractionalFromCartesian(lattice::Union{Lattice,ReciprocalLattice})
FractionalFromCartesian(a, b, c, α, β, γ)

Get the transformation from Cartesian coordinates to fractional coordinates.

Others

CrystallographyBase.cellvolumeFunction
cellvolume(a, b, c, α, β, γ)

Calculate the cell volume from 6 cell parameters.

cellvolume(l::Lattice)
cellvolume(c::Cell)

Calculate the cell volume from a Lattice or a Cell.

cellvolume(g::MetricTensor)

Calculate the cell volume from a MetricTensor.

Symmetry

Crystallography.SeitzOperatorType
SeitzOperator(𝐑::AbstractMatrix, 𝐭::AbstractVector)
SeitzOperator(𝐑::AbstractMatrix)
SeitzOperator(𝐭::AbstractVector)

Construct a Seitz operator from matrices, vectors, or both.

The operator is defined by the following equation:

\[\left[ \begin{array}{ccc|c} & & & \\ & \mathbf{R} & & \mathbf{t} \\ & & & \\ \hline 0 & 0 & 0 & 1 \end{array} \right],\]

where $\mathbf{R}$ is a point group operation and $\mathbf{t}$ is a translation.

source