httk.atomistic.models.structure.numeric_view¶
A plain-numpy presentation of a structure backend.
Classes¶
A plain-numpy presentation of a |
Module Contents¶
- class httk.atomistic.models.structure.numeric_view.NumericUnitcellStructureView(obj, **hints)[source]¶
Bases:
httk.atomistic.models.structure.semantics.StructureSemanticsMixin,httk.atomistic.models.structure.view.StructureViewA plain-numpy presentation of a
UnitcellStructure.Where a
UnitcellStructureholds 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
UnitcellStructuresubclass. Its exactUnitcellStructureis built lazily on first access to exact geometry.- Parameters:
obj (httk.atomistic.models.structure.like.StructureLike) – The structure backend or source to present.
**hints (Any) – Backend-selection hints passed to structure coercion.
- property cell: httk.atomistic.models.cell.numeric.NumericCell[source]¶
The cell as a
NumericCell.
- property sites: httk.atomistic.models.sites.numeric.NumericSites[source]¶
The sites as a
NumericSites.
- property species: tuple[httk.atomistic.models.species.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.
- property charge: float | None[source]¶
Expose the explicitly assigned charge as a floating-point value.
- property site_moments: httk.core.NumericVector | None[source]¶
Expose Cartesian site moments as numeric values.
- property assemblies: tuple[httk.atomistic.composition.Assembly, Ellipsis] | None[source]¶
Expose site correlations.
- property lattice_vectors: list[list[float]][source]¶
Expose the cell vectors as numeric coordinates.
- property fractional_site_positions: list[list[float]][source]¶
Expose reduced site positions as numeric coordinates.
- property cartesian_site_positions: list[list[float]][source]¶
Expose Cartesian site positions as numeric coordinates.
- property exact: httk.atomistic.models.structure.unitcell.UnitcellStructure[source]¶
The exact
UnitcellStructurethis view presents.