httk.atomistic.models.moments

Submodules

Attributes

Classes

CartesianSiteMoments

Per-site Cartesian magnetic moments, exactly held in Bohr magnetons.

CartesianSiteMomentsView

A lazy Cartesian site-moments presentation of any site-moments backend.

CollinearSiteMoments

Signed per-site scalar moments with no assigned Cartesian axis.

CrystalAxisSiteMoments

Moments along the unit lattice axes , , ĉ, in Bohr magnetons.

CrystalAxisSiteMomentsView

A lazy crystal-axis site-moments presentation with an eagerly checked frame hint.

Package Contents

class httk.atomistic.models.moments.CartesianSiteMoments(moments, precision=None)[source]

Bases: httk.atomistic.models.moments.backend.SiteMomentsBackend

Per-site Cartesian magnetic moments, exactly held in Bohr magnetons.

kind = 'cartesian'
property cartesian_moments: httk.core.SurdVector

The exact Nx3 Cartesian moments, one row per site.

property precision: fractions.Fraction | None

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.

class httk.atomistic.models.moments.CartesianSiteMomentsView(obj, **hints)[source]

Bases: httk.atomistic.models.moments.view_base.SiteMomentsViewBase, httk.atomistic.models.moments.cartesian.CartesianSiteMoments

A lazy Cartesian site-moments presentation of any site-moments backend.

unview()[source]

Return the view’s presented representation as a plain, non-View instance.

Concrete views that mimic a value type override this to shed the httk wrapper; the result may alias the view’s storage (no copy is promised). The default raises TypeError, which is the correct behavior for views that only adapt an interface and have no faithful standalone value.

Returns:

The presented value as a plain, non-View instance.

Raises:

TypeError – If this interface-only view has no standalone plain value.

Return type:

httk.atomistic.models.moments.cartesian.CartesianSiteMoments

class httk.atomistic.models.moments.CollinearSiteMoments(moments, precision=None)[source]

Bases: httk.atomistic.models.moments.backend.SiteMomentsBackend

Signed per-site scalar moments with no assigned Cartesian axis.

kind = 'collinear'
property collinear_moments: httk.core.FracVector

The exact signed scalar moment for each site.

property cartesian_moments: httk.core.SurdVector
property precision: fractions.Fraction | None

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.

class httk.atomistic.models.moments.CrystalAxisSiteMoments(moments, cell, precision=None)[source]

Bases: httk.atomistic.models.moments.backend.SiteMomentsBackend

Moments along the unit lattice axes , , ĉ, in Bohr magnetons.

kind = 'crystalaxis'
property crystalaxis_moments: httk.core.SurdVector

The exact Nx3 moments along the cell’s unit lattice axes.

property cell: httk.atomistic.models.cell.cell.Cell

The cell defining the crystal-axis frame.

property cartesian_moments: httk.core.SurdVector

The exact Cartesian moments, using rows moments * U.

property precision: fractions.Fraction | None

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.

class httk.atomistic.models.moments.CrystalAxisSiteMomentsView(obj, *, cell=None, **hints)[source]

Bases: httk.atomistic.models.moments.view_base.SiteMomentsViewBase, httk.atomistic.models.moments.crystalaxis.CrystalAxisSiteMoments

A lazy crystal-axis site-moments presentation with an eagerly checked frame hint.

unview()[source]

Return the view’s presented representation as a plain, non-View instance.

Concrete views that mimic a value type override this to shed the httk wrapper; the result may alias the view’s storage (no copy is promised). The default raises TypeError, which is the correct behavior for views that only adapt an interface and have no faithful standalone value.

Returns:

The presented value as a plain, non-View instance.

Raises:

TypeError – If this interface-only view has no standalone plain value.

Return type:

httk.atomistic.models.moments.crystalaxis.CrystalAxisSiteMoments

type httk.atomistic.models.moments.SiteMomentsLike = httk.atomistic.models.moments.backend.SiteMomentsBackend | httk.atomistic.models.moments.view_base.SiteMomentsViewBase[source]