Public API
Contents
Index
MillerIndices.MillerMillerIndices.MillerBravaisMillerIndices.ReciprocalMillerMillerIndices.ReciprocalMillerBravaisCrystallographyBase.lengthofMillerIndices.anglebtwMillerIndices.familyofMillerIndices.interplanar_spacingMillerIndices.@m_str
Public interface
Types
MillerIndices.Miller — Type
Miller(i, j, k)Represent the Miller indices in the real space (crystal directions).
MillerIndices.MillerBravais — Type
MillerBravais(i, j, k, l)Represent the Miller–Bravais indices in the real space (crystal directions).
MillerIndices.ReciprocalMiller — Type
ReciprocalMiller(i, j, k)Represent the Miller indices in the reciprocal space (planes).
MillerIndices.ReciprocalMillerBravais — Type
ReciprocalMillerBravais(i, j, k, l)Represent the Miller–Bravais indices in the reciprocal space (planes).
Functions and macros
MillerIndices.familyof — Function
familyof(x::Union{Miller,MillerBravais,ReciprocalMiller,ReciprocalMillerBravais})List the all the directions/planes that are equivalent to x by symmetry.
MillerIndices.anglebtw — Function
anglebtw(x::Miller, y::Miller, g::MetricTensor)
anglebtw(x::MillerBravais, y::MillerBravais, g::MetricTensor)
anglebtw(x::ReciprocalMiller, y::ReciprocalMiller, g::MetricTensor)
anglebtw(x::ReciprocalMillerBravais, y::ReciprocalMillerBravais, g::MetricTensor)Calculate the angle (in degrees) between two directions by:
\[\cos\theta = \frac{\mathbf{x} \cdot \mathbf{y}}{\lvert\mathbf{x}\rvert \lvert\mathbf{y}\rvert} = \frac{\sum_{ij} x_i g_{ij} y_j}{\sqrt{\sum_{ij} x_i g_{ij} x_j} \sqrt{\sum_{ij} y_i g_{ij} y_j}}.\]
MillerIndices.interplanar_spacing — Function
interplanar_spacing(x::Union{ReciprocalMiller,ReciprocalMillerBravais}, g::MetricTensor)Calculate the interplanar spacing by:
\[d_{h\ k \ l} = \frac{1}{\lvert \mathbf{x}_{h\ k \ l}\rvert}.\]
CrystallographyBase.lengthof — Function
lengthof(x::Union{AbstractMiller,AbstractMillerBravais}, g::MetricTensor)Calculate the magnitude of a given indices with respect to a specified metric tensor.
MillerIndices.@m_str — Macro
m_str(s)Generate the Miller indices or Miller–Bravais indices quickly.
Examples
julia> m"[-1, 0, 1]"
3-element Miller:
-1
0
1
julia> m"<2, -1, -1, 3>"
4-element MillerBravais:
2
-1
-1
3
julia> m"(-1, 0, 1)"
3-element ReciprocalMiller:
-1
0
1
julia> m"(1, 0, -1, 0)"
4-element ReciprocalMillerBravais:
1
0
-1
0