httk.atomistic.models.cell.numeric¶
The NumericCell presentation: a Cell exposed as plain numpy numbers.
Classes¶
A plain-numpy presentation of a |
Module Contents¶
- class httk.atomistic.models.cell.numeric.NumericCell(cell)[source]¶
A plain-numpy presentation of a
Cell.Where a
Cellholds its geometry exactly (aSurdVectorbasis, exactSurdScalarlengths/volume, exactFractionangles), aNumericCellmirrors that interface but returns plain numpy numbers — afloat64numpy.ndarrayfor every vector and a plainfloatfor every scalar — for callers who do not need exact arithmetic and just want numpy arrays.The presentation is numpy-backed, so constructing a
NumericCellrequires numpy (thehttk-atomistic[numpy]extra) and raisesImportErroreagerly when it is unavailable. The exact object is always one hop away viaexact.- Parameters:
cell (httk.atomistic.models.cell.like.CellLike) – The cell or cell-like object to present.
- property scale: float[source]¶
The overall length factor.
- Returns:
The scale as a floating-point value.
- Return type:
- property precision: float | None[source]¶
The cell precision, or
Noneif unknown.- Returns:
The absolute precision as a floating-point value.
- Return type:
float | None
- property periodicity: tuple[bool, bool, bool][source]¶
Which of the three basis rows is a genuine lattice translation.
- property nperiodic_dimensions: int[source]¶
How many of the three directions are periodic.
- Returns:
The number of periodic directions.
- Return type:
- property unscaled_basis: httk.core.NumericVector[source]¶
The 3x3 cell vectors before applying
scale.- Returns:
The unscaled lattice vectors as floating-point values.
- Return type:
- property basis: httk.core.NumericVector[source]¶
The 3x3 lattice vectors
scale * unscaled_basis.- Returns:
The scaled lattice vectors as floating-point values.
- Return type:
- property lengths: httk.core.NumericVector[source]¶
The three cell-vector lengths.
- Returns:
The lengths as floating-point values.
- Return type:
- property angles: httk.core.NumericVector[source]¶
The cell angles
(alpha, beta, gamma)in degrees.- Returns:
The angles as floating-point values.
- Return type:
- property volume: float[source]¶
The cell volume.
- Returns:
The volume as a floating-point value.
- Raises:
ValueError – If the exact cell is not periodic in all three directions.
- Return type:
- metric()[source]¶
The Gram matrix
basis * basis^T.- Returns:
The Gram matrix as floating-point values.
- Return type:
- property exact: httk.atomistic.models.cell.cell.Cell[source]¶
The exact cell this presentation wraps.
- Returns:
The exact cell.
- Return type: