nmr-processing 3.4.1 → 6.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/lib/assignment/get13CAssignments.js.map +1 -1
  2. package/lib/assignment/get1HAssignments.d.ts +2 -2
  3. package/lib/{types → assignment}/nmrAssigment.d.ts +2 -2
  4. package/lib/{types → assignment}/nmrAssigment.js +0 -0
  5. package/lib/assignment/nmrAssigment.js.map +1 -0
  6. package/lib/assignment/utils/buildAssignments.js.map +1 -1
  7. package/lib/assignment/utils/createMapPossibleAssignments.d.ts +1 -1
  8. package/lib/assignment/utils/createMapPossibleAssignments.js.map +1 -1
  9. package/lib/constants/couplingValues.js.map +1 -1
  10. package/lib/databases/DatabaseNMREntry.d.ts +1 -1
  11. package/lib/index.d.ts +9 -10
  12. package/lib/index.js +1 -1
  13. package/lib/ml-matrix-convolution.d.ts +8 -0
  14. package/lib/ml-matrix-convolution.js +2 -0
  15. package/lib/ml-matrix-convolution.js.map +1 -0
  16. package/lib/ml-simple-clustering.d.ts +8 -0
  17. package/lib/ml-simple-clustering.js +2 -0
  18. package/lib/ml-simple-clustering.js.map +1 -0
  19. package/lib/peaks/NMRPeak1D.d.ts +4 -0
  20. package/lib/{types → peaks}/NMRPeak1D.js +0 -0
  21. package/lib/{types → peaks}/NMRPeak1D.js.map +1 -1
  22. package/lib/peaks/peaksFilterImpurities.d.ts +1 -1
  23. package/lib/peaks/peaksFilterImpurities.js +1 -1
  24. package/lib/peaks/peaksFilterImpurities.js.map +1 -1
  25. package/lib/peaks/peaksToRanges.d.ts +2 -2
  26. package/lib/peaks/peaksToRanges.js +11 -17
  27. package/lib/peaks/peaksToRanges.js.map +1 -1
  28. package/lib/peaks/util/determineRealTop.d.ts +2 -2
  29. package/lib/peaks/util/determineRealTop.js +3 -2
  30. package/lib/peaks/util/determineRealTop.js.map +1 -1
  31. package/lib/peaks/util/jAnalyzer.d.ts +2 -2
  32. package/lib/peaks/util/jAnalyzer.js +12 -13
  33. package/lib/peaks/util/jAnalyzer.js.map +1 -1
  34. package/lib/peaks/util/joinRanges.d.ts +1 -1
  35. package/lib/peaks/util/peakOptimizer.d.ts +3 -3
  36. package/lib/peaks/util/peakOptimizer.js.map +1 -1
  37. package/lib/{types → prediction}/dataStructure.d.ts +0 -0
  38. package/lib/{types → prediction}/dataStructure.js +0 -0
  39. package/lib/prediction/dataStructure.js.map +1 -0
  40. package/lib/prediction/predictAll.d.ts +1 -1
  41. package/lib/prediction/predictAll.js +1 -1
  42. package/lib/prediction/predictAll.js.map +1 -1
  43. package/lib/prediction/predictCOSY.d.ts +1 -1
  44. package/lib/prediction/predictCOSY.js.map +1 -1
  45. package/lib/prediction/predictCarbon.d.ts +2 -2
  46. package/lib/prediction/predictCarbon.js.map +1 -1
  47. package/lib/prediction/predictHMBC.d.ts +1 -1
  48. package/lib/prediction/predictHMBC.js.map +1 -1
  49. package/lib/prediction/predictHSQC.d.ts +1 -1
  50. package/lib/prediction/predictHSQC.js.map +1 -1
  51. package/lib/prediction/predictProton.d.ts +1 -1
  52. package/lib/prediction/predictProton.js +1 -1
  53. package/lib/prediction/predictProton.js.map +1 -1
  54. package/lib/{types → prediction}/prediction1D.d.ts +2 -2
  55. package/lib/{types → prediction}/prediction1D.js +0 -0
  56. package/lib/prediction/prediction1D.js.map +1 -0
  57. package/lib/prediction/utils/fetchPrediction.d.ts +1 -1
  58. package/lib/prediction/utils/getFilteredIDiaIDs.d.ts +1 -1
  59. package/lib/prediction/utils/getFilteredIDiaIDs.js.map +1 -1
  60. package/lib/prediction/utils/getNuclei.js +1 -1
  61. package/lib/prediction/utils/getNuclei.js.map +1 -1
  62. package/lib/prediction/utils/getPredictions.d.ts +2 -2
  63. package/lib/prediction/utils/predict2D.d.ts +2 -2
  64. package/lib/prediction/utils/queryByHOSE.d.ts +1 -1
  65. package/lib/prediction/utils/queryByHOSE.js.map +1 -1
  66. package/lib/ranges/rangesToACS.d.ts +1 -1
  67. package/lib/ranges/rangesToXY.d.ts +3 -3
  68. package/lib/ranges/rangesToXY.js.map +1 -1
  69. package/lib/signal/signalJoinCouplings.d.ts +2 -2
  70. package/lib/signal/signalJoinCouplings.js +3 -3
  71. package/lib/signal/signalJoinCouplings.js.map +1 -1
  72. package/lib/signal/signalMultiplicityPattern.d.ts +1 -1
  73. package/lib/{types → signals}/NMRSignal1D.d.ts +1 -1
  74. package/lib/{types → signals}/NMRSignal1D.js +0 -0
  75. package/lib/{types → signals}/NMRSignal1D.js.map +1 -1
  76. package/lib/signals/hackSignalsToXY.d.ts +1 -1
  77. package/lib/{types → signals}/jcoupling.d.ts +1 -1
  78. package/lib/{types → signals}/jcoupling.js +0 -0
  79. package/lib/{types → signals}/jcoupling.js.map +1 -1
  80. package/lib/signals/signals2DToZ.d.ts +1 -1
  81. package/lib/signals/signalsJoin.d.ts +4 -4
  82. package/lib/signals/signalsJoin.js +7 -7
  83. package/lib/signals/signalsJoin.js.map +1 -1
  84. package/lib/signals/signalsToRanges.d.ts +2 -2
  85. package/lib/signals/signalsToRanges.js.map +1 -1
  86. package/lib/signals/signalsToXY.d.ts +3 -3
  87. package/lib/signals/simulation/signalsToSpinSystem.d.ts +2 -2
  88. package/lib/signals/simulation/simulate1D.d.ts +5 -4
  89. package/lib/signals/simulation/simulate1D.js.map +1 -1
  90. package/lib/signals/simulation/splitSpinSystem.d.ts +1 -1
  91. package/lib/signals/simulation/splitSpinSystem.js.map +1 -1
  92. package/lib/{types → signals}/spinSystem.d.ts +0 -0
  93. package/lib/{types → signals}/spinSystem.js +0 -0
  94. package/lib/{types → signals}/spinSystem.js.map +1 -1
  95. package/lib/{types → utilities}/MakeMandatory.d.ts +0 -0
  96. package/lib/{types → utilities}/MakeMandatory.js +0 -0
  97. package/lib/utilities/MakeMandatory.js.map +1 -0
  98. package/lib/utilities/joinPatterns.js.map +1 -1
  99. package/lib/utilities/rangeFromSignal.d.ts +1 -1
  100. package/lib/utilities/resurrect.d.ts +1 -1
  101. package/lib/utilities/resurrectRange.d.ts +1 -1
  102. package/lib/{types → xy}/NMRRange.d.ts +1 -1
  103. package/lib/{types → xy}/NMRRange.js +0 -0
  104. package/lib/{types → xy}/NMRRange.js.map +1 -1
  105. package/lib/xy/xyAutoPeaksPicking.d.ts +4 -60
  106. package/lib/xy/xyAutoPeaksPicking.js +3 -3
  107. package/lib/xy/xyAutoPeaksPicking.js.map +1 -1
  108. package/lib/xy/xyAutoRangesPicking.d.ts +2 -2
  109. package/lib/xy/xyAutoRangesPicking.js.map +1 -1
  110. package/lib/{types → xyz}/NMRSignal2D.d.ts +6 -7
  111. package/lib/{types → xyz}/NMRSignal2D.js +0 -0
  112. package/lib/{types → xyz}/NMRSignal2D.js.map +1 -1
  113. package/lib/xyz/NMRZone.d.ts +8 -0
  114. package/lib/{types → xyz}/NMRZone.js +0 -0
  115. package/lib/{types → xyz}/NMRZone.js.map +1 -1
  116. package/lib/xyz/{xyzAutoPeaksPicking.d.ts → xyzAutoZonesPicking.d.ts} +3 -3
  117. package/lib/xyz/{xyzAutoPeaksPicking.js → xyzAutoZonesPicking.js} +38 -24
  118. package/lib/xyz/xyzAutoZonesPicking.js.map +1 -0
  119. package/lib/xyz/xyzJResAnalyzer.d.ts +1 -1
  120. package/lib/xyz/xyzJResAnalyzer.js.map +1 -1
  121. package/lib-esm/assignment/get13CAssignments.js.map +1 -1
  122. package/lib-esm/{types → assignment}/nmrAssigment.js +0 -0
  123. package/lib-esm/assignment/nmrAssigment.js.map +1 -0
  124. package/lib-esm/assignment/utils/buildAssignments.js.map +1 -1
  125. package/lib-esm/assignment/utils/createMapPossibleAssignments.js.map +1 -1
  126. package/lib-esm/constants/couplingValues.js.map +1 -1
  127. package/lib-esm/index.js +1 -1
  128. package/lib-esm/ml-matrix-convolution.js +2 -0
  129. package/lib-esm/ml-matrix-convolution.js.map +1 -0
  130. package/lib-esm/ml-simple-clustering.js +2 -0
  131. package/lib-esm/ml-simple-clustering.js.map +1 -0
  132. package/lib-esm/{types → peaks}/NMRPeak1D.js +0 -0
  133. package/lib-esm/{types → peaks}/NMRPeak1D.js.map +1 -1
  134. package/lib-esm/peaks/peaksFilterImpurities.js +1 -1
  135. package/lib-esm/peaks/peaksFilterImpurities.js.map +1 -1
  136. package/lib-esm/peaks/peaksToRanges.js +11 -17
  137. package/lib-esm/peaks/peaksToRanges.js.map +1 -1
  138. package/lib-esm/peaks/util/determineRealTop.js +4 -3
  139. package/lib-esm/peaks/util/determineRealTop.js.map +1 -1
  140. package/lib-esm/peaks/util/jAnalyzer.js +12 -13
  141. package/lib-esm/peaks/util/jAnalyzer.js.map +1 -1
  142. package/lib-esm/peaks/util/peakOptimizer.js.map +1 -1
  143. package/lib-esm/{types → prediction}/dataStructure.js +0 -0
  144. package/lib-esm/prediction/dataStructure.js.map +1 -0
  145. package/lib-esm/prediction/predictAll.js +1 -1
  146. package/lib-esm/prediction/predictAll.js.map +1 -1
  147. package/lib-esm/prediction/predictCOSY.js.map +1 -1
  148. package/lib-esm/prediction/predictCarbon.js.map +1 -1
  149. package/lib-esm/prediction/predictHMBC.js.map +1 -1
  150. package/lib-esm/prediction/predictHSQC.js.map +1 -1
  151. package/lib-esm/prediction/predictProton.js +1 -1
  152. package/lib-esm/prediction/predictProton.js.map +1 -1
  153. package/lib-esm/{types → prediction}/prediction1D.js +0 -0
  154. package/lib-esm/prediction/prediction1D.js.map +1 -0
  155. package/lib-esm/prediction/utils/getFilteredIDiaIDs.js.map +1 -1
  156. package/lib-esm/prediction/utils/getNuclei.js +1 -1
  157. package/lib-esm/prediction/utils/getNuclei.js.map +1 -1
  158. package/lib-esm/prediction/utils/queryByHOSE.js.map +1 -1
  159. package/lib-esm/ranges/rangesToXY.js.map +1 -1
  160. package/lib-esm/signal/signalJoinCouplings.js +3 -3
  161. package/lib-esm/signal/signalJoinCouplings.js.map +1 -1
  162. package/lib-esm/{types → signals}/NMRSignal1D.js +0 -0
  163. package/lib-esm/{types → signals}/NMRSignal1D.js.map +1 -1
  164. package/lib-esm/{types → signals}/jcoupling.js +0 -0
  165. package/lib-esm/{types → signals}/jcoupling.js.map +1 -1
  166. package/lib-esm/signals/signalsJoin.js +7 -7
  167. package/lib-esm/signals/signalsJoin.js.map +1 -1
  168. package/lib-esm/signals/signalsToRanges.js.map +1 -1
  169. package/lib-esm/signals/simulation/simulate1D.js.map +1 -1
  170. package/lib-esm/signals/simulation/splitSpinSystem.js.map +1 -1
  171. package/lib-esm/{types → signals}/spinSystem.js +0 -0
  172. package/lib-esm/{types → signals}/spinSystem.js.map +1 -1
  173. package/lib-esm/{types → utilities}/MakeMandatory.js +0 -0
  174. package/lib-esm/utilities/MakeMandatory.js.map +1 -0
  175. package/lib-esm/utilities/joinPatterns.js.map +1 -1
  176. package/lib-esm/{types → xy}/NMRRange.js +0 -0
  177. package/lib-esm/{types → xy}/NMRRange.js.map +1 -1
  178. package/lib-esm/xy/xyAutoPeaksPicking.js +3 -3
  179. package/lib-esm/xy/xyAutoPeaksPicking.js.map +1 -1
  180. package/lib-esm/xy/xyAutoRangesPicking.js.map +1 -1
  181. package/lib-esm/{types → xyz}/NMRSignal2D.js +0 -0
  182. package/lib-esm/{types → xyz}/NMRSignal2D.js.map +1 -1
  183. package/lib-esm/{types → xyz}/NMRZone.js +0 -0
  184. package/lib-esm/{types → xyz}/NMRZone.js.map +1 -1
  185. package/lib-esm/xyz/{xyzAutoPeaksPicking.js → xyzAutoZonesPicking.js} +36 -22
  186. package/lib-esm/xyz/xyzAutoZonesPicking.js.map +1 -0
  187. package/lib-esm/xyz/xyzJResAnalyzer.js.map +1 -1
  188. package/package.json +20 -17
  189. package/src/assignment/get13CAssignments.ts +5 -2
  190. package/src/assignment/get1HAssignments.ts +2 -2
  191. package/src/{types → assignment}/nmrAssigment.ts +2 -2
  192. package/src/assignment/utils/buildAssignments.ts +1 -4
  193. package/src/assignment/utils/createMapPossibleAssignments.ts +5 -2
  194. package/src/constants/couplingValues.ts +1 -1
  195. package/src/databases/DatabaseNMREntry.ts +1 -1
  196. package/src/index.ts +9 -10
  197. package/src/{types/ml-levenberg-marquardt/index.d.ts → ml-levenberg-marquardt.d.ts} +0 -0
  198. package/src/{types/ml-matrix-convolution/index.d.ts → ml-matrix-convolution.ts} +0 -0
  199. package/src/{types/ml-matrix-peaks-finder/index.d.ts → ml-matrix-peaks-finder.d.ts} +2 -2
  200. package/src/{types/ml-simple-clustering/index.d.ts → ml-simple-clustering.ts} +1 -1
  201. package/src/{types/ml-sparse-matrix/index.d.ts → ml-sparse-matrix.d.ts} +0 -0
  202. package/src/{types/ml-spectra-processing/index.d.ts → ml-spectra-processing.d.ts} +8 -2
  203. package/src/{types/ml-tree-set/index.d.ts → ml-tree-set.d.ts} +0 -0
  204. package/src/nmr-parser.d.ts +17 -0
  205. package/src/{types/openchemlib-utils/index..d.ts → openchemlib.d.ts} +17 -6
  206. package/src/peaks/NMRPeak1D.ts +5 -0
  207. package/src/peaks/peaksFilterImpurities.ts +3 -2
  208. package/src/peaks/peaksToRanges.ts +15 -21
  209. package/src/peaks/util/determineRealTop.ts +6 -9
  210. package/src/peaks/util/jAnalyzer.ts +16 -18
  211. package/src/peaks/util/joinRanges.ts +1 -1
  212. package/src/peaks/util/peakOptimizer.ts +5 -4
  213. package/src/{types → prediction}/dataStructure.ts +1 -1
  214. package/src/prediction/predictAll.ts +6 -7
  215. package/src/prediction/predictCOSY.ts +1 -2
  216. package/src/prediction/predictCarbon.ts +4 -4
  217. package/src/prediction/predictHMBC.ts +1 -2
  218. package/src/prediction/predictHSQC.ts +5 -3
  219. package/src/prediction/predictProton.ts +4 -3
  220. package/src/{types → prediction}/prediction1D.ts +2 -2
  221. package/src/prediction/utils/fetchPrediction.ts +1 -1
  222. package/src/prediction/utils/getFilteredIDiaIDs.ts +1 -2
  223. package/src/prediction/utils/getNuclei.ts +3 -3
  224. package/src/prediction/utils/getPredictions.ts +3 -3
  225. package/src/prediction/utils/predict2D.ts +4 -4
  226. package/src/prediction/utils/queryByHOSE.ts +2 -2
  227. package/src/ranges/rangesToACS.ts +2 -2
  228. package/src/ranges/rangesToXY.ts +5 -5
  229. package/src/signal/signalJoinCouplings.ts +6 -6
  230. package/src/signal/signalMultiplicityPattern.ts +1 -1
  231. package/src/{types → signals}/NMRSignal1D.ts +2 -1
  232. package/src/signals/hackSignalsToXY.ts +2 -2
  233. package/src/{types → signals}/jcoupling.ts +1 -1
  234. package/src/signals/signals2DToZ.ts +1 -1
  235. package/src/signals/signalsJoin.ts +11 -10
  236. package/src/signals/signalsToRanges.ts +4 -3
  237. package/src/signals/signalsToXY.ts +6 -6
  238. package/src/signals/simulation/signalsToSpinSystem.ts +4 -4
  239. package/src/signals/simulation/simulate1D.ts +5 -4
  240. package/src/signals/simulation/splitSpinSystem.ts +11 -3
  241. package/src/{types → signals}/spinSystem.ts +0 -0
  242. package/src/{types → utilities}/MakeMandatory.ts +0 -0
  243. package/src/utilities/joinPatterns.ts +0 -1
  244. package/src/utilities/rangeFromSignal.ts +1 -1
  245. package/src/utilities/resurrect.ts +1 -1
  246. package/src/utilities/resurrectRange.ts +2 -2
  247. package/src/{types → xy}/NMRRange.ts +1 -1
  248. package/src/xy/xyAutoPeaksPicking.ts +19 -58
  249. package/src/xy/xyAutoRangesPicking.ts +3 -2
  250. package/src/{types → xyz}/NMRSignal2D.ts +6 -8
  251. package/src/xyz/NMRZone.ts +10 -0
  252. package/src/xyz/{xyzAutoPeaksPicking.ts → xyzAutoZonesPicking.ts} +44 -27
  253. package/src/xyz/xyzJResAnalyzer.ts +7 -6
  254. package/CHANGELOG.md +0 -550
  255. package/lib/types/MPFPeak.d.ts +0 -9
  256. package/lib/types/MPFPeak.js +0 -3
  257. package/lib/types/MPFPeak.js.map +0 -1
  258. package/lib/types/MakeMandatory.js.map +0 -1
  259. package/lib/types/NMRPeak1D.d.ts +0 -11
  260. package/lib/types/NMRZone.d.ts +0 -12
  261. package/lib/types/XYNumberArray.d.ts +0 -4
  262. package/lib/types/XYNumberArray.js +0 -3
  263. package/lib/types/XYNumberArray.js.map +0 -1
  264. package/lib/types/dataStructure.js.map +0 -1
  265. package/lib/types/nmrAssigment.js.map +0 -1
  266. package/lib/types/prediction1D.js.map +0 -1
  267. package/lib/types/prediction2D.d.ts +0 -0
  268. package/lib/types/prediction2D.js +0 -2
  269. package/lib/types/prediction2D.js.map +0 -1
  270. package/lib/xyz/xyzAutoPeaksPicking.js.map +0 -1
  271. package/lib-esm/types/MPFPeak.js +0 -2
  272. package/lib-esm/types/MPFPeak.js.map +0 -1
  273. package/lib-esm/types/MakeMandatory.js.map +0 -1
  274. package/lib-esm/types/XYNumberArray.js +0 -2
  275. package/lib-esm/types/XYNumberArray.js.map +0 -1
  276. package/lib-esm/types/dataStructure.js.map +0 -1
  277. package/lib-esm/types/nmrAssigment.js.map +0 -1
  278. package/lib-esm/types/prediction1D.js.map +0 -1
  279. package/lib-esm/types/prediction2D.js +0 -2
  280. package/lib-esm/types/prediction2D.js.map +0 -1
  281. package/lib-esm/xyz/xyzAutoPeaksPicking.js.map +0 -1
  282. package/src/types/MPFPeak.ts +0 -9
  283. package/src/types/NMRPeak1D.ts +0 -11
  284. package/src/types/NMRZone.ts +0 -10
  285. package/src/types/XYNumberArray.ts +0 -4
  286. package/src/types/ml-gsd/index.d.ts +0 -164
  287. package/src/types/prediction2D.ts +0 -0
