
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
nmr-predictor
Advanced tools
NMR chemical shift predictor
This library provide function for predicting nmr chemical shift for 1H and 13C. The predictions could be made from 2 different ways: 1. By the use of a local database of molecular fragments that are paired with is corresponding chemical shifts, and 2. by the use of Spinus too. The predictor accepts a molfile as input data, and produces a set of predictions for each of the atoms in the molecule. Prediction of coupling constants are supported aswell, by means of the Karplus equation.
$ npm install nmr-predictor
In this example, we made use of our local databases for the chemical shift prediction. If you don't have your own databases, you may use our precompiled libraries for 1H and 13C, available in our github project by means of the fecthProton and fetchCarbon functions. fetchCarbon retrieves a compiled version of NMRShiftDB2 database. fetchProton retrieves an inhouse beta library for 1H predictions.
'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);
});
FAQs
NMR chemical shift predictor
The npm package nmr-predictor receives a total of 3 weekly downloads. As such, nmr-predictor popularity was classified as not popular.
We found that nmr-predictor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.