Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 2.04 KB

README.md

File metadata and controls

49 lines (35 loc) · 2.04 KB

j-coupling-constant-predictor

NPM version build status Test coverage David deps npm download

Predictor of 1,2,3,4 and 5 J H-H coupling constants

Installation

$ npm i j-coupling-constant-predictor

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);

License

MIT