A struct representing a lattice vector triplet (h, k, l) in a crystal lattice.
More...
A struct representing a lattice vector triplet (h, k, l) in a crystal lattice.
The HKL
struct is used to represent a triplet of integers (h, k, l) that defines a lattice vector in a crystal lattice. The triplet is typically used to index the reciprocal lattice of the crystal lattice, with h, k, and l being the Miller indices of the lattice vector in the reciprocal lattice.
The HKL
struct provides methods to calculate the magnitude of the lattice vector using the lattice parameters of the crystal lattice, and to compare HKL
objects using the magnitude of the lattice vectors.
double occ::crystal::HKL::d |
( |
const Mat3 & |
lattice | ) |
const |
Calculates the magnitude of the lattice vector represented by this HKL
object.
The magnitude of the lattice vector is calculated using the lattice parameters of the crystal lattice, as follows:
\[
d = \sqrt{h^2 a^2 + k^2 b^2 + l^2 c^2 + 2 hk ab \cos \gamma + 2 hl ac
\cos \beta + 2 kl bc \cos \alpha}
\]
where (h, k, l) are the Miller indices of the lattice vector, and (a, b, c) and ( \(\alpha\), \(\beta\), \(\gamma\)) are the lattice parameters of the crystal lattice.
- Parameters
-
lattice | The lattice parameters of the crystal lattice, represented as a 3x3 matrix. The matrix must have the lattice vectors as columns, in the order (a, b, c). |
- Returns
- The magnitude of the lattice vector represented by this
HKL
object, as a floating-point value.