httk.atomistic.models.moments¶
Submodules¶
- httk.atomistic.models.moments.api
- httk.atomistic.models.moments.backend
- httk.atomistic.models.moments.cartesian
- httk.atomistic.models.moments.cartesian_view
- httk.atomistic.models.moments.collinear
- httk.atomistic.models.moments.crystalaxis
- httk.atomistic.models.moments.crystalaxis_view
- httk.atomistic.models.moments.like
- httk.atomistic.models.moments.view_base
Attributes¶
Classes¶
Per-site Cartesian magnetic moments, exactly held in Bohr magnetons. |
|
A lazy Cartesian site-moments presentation of any site-moments backend. |
|
Signed per-site scalar moments with no assigned Cartesian axis. |
|
Moments along the unit lattice axes |
|
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.SiteMomentsBackendPer-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
Noneinstead of breaking.
- class httk.atomistic.models.moments.CartesianSiteMomentsView(obj, **hints)[source]¶
Bases:
httk.atomistic.models.moments.view_base.SiteMomentsViewBase,httk.atomistic.models.moments.cartesian.CartesianSiteMomentsA 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.SiteMomentsBackendSigned 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
Noneinstead of breaking.
- class httk.atomistic.models.moments.CrystalAxisSiteMoments(moments, cell, precision=None)[source]¶
Bases:
httk.atomistic.models.moments.backend.SiteMomentsBackendMoments along the unit lattice axes
â,b̂,ĉ, 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
Noneinstead 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.CrystalAxisSiteMomentsA 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]¶