httk.atomistic.structure_asu

Backend presenting an ASUStructure through the common structure interface.

Registering this makes an ASUStructure usable anywhere a structure is accepted: UnitcellStructureView(asu) is the full unit cell, and the OPTIMADE provider, the numeric layer, and everything else follow without changes.

The expansion is lazy. Building an ASUStructure, inspecting its space group, or writing it back out never generates the cell.

Classes

StructureASU

Backend for a crystal structure carried as its asymmetric unit.

Module Contents

class httk.atomistic.structure_asu.StructureASU(obj: httk.atomistic.asu_structure.ASUStructure, **hints: Any)[source]

Bases: httk.atomistic.structure_backend.StructureBackend

Backend for a crystal structure carried as its asymmetric unit.

cell and species come straight off the ASU. sites and species_at_sites are the expansion, generated on first access and cached by the ASUStructure itself.

property cell: httk.atomistic.cell.Cell[source]
property sites: httk.atomistic.sites.Sites[source]
property species: tuple[httk.atomistic.species.Species, Ellipsis][source]
property species_at_sites: tuple[str, Ellipsis][source]
property asu: httk.atomistic.asu_structure.ASUStructure[source]

The underlying asymmetric unit, so a view can adopt it without re-deriving it.

unwrap() Any[source]

Return the most raw representation possible of this backend, i.e., if it uses a backend with an internal representaion - or if it can (possibly lossly) convert itself into a more raw representation that still would be recognized as a <Something>Like type, that representation will be returned. If this is not possible, the instance itself is returned.