0.1.0 • Published 5 years ago

j-coupling-constant-predictor v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

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

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

License

MIT