httk.atomistic.models.sites.numeric

The NumericSites presentation: a Sites object exposed as plain numpy numbers.

Classes

NumericSites

A plain-numpy presentation of a Sites object.

Module Contents

class httk.atomistic.models.sites.numeric.NumericSites(sites)[source]

A plain-numpy presentation of a Sites object.

Where a Sites holds its reduced coordinates exactly (an Nx3 rational FracVector), a NumericSites mirrors that interface but returns plain float64 numpy 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 NumericSites requires numpy (the httk-atomistic[numpy] extra) and raises ImportError eagerly when it is unavailable. The exact object is always one hop away via exact.

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 None if 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:

httk.core.NumericVector

property exact: httk.atomistic.models.sites.sites.Sites[source]

The exact sites this presentation wraps.

Returns:

The exact sites.

Return type:

httk.atomistic.models.sites.sites.Sites