httk.atomistic.cell_params_view

A view presenting any cell backend as cell parameters (a, b, c, alpha, beta, gamma).

Classes

CellParamsView

A view presenting an underlying cell backend as cell parameters.

Module Contents

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

Bases: httk.atomistic.cell_view.CellView, tuple

A view presenting an underlying cell backend as cell parameters.

This view is a genuine flat 6-tuple (a, b, c, alpha, beta, gamma) with the angles in degrees, built eagerly and immutable, with the elements also available as the named properties a/b/c/alpha/beta/gamma. Parameters carry no orientation, so converting a cell to parameters is lossy: reconstructing a cell from this view reproduces the lengths, angles, and volume, but not the original cell-vector orientation.

property a: float[source]

The length of the first cell vector.

property b: float[source]

The length of the second cell vector.

property c: float[source]

The length of the third cell vector.

property alpha: float[source]

The angle between the second and third cell vectors, in degrees.

property beta: float[source]

The angle between the first and third cell vectors, in degrees.

property gamma: float[source]

The angle between the first and second cell vectors, in degrees.

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.