httk.atomistic.models.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.models.cell.numeric_view.CellNumericView(obj, **hints)[source]

Bases: httk.atomistic.models.cell.view_base.CellViewBase, httk.atomistic.models.cell.numeric.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 lazily from the backend on first access, preserving the scale/unscaled split. Like a NumericCell it requires numpy (raising ImportError otherwise).

Parameters:
unwrap()[source]

Return the raw object behind the backend.

Returns:

The unwrapped source object.

Return type:

Any

unview()[source]

Return this presentation as a standalone numeric cell.

Returns:

The plain-numpy presentation.

Return type:

httk.atomistic.models.cell.numeric.NumericCell