httk.atomistic.structure_primitive¶
Backend wrapping an spglib-like (lattice, positions, numbers) triple.
Classes¶
Backend for a crystal structure backed by an spglib-like triple. |
Module Contents¶
- class httk.atomistic.structure_primitive.StructurePrimitive(obj: Any, **hints: Any)[source]¶
Bases:
httk.atomistic.structure_backend.StructureBackendBackend for a crystal structure backed by an spglib-like triple.
The native representation is a length-3
(lattice, positions, numbers)list or tuple, wherelatticeis 3x3,positionsis Nx3 reduced coordinates, andnumbersis the length-N sequence of atomic numbers. The quartet is derived lazily and cached:cellis aCell,sitesaSites,speciesone single-elementSpeciesper distinct atomic number, andunwrapreturns the original triple.- property cell: httk.atomistic.cell.Cell[source]¶
- property sites: httk.atomistic.sites.Sites[source]¶
- property species: tuple[httk.atomistic.species.Species, Ellipsis][source]¶
- 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.