nmr-processing 3.3.0 → 3.3.4

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 (168) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/lib/databases/DatabaseNMREntry.d.ts +1 -1
  3. package/lib/index.d.ts +9 -0
  4. package/lib/peaks/peaksToRanges.d.ts +1 -1
  5. package/lib/peaks/peaksToRanges.js.map +1 -1
  6. package/lib/peaks/util/determineRealTop.d.ts +1 -1
  7. package/lib/peaks/util/jAnalyzer.d.ts +2 -2
  8. package/lib/prediction/predictCOSY.d.ts +3 -3
  9. package/lib/prediction/predictCarbon.d.ts +1 -1
  10. package/lib/prediction/predictCarbon.js +5 -5
  11. package/lib/prediction/predictCarbon.js.map +1 -1
  12. package/lib/prediction/predictHMBC.d.ts +3 -3
  13. package/lib/prediction/predictHSQC.d.ts +3 -3
  14. package/lib/prediction/predictProton.js +2 -2
  15. package/lib/prediction/predictProton.js.map +1 -1
  16. package/lib/prediction/utils/getFilteredIDiaIDs.d.ts +1 -1
  17. package/lib/prediction/utils/predict2D.js +6 -6
  18. package/lib/prediction/utils/predict2D.js.map +1 -1
  19. package/lib/prediction/utils/queryByHOSE.d.ts +1 -1
  20. package/lib/prediction/utils/queryByHOSE.js +1 -1
  21. package/lib/prediction/utils/queryByHOSE.js.map +1 -1
  22. package/lib/ranges/rangesToXY.d.ts +2 -2
  23. package/lib/signal/signalJoinCouplings.d.ts +1 -1
  24. package/lib/signal/signalJoinCouplings.js +5 -5
  25. package/lib/signal/signalJoinCouplings.js.map +1 -1
  26. package/lib/signals/hackSignalsToXY.js +7 -7
  27. package/lib/signals/hackSignalsToXY.js.map +1 -1
  28. package/lib/signals/signals2DToZ.js.map +1 -1
  29. package/lib/signals/signalsJoin.js +1 -1
  30. package/lib/signals/signalsJoin.js.map +1 -1
  31. package/lib/signals/signalsToXY.d.ts +2 -2
  32. package/lib/signals/signalsToXY.js +4 -4
  33. package/lib/signals/signalsToXY.js.map +1 -1
  34. package/lib/signals/simulation/signalsToSpinSystem.js +8 -8
  35. package/lib/signals/simulation/signalsToSpinSystem.js.map +1 -1
  36. package/lib/signals/simulation/simulate1D.d.ts +3 -3
  37. package/lib/types/MPFPeak.d.ts +9 -0
  38. package/lib/types/MPFPeak.js +3 -0
  39. package/lib/types/MPFPeak.js.map +1 -0
  40. package/lib/types/MakeMandatory.d.ts +3 -0
  41. package/lib/types/MakeMandatory.js +3 -0
  42. package/lib/types/MakeMandatory.js.map +1 -0
  43. package/lib/types/NMRPeak1D.d.ts +11 -0
  44. package/lib/types/NMRPeak1D.js +3 -0
  45. package/lib/types/NMRPeak1D.js.map +1 -0
  46. package/lib/types/NMRRange.d.ts +11 -0
  47. package/lib/types/NMRRange.js +3 -0
  48. package/lib/types/NMRRange.js.map +1 -0
  49. package/lib/types/NMRSignal1D.d.ts +21 -0
  50. package/lib/types/NMRSignal1D.js +3 -0
  51. package/lib/types/NMRSignal1D.js.map +1 -0
  52. package/lib/types/NMRSignal2D.d.ts +19 -0
  53. package/lib/types/NMRSignal2D.js +3 -0
  54. package/lib/types/NMRSignal2D.js.map +1 -0
  55. package/lib/types/NMRZone.d.ts +11 -0
  56. package/lib/types/NMRZone.js +3 -0
  57. package/lib/types/NMRZone.js.map +1 -0
  58. package/lib/types/XYNumberArray.d.ts +4 -0
  59. package/lib/types/XYNumberArray.js +3 -0
  60. package/lib/types/XYNumberArray.js.map +1 -0
  61. package/lib/types/dataStructure.d.ts +4 -0
  62. package/lib/types/dataStructure.js +3 -0
  63. package/lib/types/dataStructure.js.map +1 -0
  64. package/lib/types/jcoupling.d.ts +8 -0
  65. package/lib/types/jcoupling.js +3 -0
  66. package/lib/types/jcoupling.js.map +1 -0
  67. package/lib/types/nmrAssigment.d.ts +28 -0
  68. package/lib/types/nmrAssigment.js +3 -0
  69. package/lib/types/nmrAssigment.js.map +1 -0
  70. package/lib/types/prediction1D.d.ts +12 -0
  71. package/lib/types/prediction1D.js +3 -0
  72. package/lib/types/prediction1D.js.map +1 -0
  73. package/{src → lib}/types/prediction2D.d.ts +0 -0
  74. package/lib/types/prediction2D.js +2 -0
  75. package/lib/types/prediction2D.js.map +1 -0
  76. package/lib/types/spinSystem.d.ts +8 -0
  77. package/lib/types/spinSystem.js +3 -0
  78. package/lib/types/spinSystem.js.map +1 -0
  79. package/lib/xy/xyAutoRangesPicking.d.ts +1 -1
  80. package/lib-esm/peaks/peaksToRanges.js.map +1 -1
  81. package/lib-esm/prediction/predictCarbon.js +5 -5
  82. package/lib-esm/prediction/predictCarbon.js.map +1 -1
  83. package/lib-esm/prediction/predictProton.js +2 -2
  84. package/lib-esm/prediction/predictProton.js.map +1 -1
  85. package/lib-esm/prediction/utils/predict2D.js +6 -6
  86. package/lib-esm/prediction/utils/predict2D.js.map +1 -1
  87. package/lib-esm/prediction/utils/queryByHOSE.js +1 -1
  88. package/lib-esm/prediction/utils/queryByHOSE.js.map +1 -1
  89. package/lib-esm/signal/signalJoinCouplings.js +5 -5
  90. package/lib-esm/signal/signalJoinCouplings.js.map +1 -1
  91. package/lib-esm/signals/hackSignalsToXY.js +7 -7
  92. package/lib-esm/signals/hackSignalsToXY.js.map +1 -1
  93. package/lib-esm/signals/signals2DToZ.js.map +1 -1
  94. package/lib-esm/signals/signalsJoin.js +1 -1
  95. package/lib-esm/signals/signalsJoin.js.map +1 -1
  96. package/lib-esm/signals/signalsToXY.js +4 -4
  97. package/lib-esm/signals/signalsToXY.js.map +1 -1
  98. package/lib-esm/signals/simulation/signalsToSpinSystem.js +8 -8
  99. package/lib-esm/signals/simulation/signalsToSpinSystem.js.map +1 -1
  100. package/lib-esm/types/MPFPeak.js +2 -0
  101. package/lib-esm/types/MPFPeak.js.map +1 -0
  102. package/lib-esm/types/MakeMandatory.js +2 -0
  103. package/lib-esm/types/MakeMandatory.js.map +1 -0
  104. package/lib-esm/types/NMRPeak1D.js +2 -0
  105. package/lib-esm/types/NMRPeak1D.js.map +1 -0
  106. package/lib-esm/types/NMRRange.js +2 -0
  107. package/lib-esm/types/NMRRange.js.map +1 -0
  108. package/lib-esm/types/NMRSignal1D.js +2 -0
  109. package/lib-esm/types/NMRSignal1D.js.map +1 -0
  110. package/lib-esm/types/NMRSignal2D.js +2 -0
  111. package/lib-esm/types/NMRSignal2D.js.map +1 -0
  112. package/lib-esm/types/NMRZone.js +2 -0
  113. package/lib-esm/types/NMRZone.js.map +1 -0
  114. package/lib-esm/types/XYNumberArray.js +2 -0
  115. package/lib-esm/types/XYNumberArray.js.map +1 -0
  116. package/lib-esm/types/dataStructure.js +2 -0
  117. package/lib-esm/types/dataStructure.js.map +1 -0
  118. package/lib-esm/types/jcoupling.js +2 -0
  119. package/lib-esm/types/jcoupling.js.map +1 -0
  120. package/lib-esm/types/nmrAssigment.js +2 -0
  121. package/lib-esm/types/nmrAssigment.js.map +1 -0
  122. package/lib-esm/types/prediction1D.js +2 -0
  123. package/lib-esm/types/prediction1D.js.map +1 -0
  124. package/lib-esm/types/prediction2D.js +2 -0
  125. package/lib-esm/types/prediction2D.js.map +1 -0
  126. package/lib-esm/types/spinSystem.js +2 -0
  127. package/lib-esm/types/spinSystem.js.map +1 -0
  128. package/package.json +5 -6
  129. package/src/databases/DatabaseNMREntry.ts +1 -1
  130. package/src/index.ts +13 -0
  131. package/src/peaks/peaksToRanges.ts +3 -4
  132. package/src/peaks/util/determineRealTop.ts +1 -1
  133. package/src/peaks/util/jAnalyzer.ts +2 -2
  134. package/src/prediction/predictCOSY.ts +1 -1
  135. package/src/prediction/predictCarbon.ts +8 -8
  136. package/src/prediction/predictHMBC.ts +1 -1
  137. package/src/prediction/predictHSQC.ts +1 -1
  138. package/src/prediction/predictProton.ts +2 -2
  139. package/src/prediction/utils/predict2D.ts +12 -10
  140. package/src/prediction/utils/queryByHOSE.ts +2 -2
  141. package/src/ranges/rangesToACS.ts +1 -1
  142. package/src/ranges/rangesToXY.ts +2 -2
  143. package/src/signal/signalJoinCouplings.ts +6 -6
  144. package/src/signals/hackSignalsToXY.ts +8 -8
  145. package/src/signals/signals2DToZ.ts +0 -1
  146. package/src/signals/signalsJoin.ts +1 -1
  147. package/src/signals/signalsToRanges.ts +1 -1
  148. package/src/signals/signalsToXY.ts +7 -7
  149. package/src/signals/simulation/signalsToSpinSystem.ts +10 -10
  150. package/src/signals/simulation/simulate1D.ts +3 -3
  151. package/src/types/{MPFPeak.d.ts → MPFPeak.ts} +0 -0
  152. package/src/types/{MakeMandatory.d.ts → MakeMandatory.ts} +0 -0
  153. package/src/types/{NMRPeak1D.d.ts → NMRPeak1D.ts} +0 -0
  154. package/src/types/{NMRRange.d.ts → NMRRange.ts} +0 -0
  155. package/src/types/{NMRSignal1D.d.ts → NMRSignal1D.ts} +4 -4
  156. package/src/types/{NMRSignal2D.d.ts → NMRSignal2D.ts} +2 -1
  157. package/src/types/{NMRZone.d.ts → NMRZone.ts} +1 -1
  158. package/src/types/{XYNumberArray.d.ts → XYNumberArray.ts} +0 -0
  159. package/src/types/{dataStructure.d.ts → dataStructure.ts} +0 -0
  160. package/src/types/{jcoupling.d.ts → jcoupling.ts} +1 -1
  161. package/src/types/{nmrAssigment.d.ts → nmrAssigment.ts} +1 -1
  162. package/src/types/openchemlib-utils/{index.d.ts → index..d.ts} +0 -0
  163. package/src/types/{prediction1D.d.ts → prediction1D.ts} +0 -0
  164. package/src/types/prediction2D.ts +0 -0
  165. package/src/types/{spinSystem.d.ts → spinSystem.ts} +0 -0
  166. package/src/xyz/xyzAutoPeaksPicking.ts +1 -1
  167. package/src/xyz/xyzJResAnalyzer.ts +2 -2
  168. package/src/types/jest.d.ts +0 -15
