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.
For UnitcellStructureView(asu), expansion is deferred until the sites or per-site species
assignment are read; cell, species, and space-group access never expands it.
Classes¶
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.StructureBackendBackend for a crystal structure carried as its asymmetric unit.
cellandspeciescome straight off the ASU.sitesandspecies_at_sitesare 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 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.