httk.atomistic.models.cell.view

A view presenting any cell backend as a Cell (the class representation).

Classes

CellView

A view presenting an underlying cell backend as a Cell.

Module Contents

class httk.atomistic.models.cell.view.CellView(obj, **hints)

Bases: httk.atomistic.models.cell.view_base.CellViewBase, httk.atomistic.models.cell.cell.Cell

A view presenting an underlying cell backend as a Cell.

This view is a genuine Cell, so it can be passed anywhere a Cell is accepted. Its state is built lazily on first access from the backend.

Parameters:
property lengths: tuple[httk.core.SurdScalar, Ellipsis]

Present the backend’s native cell-vector lengths without re-deriving them.

Returns:

The three exact or backend-native cell-vector lengths.

Return type:

tuple[httk.core.SurdScalar, Ellipsis]

property angles: tuple[fractions.Fraction, Ellipsis]

Present the backend’s native crystallographic angles without re-deriving them.

Returns:

The three cell angles in degrees.

Return type:

tuple[fractions.Fraction, Ellipsis]

unwrap()

Return the raw object behind the backend.

Returns:

The unwrapped source object.

Return type:

Any

unview()

Return this presentation as a standalone cell.

The original backend remains available through unwrap(). For a parameter backend with a non-special angle, the standalone basis uses that backend’s documented deterministic rational approximation.

Returns:

The standalone basis representation.

Return type:

httk.atomistic.models.cell.cell.Cell