httk.atomistic.models.cell.view¶
A view presenting any cell backend as a Cell (the class representation).
Classes¶
A view presenting an underlying cell backend as a |
Module Contents¶
- class httk.atomistic.models.cell.view.CellView(obj, **hints)[source]¶
Bases:
httk.atomistic.models.cell.view_base.CellViewBase,httk.atomistic.models.cell.cell.CellA 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:
obj (httk.atomistic.models.cell.like.CellLike) – The cell-like object to present.
**hints (Any) – Backend-selection hints.
- property lengths: tuple[httk.core.SurdScalar, ...][source]¶
Present the backend’s native cell-vector lengths without re-deriving them.
- Returns:
The three exact or backend-native cell-vector lengths.
- Return type:
- property angles: tuple[fractions.Fraction, ...][source]¶
Present the backend’s native crystallographic angles without re-deriving them.
- Returns:
The three cell angles in degrees.
- Return type:
- basis_floats()[source]¶
Present the backend’s native float basis when it has one, else the validated exact basis as floats.
- 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 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: