endorfrq#

torchspin.endorfrq(sys, B_field, phi=0.0, theta=0.0, freq_range=None, threshold=1e-4, mwFreq=None, _H0=None, _mux=None, _muy=None, _muz=None, _snmux=None, _snmuy=None, _snmuz=None, opt=None)[source]#

Compute ENDOR transition frequencies at a fixed EPR field.

Parameters:
  • sys (SpinSystem) – Spin system. Must contain at least one nucleus.

  • B_field (float) – Fixed EPR field in mT.

  • phi (float) – Field orientation in radians. n = (sin(θ)cos(φ), sin(θ)sin(φ), cos(θ)).

  • theta (float) – Field orientation in radians. n = (sin(θ)cos(φ), sin(θ)sin(φ), cos(θ)).

  • freq_range (Optional[tuple[float, float]]) – (f_lo, f_hi) in MHz, used by the transition selection only (as EasySpin’s Exp.Range): a level pair whose frequency is outside the range at every orientation of the selection grid is dropped. The selected pairs are returned at (phi, theta) even where their frequency is outside the range (0.9.14; before, the range filtered the lines at this orientation). None = no range.

  • threshold (float) – Relative selection threshold (EasySpin Opt.Threshold). A level pair is kept if its nuclear-moment rate summed over the selection grid is > threshold * max (0.9.14; before, the selection used the per-orientation intensities >= threshold * max). Default 1e-4 (EasySpin’s endorfrq default is 1e-3; salt passes Options.Threshold, 1e-4).

  • mwFreq (Optional[float]) – Microwave frequency in GHz. Currently unused (reserved for orientation-selection weighting).

  • opt (Optional['Options']) – Optional Options. Reads Enhancement, Transitions, TPSGridSymm and TPSGridSize (threshold stays the explicit argument). With Enhancement=True the intensities use the total magnetic moment (electron + nuclear, ham()’s mux/muy/muz) perpendicular to the field instead of the nuclear moment, i.e. they include hyperfine enhancement (EasySpin Opt.Enhancement='on'); the selection is unchanged. Transitions ('all' or 1-based level pairs) gives the level pairs directly and skips the selection, as EasySpin’s Opt.Transitions. TPSGridSymm/TPSGridSize set the selection grid (EasySpin’s undocumented options of the same names, defaults 'D2h' and 4). None (default) = all defaults.

Returns:

  • freqs – Nuclear transition frequencies in MHz, shape (nTrans,).

  • intensities – Transition intensities (a.u.), shape (nTrans,).

  • transitions – Level pairs [u, v], shape (nTrans, 2): 1-based level numbers in ascending energy at B_field, u < v, as EasySpin’s Transitions output and Options.Transitions (0.9.2; before, 0-based: subtract 1 to index the eigenvalues/eigenvectors). Rows follow freqs (ascending frequency); EasySpin orders them by descending selection rate.

Raises:

ValueError – If the spin system contains no nuclei.

Return type:

tuple[Tensor, Tensor, Tensor]

Notes

Electronic level pairs are always excluded from the automatic selection, as in EasySpin (0.9.14; before, only with Enhancement). Levels are grouped by energy into blocks of nStates / prod(2S+1), valid when the electron Zeeman/zero-field splitting exceeds the nuclear splittings.