Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nmr-predictor

Package Overview
Dependencies
Maintainers
4
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nmr-predictor - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

5

History.md

@@ -0,1 +1,6 @@

<a name="0.2.1"></a>
## [0.2.1](https://github.com/cheminfo-js/nmr-predictor/compare/v0.1.0...v0.2.1) (2016-12-05)
0.0.1 / HEAD

@@ -2,0 +7,0 @@ ============

2

package.json
{
"name": "nmr-predictor",
"version": "0.2.0",
"version": "0.2.1",
"description": "NMR chemical shift predictor",

@@ -5,0 +5,0 @@ "keywords": [],

@@ -6,3 +6,2 @@ 'use strict'

const OCLE = require('openchemlib-extended');
const Matrix = require('ml-matrix');

@@ -20,3 +19,3 @@ const newArray = require('new-array');

setDB(db){
setDB(db) {
this.db = db;

@@ -73,3 +72,3 @@ }

var diaIDs = mol.getGroupedDiastereotopicAtomIDs({atomLabel:atomLabel});
var diaIDs = mol.getGroupedDiastereotopicAtomIDs({atomLabel: atomLabel});
var infoCOSY = [];//mol.getCouplings();

@@ -83,8 +82,8 @@ if(couplings) {

var i, k, j, atom, hosesString;
for (j = diaIDs.length-1; j >=0; j--) {
hosesString = OCLE.Util.getHoseCodesFromDiastereotopicID(diaIDs[j].oclID, {maxSphereSize:levels[0], type: algorithm});
for (j = diaIDs.length - 1; j >= 0; j--) {
hosesString = OCLE.Util.getHoseCodesFromDiastereotopicID(diaIDs[j].oclID, {maxSphereSize: levels[0], type: algorithm});
atom = {
diaIDs: [diaIDs[j].oclID + '']
};
for(k=0; k < levels.length; k++) {
for(k = 0; k < levels.length; k++) {
atom['hose'+levels[k]] = hosesString[levels[k]-1]+'';

@@ -137,3 +136,3 @@ }

}
toReturn[j]=atom;
toReturn[j] = atom;
}

@@ -157,3 +156,3 @@ //TODO this will not work because getPaths is not implemented yet!!!!

if(toReturn[j].diaIDs[0] == linksOH[k].fromDiaID) {
toReturn.splice(j,1);
toReturn.splice(j, 1);
break;

@@ -167,3 +166,3 @@ }

if(toReturn[j].diaIDs[0] == linksNH[k].fromDiaID) {
toReturn.splice(j,1);
toReturn.splice(j, 1);
break;

@@ -204,3 +203,3 @@ }

var csByOclID = {};
for (j = diaIDs.length-1; j >=0; j--) {
for (j = diaIDs.length-1; j >= 0; j--) {
oclID = diaIDs[j].oclID + '';

@@ -222,6 +221,6 @@ for (k = diaIDs[j].atoms.length - 1; k >= 0; k--) {

var idsKeys = Object.keys(ids);
for (i = 0;i < nspins; i++) {
for (i = 0; i < nspins; i++) {
tmpCS = csByOclID[atoms[idsKeys[i]]].cs/csByOclID[atoms[idsKeys[i]]].nc;
result[i] = {atomIDs:[idsKeys[i]], diaIDs:[atoms[idsKeys[i]]], integral:integrals[i],
delta:tmpCS, atomLabel: 'H', j:[]};
result[i] = {atomIDs: [idsKeys[i]], diaIDs: [atoms[idsKeys[i]]], integral: integrals[i],
delta: tmpCS, atomLabel: 'H', j: []};
for (j=0; j < nspins; j++) {

@@ -245,3 +244,3 @@ if(jc[i][j] !== 0 ) {

_multiplicityToString(mul){
_multiplicityToString(mul) {
switch(mul) {

@@ -294,3 +293,3 @@ case 2:

return {ids, chemicalShifts:cs, integrals, couplingConstants:jc, multiplicity: newArray(nspins, 2)};
return {ids, chemicalShifts: cs, integrals, couplingConstants: jc, multiplicity: newArray(nspins, 2)};

@@ -305,3 +304,3 @@ }

function group(prediction, param){
function group(prediction, param) {
if(param && param.group) {

@@ -308,0 +307,0 @@ prediction.sort(function(a, b) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc