npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

multiplet-analysis

v2.1.5

Published

Extract coupling constants from a complex NMR multiiplet

Downloads

778

Readme

multiplet-analysis

NPM version build status npm download

The goal of this project is to be able to determine the multiplicity of a NMR signal as well as the coupling constants. It is based on a delta-function deconvolution developed by D. Jeannerat and G. Bodenhausen and published in J. Magn. Reson. 1999, 141(1), p133 doi:10.1006/jmre.1999.1845. More info and discussion in doc/README.md The result of the analysis that is an object composed:

  • delta
  • multiplicity : m (massif if delta is unspecified), s, s br, d br. We can repeat the multiplicity in this field but if it is empty we should use it from coupling constants array.
  • peak: [{x: , y:, z:, width}, {x: , y:, z:, width}, ]
  • j []
    • multiplicity: (d, t, q, p pent quint, sext hex, sept hept, oct, non)
    • coupling: (Hz)

Technical information

Run example

node -r esm examples/quadruplet.js
node -r esm examples/ddd.js
node -r esm examples/ddd_ABCD.js
node -r esm examples/doublet.js

node -r esm examples/simulate.js; # to simulate from a user-defined spin system
node -r esm examples/dd-exp.js; # to simulate from a user-defined spin system
node -r esm examples/asymDoublet.js; # to simulate from a user-defined spin system

Developement

git clone https://github.com/cheminfo/multiplet-analysis.git
cd multiplet-analysis
code .

To run the jest tests in an interactive way (preferably on a second screen): npx jest --watch

In order to debug you may anytime add a console.log in the code. The result of the log will appear in the jest --watch.

In the jest --.watch terminal you may as well select only one specific test.

In is also possible to select a specific test in the code by adding .only after describe or it like for example: it.only('s

Debugging data

In order to debug algorithm it is important to be able to visualize them. In the project we added a folder /examples/web that contains index.html. This webpage will load data.json and annotations.json and display a chart.

To automatically use and refresh this webpage you should install the plugin Live server typing code --install-extension ritwickdey.liveserver. Then, right click on index.html and open with live server. This will open the webpage in the browser and reload it if the files change.

There are also 2 examples files to create the data:

  • exampleGenerateAnnotations : create an array of annotations
  • exampleGenerateData : create an object like {x:[], y:[]}

When you clone / update the project don't forget to npm i to load possible new dependencies.

If you want to execute those scripts written as module you need to use esm that is installed as a development dependency. npm install esm node -r esm ./examples/web/exampleGenerateAnnotations.js

Creating simulated data

Spectra can be simulated on

http://www.nmrdb.org/simulator/

And the data can be download as a JSON file.

Installation

npm i multiplet-analysis

Usage

import library from 'multiplet-analysis';

const result = library(args);
// result is ...

API Documentation

License

MIT

npm i ml-fft npm home ml-fft

Demo and examples

Main scientific page.

example 1.

example 2.