Hamiltonian

Set the parameters of the Heisenberg Hamiltonian, such as external field or exchange interaction.

class spirit.hamiltonian.BiaxialAnisotropyData(indices, primary, secondary, site_p, magnitude, exponents)

Bases: NamedTuple

__annotations__ = {'exponents': <class 'numpy.ndarray'>, 'indices': <class 'numpy.ndarray'>, 'magnitude': <class 'numpy.ndarray'>, 'primary': <class 'numpy.ndarray'>, 'secondary': <class 'numpy.ndarray'>, 'site_p': <class 'numpy.ndarray'>}
__getnewargs__()

Return self as a plain tuple. Used by copy and pickle.

__match_args__ = ('indices', 'primary', 'secondary', 'site_p', 'magnitude', 'exponents')
__module__ = 'spirit.hamiltonian'
static __new__(_cls, indices: ndarray, primary: ndarray, secondary: ndarray, site_p: ndarray, magnitude: ndarray, exponents: ndarray)

Create new instance of BiaxialAnisotropyData(indices, primary, secondary, site_p, magnitude, exponents)

__orig_bases__ = (<function NamedTuple>,)
__repr__()

Return a nicely formatted representation string

__slots__ = ()
_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('indices', 'primary', 'secondary', 'site_p', 'magnitude', 'exponents')
classmethod _make(iterable)

Make a new BiaxialAnisotropyData object from a sequence or iterable

_replace(**kwds)

Return a new BiaxialAnisotropyData object replacing specified fields with new values

exponents: ndarray

Alias for field number 5

indices: ndarray

Alias for field number 0

magnitude: ndarray

Alias for field number 4

primary: ndarray

Alias for field number 1

secondary: ndarray

Alias for field number 2

site_p: ndarray

Alias for field number 3

spirit.hamiltonian.CHIRALITY_BLOCH = 1

DMI Bloch chirality type for neighbour shells

spirit.hamiltonian.CHIRALITY_BLOCH_INVERSE = -1

DMI Bloch chirality type for neighbour shells with opposite sign

spirit.hamiltonian.CHIRALITY_NEEL = 2

DMI Neel chirality type for neighbour shells

spirit.hamiltonian.CHIRALITY_NEEL_INVERSE = -2

DMI Neel chirality type for neighbour shells with opposite sign

spirit.hamiltonian.DDI_METHOD_CUTOFF = 3

Dipole-dipole interaction: use a direct summation with a cutoff radius

spirit.hamiltonian.DDI_METHOD_FFT = 1

Dipole-dipole interaction: use FFT convolutions

spirit.hamiltonian.DDI_METHOD_FMM = 2

Dipole-dipole interaction: use a fast multipole method (FMM)

spirit.hamiltonian.DDI_METHOD_NONE = 0

Dipole-dipole interaction: do not calculate

spirit.hamiltonian.get_anisotropy(p_state, idx_image=-1, idx_chain=-1)

Get the magnetocrystalline anisotropy.

spirit.hamiltonian.get_biaxial_anisotropy(p_state, n_indices=None, n_terms=None, idx_image=-1, idx_chain=-1)

Get the data representing the biaxial anisotropy.

spirit.hamiltonian.get_biaxial_anisotropy_n_atoms(p_state, idx_image=-1, idx_chain=-1)

Get the number of atoms for which a biaxial anisotropy is defined.

spirit.hamiltonian.get_biaxial_anisotropy_n_terms(p_state, idx_image=-1, idx_chain=-1)

Get the number of terms that contribute to the biaxial anisotropy.

spirit.hamiltonian.get_boundary_conditions(p_state, idx_image=-1, idx_chain=-1)

Returns an array of shape(3) containing the boundary conditions in the three translation directions [a, b, c] of the lattice.

spirit.hamiltonian.get_cubic_anisotropy(p_state, idx_image=-1, idx_chain=-1)

Set the cubic magnetocrystalline anisotropy.

spirit.hamiltonian.get_ddi(p_state, idx_image=-1, idx_chain=-1)

Returns a dictionary, containing information about the used ddi settings

spirit.hamiltonian.get_field(p_state, idx_image=-1, idx_chain=-1)

Returns the magnitude and an array of shape(3) containing the direction of the external magnetic field.

spirit.hamiltonian.get_name(p_state, idx_image=-1, idx_chain=-1)

Returns a string containing the name of the Hamiltonian currently in use.

spirit.hamiltonian.set_anisotropy(p_state, magnitude, direction, idx_image=-1, idx_chain=-1)

Set the (homogeneous) magnetocrystalline anisotropy.

spirit.hamiltonian.set_biaxial_anisotropy(p_state, magnitude, exponents, primary, secondary, n_terms=None, idx_image=-1, idx_chain=-1)

Set the (homogeneous) biaxial magnetocrystalline anisotropy.

spirit.hamiltonian.set_boundary_conditions(p_state, boundaries, idx_image=-1, idx_chain=-1)

Set the boundary conditions along the translation directions [a, b, c].

0 = open, 1 = periodical

spirit.hamiltonian.set_cubic_anisotropy(p_state, magnitude, idx_image=-1, idx_chain=-1)

Set the (homogeneous) magnetocrystalline anisotropy.

spirit.hamiltonian.set_ddi(p_state, ddi_method, n_periodic_images=[4, 4, 4], radius=0.0, pb_zero_padding=True, idx_image=-1, idx_chain=-1)

Set the dipolar interaction calculation method.

  • ddi_method: one of the integers defined above

  • n_periodic_images: the number of periodical images in the three translation directions, taken into account when boundaries in the corresponding direction are periodical

  • radius: the cutoff radius for the direct summation method

  • pb_zero_padding: if True zero padding is used for periodical directions

spirit.hamiltonian.set_dmi(p_state, n_shells, D_ij, chirality=1, idx_image=-1, idx_chain=-1)

Set the Dzyaloshinskii-Moriya interaction in terms of neighbour shells.

spirit.hamiltonian.set_exchange(p_state, n_shells, J_ij, idx_image=-1, idx_chain=-1)

Set the Exchange interaction in terms of neighbour shells.

spirit.hamiltonian.set_field(p_state, magnitude, direction, idx_image=-1, idx_chain=-1)

Set the (homogeneous) external magnetic field.

spirit.hamiltonian.write_hessian(p_state, filename, triplet_format=True, idx_image=-1, idx_chain=-1)

RWrites the embedding Hessian to a file