@@ -1,7 +1,7 @@
1
1
  import { signalJoinCouplings } from '../signal/signalJoinCouplings';
2
2
  import { signalMultiplicityPattern } from '../signal/signalMultiplicityPattern';
3
3
  import type { NMRRange } from '../types/NMRRange';
4
- import { NMRSignal1D } from '../types/NMRSignal1D';
4
+ import type { NMRSignal1D } from '../types/NMRSignal1D';
5
5
 
6
6
  const globalOptions = {
7
7
  h: {
@@ -1,7 +1,7 @@
1
1
  import { DoubleArray } from 'cheminfo-types';
2
2
  import arraySequentialFill from 'ml-array-sequential-fill';
3
3
  import { SpectrumGenerator } from 'spectrum-generator';
4
- import type { Shape1DOption } from 'spectrum-generator';
4
+ import type { Shape1DOptions } from 'spectrum-generator';
5
5
 
6
6
  import { hackSignalsToXY } from '../signals/hackSignalsToXY';
7
7
  import type { MakeMandatory } from '../types/MakeMandatory';
@@ -41,7 +41,7 @@ export interface RangeToXYOptions {
41
41
  * options of signals.
42
42
  * @default { kind: 'gaussian' }
43
43
  */
44
- shape: Shape1DOption;
44
+ shape: Shape1DOptions;
45
45
  }
46
46
  function checkForSignals(
47
47
  ranges: NMRRange[],
@@ -1,8 +1,8 @@
1
1
  import sum from 'ml-array-sum';
2
2
 
3
3
  import type { MakeMandatory } from '../types/MakeMandatory';
4
- import { NMRSignal1D } from '../types/NMRSignal1D';
5
- import { Jcoupling } from '../types/jcoupling';
4
+ import type { NMRSignal1D } from '../types/NMRSignal1D';
5
+ import type { Jcoupling } from '../types/jcoupling';
6
6
  import { joinPatterns } from '../utilities/joinPatterns';
7
7
 
8
8
  export interface SignalJoinCouplingsOptions {
@@ -89,10 +89,10 @@ function groupJCouplings(
89
89
  signal.js = [];
90
90
  for (let group of groups) {
91
91
  let coupling = sum(group.map((group) => group.coupling)) / group.length;
92
- let atomIDs = distinctValues(
92
+ let atoms = distinctValues(
93
93
  group
94
- .filter((group) => group.atomIDs)
95
- .map((group) => group.atomIDs)
94
+ .filter((group) => group.atoms)
95
+ .map((group) => group.atoms)
96
96
  .flat() as number[],
97
97
  ) as number[];
98
98
 
@@ -128,7 +128,7 @@ function groupJCouplings(
128
128
  if (diaIDs.length === 1) newJ.diaIDs = diaIDs;
129
129
  if (distances.length === 1 && distances[0]) newJ.distance = distances[0];
130
130
  if (assignment.length > 0) newJ.assignment = assignment;
131
- if (atomIDs.length > 0) newJ.atomIDs = atomIDs;
131
+ if (atoms.length > 0) newJ.atoms = atoms;
132
132
  signal.js.push(newJ);
133
133
  }
134
134
  return signal;
@@ -1,6 +1,6 @@
1
1
  import { couplingPatterns } from '../constants/couplingPatterns';
2
2
  import type { NMRSignal1D } from '../types/NMRSignal1D';
3
- import { Jcoupling } from '../types/jcoupling';
3
+ import type { Jcoupling } from '../types/jcoupling';
4
4
 
5
5
  import { OptionsSignalsToXY, signalsToXY } from './signalsToXY';
6
6
 
@@ -16,7 +16,7 @@ export function hackSignalsToXY(
16
16
  let newSignals = JSON.parse(JSON.stringify(signals));
17
17
 
18
18
  signals.forEach((signal, s) => {
19
- const { js: jCouplings = [], atomIDs: signalAssignment = [s] } = signal;
19
+ const { js: jCouplings = [], atoms: signalAssignment = [s] } = signal;
20
20
 
21
21
  let { newCouplings, tempSignals } = checkCouplings(
22
22
  jCouplings,
@@ -27,7 +27,7 @@ export function hackSignalsToXY(
27
27
  if (tempSignals.length > 0) newSignals.push(...tempSignals);
28
28
 
29
29
  newSignals[s].js = newCouplings;
30
- newSignals[s].atomIDs = signalAssignment;
30
+ newSignals[s].atoms = signalAssignment;
31
31
  });
32
32
 
33
33
  return signalsToXY(newSignals, options);
@@ -42,8 +42,8 @@ function checkCouplings(
42
42
  let tempSignals: NMRSignal1D[] = [];
43
43
  const newCouplings = jCouplings.reduce<Jcoupling[]>(
44
44
  (newCouplings, jCoupling) => {
45
- const { atomIDs = [], multiplicity, coupling } = jCoupling;
46
- if (atomIDs.length === 0) {
45
+ const { atoms = [], multiplicity, coupling } = jCoupling;
46
+ if (atoms.length === 0) {
47
47
  if (coupling && multiplicity) {
48
48
  let tempCouplings: Jcoupling[] = [];
49
49
  const nbLinks = couplingPatterns.indexOf(multiplicity);
@@ -51,7 +51,7 @@ function checkCouplings(
51
51
  newSignalAssignment++;
52
52
  tempCouplings.push({
53
53
  coupling,
54
- atomIDs: [newSignalAssignment],
54
+ atoms: [newSignalAssignment],
55
55
  });
56
56
  tempSignals.push(
57
57
  formatSignal(coupling, [newSignalAssignment], signalAssignment),
@@ -75,11 +75,11 @@ function formatSignal(
75
75
  ) {
76
76
  return {
77
77
  delta: 100000,
78
- atomIDs: newSignalAssignment,
78
+ atoms: newSignalAssignment,
79
79
  js: [
80
80
  {
81
81
  coupling,
82
- atomIDs: signalAssignment,
82
+ atoms: signalAssignment,
83
83
  },
84
84
  ],
85
85
  };
@@ -51,7 +51,6 @@ export function signals2DToZ(
51
51
  );
52
52
 
53
53
  width = ensureXYNumber(width);
54
-
55
54
  return generateSpectrum2D(peaks, {
56
55
  generator: {
57
56
  from: ensureXYNumber(from),
@@ -95,7 +95,7 @@ export function signalsJoin(
95
95
  nbAtoms: sum(group.map((item) => item.nbAtoms || 0)),
96
96
  delta: mean(group.map((item) => item.delta)),
97
97
  diaIDs: group[0].diaIDs,
98
- atomIDs: group.map((item) => item.atomIDs || []).flat(),
98
+ atoms: group.map((item) => item.atoms || []).flat(),
99
99
  js,
100
100
  };
101
101
 
@@ -1,4 +1,4 @@
1
- import { MakeMandatory } from '../types/MakeMandatory';
1
+ import type { MakeMandatory } from '../types/MakeMandatory';
2
2
  import type { NMRRange } from '../types/NMRRange';
3
3
  import type { NMRSignal1D } from '../types/NMRSignal1D';
4
4
  import { rangeFromSignal } from '../utilities/rangeFromSignal';
@@ -1,10 +1,10 @@
1
1
  import rescale from 'ml-array-rescale';
2
2
  import arraySequentialFill from 'ml-array-sequential-fill';
3
- import type { Shape1DOption } from 'spectrum-generator';
3
+ import type { Shape1DOptions } from 'spectrum-generator';
4
4
 
5
- import { MakeMandatory } from '../types/MakeMandatory';
5
+ import type { MakeMandatory } from '../types/MakeMandatory';
6
6
  import type { NMRSignal1D } from '../types/NMRSignal1D';
7
- import { Jcoupling } from '../types/jcoupling';
7
+ import type { Jcoupling } from '../types/jcoupling';
8
8
 
9
9
  import { signalsToSpinSystem } from './simulation/signalsToSpinSystem';
10
10
  import simulate1D from './simulation/simulate1D';
@@ -25,7 +25,7 @@ export interface OptionsSignalsToXY {
25
25
  /**
26
26
  * Shape options for ml-spectrum-generator
27
27
  */
28
- shape?: Shape1DOption;
28
+ shape?: Shape1DOptions;
29
29
  /**
30
30
  * The linewidth of the output spectrum, expresed in Hz.
31
31
  * @default 1
@@ -49,7 +49,7 @@ export interface OptionsSignalsToXY {
49
49
  }
50
50
 
51
51
  type JcouplingFromPrediction = MakeMandatory<Jcoupling, 'distance'>;
52
- type Signal1DWidthAtomsIDsAndDiaID = MakeMandatory<NMRSignal1D, 'atomIDs'>;
52
+ type Signal1DWidthAtomsIDsAndDiaID = MakeMandatory<NMRSignal1D, 'atoms'>;
53
53
  type Signal1DWidthJsAndDiaID = Omit<Signal1DWidthAtomsIDsAndDiaID, 'js'> & {
54
54
  js: JcouplingFromPrediction[];
55
55
  };
@@ -60,10 +60,10 @@ function checkForMandatory(
60
60
  for (const signal of signals) {
61
61
  if (!signal.js) throw new Error('There is not js');
62
62
  // if (!signal.diaID) throw new Error('There is not diaID');
63
- if (!signal.atomIDs) throw new Error('There is not atomIDs');
63
+ if (!signal.atoms) throw new Error('There is not atoms');
64
64
  for (const j of signal.js) {
65
65
  // if (!j.diaID) throw new Error('There is not diaID');
66
- if (!j.atomIDs) throw new Error('There is not atomIDs');
66
+ if (!j.atoms) throw new Error('There is not atoms');
67
67
  }
68
68
  }
69
69
  }
@@ -1,17 +1,17 @@
1
1
  import { Matrix } from 'ml-matrix';
2
2
  import simpleClustering from 'ml-simple-clustering';
3
3
 
4
- import { MakeMandatory } from '../../types/MakeMandatory';
4
+ import type { MakeMandatory } from '../../types/MakeMandatory';
5
5
  import type { NMRSignal1D } from '../../types/NMRSignal1D';
6
- import { Jcoupling } from '../../types/jcoupling';
6
+ import type { Jcoupling } from '../../types/jcoupling';
7
7
  import type { SpinSystem } from '../../types/spinSystem';
8
8
 
9
9
  interface Ids {
10
10
  [index: number]: number;
11
11
  }
12
12
 
13
- type JcouplingFromPrediction = MakeMandatory<Jcoupling, 'atomIDs'>;
14
- type Signal1DWidthAtomIDs = MakeMandatory<NMRSignal1D, 'atomIDs'>;
13
+ type JcouplingFromPrediction = MakeMandatory<Jcoupling, 'atoms'>;
14
+ type Signal1DWidthAtomIDs = MakeMandatory<NMRSignal1D, 'atoms'>;
15
15
  type Signal1DFromPrediction = Omit<Signal1DWidthAtomIDs, 'js'> & {
16
16
  js: JcouplingFromPrediction[];
17
17
  };
@@ -21,9 +21,9 @@ function checkForMandatory(
21
21
  ): asserts signals is Signal1DFromPrediction[] {
22
22
  for (const signal of signals) {
23
23
  if (!signal.js) throw new Error('there is not js');
24
- if (!signal.atomIDs) throw new Error('there is not atomIDs');
24
+ if (!signal.atoms) throw new Error('there is not atoms');
25
25
  for (const jcoupling of signal.js) {
26
- if (!jcoupling.atomIDs) throw new Error('there is not atomIDs');
26
+ if (!jcoupling.atoms) throw new Error('there is not atoms');
27
27
  }
28
28
  }
29
29
  }
@@ -39,16 +39,16 @@ export function signalsToSpinSystem(signals: NMRSignal1D[]): SpinSystem {
39
39
  for (let i = 0; i < nSpins; i++) {
40
40
  multiplicity[i] = 2;
41
41
  chemicalShifts[i] = signals[i].delta;
42
- const index = signals[i].atomIDs[0];
42
+ const index = signals[i].atoms[0];
43
43
  ids[index] = i;
44
44
  }
45
45
  //create the coupling matrix
46
46
  for (let i = 0; i < nSpins; i++) {
47
- let { atomIDs: signalAssignment, js: jCoupling } = signals[i];
47
+ let { atoms: signalAssignment, js: jCoupling } = signals[i];
48
48
  const fromIndex = signalAssignment[0];
49
49
  for (const jcoupling of jCoupling) {
50
- let { coupling, atomIDs } = jcoupling;
51
- const toIndex = atomIDs[0];
50
+ let { coupling, atoms } = jcoupling;
51
+ const toIndex = atoms[0];
52
52
  couplingConstants.set(ids[fromIndex], ids[toIndex], coupling);
53
53
  couplingConstants.set(ids[toIndex], ids[fromIndex], coupling);
54
54
  }
@@ -3,9 +3,9 @@ import { Matrix, EVD } from 'ml-matrix';
3
3
  import type { Matrix as MatrixClassType } from 'ml-matrix';
4
4
  import { SparseMatrix } from 'ml-sparse-matrix';
5
5
  import { SpectrumGenerator } from 'spectrum-generator';
6
- import type { Shape1DOption } from 'spectrum-generator';
6
+ import type { Shape1DOptions } from 'spectrum-generator';
7
7
 
8
- import { SpinSystem } from '../../types/spinSystem';
8
+ import type { SpinSystem } from '../../types/spinSystem';
9
9
 
10
10
  import getPauliMatrix from './getPauliMatrix';
11
11
 
@@ -46,7 +46,7 @@ interface Simulate1DOptions {
46
46
  * Shape options
47
47
  * @default {kind:'gaussian'}
48
48
  */
49
- shape?: Shape1DOption;
49
+ shape?: Shape1DOptions;
50
50
  }
51
51
 
52
52
  /**
File without changes
File without changes
File without changes
@@ -1,17 +1,17 @@
1
+ import type { NMRPeak1D } from './NMRPeak1D';
1
2
  import type { Jcoupling } from './jcoupling';
2
- import { GSDPeak } from './ml-gsd/index.d';
3
3
 
4
- interface NMRSignal1D {
4
+ export interface NMRSignal1D {
5
5
  delta: number;
6
6
  js?: Jcoupling[];
7
- atomIDs?: number[];
7
+ atoms?: number[];
8
8
  assignment?: string;
9
9
  kind?: string;
10
10
  multiplicity?: string;
11
11
  diaIDs?: string[];
12
12
  nbAtoms?: number;
13
13
  integration?: number;
14
- peaks?: GSDPeak[];
14
+ peaks?: NMRPeak1D[];
15
15
  statistic?: {
16
16
  mean: number;
17
17
  sd: number;
@@ -4,7 +4,7 @@ export interface Signal2DAxisData {
4
4
  nucleus?: string;
5
5
  delta: number;
6
6
  resolution?: number;
7
- atomIDs?: number[];
7
+ atoms?: number[];
8
8
  diaIDs?: string[];
9
9
  fromTo?: {
10
10
  from: number;
@@ -15,5 +15,6 @@ export interface NMRSignal2D {
15
15
  x: Signal2DAxisData;
16
16
  y: Signal2DAxisData;
17
17
  peaks?: MPFPeak[];
18
+ kind?: string;
18
19
  _highlight?: (number | string)[];
19
20
  }
@@ -1,4 +1,4 @@
1
- import { NMRSignal2D } from "./NMRSignal2D";
1
+ import type { NMRSignal2D } from "./NMRSignal2D";
2
2
 
3
3
  interface fromTo { from: number, to: number }
4
4
 
@@ -1,6 +1,6 @@
1
1
  export interface Jcoupling {
2
2
  coupling: number;
3
- atomIDs?: number[];
3
+ atoms?: number[];
4
4
  assignment?: string | string[];
5
5
  diaIDs?: string[];
6
6
  multiplicity?: string;
@@ -1,7 +1,7 @@
1
1
  import { Molecule } from 'openchemlib';
2
2
 
3
3
  import type { NMRRange } from './NMRRange';
4
- import { NMRZone } from './NMRZone';
4
+ import type { NMRZone } from './NMRZone';
5
5
 
6
6
  export interface NMRAssignmentType {
7
7
  /**
File without changes
File without changes
File without changes
@@ -7,7 +7,7 @@ import { determineRealTop } from '../peaks/util/determineRealTop';
7
7
  import { getKernel } from '../peaks/util/getKernel';
8
8
  import type { GetKernelOptions } from '../peaks/util/getKernel';
9
9
  import * as PeakOptimizer from '../peaks/util/peakOptimizer';
10
- import { MPFPeak } from '../types/MPFPeak';
10
+ import type { MPFPeak } from '../types/MPFPeak';
11
11
  import type { NMRSignal2D } from '../types/NMRSignal2D';
12
12
 
13
13
  const smallFilter = [
@@ -2,8 +2,8 @@ import simpleClustering from 'ml-simple-clustering';
2
2
 
3
3
  import type { JAxisKeys } from '../peaks/util/jAnalyzer';
4
4
  import jAnalyzer from '../peaks/util/jAnalyzer';
5
- import { MPFPeak } from '../types/MPFPeak';
6
- import { MakeMandatory } from '../types/MakeMandatory';
5
+ import type { MPFPeak } from '../types/MPFPeak';
6
+ import type { MakeMandatory } from '../types/MakeMandatory';
7
7
  import type { NMRSignal2D } from '../types/NMRSignal2D';
8
8
 
9
9
  interface CompilePatternOptions {
@@ -1,15 +0,0 @@
1
- declare namespace jest {
2
- type Iterable =
3
- | number
4
- | Iterable[]
5
- | { [k: string]: Iterable }
6
- | string
7
- | null
8
- | undefined
9
- | boolean;
10
-
11
- interface Matchers<R> {
12
- toBeDeepCloseTo: (expected: Iterable, decimals?: number) => R;
13
- toMatchCloseTo: (expected: Iterable, decimals?: number) => R;
14
- }
15
- }