httk.atomistic.cell_primitive¶
Backend wrapping a raw 3x3 cell basis (the matrix of cell vectors).
Classes¶
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.CellBackendBackend 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
SurdVectorbasisis built lazily and cached. This representation carries no separate length factor, soscaleis the exact1andunscaled_basis == basis.unwrapreturns 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.