radtools.ExchangeHamiltonian.notation#

property

property ExchangeHamiltonian.notation#

Return a string with a simple comment about the Hamiltonian notation.

It can be set with a

  • string

    One of the predefined notations: "standard", "TB2J", "SpinW"

  • iterable with 5 elements

    Each element is converted to bool and the parameters are set with values. Order: (double counting, spin normalized, factor 1/2, factor 2, minus sign).

Predefined notations:

  • Standard

    (True, False, False, False, True)

    \[H = -\sum_{i,j} \hat{\boldsymbol{S}}_i \cdot \boldsymbol{J}_{i,j} \hat{\boldsymbol{S}}_j\]

    where double counting is present (\(ij\) and \(ji\) is in the sum). Spin vectors are not normalized.

  • TB2J

    (True, True, False, False, True)

    \[H = -\sum_{i,j} \hat{\boldsymbol{S}}_i \cdot \boldsymbol{J}_{i,j} \hat{\boldsymbol{S}}_j\]

    where double counting is present (\(ij\) and \(ji\) is in the sum). Spin vectors are normalized to 1.

  • SpinW

    (True, False, False, False, False)

    \[H = \sum_{i,j} \hat{\boldsymbol{S}}_i \cdot \boldsymbol{J}_{i,j} \hat{\boldsymbol{S}}_j\]

    where double counting is present (\(ij\) and \(ji\) is in the sum). Spin vectors are not normalized.

Setting of this attribute either change the notation (if corresponding attributes are defined) or set the interpretation (if corresponding attribute are not defined).

Returns:
notation(5,) tuple of bool

True/False values of notation properties:

(double_counting, spin_normalized, factor_one_half, factor_two, minus_sign)

Examples

Setting one of the predefined notations:

>>> import radtools as rad
>>> model = rad.ExchangeHamiltonian()
>>> model.notation = "standard"
>>> model.notation
H = -sum_{i,j} S_i J_ij S_j
Double counting is present.
Spin vectors are not normalized.
(True, False, False, False, True)
>>> model.notation = "TB2J"
>>> model.notation
H = -sum_{i,j} S_i J_ij S_j
Double counting is present.
Spin vectors are normalized to 1.
(True, True, False, False, True)
>>> model.notation = "SpinW"
>>> model.notation
H = sum_{i,j} S_i J_ij S_j
Double counting is present.
Spin vectors are not normalized.
(True, False, False, False, False)

Setting the notation:

>>> import radtools as rad
>>> model = rad.ExchangeHamiltonian()
>>> Cr = rad.Atom("Cr", spin=1.5)
>>> model.add_bond(rad.ExchangeParameter(iso=1), Cr, Cr, (1, 0, 0))
>>> model[Cr, Cr, (1, 0, 0)].iso
1.0
>>> # For the first time interpretation is set,
>>> # values of exchange are not changed
>>> model.notation = "standard"
>>> model[Cr, Cr, (1, 0, 0)].iso
1.0
>>> # Once the notation is set the values
>>> # are changing if the notation is changed again.
>>> model.notation = "TB2J"
>>> model[Cr, Cr, (1, 0, 0)].iso
2.25
>>> model.notation = "SpinW"
>>> model[Cr, Cr, (1, 0, 0)].iso
-1.0
>>> model.notation = "standard"
>>> model[Cr, Cr, (1, 0, 0)].iso
1.0

Setting individual properties:

>>> import radtools as rad
>>> model = rad.ExchangeHamiltonian()
>>> Cr = rad.Atom("Cr", spin=1.5)
>>> model.add_bond(rad.ExchangeParameter(iso=1), Cr, Cr, (1, 0, 0))
>>> model[Cr, Cr, (1, 0, 0)].iso
1.0
>>> # For the first time interpretation is set,
>>> # values of exchange are not changed
>>> model.minus_sign = True
>>> model[Cr, Cr, (1, 0, 0)].iso
1.0
>>> # Once the property is set the values
>>> # are changing if the property is changed again.
>>> model.minus_sign = False
>>> model[Cr, Cr, (1, 0, 0)].iso
-1.0

Changing individual properties:

>>> import radtools as rad
>>> model = rad.ExchangeHamiltonian()
>>> Cr = rad.Atom("Cr", spin=1.5)
>>> model.add_bond(rad.ExchangeParameter(iso=1), Cr, Cr, (1, 0, 0))
>>> model[Cr, Cr, (1, 0, 0)].iso
1.0
>>> model.notation = "standard"
>>> model[Cr, Cr, (1, 0, 0)].iso
1.0
>>> model.double_counting, model.spin_normalized, model.factor_one_half, model.factor_two, model.minus_sign
(True, False, False, False, True)
>>> model.minus_sign = False
>>> model[Cr, Cr, (1, 0, 0)].iso
-1.0
>>> model.factor_one_half, model.factor_two
(False, False)
>>> model.factor_one_half = True
>>> model[Cr, Cr, (1, 0, 0)].iso
-2.0
>>> model.factor_one_half, model.factor_two
(True, False)
>>> model.factor_two = True
>>> model[Cr, Cr, (1, 0, 0)].iso
-1.0
>>> # Note that the values are switched to False,
>>> # since factor one half and two are cancelling each other
>>> model.factor_one_half, model.factor_two
(False, False)
>>> model.spin_normalized = True
>>> model[Cr, Cr, (1, 0, 0)].iso
-2.25
>>> model.double_counting = False
>>> model[Cr, Cr, (1, 0, 0)].iso
-4.5