magnopy.SpinHamiltonian.parameters#
method
- SpinHamiltonian.parameters(n=None, p_n=None)[source]#
Returns an iterator over parameters of the Hamiltonian.
Added in version 0.5.0.
See Spin Hamiltonian for the definition of the Hamiltonian and the meaning of
nandp_n.- Parameters:
- nint, optional
Number of spins in the terms of the spin Hamiltonian. Expected to be between 1 and 4. If not given, then all parameters are returned and
p_nis ignored.- p_nint, optional
Index of integer partition of
n. Expected to be between 1 and maximal number of integer partitions for the givenn. If not given, then parameters of all respective terms of the spin Hamiltonian withnspins are returned. Ignored ifnis not given.
- Returns:
- parametersiterator
Iterator over parameters of the Hamiltonian. Each element of the iterator is a tuple
(nus, alphas, parameter)wherenusis a tuple of unit cell indices,alphasis a tuple of atom indices, andparameteris a vector/matrix/tensor of the interaction parameter.len(alphas) = nlen(nus) == len(alphas) - 1len(parameter.shape) == len(alphas)parameter.shape[i] == 3for all0 <= i < len(alphas)alphas[0]is always located in the unit cell (0, 0, 0)alphas[i]is located in the unit cellnus[i-1]for1 <= i < len(alphas)