httk.atomistic.models.structure.plain

Backend wrapping an spglib-like (lattice, positions, numbers) triple.

Classes

PlainStructure

Represent a crystal structure backed by an spglib-like triple.

Module Contents

class httk.atomistic.models.structure.plain.PlainStructure(obj, **hints)[source]

Bases: httk.atomistic.models.structure.backend.StructureBackend

Represent a crystal structure backed by an spglib-like triple.

The native representation is a length-3 (lattice, positions, numbers) list or tuple, where lattice is 3x3, positions is Nx3 reduced coordinates, and numbers is the length-N sequence of atomic numbers. The quartet is derived lazily and cached: cell is a Cell, sites a Sites, species one single-element Species per distinct atomic number, and unwrap returns the original triple. :param obj: The primitive structure triple to wrap. :param **hints: Backend-selection hints.

property cell: httk.atomistic.models.cell.cell.Cell[source]

Expose the cell derived from the lattice.

property sites: httk.atomistic.models.sites.sites.Sites[source]

Expose the reduced coordinates derived from the positions.

property species: tuple[httk.atomistic.models.species.species.Species, Ellipsis][source]

Expose one species definition for each distinct atomic number.

property species_at_sites: tuple[str, Ellipsis][source]

Expose the species name occupying each site.

unwrap()[source]

Return the original primitive structure triple.

Returns:

The wrapped lattice, positions, and atomic numbers.

Return type:

Any