httk.atomistic.models.cell.plain

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

Classes

PlainCell

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

Module Contents

class httk.atomistic.models.cell.plain.PlainCell(obj, **hints)[source]

Bases: httk.atomistic.models.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.

Parameters:
  • obj (Any) – The raw 3x3 basis representation.

  • **hints (Any) – Backend-selection hints.

property basis: httk.core.SurdVector[source]

Return the raw basis in the canonical representation.

Returns:

The cell vectors.

Return type:

httk.core.SurdVector

property scale: httk.core.SurdScalar[source]

Return the unit scale factor.

Returns:

The factor applied to unscaled_basis.

Return type:

httk.core.SurdScalar

property unscaled_basis: httk.core.SurdVector[source]

Return the basis before scaling.

Returns:

The cell vectors.

Return type:

httk.core.SurdVector

unwrap()[source]

Return the original basis object.

Returns:

The raw basis representation.

Return type:

Any