magnopy.SpinHamiltonian.add_1#

method

SpinHamiltonian.add_1(alpha: int, parameter, units=None, when_present='raise error') None#

Adds a parameter of one spin & one site term of the Hamiltonian (partition 1).

Deprecated since version 0.5.0: Use SpinHamiltonian.add() instead.

See Spin Hamiltonian for the definition of the relevant term of the Hamiltonian.

See SpinHamiltonian.add() for the detailed description of units, when_present, and populate_equivalent arguments.

Parameters:
alphaint

Index of an atom in the unit cell, with which the parameter is associated. 0 <= alpha < len(spinham.atoms.names).

parameter(3, ) array-like

Value of the parameter (\(3 imes1\) vector). Given in the units of units.

unitsstr, optional

Added in version 0.3.0.

Passed directly to SpinHamiltonian.add().

when_presentstr, default "raise error"

Added in version 0.4.0.

Passed directly to SpinHamiltonian.add().

See also

p1
add
remove
parameters