@@ -1,9 +1,6 @@
1
1
  import treeSet from 'ml-tree-set';
2
2
 
3
- import {
4
- Targets,
5
- NMRSignal1DWithAtomsAndDiaIDs,
6
- } from '../get1HAssignments';
3
+ import { Targets, NMRSignal1DWithAtomsAndDiaIDs } from '../get1HAssignments';
7
4
 
8
5
  import { createMapPossibleAssignments } from './createMapPossibleAssignments';
9
6
  import { exploreTreeRec } from './exploreTreeRec';
@@ -1,7 +1,10 @@
1
- import { MakeMandatory } from '../../types/MakeMandatory';
1
+ import { MakeMandatory } from '../../utilities/MakeMandatory';
2
2
  import type { Targets } from '../get1HAssignments';
3
3
 
4
- import type { RestrictionByCS, Predictions1Dassignments } from './buildAssignments';
4
+ import type {
5
+ RestrictionByCS,
6
+ Predictions1Dassignments,
7
+ } from './buildAssignments';
5
8
 
6
9
  type RestrictionByCSMandatory = MakeMandatory<
7
10
  RestrictionByCS,
@@ -1,4 +1,4 @@
1
- export const couplingValues: {[key: string]: number} = {
1
+ export const couplingValues: { [key: string]: number } = {
2
2
  s: 0,
3
3
  d: 1,
4
4
  t: 2,
@@ -1,4 +1,4 @@
1
- import { NMRRange } from '../types/NMRRange';
1
+ import { NMRRange } from '../xy/NMRRange';
2
2
 
3
3
  export interface DatabaseNMREntry {
4
4
  smiles?: string;
package/src/index.ts CHANGED
@@ -27,22 +27,21 @@ export * from './utilities/rangeFromSignal';
27
27
  export * from './xy/xyAutoPeaksPicking';
28
28
  export * from './xy/xyAutoRangesPicking';
29
29
 
30
- export * from './xyz/xyzAutoPeaksPicking';
30
+ export * from './xyz/xyzAutoZonesPicking';
31
31
  export * from './xyz/xyzJResAnalyzer';
32
32
 
33
33
  export * from './databases/getDatabase';
34
34
  export * from './databases/carbonImpurities';
35
35
  export * from './databases/protonImpurities';
36
36
 
37
- export type { NMRSignal1D } from './types/NMRSignal1D';
38
- export type { NMRSignal2D } from './types/NMRSignal2D';
39
- export type { NMRRange } from './types/NMRRange';
40
- export type { NMRZone } from './types/NMRZone';
41
- export type { XYNumberArray } from './types/XYNumberArray';
42
- export type { NMRPeak1D } from './types/NMRPeak1D';
43
- export type { Prediction1D } from './types/prediction1D';
44
- export type { Jcoupling } from './types/jcoupling';
37
+ export type { NMRSignal1D } from './signals/NMRSignal1D';
38
+ export type { NMRSignal2D } from './xyz/NMRSignal2D';
39
+ export type { NMRRange } from './xy/NMRRange';
40
+ export type { NMRZone } from './xyz/NMRZone';
41
+ export type { NMRPeak1D } from './peaks/NMRPeak1D';
42
+ export type { Prediction1D } from './prediction/prediction1D';
43
+ export type { Jcoupling } from './signals/jcoupling';
45
44
  export type {
46
45
  DataBaseLevelStructure,
47
46
  DataBaseStructure,
48
- } from './types/dataStructure';
47
+ } from './prediction/dataStructure';
@@ -8,7 +8,7 @@ declare module 'ml-matrix-peaks-finder' {
8
8
  cols: number;
9
9
  labelling?: 'drain' | 'floodfill';
10
10
  }
11
- interface MPFPeak {
11
+ interface Peak2D {
12
12
  x: number;
13
13
  y: number;
14
14
  z: number;
@@ -20,5 +20,5 @@ declare module 'ml-matrix-peaks-finder' {
20
20
  function findPeaks2DRegion(
21
21
  absoluteData: number[] | Float64Array,
22
22
  options?: FindPeaks2DRegionOptions,
23
- ): MPFPeak[];
23
+ ): Peak2D[];
24
24
  }
@@ -9,4 +9,4 @@ declare module 'ml-simple-clustering' {
9
9
  interface OptionsSimpleClustering {
10
10
  threshold?: number;
11
11
  out?: 'assignment' | 'indexes' | 'values';
12
- }
12
+ }
@@ -45,7 +45,13 @@ declare module 'ml-spectra-processing' {
45
45
 
46
46
  interface XYIntegrationOptions extends XGetFromToIndexOptions {}
47
47
 
48
- function xyIntegration(data: XYNumberArray, options?: XYIntegrationOptions): number;
48
+ function xyIntegration(
49
+ data: XYNumberArray,
50
+ options?: XYIntegrationOptions,
51
+ ): number;
49
52
 
50
- function xGetFromToIndex(x: number[] | Float64Array, options?: XGetFromToIndexOptions): number;
53
+ function xGetFromToIndex(
54
+ x: number[] | Float64Array,
55
+ options?: XGetFromToIndexOptions,
56
+ ): number;
51
57
  }
@@ -0,0 +1,17 @@
1
+ declare module 'nmr-parser' {
2
+ interface FromBrukerOptions {
3
+ base64?: boolean;
4
+ shiftX?: number;
5
+ info?: any;
6
+ name?: string;
7
+ }
8
+
9
+ function fromBruker(
10
+ zipFile: ArrayBuffer | string,
11
+ options?: Partial<FromBrukerOptions>,
12
+ ): Promise<Array<any>>;
13
+
14
+ function fromJCAMP(buffer: string | ArrayBuffer, options?: any): Array<any>;
15
+
16
+ function fromJEOL(buffer: ArrayBuffer): any;
17
+ }
@@ -48,7 +48,10 @@ declare module 'openchemlib-utils' {
48
48
  export interface PathInfo extends AtomInfo {
49
49
  paths: HoseCodesForPath[];
50
50
  }
51
- function getPathsInfo(molecule: Molecule, options?: GetPathsInfoOptions): PathInfo[];
51
+ function getPathsInfo(
52
+ molecule: Molecule,
53
+ options?: GetPathsInfoOptions,
54
+ ): PathInfo[];
52
55
 
53
56
  export interface AtomInfo {
54
57
  oclID: string;
@@ -102,20 +105,25 @@ declare module 'openchemlib-utils' {
102
105
  export interface HoseCodesForPath {
103
106
  atoms: number[];
104
107
  from: number;
105
- to: number,
106
- torsion?: number,
108
+ to: number;
109
+ torsion?: number;
107
110
  hoses: Hoses;
108
111
  length: number;
109
112
  }
110
113
 
111
- function getHoseCodesForPath(molecule: Molecule, from: string, to: string, maxLength: number): HoseCodesForPath;
114
+ function getHoseCodesForPath(
115
+ molecule: Molecule,
116
+ from: string,
117
+ to: string,
118
+ maxLength: number,
119
+ ): HoseCodesForPath;
112
120
 
113
121
  export interface GetConnectivityMatrixOptions {
114
122
  /**
115
123
  * get the path length between atoms
116
124
  * @default false
117
125
  */
118
- pathLength?: boolean
126
+ pathLength?: boolean;
119
127
  /**
120
128
  * set the nominal mass of the atoms on diagonal
121
129
  * @default false
@@ -142,7 +150,10 @@ declare module 'openchemlib-utils' {
142
150
  */
143
151
  stda?: boolean | number;
144
152
  }
145
- function getConnectivityMatrix(molecule: Molecule, options?: GetConnectivityMatrixOptions): number[][] | Float64Array[];
153
+ function getConnectivityMatrix(
154
+ molecule: Molecule,
155
+ options?: GetConnectivityMatrixOptions,
156
+ ): number[][] | Float64Array[];
146
157
 
147
158
  function getDiastereotopicAtomIDs(molecule: Molecule): string[];
148
159
  }
@@ -0,0 +1,5 @@
1
+ import type { Peak1D } from 'ml-gsd';
2
+
3
+ export interface NMRPeak1D extends Peak1D {
4
+ kind?: string;
5
+ }
@@ -1,6 +1,7 @@
1
1
  import { impurities } from '../constants/impurities';
2
2
  import type { ImpuritySignal } from '../constants/impurities';
3
- import type { NMRPeak1D } from '../types/NMRPeak1D';
3
+
4
+ import type { NMRPeak1D } from './NMRPeak1D';
4
5
 
5
6
  const toCheck = ['solvent', 'h2o', 'tms'];
6
7
 
@@ -66,7 +67,7 @@ function checkImpurity(
66
67
  while (i--) {
67
68
  j = peakList.length;
68
69
  while (j--) {
69
- tolerance = error + peakList[j].shape.width;
70
+ tolerance = error + peakList[j].width;
70
71
  difference = Math.abs(impurity[i].shift - peakList[j].x);
71
72
  if (difference < tolerance) {
72
73
  // && (impurity[i].multiplicity === '' || (impurity[i].multiplicity.indexOf(peakList[j].multiplicity)) { // some impurities has multiplicities like 'bs' but at presents it is unsupported
@@ -1,11 +1,11 @@
1
1
  import type { DataXY } from 'cheminfo-types';
2
2
  import { xyIntegration } from 'ml-spectra-processing';
3
3
 
4
- import type { MakeMandatory } from '../types/MakeMandatory';
5
- import type { NMRPeak1D } from '../types/NMRPeak1D';
6
- import type { NMRRange } from '../types/NMRRange';
7
- import type { NMRSignal1D } from '../types/NMRSignal1D';
4
+ import type { NMRSignal1D } from '../signals/NMRSignal1D';
5
+ import type { MakeMandatory } from '../utilities/MakeMandatory';
6
+ import type { NMRRange } from '../xy/NMRRange';
8
7
 
8
+ import type { NMRPeak1D } from './NMRPeak1D';
9
9
  import jAnalyzer from './util/jAnalyzer';
10
10
  import type { SignalIntern, Peak1DIntern } from './util/jAnalyzer';
11
11
  import { joinRanges } from './util/joinRanges';
@@ -91,22 +91,20 @@ const assignSignal = (
91
91
  delta: NaN,
92
92
  nbPeaks: 1,
93
93
  kind: 'signal',
94
- startX: peak.x - peak.shape.width,
95
- stopX: peak.x + peak.shape.width,
94
+ startX: peak.x - peak.width,
95
+ stopX: peak.x + peak.width,
96
96
  observe: frequency,
97
97
  nucleus,
98
98
  integralData: {
99
- from: peak.x - peak.shape.width * 3,
100
- to: peak.x + peak.shape.width * 3,
99
+ from: peak.x - peak.width * 3,
100
+ to: peak.x + peak.width * 3,
101
101
  value: 0,
102
102
  },
103
103
  peaks: [
104
104
  {
105
105
  x: peak.x,
106
106
  intensity: peak.y,
107
- shape: {
108
- width: peak.shape.width,
109
- },
107
+ width: peak.width,
110
108
  },
111
109
  ],
112
110
  };
@@ -177,9 +175,7 @@ export function peaksToRanges(
177
175
  peaksO.push({
178
176
  x: peakR.x,
179
177
  y: peakR.intensity,
180
- shape: {
181
- width: peakR.shape.width,
182
- },
178
+ width: peakR.width,
183
179
  });
184
180
  signal.mask.splice(j, 1);
185
181
  signal.mask2.splice(j, 1);
@@ -306,24 +302,22 @@ function detectSignals(
306
302
  if (peak.kind) signal1D.kind = peak.kind;
307
303
  signals.push(signal1D);
308
304
  } else {
309
- let tmp = peak.x + peak.shape.width;
305
+ let tmp = peak.x + peak.width;
310
306
  signal1D.stopX = Math.max(signal1D.stopX, tmp);
311
307
  signal1D.startX = Math.min(signal1D.startX, tmp);
312
308
  signal1D.nbPeaks++;
313
309
  signal1D.peaks.push({
314
310
  x: peak.x,
315
311
  intensity: peak.y,
316
- shape: {
317
- width: peak.shape.width,
318
- },
312
+ width: peak.width,
319
313
  });
320
314
  signal1D.integralData.from = Math.min(
321
315
  signal1D.integralData.from,
322
- peak.x - peak.shape.width * 3,
316
+ peak.x - peak.width * 3,
323
317
  );
324
318
  signal1D.integralData.to = Math.max(
325
319
  signal1D.integralData.to,
326
- peak.x + peak.shape.width * 3,
320
+ peak.x + peak.width * 3,
327
321
  );
328
322
  if (peak.kind) signal1D.kind = peak.kind;
329
323
  }
@@ -371,5 +365,5 @@ function detectSignals(
371
365
  * @private
372
366
  */
373
367
  function computeArea(peak: Peak1DIntern) {
374
- return Math.abs(peak.intensity * peak.shape.width * 1.57); // todo add an option with this value: 1.772453851
368
+ return Math.abs(peak.intensity * peak.width * 1.57); // todo add an option with this value: 1.772453851
375
369
  }
@@ -1,9 +1,6 @@
1
1
  import LM from 'ml-levenberg-marquardt';
2
- import { gaussian2D } from 'ml-peak-shape-generator';
3
-
4
- import type { MPFPeak } from '../../types/MPFPeak';
5
-
6
- const { fct: gaussian2DFct } = gaussian2D;
2
+ import type { Peak2D } from 'ml-matrix-peaks-finder';
3
+ import { Gaussian2D } from 'ml-peak-shape-generator';
7
4
 
8
5
  const direction8X = [-1, -1, -1, 0, 0, 1, 1, 1];
9
6
  const direction8Y = [-1, 0, 1, -1, 1, -1, 0, 1];
@@ -12,7 +9,7 @@ const direction16Y = [-2, -1, 0, 1, 2, -2, 2, -2, 2, -2, 2, -2, -1, 0, 1, 2];
12
9
 
13
10
  type Data = number[] | Float64Array;
14
11
 
15
- export function determineRealTop(peaks: MPFPeak[], options: any) {
12
+ export function determineRealTop(peaks: Peak2D[], options: any) {
16
13
  let { nCols, absoluteData, originalData, minX, maxX, minY, maxY } = options;
17
14
  for (let i = 0; i < peaks.length; i++) {
18
15
  let xIndex = Math.round(peaks[i].x);
@@ -142,6 +139,7 @@ function fitGaussian(
142
139
  }
143
140
 
144
141
  function paramGaussian2D(intervalX: number, intervalY: number, nCols: number) {
142
+ const gaussian2D = new Gaussian2D();
145
143
  return (p: number[]) => {
146
144
  return (t: number) => {
147
145
  let nL = p.length / 5;
@@ -149,13 +147,12 @@ function paramGaussian2D(intervalX: number, intervalY: number, nCols: number) {
149
147
  let xIndex = t % nCols;
150
148
  let yIndex = (t - xIndex) / nCols;
151
149
  for (let i = 0; i < nL; i++) {
150
+ gaussian2D.fwhm = { x: p[i + 3 * nL], y: p[i + 4 * nL] };
152
151
  result +=
153
152
  p[i + 2 * nL] *
154
- gaussian2DFct(
153
+ gaussian2D.fct(
155
154
  (xIndex - p[i]) * intervalX,
156
155
  (yIndex - p[i + nL]) * intervalY,
157
- p[i + 3 * nL],
158
- p[i + 4 * nL],
159
156
  );
160
157
  }
161
158
  return result;
@@ -1,5 +1,5 @@
1
- import type { MakeMandatory } from '../../types/MakeMandatory';
2
- import type { NMRPeak1D } from '../../types/NMRPeak1D';
1
+ import type { MakeMandatory } from '../../utilities/MakeMandatory';
2
+ import type { NMRPeak1D } from '../NMRPeak1D';
3
3
 
4
4
  /*
5
5
  * This library implements the J analyser described by Cobas et al in the paper:
@@ -154,7 +154,11 @@ export default {
154
154
  k = 1;
155
155
  let nFlagged = 2;
156
156
  maxFlagged = Math.pow(2, n) - 1;
157
- while (jCouplings.length < n && nFlagged < maxFlagged && k < peaks.length) {
157
+ while (
158
+ jCouplings.length < n &&
159
+ nFlagged < maxFlagged &&
160
+ k < peaks.length
161
+ ) {
158
162
  counter += 1;
159
163
  // 4.1. Increment j. Set k to the number of the first unflagged component.
160
164
  j++;
@@ -219,13 +223,12 @@ function updateSignal(signal: SignalInternMandatory, jCouplings: number[]) {
219
223
  // Update the limits of the signal
220
224
  let peaks = signal.peaksComp; // Always in Hz
221
225
  let nbPeaks = peaks.length;
222
- signal.startX = peaks[0].x / signal.observe - peaks[0].shape.width;
226
+ signal.startX = peaks[0].x / signal.observe - peaks[0].width;
223
227
  signal.stopX =
224
- peaks[nbPeaks - 1].x / signal.observe + peaks[nbPeaks - 1].shape.width;
225
- signal.integralData.from =
226
- peaks[0].x / signal.observe - peaks[0].shape.width * 3;
228
+ peaks[nbPeaks - 1].x / signal.observe + peaks[nbPeaks - 1].width;
229
+ signal.integralData.from = peaks[0].x / signal.observe - peaks[0].width * 3;
227
230
  signal.integralData.to =
228
- peaks[nbPeaks - 1].x / signal.observe + peaks[nbPeaks - 1].shape.width * 3;
231
+ peaks[nbPeaks - 1].x / signal.observe + peaks[nbPeaks - 1].width * 3;
229
232
  // Compile the pattern and format the constant couplings
230
233
  signal.maskPattern = signal.mask2;
231
234
  signal.multiplicity = abstractPattern(signal, jCouplings);
@@ -466,9 +469,7 @@ function symmetrize(
466
469
  peaks[i] = {
467
470
  x: peak[jAxis] * newSignal.observe,
468
471
  intensity: peak[intensity],
469
- shape: {
470
- width: peak.shape.width,
471
- },
472
+ width: peak.width,
472
473
  };
473
474
  }
474
475
  // Join the peaks that are closer than 0.25 Hz
@@ -480,7 +481,7 @@ function symmetrize(
480
481
  peaks[i].intensity = peaks[i].intensity + peaks[i + 1].intensity;
481
482
  peaks[i].x /= peaks[i].intensity;
482
483
  peaks[i].intensity /= 2;
483
- peaks[i].shape.width += peaks[i + 1].shape.width;
484
+ peaks[i].width += peaks[i + 1].width;
484
485
  peaks.splice(i + 1, 1);
485
486
  }
486
487
  }
@@ -527,12 +528,9 @@ function symmetrize(
527
528
 
528
529
  if (Math.abs(diffL - diffR) < maxError) {
529
530
  avg = Math.min(peaks[left].intensity, peaks[right].intensity);
530
- avgWidth = Math.min(
531
- peaks[left].shape.width,
532
- peaks[right].shape.width,
533
- );
531
+ avgWidth = Math.min(peaks[left].width, peaks[right].width);
534
532
  peaks[left].intensity = peaks[right].intensity = avg;
535
- peaks[left].shape.width = peaks[right].shape.width = avgWidth;
533
+ peaks[left].width = peaks[right].width = avgWidth;
536
534
  middle = [
537
535
  middle[0] + (peaks[right].x + peaks[left].x) / 2,
538
536
  middle[1] + 1,
@@ -712,5 +710,5 @@ function chemicalShift(peaks: Peak1DIntern[], mask: boolean[] = []) {
712
710
  * @private
713
711
  */
714
712
  function getArea(peak: Peak1DIntern) {
715
- return Math.abs(peak.intensity * peak.shape.width * 1.57); // 1.772453851);
713
+ return Math.abs(peak.intensity * peak.width * 1.57); // 1.772453851);
716
714
  }
@@ -1,4 +1,4 @@
1
- import type { NMRRange } from '../../types/NMRRange';
1
+ import type { NMRRange } from '../../xy/NMRRange';
2
2
 
3
3
  export function joinRanges(ranges: NMRRange[]) {
4
4
  ranges.sort((a, b) => a.from - b.from);
@@ -1,10 +1,11 @@
1
- import type { MPFPeak } from '../../types/MPFPeak';
2
- import type { NMRSignal2D } from '../../types/NMRSignal2D';
1
+ import type { Peak2D } from 'ml-matrix-peaks-finder';
2
+
3
+ import type { NMRSignal2D } from '../../xyz/NMRSignal2D';
3
4
 
4
5
  let diagonalError = 0.05;
5
6
  let tolerance = 0.05;
6
7
 
7
- export function clean(peaks: MPFPeak[], threshold: number) {
8
+ export function clean(peaks: Peak2D[], threshold: number) {
8
9
  let max = Number.NEGATIVE_INFINITY;
9
10
  // double min = Double.MAX_VALUE;
10
11
  for (let i = peaks.length - 1; i >= 0; i--) {
@@ -151,7 +152,7 @@ function completeMissingIfNeeded(
151
152
  },
152
153
  peaks: [{ x: thisSignal.x.delta, y: thisSignal.x.delta, z: 1 }],
153
154
  };
154
- newSignal.peaks = [{ x: thisSignal.x.delta, y: thisSignal.x.delta, z: 1 }]
155
+ newSignal.peaks = [{ x: thisSignal.x.delta, y: thisSignal.x.delta, z: 1 }];
155
156
  output.push(newSignal);
156
157
  tmpProp = [0, thisProp[1]];
157
158
  properties.push(tmpProp);
@@ -2,4 +2,4 @@ export interface DataBaseLevelStructure {
2
2
  [key: string]: number[] | undefined;
3
3
  }
4
4
 
5
- export type DataBaseStructure = DataBaseLevelStructure[];
5
+ export type DataBaseStructure = DataBaseLevelStructure[];
@@ -1,16 +1,14 @@
1
1
  import type { Molecule } from 'openchemlib';
2
2
 
3
- import type { Prediction1D } from '../types/prediction1D';
4
-
5
3
  import { predictCOSY } from './predictCOSY';
6
4
  import { predictCarbon, PredictCarbonOptions } from './predictCarbon';
7
5
  import { predictHMBC } from './predictHMBC';
8
6
  import { predictHSQC } from './predictHSQC';
9
7
  import { predictProton, PredictProtonOptions } from './predictProton';
8
+ import type { Prediction1D } from './prediction1D';
10
9
  import { getPredictions } from './utils/getPredictions';
11
10
  import type { Predictor } from './utils/predict2D';
12
11
 
13
-
14
12
  export interface PredictAllOptions {
15
13
  /**
16
14
  * nucleus label to use in the X axis
@@ -93,13 +91,14 @@ export async function predictAll(
93
91
  predictions,
94
92
  );
95
93
 
96
- if (!xPrediction || !yPrediction)
97
- {throw new Error('predictions are not availaible');}
94
+ if (!xPrediction || !yPrediction) {
95
+ throw new Error('predictions are not availaible');
96
+ }
98
97
 
99
98
  predictions = {
100
99
  H: xPrediction,
101
- C: yPrediction
102
- }
100
+ C: yPrediction,
101
+ };
103
102
 
104
103
  const { molfile, diaIDs } = xPrediction;
105
104
 
@@ -1,8 +1,7 @@
1
1
  import { Molecule } from 'openchemlib';
2
2
 
3
- import type { Prediction1D } from '../types/prediction1D';
4
-
5
3
  import { predictProton, PredictProtonOptions } from './predictProton';
4
+ import type { Prediction1D } from './prediction1D';
6
5
  import { predict2D, Predictor } from './utils/predict2D';
7
6
 
8
7
  export interface PredictCOSYOptions {
@@ -1,12 +1,12 @@
1
1
  import fetch from 'cross-fetch';
2
2
  import type { Molecule } from 'openchemlib';
3
3
 
4
+ import type { NMRSignal1D } from '../signals/NMRSignal1D';
4
5
  import { signalsToRanges } from '../signals/signalsToRanges';
5
- import type { MakeMandatory } from '../types/MakeMandatory';
6
- import type { NMRSignal1D } from '../types/NMRSignal1D';
7
- import type { DataBaseStructure } from '../types/dataStructure';
8
- import type { Prediction1D } from '../types/prediction1D';
6
+ import type { MakeMandatory } from '../utilities/MakeMandatory';
9
7
 
8
+ import type { DataBaseStructure } from './dataStructure';
9
+ import type { Prediction1D } from './prediction1D';
10
10
  import { fetchPrediction } from './utils/fetchPrediction';
11
11
  import { flatGroupedDiaIDs } from './utils/flatGroupedDiaIDs';
12
12
  import { getFilteredIDiaIDs } from './utils/getFilteredIDiaIDs';
@@ -1,11 +1,10 @@
1
1
  import { Molecule } from 'openchemlib';
2
2
 
3
- import type { Prediction1D } from '../types/prediction1D';
4
-
5
3
  import { predictCarbon } from './predictCarbon';
6
4
  import type { PredictCarbonOptions } from './predictCarbon';
7
5
  import { predictProton } from './predictProton';
8
6
  import type { PredictProtonOptions } from './predictProton';
7
+ import type { Prediction1D } from './prediction1D';
9
8
  import { predict2D } from './utils/predict2D';
10
9
  import type { Predictor } from './utils/predict2D';
11
10
 
@@ -1,9 +1,8 @@
1
1
  import { Molecule } from 'openchemlib';
2
2
 
3
- import type { Prediction1D } from '../types/prediction1D';
4
-
5
3
  import { predictCarbon, PredictCarbonOptions } from './predictCarbon';
6
4
  import { predictProton, PredictProtonOptions } from './predictProton';
5
+ import type { Prediction1D } from './prediction1D';
7
6
  import { predict2D, Predictor } from './utils/predict2D';
8
7
 
9
8
  export interface PredictHSQCOptions {
@@ -49,7 +48,10 @@ export interface PredictHSQCOptions {
49
48
  * @returns {Promise<object>} - object with molfile, diaIDs, 2D signals joined signals and zones.
50
49
  */
51
50
 
52
- export async function predictHSQC(molecule: Molecule, options: PredictHSQCOptions = {}) {
51
+ export async function predictHSQC(
52
+ molecule: Molecule,
53
+ options: PredictHSQCOptions = {},
54
+ ) {
53
55
  let {
54
56
  minLength = 1,
55
57
  maxLength = 1,
@@ -7,10 +7,11 @@ import {
7
7
  getDiastereotopicAtomIDs,
8
8
  } from 'openchemlib-utils';
9
9
 
10
+ import type { NMRSignal1D } from '../signals/NMRSignal1D';
10
11
  import { signalsJoin } from '../signals/signalsJoin';
11
12
  import { signalsToRanges } from '../signals/signalsToRanges';
12
- import type { NMRSignal1D } from '../types/NMRSignal1D';
13
- import type { Prediction1D } from '../types/prediction1D';
13
+
14
+ import type { Prediction1D } from './prediction1D';
14
15
 
15
16
  /**
16
17
  * Makes a prediction using proton.
@@ -102,7 +103,7 @@ function protonParser(
102
103
  atoms: [linked],
103
104
  diaIDs: [diaIDs[linked]],
104
105
  multiplicity: 'd',
105
- distance: distanceMatrix[atom][linked],
106
+ pathLength: distanceMatrix[atom][linked],
106
107
  });
107
108
  signal.js.sort((a, b) => b.coupling - a.coupling);
108
109
  }
@@ -1,7 +1,7 @@
1
1
  import type { Molecule } from 'openchemlib';
2
2
 
3
- import type { NMRRange } from "./NMRRange";
4
- import type { NMRSignal1D } from "./NMRSignal1D";
3
+ import type { NMRSignal1D } from '../signals/NMRSignal1D';
4
+ import type { NMRRange } from '../xy/NMRRange';
5
5
 
6
6
  export interface Prediction1D {
7
7
  molfile: string;
@@ -1,7 +1,7 @@
1
1
  import { fetch } from 'cross-fetch';
2
2
  import { Molecule } from 'openchemlib';
3
3
 
4
- import type { Prediction1D } from '../../types/prediction1D';
4
+ import type { Prediction1D } from '../prediction1D';
5
5
 
6
6
  interface FetchPredictionOptions {
7
7
  webserviceURL: string;
@@ -24,8 +24,7 @@ export function getFilteredIDiaIDs(
24
24
 
25
25
  const molfile = molecule.toMolfile();
26
26
 
27
- let groupedDiaIDs =
28
- getGroupedDiastereotopicAtomIDs(molecule);
27
+ let groupedDiaIDs = getGroupedDiastereotopicAtomIDs(molecule);
29
28
 
30
29
  let carbonDiaIDs = groupedDiaIDs
31
30
  .filter((e) => e.atomLabel === 'C')
@@ -1,8 +1,8 @@
1
- const nucleusMap: {[key: string]: string;} = {
1
+ const nucleusMap: { [key: string]: string } = {
2
2
  h: '1H',
3
3
  c: '13C',
4
4
  };
5
5
 
6
- export function getNuclei(input: {[key: string]: string}) {
7
- return Object.values(input).map((e) => (nucleusMap[e.toLowerCase()]));
6
+ export function getNuclei(input: { [key: string]: string }) {
7
+ return Object.values(input).map((e) => nucleusMap[e.toLowerCase()]);
8
8
  }