Bravais lattices#
For the full technical reference see Bravais lattices
For the description of each Bravais lattice type see Bravais lattices.
Bravais lattice notation and standardization follows Setyawan and Curtarolo [1].
Each Bravais lattice is an instance of Lattice class.
For each Bravais lattice system there is a function defined, that constructs
the instance of Lattice class from the set of relevant parameters. For the
names of the constructors and corresponding parameters see
dedicated pages (for full reference see
Api reference).
Import#
>>> # Exact import
>>> from wulfric.bravais_lattice.constructor import CUB
>>> # Explicit import
>>> from wulfric.bravais_lattice import CUB
>>> # Recommended import
>>> from wulfric import CUB
Creation#
>>> lattice = CUB(1)
>>> lattice.parameters
(1.0, 1.0, 1.0, 90.0, 90.0, 90.0)
Constructor can be used to get the cell instead of the lattice:
>>> cell = CUB(1, return_cell=True)
>>> cell
array([[1, 0, 0],
[0, 1, 0],
[0, 0, 1]])
Predefined examples#
For each type and variation a predefined example of the lattice is available. It could be accessed in a following way:
>>> import wulfric as wulf
>>> cubic_example = wulf.lattice_example("cub")
>>> cubic_example.variation
'CUB'
Hint
Capitalization of the name of the lattice example is not important:
CUB, CUb, CuB, cUB, Cub, cUb, cuB, and cub are equivalent.