Spinach (software)

{{Short description|Magnetic resonance simulation package}}

{{Cleanup press release|1=article|date=December 2023}}

{{Infobox software

|logo = spinach_package_logo.png

|name = Spinach software

|released = {{Start date and age|2011|11|17|df=yes}}

|latest release version = 2.8

|latest release date = {{Start date and age|2023|08|06|df=yes}}

|programming language = Matlab

|operating system = Windows, Linux, macOS

|language = English

|genre = Magnetic resonance

|developer = Ilya Kuprov (lead developer)

|license = MIT License

|website = {{URL|spindynamics.org}}

}}

Spinach is an open-source magnetic resonance simulation package initially released in 2011 and continuously updated since. The package is written in Matlab and makes use of the built-in parallel computing and GPU interfaces of Matlab.

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.

File:strychnine_ecosy.png NMR spectrum of strychnine alkaloid simulated using Spinach.]]

Overview

Spinach implements magnetic resonance spectroscopy and imaging simulations by solving the equation of motion for the density matrix \mathbf{\rho }\left( t \right) in the time domain:

\begin{matrix}

\frac{\partial }{\partial t}\mathbf{\rho }\left( t \right)=-i\mathbf{L}\left( t \right)\mathbf{\rho }\left( t \right) \\

\Downarrow \\

\mathbf{\rho }\left( t+dt \right)=\exp \left[ -i\mathbf{L}\left( t \right)dt \right]\mathbf{\rho }\left( t \right) \\

\end{matrix}

where the Liouvillian superoperator \mathbf{L}\left( t \right) is a sum of the Hamiltonian commutation superoperator \mathbf{H}\left( t \right), relaxation superoperator \mathbf{R}, kinetics superoperator \mathbf{K}, and potentially other terms that govern spatial dynamics and coupling to other degrees of freedom:

\mathbf{L}\left( t \right)=\mathbf{H}\left( t \right)+i\mathbf{R}+i\mathbf{K}+...

Computational efficiency is achieved through the use of reduced state spaces, sparse matrix arithmetic, on-the-fly trajectory analysis, and dynamic parallelization.

Standard functionality

As of 2023, Spinach is cited in over 300 academic publications. According to the documentation and academic papers citing its features, the most recent version 2.8 of the package performs:

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.

Optimal control module

Spinach contains an implementation the gradient ascent pulse engineering (GRAPE) algorithm for quantum optimal control. The documentation and the book describing the optimal control module of the package 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.

References

{{cite journal | last=Hogben | first=H.J. | last2=Krzystyniak | first2=M. | last3=Charnock | first3=G.T.P. | last4=Hore | first4=P.J. | last5=Kuprov | first5=I. | title=Spinach – a software library for simulation of spin dynamics in large spin systems | journal=Journal of Magnetic Resonance | volume=208 | issue=2 | year=2011 | issn=1090-7807 | doi=10.1016/j.jmr.2010.11.008 | pages=179–194}}

