httk.atomistic.numeric_cell

The NumericCell presentation: a Cell exposed as plain numpy numbers.

Classes

NumericCell

A plain-numpy presentation of a Cell.

Module Contents

class httk.atomistic.numeric_cell.NumericCell(cell: httk.atomistic.cell_like.CellLike)[source]

A plain-numpy presentation of a Cell.

Where a Cell holds its geometry exactly (a SurdVector basis, exact SurdScalar lengths/volume, exact Fraction angles), a NumericCell mirrors that interface but returns plain numpy numbers — a float64 numpy.ndarray for every vector and a plain float for every scalar — for callers who do not need exact arithmetic and just want numpy arrays.

The presentation is numpy-backed, so constructing a NumericCell 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.

property scale: float[source]

The overall length factor as a plain float.

property unscaled_basis: httk.core.NumericVector[source]

The 3x3 cell vectors before applying scale as a float64 numpy array.

property basis: httk.core.NumericVector[source]

The 3x3 lattice vectors scale * unscaled_basis as a float64 numpy array.

property lengths: httk.core.NumericVector[source]

The three cell-vector lengths as a (3,) float64 numpy array.

property angles: httk.core.NumericVector[source]

The cell angles (alpha, beta, gamma) in degrees as a (3,) float64 numpy array.

property volume: float[source]

The cell volume as a plain float.

metric() httk.core.NumericVector[source]

The Gram matrix basis * basis^T as a float64 numpy array.

property exact: httk.atomistic.cell.Cell[source]

The exact Cell this presentation wraps.