Spinach (software)
| Spinach | |
|---|---|
| Developer | Ilya Kuprov (lead developer) |
| Release | 2011 |
| Stable release | 2.12.1
/ 15 June 2026 |
| Written in | MATLAB, C++ |
| Operating system | Microsoft Windows, macOS, Linux |
| Available in | English |
| Type | Magnetic resonance simulation |
| License | MIT License |
| Website | spindynamics |
| Repository | github |
Spinach is an open-source software package for numerical simulation of time-domain spin dynamics in magnetic resonance. It is written in MATLAB and is used for simulations in nuclear magnetic resonance (NMR), electron paramagnetic resonance (EPR), magnetic resonance imaging (MRI), dynamic nuclear polarization (DNP), magic angle spinning (MAS), spin chemistry, and quantum optimal control.
The package was introduced in 2011 in the Journal of Magnetic Resonance as a library for simulating spin dynamics in large spin systems. Subsequent publications describe its use for large-scale magnetic resonance simulations, including reduced state-space calculations, Fokker-Planck treatment of spatial dynamics, quantum mechanical MRI simulation, and optimal control calculations.
The source code is maintained in a public GitHub repository and distributed under the MIT License. The name of the package whimsically refers to the physical concept of spin and to Popeye the Sailor who, in the eponymous comic books, becomes stronger after consuming spinach.