nmr-predictor-dev
v1.1.8
Published
NMR chemical shift predictor
Downloads
3
Readme
nmr-predictor
NMR chemical shift predictor
Installation
$ npm install nmr-predictor
Example
'use strict';
const predictor = require('..');
const molfile = `Benzene, ethyl-, ID: C100414
NIST 16081116462D 1 1.00000 0.00000
Copyright by the U.S. Sec. Commerce on behalf of U.S.A. All rights reserved.
8 8 0 0 0 1 V2000
0.5015 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0
0.0000 0.8526 0.0000 C 0 0 0 0 0 0 0 0 0
1.5046 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0
2.0062 0.8526 0.0000 C 0 0 0 0 0 0 0 0 0
3.0092 0.8526 0.0000 C 0 0 0 0 0 0 0 0 0
1.5046 1.7554 0.0000 C 0 0 0 0 0 0 0 0 0
0.5015 1.7052 0.0000 C 0 0 0 0 0 0 0 0 0
3.5108 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0
1 2 2 0 0 0
3 1 1 0 0 0
2 7 1 0 0 0
4 3 2 0 0 0
4 5 1 0 0 0
6 4 1 0 0 0
5 8 1 0 0 0
7 6 2 0 0 0
M END
`;
// 1D proton prediction
predictor.fetchProton().then(function () {
console.log(predictor.proton(molfile));
});
// 2D HSQC prediction
Promise.all([
predictor.fetchProton(),
predictor.fetchCarbon()
]).then(function (dbs) {
return predictor.twod(predictor.proton(molfile), predictor.carbon(molfile), molfile);
});
// 2D HSQC with spinus
Promise.all([
predictor.spinus(molfile),
predictor.fetchCarbon()
]).then(function (results) {
return predictor.twod(results[0], predictor.carbon(molfile), molfile);
});