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:

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.