httk.atomistic.numeric_cell¶
The NumericCell presentation: a Cell exposed as plain numpy numbers.
Classes¶
A plain-numpy presentation of a |
Module Contents¶
- class httk.atomistic.numeric_cell.NumericCell(cell: httk.atomistic.cell_like.CellLike)[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.- property unscaled_basis: httk.core.NumericVector[source]¶
The 3x3 cell vectors before applying
scaleas afloat64numpy array.
- property basis: httk.core.NumericVector[source]¶
The 3x3 lattice vectors
scale * unscaled_basisas afloat64numpy array.
- property lengths: httk.core.NumericVector[source]¶
The three cell-vector lengths as a
(3,)float64numpy array.
- property angles: httk.core.NumericVector[source]¶
The cell angles
(alpha, beta, gamma)in degrees as a(3,)float64numpy array.
- metric() httk.core.NumericVector[source]¶
The Gram matrix
basis * basis^Tas afloat64numpy array.
- property exact: httk.atomistic.cell.Cell[source]¶
The exact
Cellthis presentation wraps.