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) andexp.Range(mT, EPR sweep range) are used to locate EPR resonance fields.opt (Options | None) – Computational options. Defaults to
Options().GridSizeis an intNor[N, Ninterp]as in EasySpin: in fixed-field mode the transitions are followed across theN-knot grid, interpolatedNinterp-fold and projected onto the frequency axis (projecttriangles/projectzones), so coarse grids give smooth powder patterns. Setopt.device='cuda'for GPU acceleration. On the matrix paths the level pairs are selected once, as in EasySpin endorfrq (Thresholdon the nuclear-moment rates summed over theTPSGridSymm/TPSGridSizegrid, electronic pairs removed; at 5 fields spanning the sweep in field-swept mode), independent ofGridSize;Transitionsreplaces the selection (0.9.14).freq_range (tuple[float, float] | None) –
(f_lo, f_hi)in MHz for the ENDOR frequency axis. IfNone, 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 areabs(<i|mu_perp|j>)**2in (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’ssaltoutput timesdx / (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 ifSys.Hamis combined with an explicit perturbation method (Options.Method='perturb','perturb1','perturb2').- Return type:
Notes
Deliberate deviation (Sys.Ham). EasySpin’s salt rejects every
Sys.Ham*term (salt.m:132). torchspin simulates them: a spin system with anySys.Hamentry is always sent to the matrix paths (resonance fields byresfields_batchin the field-swept mode, ENDOR transitions by diagonalizingham()), 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 fromSys.galone, which is zero when the linear Zeeman term is given asHam110/Ham112. Field-quadratic and cubic terms (lB >= 2) are dropped, as inpepper()with the defaultOptions.QuadraticZeeman=False(QuadraticZeeman=Trueraises). See KNOWN_LIMITATIONS.md.