radtools.SpinHamiltonian#

class radtools.SpinHamiltonian(crystal: Crystal = None, notation=None, **kwargs)[source]#

Spin Hamiltonian.

By default the notation of the spin Hamiltonian is not defined and could be different in different context. However, in could always be checked via notation. In user-specific cases it is the responsibility of the user to set the interpretation of the Hamiltonian`s notation.

For the predefined notations see notation().

Child of the Crystal class.

Changed in version 0.8.0: Renamed from SpinHamiltonian to SpinHamiltonian.

Parameters:
crystalCrystal, optional

Crystal on which the spin Hamiltonian is build. By default it is cubic (\(a=1\)) lattice with no atoms.

notationstr or tuple of two bool and one float, optional

One of the predefined notations or tuple with custom notation. See notation for details.

**kwargs

Keyword arguments for the Crystal constructor.

Notes

You can still use the old name, but it is deprecated and will be removed in the future.

Methods:

add_atom([new_atom, relative])

Add atom to the crystal.

add_bond(atom1, atom2, R[, J])

Add one bond to the Hamiltonian.

converge_mag_dipdip_energy([start, step, ...])

Converge magnetic dipole-dipole energy.

ferromagnetic_energy([theta, phi])

Compute energy of the Hamiltonian assuming ferromagnetic state.

filter([max_distance, min_distance, ...])

Filter the exchange entries based on the given conditions.

filtered([max_distance, min_distance, ...])

Create filtered spin Hamiltonian based on the given conditions.

find_primitive_cell()

Detect primitive cell.

form_model(template)

Force the Hamiltonian to have the symmetries of the template.

formed_model(template)

Form the model from the Hamiltoian based on the template.

get_atom(name[, index, return_all])

Return atom object of the crystal.

get_atom_coordinates(atom[, R, index, relative])

Getter for the atom coordinates.

get_distance(atom1, atom2[, R, index1, ...])

Getter for distance between the atom1 and atom2.

get_vector(atom1, atom2[, R, index1, ...])

Getter for vector from atom1 to atom2.

input_for_magnons([nodmi, noaniso, custom_mask])

Input from the spin Hamiltonian.

lattice_points([relative, reciprocal, normalize])

Compute lattice points

mag_dipdip_energy(na, nb, nc[, progress_bar])

Computes magnetic dipole-dipole energy.

remove_atom(atom)

Remove magnetic atom from the Hamiltonian.

remove_bond(atom1, atom2, R)

Remove one bond from the Hamiltonian.

set_interpretation([double_counting, ...])

Set the interpretation of the Hamiltonian`s notation.

type([eps_rel])

Identify the lattice type.

voronoi_cell([reciprocal, normalize])

Computes Voronoi edges around (0,0,0) point.

Properties:

a

Length of the first lattice vector \(\vert\vec{a}_1\vert\).

a1

First lattice vector \(\vec{a}_1\).

a2

Second lattice vector \(\vec{a}_2\).

a3

Third lattice vector \(\vec{a}_3\).

alpha

Angle between second and third lattice vector.

b

Length of the second lattice vector \(\vert\vec{a}_2\vert\).

b1

First reciprocal lattice vector.

b2

Second reciprocal lattice vector.

b3

Third reciprocal lattice vector.

beta

Angle between first and third lattice vector.

c

Length of the third lattice vector \(\vert\vec{a}_3\vert\).

cell

Unit cell of the lattice.

cell_list

List of cells from the Hamiltonian.

centring_type

Centring type.

conv_a

Length of the first vector of the conventional cell.

conv_a1

First vector of the conventional cell.

conv_a2

Second vector of the conventional cell.

conv_a3

Third vector of the conventional cell.

conv_alpha

Angle between second and third conventional lattice vector.

conv_b

Length of the second vector of the conventional cell.

conv_beta

Angle between first and third conventional lattice vector.

conv_c

Length of the third vector of the conventional cell.

conv_cell

Conventional cell.

conv_gamma

Angle between first and second conventional lattice vector.

conv_parameters

Return conventional cell parameters.

conv_unit_cell_volume

Volume of the conventional unit cell.

crystal

Crystal of the Hamiltonian.

crystal_family

Crystal family.

double_counting

Whether double counting is present in the Hamiltonian.

eps

Epsilon parameter.

eps_rel

Relative epsilon

factor

Whether any factor is present in the Hamiltonian.

gamma

Angle between first and second lattice vector.

k_a

Length of the first reciprocal lattice vector \(\vert\vec{b}_1\vert\).

k_alpha

Angle between second and third reciprocal lattice vector.

k_b

Length of the second reciprocal lattice vector \(\vert\vec{b}_2\vert\).

k_beta

Angle between first and third reciprocal lattice vector.

k_c

Length of the third reciprocal lattice vector \(\vert\vec{b}_3\vert\).

k_gamma

Angle between first and second reciprocal lattice vector.

kpoints

Instance of Kpoints with the high symmetry points and path.

lattice

Lattice of the crystal.

magnetic_atoms

Magnetic atoms of the model.

name

Human-readable name of the Bravais lattice type.

notation

Tuple of the notation.

notation_string

Human-readable representation of the notation.

number_spins_in_unit_cell

Number of spins (or magnetic atoms) in the unit cell.

parameters

Return cell parameters.

pearson_symbol

Pearson symbol.

reciprocal_cell

Reciprocal cell.

reciprocal_cell_volume

Volume of the reciprocal cell.

reciprocal_parameters

Return reciprocal cell parameters.

space_dimensions

Model minimum and maximum coordinates in real space.

spin_normalized

Whether spin is normalized.

unit_cell_volume

Volume of the unit cell.

variation

Variation of the lattice, if any.