radtools.ExchangeHamiltonian.add_bond#

method

ExchangeHamiltonian.add_bond(J: ExchangeParameter, atom1: Atom, atom2: Atom, R)[source]#

Add one bond to the Hamiltonian.

More straightforward syntax is advised:

>>> import radtools as rad
>>> Cr = rad.Atom("Cr")
>>> J = rad.ExchangeParameter(iso=1)
>>> model = rad.ExchangeHamiltonian(rad.Crystal())
>>> model[Cr, Cr, (1,0,0)] = J
>>> (Cr, Cr, (1,0,0)) in model
True

It is the same as

>>> import radtools as rad
>>> Cr = rad.Atom("Cr")
>>> J = rad.ExchangeParameter(iso=1)
>>> model = rad.ExchangeHamiltonian(rad.Crystal())
>>> model.add_bond(J, Cr, Cr, (1,0,0))
>>> (Cr, Cr, (1,0,0)) in model
True
Parameters:
JExchangeParameter

An instance of ExchangeParameter.

atom1Atom or str

Atom object in (0, 0, 0) unit cell. str works only if atom is already in the Hamiltonian.

atom2Atom or str

Atom object in R unit cell. str works only if atom is already in the Hamiltonian.

Rtuple of ints

Vector of the unit cell for atom2. In the relative coordinates (i,j,k).