Skip to main content
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

Metadata

Release files for sleepy-nmr 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sleepy-nmr 1.1.2
File Size Uploaded Provenance Actions
sleepy_nmr-1.1.2.tar.gz 647.3 kB Without provenance Details for sleepy_nmr-1.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sleepy-nmr 1.1.2
File Interpreter ABI Platform Actions
sleepy_nmr-1.1.2-py3-none-any.whl Python 3 none any Details for sleepy_nmr-1.1.2-py3-none-any.whl

Total release size: 1.2 MB

Release files / sleepy_nmr-1.1.2.tar.gz

Download URL sleepy_nmr-1.1.2.tar.gz
Size 647.3 kB
Tags Source
SHA-256 checksum
How to use checksums
09330767bae17d853c367d90748495ef756409f08e6f0052a6987d77bc7452f6
BLAKE2b-256 checksum
How to use checksums
0f08c41abaabfc94d8e1a8b13ca46207ae435977964369626e0fcc51a9979b49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / sleepy_nmr-1.1.2-py3-none-any.whl

Download URL sleepy_nmr-1.1.2-py3-none-any.whl
Size 568.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
31c2180963d74948de4aaa1214abe85047fb9ccd42da8c20d56add63961b3085
BLAKE2b-256 checksum
How to use checksums
e421eff93938e7b65b835feede3512e96592df6adb3a6a670744d7e3bbc0d424
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for sleepy-nmr 1.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page