API reference#

Everything documented here is importable from the top-level package, e.g. from torchspin import SpinSystem, Experiment, Options, pepper; the pages use those public names (torchspin.pepper), not the internal module paths. Units follow EasySpin: energies and couplings in MHz, magnetic fields in mT, microwave frequencies in GHz, angles in radians.

Core objects#

Most work needs only these: describe the spin system and the experiment, simulate, and fit.

SpinSystem

Spin system: spins, interactions and broadenings (EasySpin Sys).

Experiment

Experimental parameters for CW EPR simulations (EasySpin Exp).

Options

Computational options for the CW EPR and ENDOR simulators (EasySpin Opt).

pepper

Solid-state CW EPR spectrum (EasySpin pepper).

garlic

Isotropic or fast-motion CW EPR spectrum of S = 1/2 systems in solution.

esfit

Fit a model to data by least squares (port of EasySpin's esfit).

FitOptions

Options for esfit(): optimizer, scaling, baseline, target, budget.

FitResult

Result of esfit().

differentiable_spectrum

Differentiable CW EPR powder spectrum of a one-electron spin system.

grid_convergence

Check whether Options.GridSize is fine enough for a pepper simulation.

GridConvergence

Result of grid_convergence(): a spectrum compared with a refined one.

By topic#

Submodules#

Packages that are imported as modules rather than as top-level names: