magnopy.SpinHamiltonian.cell#

property

property SpinHamiltonian.cell#

Cell of the crystal on which the Hamiltonian is build.

See Cell for more details.

Returns:
cell(3, 3) numpy.ndarray

Matrix of the cell, rows are lattice vectors.

Notes

If is not recommended to change the cell property after the creation of SpinHamiltonian. In fact an attempt to do so will raise an AttributeError:

>>> import numpy as np
>>> import magnopy
>>> convention = magnopy.Convention()
>>> spinham = magnopy.SpinHamiltonian(
...     cell=np.eye(3), atoms={}, convention=convention
... )
>>> spinham.cell = 2 * np.eye(3)
Traceback (most recent call last):
...
AttributeError: Change of the cell attribute is not allowed after the creation of SpinHamiltonian instance. SpinHamiltonian.cell is immutable.