magnopy.SpinHamiltonian#

class magnopy.SpinHamiltonian(cell, atoms, convention)[source]#

Spin Hamiltonian.

Parameters:
conventionConvention or str

A convention of the spin Hamiltonian.

cell(3, 3) array-like

Matrix of a cell, rows are interpreted as vectors.

atomsdict

Dictionary with atoms.

Examples

For example of usage see the page in the user guide - Spin Hamiltonian.

Methods:

add_1(alpha, parameter[, replace])

Adds a (one spin & one site) parameter to the Hamiltonian.

add_21(alpha, parameter[, replace])

Adds a (two spins & one site) parameter to the Hamiltonian.

add_22(alpha, beta, nu, parameter[, replace])

Adds a (two spins & two sites) parameter to the Hamiltonian.

add_31(alpha, parameter[, replace])

Adds a (three spins & one site) parameter to the Hamiltonian.

add_32(alpha, beta, nu, parameter[, replace])

Adds a (three spins & two sites) parameter to the Hamiltonian.

add_33(alpha, beta, gamma, nu, _lambda, ...)

Adds a (three spins & three sites) parameter to the Hamiltonian.

add_41(alpha, parameter[, replace])

Adds a (four spins & one site) parameter to the Hamiltonian.

add_421(alpha, beta, nu, parameter[, replace])

Adds a (four spins & two sites (3+1)) parameter to the Hamiltonian.

add_422(alpha, beta, nu, parameter[, replace])

Adds a (four spins & two sites (2+2)) parameter to the Hamiltonian.

add_43(alpha, beta, gamma, nu, _lambda, ...)

Adds a (four spins & three sites) parameter to the Hamiltonian.

add_44(alpha, beta, gamma, epsilon, nu, ...)

Adds a (four spins & four sites) parameter to the Hamiltonian.

add_magnetic_field(h[, alphas])

Adds external magnetic field to the Hamiltonian in the form of one spin parameters.

copy()

Returns a new, independent copy of the same Hamiltonian.

get_empty()

Returns the Hamiltonian with the same cell, atoms and convention, but with no parameters present.

remove_1(alpha)

Removes a (one spin & one site) parameter from the Hamiltonian.

remove_21(alpha)

Removes a (two spins & one site) parameter from the Hamiltonian.

remove_22(alpha, beta, nu)

Removes a (two spins & two sites) parameter from the Hamiltonian.

remove_31(alpha)

Removes a (three spins & one site) parameter from the Hamiltonian.

remove_32(alpha, beta, nu)

Removes a (three spins & two sites) parameter from the Hamiltonian.

remove_33(alpha, beta, gamma, nu, _lambda)

Removes a (three spins & three sites) parameter from the Hamiltonian.

remove_41(alpha)

Removes a (four spins & one site) parameter from the Hamiltonian.

remove_421(alpha, beta, nu)

Removes a (four spins & two sites (3+1)) parameter from the Hamiltonian.

remove_422(alpha, beta, nu)

Removes a (four spins & two sites (2+2)) parameter from the Hamiltonian.

remove_43(alpha, beta, gamma, nu, _lambda)

Removes a (four spins & three sites) parameter from the Hamiltonian.

remove_44(alpha, beta, gamma, epsilon, nu, ...)

Removes a (four spins & four sites) parameter from the Hamiltonian.

Properties:

M

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

atoms

Atoms of the crystal on which the Hamiltonian is build.

cell

Cell of the crystal on which the Hamiltonian is build.

convention

Convention of the spin Hamiltonian.

magnetic_atoms

Magnetic atoms of the spin Hamiltonian.

map_to_all

Index map from magnetic atoms to all atoms.

map_to_magnetic

Index map from all atoms to the magnetic ones.

p1

Parameters of (one spin & one site) term of the Hamiltonian.

p21

Parameters of (two spins & one site) term of the Hamiltonian.

p22

Parameters of (two spins & two sites) term of the Hamiltonian.

p31

Parameters of (three spins & one site) term of the Hamiltonian.

p32

Parameters of (three spins & two sites) term of the Hamiltonian.

p33

Parameters of (three spins & three sites) term of the Hamiltonian.

p41

Parameters of (four spins & one site) term of the Hamiltonian.

p421

Parameters of (four spins & two sites (3+1)) term of the Hamiltonian.

p422

Parameters of (four spins & two sites (2+2)) term of the Hamiltonian.

p43

Parameters of (four spins & three sites) term of the Hamiltonian.

p44

Parameters of (four spins & four sites) term of the Hamiltonian.