salt#

torchspin.salt(sys, exp, opt=None, freq_range=None, n_points=512, lw_mhz=0.1)[source]#

Field-swept ENDOR powder spectrum (frequency domain).

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

  • exp (Experiment) – Experimental parameters. exp.mwFreq (GHz) and exp.Range (mT, EPR sweep range) are used to locate EPR resonance fields.

  • opt (Options | None) – Computational options. Defaults to Options(). GridSize is an int N or [N, Ninterp] as in EasySpin: in fixed-field mode the transitions are followed across the N-knot grid, interpolated Ninterp-fold and projected onto the frequency axis (projecttriangles/projectzones), so coarse grids give smooth powder patterns. Set opt.device='cuda' for GPU acceleration. On the matrix paths the level pairs are selected once, as in EasySpin endorfrq (Threshold on the nuclear-moment rates summed over the TPSGridSymm/TPSGridSize grid, electronic pairs removed; at 5 fields spanning the sweep in field-swept mode), independent of GridSize; Transitions replaces the selection (0.9.14).

  • freq_range (tuple[float, float] | None) – (f_lo, f_hi) in MHz for the ENDOR frequency axis. If None, the range is set to [0, 2 * mwFreq * 1e3] (i.e. 0 to 2× the microwave frequency).

  • n_points (int) – Number of points in the frequency axis. Default 512.

  • lw_mhz (float | Tensor) – Gaussian FWHM (MHz) for the ENDOR lineshape convolution. Default 0.1. As in EasySpin (salt.m:899-911), a width of at most two frequency increments is not convolved: the spectrum is returned unbroadened.

Returns:

  • freq_axis – Frequency axis in MHz, shape (n_points,).

  • spec – ENDOR spectrum, shape (n_points,). Line intensities are abs(<i|mu_perp|j>)**2 in (MHz/mT)^2 on every path (first-order perturbation theory for one electron without Q, matrix diagonalization otherwise). In fixed-field mode this is the per-bin, orientation-averaged amplitude, EasySpin’s salt output times dx / (8 pi^2) (dx = bin width, MHz).

Raises:

ValueError – If the spin system contains no nuclei, a set of equivalent nuclei (Sys.n > 1) or orbital angular momenta (Sys.L), as in EasySpin; or if Sys.Ham is combined with an explicit perturbation method (Options.Method='perturb', 'perturb1', 'perturb2').

Return type:

tuple[Tensor, Tensor]

Notes

Deliberate deviation (Sys.Ham). EasySpin’s salt rejects every Sys.Ham* term (salt.m:132). torchspin simulates them: a spin system with any Sys.Ham entry is always sent to the matrix paths (resonance fields by resfields_batch in the field-swept mode, ENDOR transitions by diagonalizing ham()), which include the zero-field (lB = 0) and linear-in-field (lB = 1, e.g. Ham110/Ham112) terms exactly. The first-order perturbation paths build the Zeeman term from Sys.g alone, which is zero when the linear Zeeman term is given as Ham110/Ham112. Field-quadratic and cubic terms (lB >= 2) are dropped, as in pepper() with the default Options.QuadraticZeeman=False (QuadraticZeeman=True raises). See KNOWN_LIMITATIONS.md.