SiteIndexConverter#
- class libcasm.xtal.SiteIndexConverter(
- self: SiteIndexConverter,
- transformation_matrix_to_super: Annotated[numpy.typing.NDArray[numpy.int64], '[3, 3]'],
- n_sublattice: SupportsInt,
Bases:
pybind11_objectConvert 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
IntegralSiteCoordinatevalues within the supercell when querying for the index (on by default).bring_within(…)Bring the given
IntegralSiteCoordinateinto the superlattice using superlattice translations.Given the linear index of a site, retrieve the corresponding
IntegralSiteCoordinate.Given the
IntegralSiteCoordinateof a site, retrieve its corresponding linear index.Prevent the index converter from bringing
IntegralSiteCoordinatewithin the supercell when querying for the index.total_sites(…)Returns the total number of sites within the superlattice.