{{cite web | title=Spinach Documentation Wiki | website=SpinDynamics.org – Spin Dynamics Group | date=28 July 2023 | url=https://spindynamics.org/wiki/index.php?title=Main_Page | access-date=4 November 2023}}

{{cite journal | last=Concilio | first=M.G. | title=Large‐scale magnetic resonance simulations: a tutorial | journal=Magnetic Resonance in Chemistry | volume=58 | issue=8 | year=2020 | issn=0749-1581 | doi=10.1002/mrc.5018 | pages=691–717| doi-access=free }}

{{cite journal | last=Krushelnitsky | first=A. | last2=Hempel | first2=G. | last3=Jurack | first3=H. | last4=Ferreira | first4=T.M. | title=Rocking motion in solid proteins studied by the 15N proton-decoupled R relaxometry | journal=Physical Chemistry Chemical Physics | volume=25 | issue=23 | year=2023 | issn=1463-9076 | doi=10.1039/d3cp00444a | pages=15885–15896| doi-access=free }}

{{cite book | last=Gutmann | first=T. | last2=Groszewicz | first2=P.B. | last3=Buntkowsky | first3=G. | title=Annual Reports on NMR Spectroscopy | chapter=Solid-state NMR of nanocrystals | year=2019 | issn=0066-4103 | doi=10.1016/bs.arnmr.2018.12.001 | pages=1–82}}

{{cite journal | last=Williams | first=R.V. | last2=Yang | first2=J.-Y. | last3=Moremen | first3=K.W. | last4=Amster | first4=I.J. | last5=Prestegard | first5=J.H. | title=Measurement of residual dipolar couplings in methyl groups via carbon detection | journal=Journal of Biomolecular NMR | volume=73 | issue=3-4 | year=2019 | issn=0925-2738 | doi=10.1007/s10858-019-00245-5 | pages=191–198| pmc=7020099 }}

{{cite journal | last=Kaseman | first=D.C. | last2=Malone | first2=M.W. | last3=Tondreau | first3=A. | last4=Espy | first4=M.A. | last5=Williams | first5=R.F. | title=Quantitation of nuclear magnetic resonance spectra at Earth’s magnetic field | journal=Analytical Chemistry | volume=93 | issue=46 | year=2021 | issn=0003-2700 | doi=10.1021/acs.analchem.1c02910 | pages=15349–15357}}

{{cite journal | last=Haies | first=I.M. | last2=Jarvis | first2=J.A. | last3=Bentley | first3=H. | last4=Heinmaa | first4=I. | last5=Kuprov | first5=I. | last6=Williamson | first6=P.T.F. | last7=Carravetta | first7=M. | title=14N overtone NMR under MAS: signal enhancement using symmetry-based sequences and novel simulation strategies | journal=Physical Chemistry Chemical Physics | volume=17 | issue=9 | year=2015 | issn=1463-9076 | doi=10.1039/c4cp03994g | pages=6577–6587| doi-access=free | pmc=4673505 }}

{{cite web | title= Spinach - a fast and general spin dynamics simulation library | url=https://spindynamics.org/documents/spinach_history.pdf | access-date=2023-11-27}}

{{cite book | last=Kuprov | first=I. | title=Spin: from basic symmetries to quantum optimal control | chapter=Notes on software engineering | publisher=Springer | year=2023 | isbn=978-3-031-05606-2 | doi=10.1007/978-3-031-05607-9_9 | pages=351–373}}

{{cite book | last=Kuprov | first=I. | title=Spin: from basic symmetries to quantum optimal control | chapter=Optimal control of spin systems | publisher=Springer | year=2023 | isbn=978-3-031-05606-2 | doi=10.1007/978-3-031-05607-9_8 | pages=313–349}}

{{cite journal | last=Khaneja | first=N. | last2=Reiss | first2=T. | last3=Kehlet | first3=C. | last4=Schulte-Herbrüggen | first4=T. | last5=Glaser | first5=S.J. | title=Optimal control of coupled spin dynamics: design of NMR pulse sequences by gradient ascent algorithms | journal=Journal of Magnetic Resonance | volume=172 | issue=2 | year=2005 | issn=1090-7807 | doi=10.1016/j.jmr.2004.11.004 | pages=296–305}}

{{cite journal | last=Dumez | first=J.-N. | title=Frequency-swept pulses for ultrafast spatially encoded NMR | journal=Journal of Magnetic Resonance | volume=323 | year=2021 | issn=1090-7807 | doi=10.1016/j.jmr.2020.106817 | page=106817}}

{{cite journal | last=Allami | first=A.J. | last2=Concilio | first2=M.G. | last3=Lally | first3=P. | last4=Kuprov | first4=I. | title=Quantum mechanical MRI simulations: solving the matrix dimension problem | journal=Science Advances | volume=5 | issue=7 | date=2019-07-05 | issn=2375-2548 | doi=10.1126/sciadv.aaw8962 | page=| doi-access=free | pmc=6641938 }}

{{cite journal | last=Guduff | first=L. | last2=Kuprov | first2=I. | last3=van Heijenoort | first3=C. | last4=Dumez | first4=J.-N. | title=Spatially encoded 2D and 3D diffusion-ordered NMR spectroscopy | journal=Chemical Communications | volume=53 | issue=4 | year=2017 | issn=1359-7345 | doi=10.1039/c6cc09028a | pages=701–704}}

{{cite book | last=Kuprov | first=I. | title=Spin: from basic symmetries to quantum optimal control | chapter=Incomplete basis sets | publisher=Springer | year=2023 | isbn=978-3-031-05606-2 | doi=10.1007/978-3-031-05607-9_7 | pages=291–312}}

{{cite journal | last=Redrouthu | first=V.S. | last2=Mathies | first2=G. | title=Efficient pulsed dynamic nuclear polarization with the X-inverse-X sequence | journal=Journal of the American Chemical Society | volume=144 | issue=4 | year=2022 | issn=0002-7863 | doi=10.1021/jacs.1c09900 | pages=1513–1516}}

Category:Computational chemistry software

Category:Physics software