HTTPS SSH

SimpeleNMR

SimpeleNMR aims to be simple, automatic, batch processor for (semi) quantitative NMR spectra. Features include:

  • Agilent/Varian VNMR, Bruker (Avance II and newer), and PicoSpin files
  • 1D spectra (regular/arrayed), limited 2D spectra support (JRES/basic absolute value processing).
  • Zero fill, exponential, sine, gaussian window functions
  • Phased/magnitude/power mode spectra
  • Automatic or manual phasing
  • 1st/2nd order and smooth baseline correction
  • Output in ImatraNMR .is/isz, txt, csv, matlab, wav (FID only).
  • Open source, BSD 3-clause license.

Installation

Requirements:

  • Python3
  • NumPy
  • SciPy
  • scikit-learn
  • Matplotlib
  • Cython (only for building from scratch)

In Debian based distros, you can start with:

apt-get install python3 python3-virtualenv python3-pip

Safest way is to use pip and install the package in a dedicated virtualenv to avoid any conflicts with other packages. First create a new virtualenv and activate it:

virtualenv --python=python3 some_env_name
source some_env_name/bin/activate

Finally dowload the wheel package and use pip to install it:

pip install simpelenmr-1.5.2-cp35-cp35m-linux_x86_64.whl

Now you can use simpeleNMR whenever the virtualenv is activated.

# activate env
source some_env_name/bin/activate
# do stuff -> profit
# deactivate if you want to use some other venv
deactivate

you can also install without virtualenv, but remeber to use pip3 and add .local/bin/ to your path etc:

pip3 install simpelenmr-1.5.2-cp35-cp35m-linux_x86_64.whl --user

Example processing

SimpeleNMR is a console program and takes arguments in the following syntax:

simpele INPUTMODE FORMAT INPUTFILE [OPTIONS]

So, for example a single (s) Varian (vn) fid file can be processed with default settings with following command:

simpele s vn oil.fid

In more realistic scenario, some processing options are supplied in the form of a processing config file. An example of such file (example.sconf) could be:

zerofill = default
apo_lb = 1.0
phase = auto
autophase_mode = default
baseline_corr = 2

And now processing using example.sconf:

simpele s vn oil.fid -c example.sconf

The resulting spectrum (example_oil.isz) can be viewed using simp_view, bundled with SimpeleNMR:

simp_view oil.isz -png oil 

Quick reference

This file lists configuration options in SimpeleNMR 1.4.6 and is supplementary to the full user guide. Config parameter list

Basic

proc = [1d|2d]

Window functions and zerofill

zerofill = <POINTS>
zerofill2d = <POINTS>
apo_lb = <HZ>
apo2d_lb = <HZ>
apo_gauss = <STDEVS>
apo2d_gauss = <STDEVS>
apo_gauss_mean = <MEAN>
apo2d_gauss_mean = <MEAN>
apo_sine = <SCALE>
apo2d_sine = <SCALE>

Phasing

phase = [auto|default|manual|av|pow]
ph0 = <degrees>
ph1 = <degrees>
autophase_mode = [1|2|3|4|5|zero|default]
autophase_copyblock = [first|last]
autophase_blcorr = [1|2|3]

1D postprocess

baseline_corr = [1|2|3|drift|second|smooth]
baseline_corr_window = <POINTS_PERCENT>
trim = <TRIM_PERCENT>
align = <STATRTPPM> -> <ENDPPM> @ <REFERENCE>

2D postprocess

rotate = [y|n]
fold = [y|n]
project_f2 = [sky|y|n]

Building it yourself

This is useful if your are not on 64-bit linux with Python 3.5, so the readymade wheel archives do not work. First clone or download the repo, and create a new virtualenv if needed & activate it.

Then go to the repo dir, build & install the wheel package

# make sure you have cython
pip install cython

# build
python3 setup.py bdist_wheel

# install
pip install dist/simpelenmr-1.5.2-cp35-cp35m-linux_x86_64.whl

License

BSD 3-Clause. See: https://opensource.org/licenses/BSD-3-Clause

Copyright 2017 Valtteri Mäkelä

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.