ham_nn#
- torchspin.ham_nn(sys, nSpins=None, dtype=torch.complex128, device='cpu')[source]#
Nuclear-nuclear coupling Hamiltonian (MHz).
- Parameters:
sys (SpinSystem) – Spin system. Coupling tensors are in
sys.nn(MHz) and frames insys.nnFrame. Ifsys.nnisNone, returns zero matrix.nSpins (list[int] | None) – 1-based indices of nuclear spins to include: at least 2, each in
1..nNuclei, no duplicates; otherwiseValueErroris raised (as in EasySpin). Ignored (zero matrix returned) when the system has fewer than 2 nuclei ornnis absent or all zero, as in EasySpin. Defaults to all nuclei.dtype (dtype) – Output dtype. Default
torch.complex128.device (str) – PyTorch device string.
- Returns:
torch.Tensor – Nuclear-nuclear Hamiltonian (MHz), shape
(nStates, nStates).- Return type: