Skip to main content

Spins in Liouville-space for rElaxation and Exchange in PYthon

Project description

drawing

SLEEPY

Spins in Liouville space for rElaxation and Exchange in PYthon

SLEEPY is software intended for the simulation of NMR spin-systems including exchange processes and relaxation. Includes easy setup of the spin system, and allows application of arbitrary pulse sequences in both the rotating- and lab-frames.

Requires standard python packages plus numpy/scipy/matplotlib. Multiprocess is recommended, and ipywidgets are used for creating zoomable plots, e.g. Google Colab, although is not required. Note that we highly recommend using the Intel MKL libraries with numpy/scipy at least if you're using an Intel CPU. Anaconda installs these by default on Intel machines (Miniconda does not!). Note that we have not been able to run MKL with Python 12 or 13.

Benchmarked version

  • Python: 3.11.13
  • Numpy: 1.24.3
  • Scipy: 1.10.1
  • Multiprocessing: 0.70.15

Other tested versions (speed may vary):

  • Python: 3.8.8, 3.9.3, 3.11.11, 3.13.2
  • numpy: 1.20.1, 2.0.2, 2.2.3
  • scipy: 1.6.2, 1.14.1, 1.15.2
  • matplotlib: 3.3.4, 3.10.0

Testing has been performed on the various notebooks found at https://github.com/alsinmr/SLEEPY_tutoria/ using Jupyter Notebooks on MacOS and on myBinder.org, and also on Google Colab.

Installation is possible via pip. Please run

pip install sleepy-nmr

This will create the "sleepy" module (not sleepy-nmr!). Typical install time is ~5 seconds (install time will be significantly longer if numpy, scipy, and matplotlib are not already installed, since these will be installed as dependencies).

The SLEEPY tutorial provides extensive examples of applications of SLEEPY and is available online at http://sleepy-nmr.org or https://alsinmr.github.io/SLEEPY

These examples may be downloaded as Jupyter notebooks or run online via Google Colab (demo).

We also provide example scripts here, in the folder 'examples', which may be run as Python3 scripts. To run these, please navigate to the examples folder and then run either

python3 ShortExamples.py

or

python3 Figure3.py

Both scripts will run a number of examples and create a folder of the corresponding figures. The former calculation takes on the order of 1 minute for 6 examples, and the latter on the order of 10 minutes for 9 examples (these correspond to Figure 3 of the corresponding manuscript).

Copyright 2025 Albert Smith-Penzel, Kai Zumpfe

All files are copyrighted under the GNU General Public License. A copy of the license has been provided in the file LICENSE

Funding for this project provided by:

Deutsche Forschungsgemeinschaft (DFG) grant 450148812

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sleepy_nmr-1.1.1.tar.gz (643.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sleepy_nmr-1.1.1-py3-none-any.whl (565.8 kB view details)

Uploaded Python 3

File details

Details for the file sleepy_nmr-1.1.1.tar.gz.

File metadata

  • Download URL: sleepy_nmr-1.1.1.tar.gz
  • Upload date:
  • Size: 643.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for sleepy_nmr-1.1.1.tar.gz
Algorithm Hash digest
SHA256 6a9584496437a8607e64d400c3820be2d1e99e8b8643404646ec32b43c176f50
MD5 effcc54176f608010778f969b16a39e7
BLAKE2b-256 3043b4eff6b5617d72d95b7f2a34bfc7cc16b19b6e70a94c541e7e865c28660b

See more details on using hashes here.

File details

Details for the file sleepy_nmr-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: sleepy_nmr-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 565.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for sleepy_nmr-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aaf2be09b309d78a65bb1df9355188deec8613b60a4aa6d969c629953a826305
MD5 0742a36f69cb34598c1933139720527e
BLAKE2b-256 f738e0bfcb49185384564779d7b01785f8363f42f0e30fcbcf48b4cf2110cd7f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page