SiteIndexConverter#
- class libcasm.xtal.SiteIndexConverter(
- self: SiteIndexConverter,
- transformation_matrix_to_super: numpy.ndarray[numpy.int64[3, 3]],
- n_sublattice: int,
Bases:
pybind11_object
Convert between integral site indices \((b,i,j,k)\) and linear site index \(l\).
Constructor
- Parameters:
transformation_matrix_to_super (array_like, shape=(3,3), dtype=int) – The transformation matrix, T, relating the superstructure lattice vectors, S, to the unit structure lattice vectors, L, according to
S = L @ T
, where S and L are shape=(3,3) matrices with lattice vectors as columns.n_sublattice (int) – The number of sublattices in the
Prim
.
Methods
Automatically bring
IntegralSiteCoordinate
values within the supercell when querying for the index (on by default).Bring the given
IntegralSiteCoordinate
into the superlattice using superlattice translations.Given the linear index of a site, retrieve the corresponding
IntegralSiteCoordinate
.Given the
IntegralSiteCoordinate
of a site, retrieve its corresponding linear index.Prevent the index converter from bringing
IntegralSiteCoordinate
within the supercell when querying for the index.Returns the total number of sites within the superlattice.