j-coupling-constant-predictor
v0.1.0
Published
Predictor for 1,2,3 and 4 J coupling constants
Downloads
2
Readme
j-coupling-constant-predictor
Predictor of 1,2,3,4 and 5 J H-H coupling constants
Installation
$ npm i j-coupling-constant-predictor
API Documentation
Example
const predictor = require('j-coupling-constant-predictor');
const fs = require('fs');
const OCLE = require('openchemlib-extended');
let molfile = fs.readFileSync('moleculeWithExpandedHydrogens.mol').toString();
let molmap = OCLE.Molecule.fromMolfileWithAtomMap(molfile);
//Predict the coupling constants using the 3D information of the molecule. Use the mean of the most similar
//entries as value for the coupling constant. You can use median aswell.
let couplings = predictor.predict3D(molmap.molecule, {maxLength: 6, mapper: x => x.mean });
// Remove the couplings between chemically equivalent atoms
couplings = couplings.filter(x => x.fromDiaID !== x.toDiaID);