pyspinw.anisotropy#
Different kinds of anisotropy.
Functions
|
Find the narrowest anisotropy subclass to fit the exchange |
Classes
|
Represent the anisotropy term at a given site. |
|
Represent a uniaxial anisotropy term. |
- class pyspinw.anisotropy.Anisotropy(site: Site, anisotropy_matrix: ArrayLike, name: str = '')#
Bases:
SPWSerialisableRepresent the anisotropy term at a given site.
- Parameters:
site – Lattice site to which the anisotropy term applies.
anisotropy_matrix – 3x3 matrix defining the anisotropy contribution for the site.
name – Optional name
- property anisotropy_matrix: ndarray#
Matrix specifying the anisotropy - A term in the Hamiltonian.
- generalise()#
Returns the most general version of this class
- property name#
Name of this anisotropy
- obeys_symmetry(structure: Structure)#
Check that this anisotropy is consistent with the symmetry group
- property parameter_string#
A string representation of the parameters.
- scalar_parameters = []#
Names of scalar fields that can be varied by parameter definitions.
- serialisation_name = 'anisotropy'#
Type name used when serialising anisotropy terms to SPW data.
- property site#
Get the site for this anisotropy.
- specialise()#
Convert this to the most specific anisotropy class possible
- symmetry_fill(structure: Structure, include_original=False, specialisation_rounding_exponent: int | None = 14)#
Make multiple copies of this anisotropy so that symmetry is satisfied
- property unique_id#
Unique ID for this anisotropy.
- updated(site: Site | None = None, anisotropy_matrix: ArrayLike | None = None, name: str = '')#
Return a copy of this anisotropy term with variables replaced.
- Parameters:
site – Replacement lattice site. If omitted, the current site is reused.
anisotropy_matrix – Replacement anisotropy matrix. If omitted, the current matrix is reused.
name – Optional name. If omitted, current name is reused.
- class pyspinw.anisotropy.AxisMagnitudeAnisotropy(site: Site, a: float, direction: ArrayLike = array([0, 0, 1]), name: str = '')#
Bases:
AnisotropyRepresent a uniaxial anisotropy term.
- Parameters:
site – Lattice site to which the anisotropy term applies.
a – Anisotropy constant.
direction – Principal anisotropy direction. The vector is normalized before use.
name – Optional name.
- property a#
Amount of anisotropy (anisotropy constant).
- property constant#
Amount of anisotropy (anisotropy constant), alias for
a.
- property direction#
The principal direction of the anisotropy.
- property parameter_string#
A string representation of the parameters.
- scalar_parameters = ['a']#
Names of scalar fields that can be varied by parameter definitions.
- updated(site: Site | None = None, a: float | None = None, direction: ArrayLike | None = None, name: str | None = None)#
Return a copy of this anisotropy term with variables replaced.
- Parameters:
site – Replacement lattice site. If omitted, the current site is reused.
a – Replacement anisotropy constant. If omitted, the current constant is reused.
direction – Replacement principal anisotropy direction. If omitted, the current direction is reused.
name – Optional name. If omitted, current name is reused.
- pyspinw.anisotropy.specialise_anisotropy(anisotropy: Anisotropy) Anisotropy#
Find the narrowest anisotropy subclass to fit the exchange