httk.atomistic.cell_numeric_view

A view presenting any cell backend as a NumericCell (the plain-numpy presentation).

Classes

CellNumericView

A view presenting an underlying cell backend as a NumericCell.

Module Contents

class httk.atomistic.cell_numeric_view.CellNumericView(obj: httk.atomistic.cell_like.CellLike, **hints: Any)[source]

Bases: httk.atomistic.cell_view.CellView, httk.atomistic.numeric_cell.NumericCell

A view presenting an underlying cell backend as a NumericCell.

This view is a genuine NumericCell, so it can be passed anywhere one is accepted. Its exact Cell is built eagerly from the backend on construction, preserving the scale/unscaled split. Like a NumericCell it requires numpy (raising ImportError otherwise).

unwrap() Any[source]

Return the most raw representation possible of this view, i.e., if it uses a backend with an internal representaion - or if it can (possibly lossly) convert itself into a more raw representation that still would be recognized as a <Something>Like type, that representation will be returned. If this is not possible, the instance itself is returned.