Skip to main content

A python toolbox for simulating NMR spectra

Project description

[![Build Status](]( [![Documentation Status](](

# mrsimulator

mrsimulator is a library package with methods and tools for fast simulation of solid-state nuclear magnetic resonance (NMR) line-shapes. The library contains routines written in C which are wrapped and made available in python.

The package is currently under development. At present, mrsimulator features simulation of one-dimensional NMR line-shape of uncoupled spin I=1/2 isotopes for the following scenarios –

  • At arbitrary macroscopic magnetic flux density,
  • Magic angle spinning (MAS) at arbitrary spin rate,
  • Variable angle spinning (VAS) at arbitrary angle and spin rates,
  • Static line-shape.

For more information, refer to the [documentation](

## Installation

We recommend installing [anaconda]( distribution for python version 3.6 or higher. The anaconda distribution ships with numerous packages and modules including Numpy, Scipy, and Matplotlib which are useful packages for scientific datasets.

### Download mrsimulator package

First, clone and download the mrsimulator package from Github. If you prefer git, type the following in the terminal,

$ git clone git://

else, [download]( the package using the browser. Once downloaded, use the terminal to navigate to the directory containing the package (usually, the folder is named mrsimulator).

$ cd mrsimulator

### Installing dependencies

Next, install the dependencies of the package. We recommend using conda to install the dependencies, as follows,

$ conda install -c conda-forge openblas –file requirements.txt

### Building and Installing mrsimulator package

Because the core of the mrsimulator package is written in C, you will require a C-compiler to build and install the package. We recommend the following C-compiler for the OS types:

  • Mac OS - clang
  • Linux - gcc
  • Windows - msvc

Install the package with,

$ python install

## Check your build

If the installation is successful, you should be able to run the following [test file]( in your terminal.

$ python

This should produce the following figure.

![alt text](

Project details

Download files

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

Files for mrsimulator, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size mrsimulator-0.1.2-cp36-cp36m-manylinux1_x86_64.whl (13.9 MB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size mrsimulator-0.1.2-cp37-cp37m-macosx_10_7_x86_64.whl (238.8 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size mrsimulator-0.1.2-cp37-cp37m-manylinux1_x86_64.whl (13.9 MB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size mrsimulator-0.1.2.tar.gz (282.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page