Spinach (software)
Magnetic resonance simulation package From Wikipedia, the free encyclopedia
Spinach is an open-source magnetic resonance simulation package initially released in 2011[1] and continuously updated since.[2] The package is written in Matlab and makes use of the built-in parallel computing and GPU interfaces of Matlab.[3]
![]() | This article reads like a press release or a news article and may be largely based on routine coverage. (December 2023) |
![]() | |
Developer(s) | Ilya Kuprov (lead developer) |
---|---|
Initial release | 17 November 2011 |
Stable release | 2.8
/ 6 August 2023 |
Written in | Matlab |
Operating system | Windows, Linux, macOS |
Available in | English |
Type | Magnetic resonance |
License | MIT License |
Website | spindynamics |
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.[4]

Overview
Summarize
Perspective
Spinach implements magnetic resonance spectroscopy and imaging simulations by solving the equation of motion for the density matrix in the time domain:[1]
where the Liouvillian superoperator is a sum of the Hamiltonian commutation superoperator , relaxation superoperator , kinetics superoperator , and potentially other terms that govern spatial dynamics and coupling to other degrees of freedom:[2]
Computational efficiency is achieved through the use of reduced state spaces, sparse matrix arithmetic, on-the-fly trajectory analysis, and dynamic parallelization.[5]
Standard functionality
Summarize
Perspective
As of 2023, Spinach is cited in over 300 academic publications.[1] According to the documentation[2] and academic papers citing its features, the most recent version 2.8 of the package performs:
- Time-domain nuclear magnetic resonance (NMR) simulations of:
- Standard NMR experiments (DEPT, COSY, NOESY, HSQC, TOCSY, etc.).[6]
- Protein and nucleic acid NMR experiments (HNCA, HNCOCA, HNCO, etc.).[7]
- Magic angle spinning NMR experiments (CP-MAS, MQMAS, WISE, etc.).[8]
- Experiments involving residual dipolar coupling and other residual order effects.[9]
- Zero- and ultra-low field experiments, including Earth's field NMR.[10]
- Nuclear quadrupole resonance, including overtone NMR.[11]
- Time-domain magnetic resonance imaging (MRI) simulations, including:
- Standard and user-specified imaging sequences.[2]
- Diffusion coefficient and diffusion tensor imaging.[12]
- Three-dimensional point-resolved NMR spectroscopy.[13]
- Ultrafast spatially encoded NMR spectroscopy.[14]
- Time-domain electron spin resonance (ESR) simulations of:
- Standard pulsed ESR experiments (HYSCORE, ENDOR, ESEEM, etc.).
- Pulsed dipolar spectroscopy (DEER, RIDME, etc.).
- Dynamic nuclear polarization for static and spinning samples.[15]
Common models of spin relaxation (Redfield theory, stochastic Liouville equation, Lindblad theory) and chemical kinetics are supported, and a library of powder averaging grids is included with the package.[2]
Optimal control module
Spinach contains an implementation the gradient ascent pulse engineering (GRAPE) algorithm[16] for quantum optimal control. The documentation[2] and the book describing the optimal control module of the package[17] list the following features:
- L-BFGS quasi-Newton and Newton-Raphson GRAPE optimizers.
- Spin system trajectory analysis by coherence and correlation order.
- Spectrogram analysis of the pulse waveform.
- Prefixes, suffixes, keyholes, and freeze masks.
- Optimization of cooperative pulses and phase cycles.
- Waveform penalty functionals and instrument response.
Dissipative background evolution generators and control operators are supported, as well as ensemble control over distributions in common instrument calibration parameters, such as control channel power and offset.[2]
References
Wikiwand - on
Seamless Wikipedia browsing. On steroids.