httk.atomistic.numeric_unitcell_structure_view¶
A plain-numpy presentation of a structure backend.
Classes¶
A plain-numpy presentation of a |
Module Contents¶
- class httk.atomistic.numeric_unitcell_structure_view.NumericUnitcellStructureView(obj: httk.atomistic.structure_like.StructureLike, **hints: Any)[source]¶
Bases:
httk.atomistic.structure_view.StructureViewA plain-numpy presentation of a
Structure.Where a
Structureholds its geometry exactly (a surdcellbasis, rational reduced coordinates, and an exact Cartesian frame), this view mirrors that interface but returns plain numpy numbers: itscellis aNumericCell, itssitesaNumericSites, andcartesian_sites()afloat64numpy array. Thespecies/species_at_sitesare passed through unchanged. It is for callers who do not need exact arithmetic and just want numpy arrays.The presentation is numpy-backed, so constructing it requires numpy (the
httk-atomistic[numpy]extra) and raisesImportErroreagerly when it is unavailable. The exact object is always one hop away viaexact.This is a view, not a
Structuresubclass. Its exactStructureis built lazily on first access to exact geometry.- property cell: httk.atomistic.numeric_cell.NumericCell[source]¶
The cell as a
NumericCell.
- property sites: httk.atomistic.numeric_sites.NumericSites[source]¶
The sites as a
NumericSites.
- property species: tuple[httk.atomistic.species.Species, Ellipsis][source]¶
The distinct species, passed through unchanged.
- property species_at_sites: tuple[str, Ellipsis][source]¶
The species name occupying each site, passed through unchanged.
- cartesian_sites() httk.core.NumericVector[source]¶
The Cartesian site positions as an
(N, 3)float64numpy array.
- property exact: httk.atomistic.structure.Structure[source]¶
The exact
Structurethis view presents.