CrystallographyBase.MetricTensor
— MethodMetricTensor(a, b, c, α, β, γ)
Generate a MetricTensor
from the six cell parameters.
CrystallographyBase.MetricTensor
— MethodMetricTensor(𝐚::AbstractVector, 𝐛::AbstractVector, 𝐜::AbstractVector)
Generate a MetricTensor
from the three basis vectors.
CrystallographyBase.MetricTensor
— MethodMetricTensor(lattice::Lattice)
Generate a MetricTensor
from a Lattice
.
CrystallographyBase.MonkhorstPackGrid
— TypeMonkhorstPackGrid(mesh, is_shift)
Represent the Monkhorst–Pack grid.
Arguments
mesh
: A length-three vector specifying the k-point grid ($nk_1 × nk_2 × nk_3$) as in Monkhorst–Pack grids.is_shift
: A length-three vector specifying whether the grid is displaced by half a grid step in the corresponding directions.
CrystallographyBase.PrimitiveFromStandardized
— MethodPrimitiveFromStandardized(tf::AbstractMatrix)
Construct the transformation from a standardized cell to a primitive cell.
CrystallographyBase.StandardizedFromPrimitive
— MethodStandardizedFromPrimitive(tf::AbstractMatrix)
Construct the transformation from a primitive cell to a standardized cell.
CrystallographyCore.Lattice
— MethodLattice(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
.
CrystallographyCore.Lattice
— MethodLattice(g::MetricTensor)
Construct a Lattice
from a MetricTensor
.
CrystallographyBase.atomicmass
— Functionatomicmass(element::Element)
atomicmass(i::Union{AbstractString,Integer,Symbol})
Return the atomic mass of an element.
This function is by default not implemented. You need to load either package Mendeleev.jl
or PeriodicTable.jl
to use it.
CrystallographyBase.cellvolume
— Methodcellvolume(a, b, c, α, β, γ)
Calculate the cell volume from 6 cell parameters.
CrystallographyBase.cellvolume
— Methodcellvolume(l::Lattice)
cellvolume(c::Cell)
Calculate the cell volume from a Lattice
or a Cell
.
CrystallographyBase.cellvolume
— Methodcellvolume(g::MetricTensor)
Calculate the cell volume from a MetricTensor
.
CrystallographyBase.crystaldensity
— Methodcrystaldensity(lattice::Lattice, atoms)
crystaldensity(cell::Cell)
Calculate the density of a crystal structure.
Here, atoms
is an iterable of atomic numbers, element names, symbols, or Mendeleev.Element
s. You can extend the atomicmass
method to work with custom types.
CrystallographyBase.distance
— Methoddistance(𝐚::ReducedCoordinates, 𝐛::ReducedCoordinates, g::MetricTensor)
Get the distance between two atomic coordinates.
CrystallographyBase.islefthanded
— Methodislefthanded(lattice::Lattice)
Test whether the basis vectors are defined to be left-handed.
The basis vectors are left-handed if and only if
\[\mathbf{a} \cdot (\mathbf{b} \times \mathbf{c}) < 0.\]
CrystallographyBase.isrighthanded
— Methodisrighthanded(lattice::Lattice)
Test whether the basis vectors are defined to be right-handed.
The basis vectors are right-handed if and only if
\[\mathbf{a} \cdot (\mathbf{b} \times \mathbf{c}) > 0.\]
CrystallographyBase.latticeconstants
— Methodlatticeconstants(lattice::Lattice)
Get the six lattice constants from a lattice
.
CrystallographyBase.latticeconstants
— Methodlatticeconstants(g::MetricTensor)
Get the six lattice constants from a MetricTensor
.
CrystallographyBase.latticesystem
— Methodlatticesystem(bravais::Bravais)
Get the lattice system of a Bravais lattice.
CrystallographyBase.latticesystem
— Methodlatticesystem(lattice::Lattice; angletol=1e-5, lengthtol=1e-5)
Get the lattice system of a Lattice
.
CrystallographyBase.lengthof
— Methodlengthof(𝐚::ReducedCoordinates, g::MetricTensor)
Get the length of an atomic coordinates.
CrystallographyBase.periodicity
— Methodperiodicity(lattice::Lattice)
Get crystal periodicity in $x$, $y$, and $z$ direction from the Lattice
.
CrystallographyBase.super
— Methodsuper(cell::Cell, factors::AbstractMatrix{<:Integer})
super(cell::Cell, factors::AbstractVector{<:Integer})
super(cell::Cell, factor::Integer)
Create a supercell from cell
.
Currently, only integral replications are supported.
CrystallographyBase.super
— Methodsuper(lattice::Lattice, factors::AbstractMatrix{<:Integer})
super(lattice::Lattice, factors::AbstractVector{<:Integer})
super(lattice::Lattice, factor::Integer)
Create a supercell from lattice
.