httk.atomistic.cell_primitive

Backend wrapping a raw 3x3 cell basis (the matrix of cell vectors).

Classes

CellPrimitive

Backend for a cell backed by a raw 3x3 list or tuple of numbers (or any 3x3 vector-like).

Module Contents

class httk.atomistic.cell_primitive.CellPrimitive(obj: Any, **hints: Any)[source]

Bases: httk.atomistic.cell_backend.CellBackend

Backend for a cell backed by a raw 3x3 list or tuple of numbers (or any 3x3 vector-like).

The native representation is preserved verbatim (one cell vector per row); the exact SurdVector basis is built lazily and cached. This representation carries no separate length factor, so scale is the exact 1 and unscaled_basis == basis. unwrap returns the original raw object.

property basis: httk.core.SurdVector[source]
property scale: httk.core.SurdScalar[source]
property unscaled_basis: httk.core.SurdVector[source]
unwrap() Any[source]

Return the most raw representation possible of this backend, 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.