nmr-predictor
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "nmr-predictor", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "NMR chemical shift predictor", | ||
@@ -29,3 +29,3 @@ "keywords": [], | ||
"dependencies": { | ||
"openchemlib-extended": "1.9.0", | ||
"openchemlib-extended": "1.9.1", | ||
"ml-matrix": "^1.1.2", | ||
@@ -32,0 +32,0 @@ "new-array": "^1.0.0" |
@@ -27,13 +27,30 @@ 'use strict' | ||
} | ||
var prediction; | ||
if(typeof this.db === "object") { | ||
return this._askErno(mol, param1); | ||
prediction = this._askErno(mol, param1); | ||
} | ||
if(this.db === "spinus") { | ||
//The molfile whitout hydrogens | ||
return this._fromSpinus(mol, param1, param2); | ||
prediction = this._fromSpinus(mol, param1, param2); | ||
} | ||
if(this.db === "nmrshiftdb2") { | ||
return this._fromNnmrshiftdb2(mol, param1); | ||
prediction = this._fromNnmrshiftdb2(mol, param1); | ||
} | ||
if(param1 && param1.group||param2 && param2.group){ | ||
prediction.sort(function(a, b) { | ||
if(a.diaIDs[0] < b.diaIDs[0]) return -1; | ||
if(a.diaIDs[0] > b.diaIDs[0]) return 1; | ||
return 0; | ||
}); | ||
for(var i = prediction.length-2; i >= 0; i--){ | ||
if(prediction[i].diaIDs[0]===prediction[i+1].diaIDs[0]){ | ||
prediction[i].integral+=prediction[i+1].integral; | ||
prediction[i].atomIDs=prediction[i].atomIDs.concat(prediction[i+1].atomIDs); | ||
prediction.splice(i+1,1); | ||
} | ||
} | ||
} | ||
return prediction; | ||
} | ||
@@ -40,0 +57,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
20875
6
466
0
+ Addedis-any-array@2.0.1(transitive)
+ Addedml-array-max@1.2.4(transitive)
+ Addedml-array-min@1.2.3(transitive)
+ Addedml-array-rescale@1.3.7(transitive)
+ Addedml-array-utils@0.3.0(transitive)
+ Addedml-floyd-warshall@1.0.4(transitive)
+ Addedml-matrix@2.3.06.12.0(transitive)
+ Addedopenchemlib-extended@1.9.1(transitive)
- Removedopenchemlib-extended@1.9.0(transitive)
Updatedopenchemlib-extended@1.9.1