User guide#

Short, task-oriented pages: what each part of torchspin is for and how to use it, with examples you can paste into Python. Every example on these pages is run against the code (python docs/scripts/check_guide_examples.py). For the full list of parameters of a function or class, follow the links to the API reference.

Page

Use it to

Spin systems, experiments and options

describe a sample, a measurement and the numerical settings

Solid-state (powder) spectra

simulate frozen-solution and powder CW EPR with pepper

Is my orientation grid fine enough?

check a powder spectrum for grid convergence

Solution and slow-motion spectra

isotropic and fast-motion spectra with garlic, slow motion with chili

ENDOR and pulse EPR

ENDOR spectra with salt, pulse experiments with saffron

Fitting spectra

fit simulation parameters to measured data with esfit

Gradients and differentiable simulation

get derivatives of spectra, use a GPU

Ligand-field tools

go from a ligand-field model to g values, magnetometry and spectra

Units throughout: energies and couplings in MHz, magnetic fields in mT, microwave frequencies in GHz, angles in radians, temperatures in K.

When a result looks wrong, see Troubleshooting and reference: pitfalls, known limitations and the change log.