httk.atomistic.structure_primitive_view¶
A view presenting any structure backend as an spglib-like (lattice, positions, numbers) triple.
Classes¶
A view presenting an underlying structure backend as a primitive triple. |
Module Contents¶
- class httk.atomistic.structure_primitive_view.StructurePrimitiveView(obj: httk.atomistic.structure_like.StructureLike, **hints: Any)[source]¶
Bases:
httk.atomistic.structure_view.StructureView,tupleA view presenting an underlying structure backend as a primitive triple.
This view is a genuine
(lattice, positions, numbers)tuple, built eagerly and immutable. Because the primitive representation carries only bare atomic numbers, every site’s species must be a single, unattached chemical element (seeSpecies.is_single_element); otherwise a TypeError is raised.- unwrap() Any[source]¶
Return the most raw representation possible of this view, 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.