httk.atomistic.models.moments.api

The minimal canonical site-moments interface for httk-atomistic.

Classes

SiteMomentsAPI

Abstract base class for the canonical per-site magnetic-moments interface.

Module Contents

class httk.atomistic.models.moments.api.SiteMomentsAPI[source]

Bases: abc.ABC

Abstract base class for the canonical per-site magnetic-moments interface.

cartesian_moments is the exact Nx3 Cartesian interchange format, in Bohr magnetons. A collinear representation has no axis and therefore raises from that accessor instead of fabricating one.

property cartesian_moments: httk.core.SurdVector[source]
Abstractmethod:

cartesian_moments_floats()[source]

Return the Cartesian site moments as float rows, in Bohr magnetons.

Returns:

The Cartesian moments as float rows.

Return type:

list[list[float]]

property precision: fractions.Fraction | None[source]

How precisely the moments were stated, in Bohr magnetons, or None.

Concrete rather than abstract, so a backend with no source of precision inherits None instead of breaking.