httk.atomistic.models.sites.numeric¶
The NumericSites presentation: a Sites object exposed as plain numpy numbers.
Classes¶
A plain-numpy presentation of a |
Module Contents¶
- class httk.atomistic.models.sites.numeric.NumericSites(sites)[source]¶
A plain-numpy presentation of a
Sitesobject.Where a
Sitesholds its reduced coordinates exactly (an Nx3 rationalFracVector), aNumericSitesmirrors that interface but returns plainfloat64numpy arrays, for callers who do not need exact arithmetic and just want numpy arrays. It is len/iter/indexable over its rows, each yielded as a(3,)numpy array.The presentation is numpy-backed, so constructing a
NumericSitesrequires numpy (thehttk-atomistic[numpy]extra) and raisesImportErroreagerly when it is unavailable. The exact object is always one hop away viaexact.- Parameters:
sites (httk.atomistic.models.sites.like.SitesLike) – The sites or sites-like object to present.
- property precision: float | None[source]¶
The fractional coordinate precision, or
Noneif unknown.- Returns:
The precision as a floating-point value.
- Return type:
float | None
- property reduced_coords: httk.core.NumericVector[source]¶
The Nx3 reduced site coordinates.
- Returns:
The coordinates as floating-point values.
- Return type:
- property exact: httk.atomistic.models.sites.sites.Sites[source]¶
The exact sites this presentation wraps.
- Returns:
The exact sites.
- Return type: