nmr-processing 17.0.0 → 17.1.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.
- package/nmr-processing.cjs +3 -3
- package/nmr-processing.d.ts +266 -76
- package/nmr-processing.mjs +3 -3
- package/package.json +18 -18
package/nmr-processing.d.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { AnalizeMultipletOptions } from 'multiplet-analysis';
|
|
1
|
+
import type { AnalizeMultipletOptions } from 'multiplet-analysis';
|
|
2
2
|
import { BaseRegression } from 'ml-regression-base';
|
|
3
|
-
import {
|
|
3
|
+
import type { DataReIm } from 'ml-spectra-processing';
|
|
4
|
+
import type { DataXReIm } from 'ml-spectra-processing';
|
|
4
5
|
import { DataXY } from 'cheminfo-types';
|
|
5
|
-
import { DoubleArray } from 'cheminfo-types';
|
|
6
|
+
import type { DoubleArray } from 'cheminfo-types';
|
|
6
7
|
import { ExponentialRegression } from 'ml-regression-exponential';
|
|
7
8
|
import type { FilterXYType } from 'ml-signal-processing';
|
|
8
9
|
import { FromTo } from 'cheminfo-types';
|
|
9
|
-
import {
|
|
10
|
+
import type { GroupedDiaID } from 'openchemlib-utils';
|
|
11
|
+
import type { GSDOptions } from 'ml-gsd';
|
|
10
12
|
import { GSDPeakOptimized } from 'ml-gsd';
|
|
11
13
|
import { GSDPeakOptimizedID } from 'ml-gsd';
|
|
12
|
-
import { JoinBroadPeaksOptions } from 'ml-gsd';
|
|
14
|
+
import type { JoinBroadPeaksOptions } from 'ml-gsd';
|
|
13
15
|
import type { LightLogger } from 'cheminfo-types';
|
|
14
|
-
import { Logger } from 'cheminfo-types';
|
|
16
|
+
import type { Logger } from 'cheminfo-types';
|
|
15
17
|
import { Matrix } from 'ml-matrix';
|
|
16
|
-
import
|
|
17
|
-
import { Molecule } from 'openchemlib/full';
|
|
18
|
+
import type { Molecule } from 'openchemlib/full';
|
|
18
19
|
import type { Molecule as Molecule_2 } from 'openchemlib/minimal';
|
|
19
|
-
import { NmrData1D } from 'cheminfo-types';
|
|
20
|
-
import { NmrData2D } from 'cheminfo-types';
|
|
21
|
-
import { NmrData2DContent } from 'cheminfo-types';
|
|
22
|
-
import { NmrData2DFt } from 'cheminfo-types';
|
|
23
|
-
import { NumberArray } from 'cheminfo-types';
|
|
24
|
-
import { OCLMolecule } from 'cheminfo-types';
|
|
25
|
-
import { OptimizePeaksOptions } from 'ml-gsd';
|
|
26
|
-
import { OptionsSG1D } from 'spectrum-generator';
|
|
20
|
+
import type { NmrData1D } from 'cheminfo-types';
|
|
21
|
+
import type { NmrData2D } from 'cheminfo-types';
|
|
22
|
+
import type { NmrData2DContent } from 'cheminfo-types';
|
|
23
|
+
import type { NmrData2DFt } from 'cheminfo-types';
|
|
24
|
+
import type { NumberArray } from 'cheminfo-types';
|
|
25
|
+
import type { OCLMolecule } from 'cheminfo-types';
|
|
26
|
+
import type { OptimizePeaksOptions } from 'ml-gsd';
|
|
27
|
+
import type { OptionsSG1D } from 'spectrum-generator';
|
|
27
28
|
import type { Peak2D as Peak2D_2 } from 'ml-matrix-peaks-finder';
|
|
28
|
-
import { PeakXYWidth } from 'cheminfo-types';
|
|
29
|
+
import type { PeakXYWidth } from 'cheminfo-types';
|
|
29
30
|
import { PointXY } from 'cheminfo-types';
|
|
30
31
|
import { Shape1D } from 'ml-peak-shape-generator';
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import { XYEquallySpacedOptions } from 'ml-spectra-processing';
|
|
32
|
+
import type { TopicMolecule } from 'openchemlib-utils';
|
|
33
|
+
import type { XYEquallySpacedOptions } from 'ml-spectra-processing';
|
|
34
34
|
import type { XYNumber } from 'spectrum-generator';
|
|
35
35
|
|
|
36
36
|
declare function addDefaultSignal(range: Range_2): void;
|
|
@@ -42,6 +42,8 @@ export declare interface AirplsOptions {
|
|
|
42
42
|
tolerance: number;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
declare type AnalysisInfoSection = Record<string, string>;
|
|
46
|
+
|
|
45
47
|
declare type Apodization1D = FilterFactory<Entry1D, Apodization2DOptions> & Pick<Apodization1DFilterOptions, 'name'>;
|
|
46
48
|
|
|
47
49
|
declare interface Apodization1DFilterOptions extends BaseFilter {
|
|
@@ -75,6 +77,8 @@ export declare function apodizationXReIm(data: Required<NmrData1D>, options: Apo
|
|
|
75
77
|
|
|
76
78
|
/**
|
|
77
79
|
* pure function that applies a window function to the input data.
|
|
80
|
+
* @param data
|
|
81
|
+
* @param options
|
|
78
82
|
*/
|
|
79
83
|
export declare function apodize(data: DoubleArray, options: ApplyWindowOptions): Float64Array<ArrayBufferLike>;
|
|
80
84
|
|
|
@@ -111,9 +115,6 @@ declare interface ApplyFilterOptions_2 {
|
|
|
111
115
|
*/
|
|
112
116
|
declare function applyFilters(datum: Entry1D, filters?: Filter1DOptions[], options?: ApplyFilterOptions): void;
|
|
113
117
|
|
|
114
|
-
/***
|
|
115
|
-
* @param {object} Filters [{name:'',options:{}},{...}]
|
|
116
|
-
*/
|
|
117
118
|
declare function applyFilters_2(datum: Entry2D, filters?: Filter2DOptions[], options?: ApplyFilterOptions_2): void;
|
|
118
119
|
|
|
119
120
|
export declare interface ApplyWindowOptions {
|
|
@@ -127,6 +128,11 @@ export declare interface ApplyWindowOptions {
|
|
|
127
128
|
output?: DoubleArray;
|
|
128
129
|
}
|
|
129
130
|
|
|
131
|
+
export declare interface AtomMapping {
|
|
132
|
+
label: string;
|
|
133
|
+
atom: number;
|
|
134
|
+
}
|
|
135
|
+
|
|
130
136
|
declare type AtomTypes = 'H' | 'C';
|
|
131
137
|
|
|
132
138
|
export declare interface AutoPhaseCorrection2D {
|
|
@@ -289,8 +295,8 @@ export declare const carbonImpurities: DatabaseNMREntry[];
|
|
|
289
295
|
|
|
290
296
|
/**
|
|
291
297
|
* check whether integral based on its kind can be included in another operation or not
|
|
292
|
-
* @param integral integral
|
|
293
|
-
* @returns
|
|
298
|
+
* @param integral - integral
|
|
299
|
+
* @returns
|
|
294
300
|
*/
|
|
295
301
|
export declare function checkIntegralKind(integral: Integral): boolean;
|
|
296
302
|
|
|
@@ -300,6 +306,14 @@ declare function checkRangeKind(range: Range_2): boolean;
|
|
|
300
306
|
|
|
301
307
|
declare function checkSignalKinds(range: Range_2, kinds: string[]): boolean;
|
|
302
308
|
|
|
309
|
+
export declare interface ChemicalShift {
|
|
310
|
+
Element: string;
|
|
311
|
+
Shift: string;
|
|
312
|
+
Spincount: string;
|
|
313
|
+
Nucleicount: string;
|
|
314
|
+
Name: string;
|
|
315
|
+
}
|
|
316
|
+
|
|
303
317
|
declare type CommonField = SelectField | StringField | NumberField | BooleanField | LabelField;
|
|
304
318
|
|
|
305
319
|
declare interface CompilePatternOptions {
|
|
@@ -311,8 +325,24 @@ declare interface CompilePatternOptions {
|
|
|
311
325
|
};
|
|
312
326
|
}
|
|
313
327
|
|
|
328
|
+
export declare interface Coupling {
|
|
329
|
+
atomFrom: number;
|
|
330
|
+
atomTo: number;
|
|
331
|
+
atomLabelTo: string;
|
|
332
|
+
value: number;
|
|
333
|
+
key: string;
|
|
334
|
+
toDiaID: number;
|
|
335
|
+
pathLength: number;
|
|
336
|
+
}
|
|
337
|
+
|
|
314
338
|
export declare const couplingACSPatterns: string[];
|
|
315
339
|
|
|
340
|
+
declare interface CouplingConstant {
|
|
341
|
+
Coupling: string;
|
|
342
|
+
Shift1: string;
|
|
343
|
+
Shift2: string;
|
|
344
|
+
}
|
|
345
|
+
|
|
316
346
|
export declare const couplingPatterns: OneLetterMultiplet[];
|
|
317
347
|
|
|
318
348
|
export declare function createApodizationWindowData(options: {
|
|
@@ -343,6 +373,27 @@ export declare interface CreateSignals2DOptions {
|
|
|
343
373
|
maxX: number;
|
|
344
374
|
}
|
|
345
375
|
|
|
376
|
+
/**
|
|
377
|
+
* CT results are stored in a CSV file with a specific format and a SDF file.
|
|
378
|
+
* This function will parse the CSV and return an object with the different sections.
|
|
379
|
+
* @param csv
|
|
380
|
+
* @returns
|
|
381
|
+
*/
|
|
382
|
+
declare function ctCSVParser(csv: string, options: {
|
|
383
|
+
logger: LightLogger;
|
|
384
|
+
}): CtCSVParserResult;
|
|
385
|
+
|
|
386
|
+
declare interface CtCSVParserResult {
|
|
387
|
+
'ANALYSIS INFO'?: AnalysisInfoSection;
|
|
388
|
+
SCORES?: ScoreEntry[];
|
|
389
|
+
SPINSYSTEMS?: ParsedRow[];
|
|
390
|
+
'CHEMICAL SHIFTS (ppm)'?: ParsedRow[];
|
|
391
|
+
'COUPLING CONSTANTS (Hz)'?: ParsedRow[];
|
|
392
|
+
LINESHAPES?: ParsedRow[];
|
|
393
|
+
QMGI?: ParsedRow[];
|
|
394
|
+
[key: string]: SectionData | undefined;
|
|
395
|
+
}
|
|
396
|
+
|
|
346
397
|
export declare function ctParser(sdf: string, csv: string, options: {
|
|
347
398
|
OCL: {
|
|
348
399
|
Molecule: typeof Molecule_2;
|
|
@@ -350,8 +401,8 @@ export declare function ctParser(sdf: string, csv: string, options: {
|
|
|
350
401
|
logger?: LightLogger;
|
|
351
402
|
}): {
|
|
352
403
|
molecules: ParsedMolecule[];
|
|
353
|
-
sections:
|
|
354
|
-
groups:
|
|
404
|
+
sections: ReturnType<typeof ctCSVParser>;
|
|
405
|
+
groups: GroupData[];
|
|
355
406
|
};
|
|
356
407
|
|
|
357
408
|
export declare type DataBaseLevelEntry = number | [number] | [number, number, number, number | null, number] | undefined | NMRSignalStatistics;
|
|
@@ -577,7 +628,8 @@ declare interface FilterFactory<EntryType, OptionsType> {
|
|
|
577
628
|
* Filter function that process the data in place.
|
|
578
629
|
*/
|
|
579
630
|
apply: (datum1D: EntryType, options: OptionsType) => void;
|
|
580
|
-
/**
|
|
631
|
+
/**
|
|
632
|
+
* This function is called when the same filter had been applied
|
|
581
633
|
* it returns the value should be applied to the filter (reduce) and
|
|
582
634
|
*/
|
|
583
635
|
reduce: (previousValue: OptionsType, newValue: OptionsType) => {
|
|
@@ -600,7 +652,7 @@ export declare const Filters1D: {
|
|
|
600
652
|
}>;
|
|
601
653
|
};
|
|
602
654
|
|
|
603
|
-
declare namespace Filters1DManager {
|
|
655
|
+
export declare namespace Filters1DManager {
|
|
604
656
|
export {
|
|
605
657
|
applyFilters,
|
|
606
658
|
reapplyFilters,
|
|
@@ -609,7 +661,6 @@ declare namespace Filters1DManager {
|
|
|
609
661
|
applyFilter
|
|
610
662
|
}
|
|
611
663
|
}
|
|
612
|
-
export { Filters1DManager }
|
|
613
664
|
|
|
614
665
|
export declare const Filters2D: {
|
|
615
666
|
[K in Filter2D['name']]: Extract<Filter2D, {
|
|
@@ -617,7 +668,7 @@ export declare const Filters2D: {
|
|
|
617
668
|
}>;
|
|
618
669
|
};
|
|
619
670
|
|
|
620
|
-
declare namespace Filters2DManager {
|
|
671
|
+
export declare namespace Filters2DManager {
|
|
621
672
|
export {
|
|
622
673
|
applyFilters_2 as applyFilters,
|
|
623
674
|
reapplyFilters_2 as reapplyFilters,
|
|
@@ -626,7 +677,6 @@ declare namespace Filters2DManager {
|
|
|
626
677
|
applyFilter_2 as applyFilter
|
|
627
678
|
}
|
|
628
679
|
}
|
|
629
|
-
export { Filters2DManager }
|
|
630
680
|
|
|
631
681
|
/**
|
|
632
682
|
* Look for a multiplet based on the pattern name or abbreviation.
|
|
@@ -638,12 +688,9 @@ export declare function findMultiplet(name: string): MatchingMultiplicity | unde
|
|
|
638
688
|
* Finds a peak that can serve as a pivot point within specified boundaries.
|
|
639
689
|
* The pivot is selected based on its y-value being above a threshold and its position
|
|
640
690
|
* being closest to either boundary (minX or maxX).
|
|
641
|
-
*
|
|
642
691
|
* @param peaks - Array of points containing x and y coordinates
|
|
643
692
|
* @param options - Configuration object for finding the pivot
|
|
644
|
-
*
|
|
645
693
|
* @returns The peak that serves as pivot point
|
|
646
|
-
*
|
|
647
694
|
* @throws {Error} If peaks array is empty
|
|
648
695
|
*/
|
|
649
696
|
export declare function findPivot(peaks: PointXY[], options: XYObjectSidePointOptions): PointXY;
|
|
@@ -706,7 +753,7 @@ declare interface GaussianOptions {
|
|
|
706
753
|
|
|
707
754
|
export declare function get13CAssignments(ranges: NMRRange[], molecule: Molecule, options?: Get13CAssignmentsOptions): Promise<{
|
|
708
755
|
score: any;
|
|
709
|
-
assignment:
|
|
756
|
+
assignment: NMRRangeWithIntegration[];
|
|
710
757
|
}[]>;
|
|
711
758
|
|
|
712
759
|
export declare interface Get13CAssignmentsOptions {
|
|
@@ -741,7 +788,7 @@ export declare function get1DErrorFactor(spectrum: Entry1D): number;
|
|
|
741
788
|
|
|
742
789
|
export declare function get1HAssignments(ranges: NMRRange[], molecule: Molecule, options?: Get1HAssignmentsOptions): Promise<{
|
|
743
790
|
score: any;
|
|
744
|
-
assignment:
|
|
791
|
+
assignment: NMRRangeWithIntegration[];
|
|
745
792
|
}[]>;
|
|
746
793
|
|
|
747
794
|
export declare interface Get1HAssignmentsOptions {
|
|
@@ -837,12 +884,15 @@ export declare interface GetAutoAssignmentInput {
|
|
|
837
884
|
* The approach is to find the peaks using GSD and then to enlarge the peaks
|
|
838
885
|
* to determine the zones where the baseline is not present
|
|
839
886
|
* @param data
|
|
887
|
+
* @param options
|
|
840
888
|
*/
|
|
841
889
|
export declare function getBaselineZones(data: NmrData1D, options?: BaselineZoneOptions): BaselineCorrectionZone[];
|
|
842
890
|
|
|
843
891
|
/**
|
|
844
892
|
* Generate baseline zones by Dietrich method, it uses an iterative thresholding to discard signals zones over a power spectrum.
|
|
845
893
|
* the implementation is based on the publication of Cobas et al (DOI: {@link https://doi.org/10.1016/j.jmr.2006.07.013})
|
|
894
|
+
* @param data
|
|
895
|
+
* @param options
|
|
846
896
|
*/
|
|
847
897
|
export declare function getBaselineZonesByDietrich(data: NmrData1D, options?: BaselineZoneOptionsDietrich): BaselineCorrectionZone[];
|
|
848
898
|
|
|
@@ -857,6 +907,8 @@ declare function getDiaIDs(range: Range_2): string[];
|
|
|
857
907
|
|
|
858
908
|
/**
|
|
859
909
|
* calculate the frequency of a nucleus with respect to a reference nucleus
|
|
910
|
+
* @param nucleus
|
|
911
|
+
* @param observedNucleusData
|
|
860
912
|
*/
|
|
861
913
|
export declare function getFrequency(
|
|
862
914
|
/**
|
|
@@ -896,6 +948,19 @@ export declare interface GetPeakListOptions extends GSDOptions, OptimizePeaksOpt
|
|
|
896
948
|
|
|
897
949
|
export declare function getShiftX(spectrum: Entry1D): number;
|
|
898
950
|
|
|
951
|
+
export declare interface GroupData {
|
|
952
|
+
id: string;
|
|
953
|
+
molfile: string;
|
|
954
|
+
spinSystem: {
|
|
955
|
+
SSType: string;
|
|
956
|
+
};
|
|
957
|
+
couplingConstants: CouplingConstant[];
|
|
958
|
+
chemicalShifts: ChemicalShift[];
|
|
959
|
+
atomsMapping: AtomMapping[];
|
|
960
|
+
atomsMappingLookup: Record<string, number>;
|
|
961
|
+
signals?: NMRSignal1D[];
|
|
962
|
+
}
|
|
963
|
+
|
|
899
964
|
export declare const impurities: SolventImpurities;
|
|
900
965
|
|
|
901
966
|
export declare type Impurity = Record<string, ImpuritySignal[]>;
|
|
@@ -1046,10 +1111,10 @@ export declare function mapRanges(ranges: Range_2[] | NMRRange[], spectrum: Entr
|
|
|
1046
1111
|
delta: number;
|
|
1047
1112
|
multiplicity: string;
|
|
1048
1113
|
js: Jcoupling[];
|
|
1114
|
+
nbAtoms?: number | undefined;
|
|
1049
1115
|
atoms?: number[] | undefined;
|
|
1050
1116
|
assignment?: string | undefined;
|
|
1051
1117
|
diaIDs?: string[] | undefined;
|
|
1052
|
-
nbAtoms?: number | undefined;
|
|
1053
1118
|
integration?: number | undefined;
|
|
1054
1119
|
statistics?: NMRSignalStatistics | undefined;
|
|
1055
1120
|
kind: string;
|
|
@@ -1133,7 +1198,15 @@ export declare function mapZones(zones: Zone[], datum: Entry2D, options?: MapOpt
|
|
|
1133
1198
|
assignment?: string;
|
|
1134
1199
|
}[];
|
|
1135
1200
|
|
|
1136
|
-
export declare function markSolventPeaks<T extends NMRRange>(input: T[], solventSignals: NMRSignal1D[], options?:
|
|
1201
|
+
export declare function markSolventPeaks<T extends NMRRange>(input: T[], solventSignals: NMRSignal1D[], options?: MarkSolventPeaksOptions): T[];
|
|
1202
|
+
|
|
1203
|
+
declare interface MarkSolventPeaksOptions {
|
|
1204
|
+
/**
|
|
1205
|
+
* The NMR spectrometer frequency in MHz
|
|
1206
|
+
* @default 400
|
|
1207
|
+
*/
|
|
1208
|
+
frequency?: number;
|
|
1209
|
+
}
|
|
1137
1210
|
|
|
1138
1211
|
export declare type MatchingMultiplicity = MultipletDefinition & {
|
|
1139
1212
|
match: string;
|
|
@@ -1150,7 +1223,6 @@ export declare interface MatrixOptions {
|
|
|
1150
1223
|
/**
|
|
1151
1224
|
* Matrix generation filters
|
|
1152
1225
|
* @default []
|
|
1153
|
-
*
|
|
1154
1226
|
*/
|
|
1155
1227
|
filters: Array<MatrixFilter & {
|
|
1156
1228
|
options: object;
|
|
@@ -1178,10 +1250,10 @@ declare type MatrixProperties = Record<string, Properties>;
|
|
|
1178
1250
|
export declare function matrixToBoxPlot(input: NumberArray[], options?: {
|
|
1179
1251
|
colors?: string[];
|
|
1180
1252
|
}): {
|
|
1181
|
-
color:
|
|
1253
|
+
color: (string | undefined)[];
|
|
1254
|
+
median: Float64Array<ArrayBufferLike>;
|
|
1182
1255
|
max: Float64Array<ArrayBufferLike>;
|
|
1183
1256
|
min: Float64Array<ArrayBufferLike>;
|
|
1184
|
-
median: Float64Array<ArrayBufferLike>;
|
|
1185
1257
|
q1: Float64Array<ArrayBufferLike>;
|
|
1186
1258
|
q3: Float64Array<ArrayBufferLike>;
|
|
1187
1259
|
};
|
|
@@ -1189,7 +1261,7 @@ export declare function matrixToBoxPlot(input: NumberArray[], options?: {
|
|
|
1189
1261
|
export declare function matrixToStocsy(matrix: NumberArray[], index: number, options?: MatrixToStocsyOptions): {
|
|
1190
1262
|
y: number[];
|
|
1191
1263
|
correlations: Float64Array<ArrayBuffer>;
|
|
1192
|
-
color:
|
|
1264
|
+
color: (string | undefined)[];
|
|
1193
1265
|
};
|
|
1194
1266
|
|
|
1195
1267
|
declare interface MatrixToStocsyOptions {
|
|
@@ -1200,6 +1272,16 @@ declare interface MatrixToStocsyOptions {
|
|
|
1200
1272
|
colors?: string[];
|
|
1201
1273
|
}
|
|
1202
1274
|
|
|
1275
|
+
declare interface MinMaxContent {
|
|
1276
|
+
z: Float64Array[];
|
|
1277
|
+
minX: number;
|
|
1278
|
+
maxX: number;
|
|
1279
|
+
minY: number;
|
|
1280
|
+
maxY: number;
|
|
1281
|
+
minZ: number;
|
|
1282
|
+
maxZ: number;
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1203
1285
|
export declare interface MultipletDefinition {
|
|
1204
1286
|
label: string;
|
|
1205
1287
|
value: OneLetterMultiplet;
|
|
@@ -1310,6 +1392,7 @@ declare interface NMRZoneWithIds extends Omit<NMRZone, 'signals' | 'id'> {
|
|
|
1310
1392
|
|
|
1311
1393
|
/**
|
|
1312
1394
|
* The idea is to convert nucleus name like H1, proton or Fluorine19 to 1H and 19F.
|
|
1395
|
+
* @param nucleus
|
|
1313
1396
|
*/
|
|
1314
1397
|
export declare function normalizeNucleus(nucleus: string): string;
|
|
1315
1398
|
|
|
@@ -1337,12 +1420,6 @@ export declare interface ObservedNucleusData {
|
|
|
1337
1420
|
frequency: number;
|
|
1338
1421
|
}
|
|
1339
1422
|
|
|
1340
|
-
/**
|
|
1341
|
-
* This function will generate an object compatible with NMR-ium
|
|
1342
|
-
*
|
|
1343
|
-
* @param molecule
|
|
1344
|
-
* @param options
|
|
1345
|
-
*/
|
|
1346
1423
|
declare interface OneDOptions {
|
|
1347
1424
|
proton: FromTo;
|
|
1348
1425
|
carbon: FromTo;
|
|
@@ -1544,6 +1621,8 @@ declare interface ParsedMolecule {
|
|
|
1544
1621
|
id: string;
|
|
1545
1622
|
}
|
|
1546
1623
|
|
|
1624
|
+
declare type ParsedRow = Record<string, string>;
|
|
1625
|
+
|
|
1547
1626
|
export declare interface Peak1D extends Omit<NMRPeak1D, 'id'>, BasePeak {
|
|
1548
1627
|
originalX?: number;
|
|
1549
1628
|
}
|
|
@@ -1573,27 +1652,30 @@ export declare interface Peaks {
|
|
|
1573
1652
|
}
|
|
1574
1653
|
|
|
1575
1654
|
/**
|
|
1576
|
-
*
|
|
1655
|
+
* Filters impurities from a list of NMR peaks based on the specified options.
|
|
1656
|
+
* @template T - The type of NMR peaks.
|
|
1657
|
+
* @param peakList - The list of NMR peaks to be filtered.
|
|
1658
|
+
* @param [options={}] - The options for filtering impurities.
|
|
1659
|
+
* @returns The filtered list of NMR peaks.
|
|
1577
1660
|
*/
|
|
1578
1661
|
export declare function peaksFilterImpurities<T extends NMRPeak1D>(peakList: T[], options?: OptionsPeaksFilterImpurities): T[];
|
|
1579
1662
|
|
|
1580
1663
|
/**
|
|
1581
1664
|
* Generates an NMR Free Induction Decay (FID) signal from a list of peaks.
|
|
1582
|
-
*
|
|
1583
|
-
* @param {Array<{ x: number, y: number }>} peaks - The list of peaks, where:
|
|
1665
|
+
* @param peaks - The list of peaks, where:
|
|
1584
1666
|
* - `x` is the chemical shift in ppm.
|
|
1585
1667
|
* - `y` is the intensity of the peak.
|
|
1586
|
-
* @param
|
|
1587
|
-
* @param
|
|
1588
|
-
* @param
|
|
1589
|
-
* @param
|
|
1590
|
-
* @param
|
|
1591
|
-
* @param
|
|
1668
|
+
* @param options - The options for FID generation.
|
|
1669
|
+
* @param [options.from=0] - The start of the spectral window in ppm.
|
|
1670
|
+
* @param [options.to=10] - The end of the spectral window in ppm.
|
|
1671
|
+
* @param [options.nbPoints=1024] - The number of data points in the FID.
|
|
1672
|
+
* @param [options.frequency=400] - The spectrometer frequency in MHz.
|
|
1673
|
+
* @param [options.t2Relaxation] - An array of T2 relaxation times in milliseconds for each peak.
|
|
1592
1674
|
* If not provided, all peaks are assigned a default T2 relaxation time of 100 ms.
|
|
1593
|
-
* @returns
|
|
1675
|
+
* @returns - The generated FID signal, where:
|
|
1594
1676
|
* - `re` is the real part of the FID.
|
|
1595
1677
|
* - `im` is the imaginary part of the FID.
|
|
1596
|
-
|
|
1678
|
+
*/
|
|
1597
1679
|
export declare function peaksToFID(peaks: Array<{
|
|
1598
1680
|
x: number;
|
|
1599
1681
|
y: number;
|
|
@@ -1686,7 +1768,9 @@ export declare interface PolynomialOptions {
|
|
|
1686
1768
|
|
|
1687
1769
|
/**
|
|
1688
1770
|
* Generate the 2D correlation nmr peaks based on the number of bonds between a pair of atoms
|
|
1689
|
-
* @
|
|
1771
|
+
* @param molecule
|
|
1772
|
+
* @param options
|
|
1773
|
+
* @returns - object with molfile, diaIDs, 1D and 2D signals, joined signals, ranges and zones.
|
|
1690
1774
|
*/
|
|
1691
1775
|
export declare function predict(molecule: Molecule, options?: PredictAllOptions): Promise<Predicted>;
|
|
1692
1776
|
|
|
@@ -1777,22 +1861,58 @@ declare interface PredictCOSYOptions {
|
|
|
1777
1861
|
export declare interface Predicted {
|
|
1778
1862
|
molfile: string;
|
|
1779
1863
|
molfileWithH: string;
|
|
1780
|
-
hoses:
|
|
1781
|
-
diaIDs:
|
|
1782
|
-
groupedDiaIDs:
|
|
1864
|
+
hoses: string[];
|
|
1865
|
+
diaIDs: string[] | undefined;
|
|
1866
|
+
groupedDiaIDs: GroupedDiaID[];
|
|
1783
1867
|
moleculeWithHydrogens: Molecule;
|
|
1784
|
-
distanceMatrix:
|
|
1868
|
+
distanceMatrix: NumberArray[];
|
|
1785
1869
|
spectra: PredictedSpectra;
|
|
1786
1870
|
}
|
|
1787
1871
|
|
|
1788
|
-
export declare interface
|
|
1872
|
+
export declare interface Predicted1DSpectra {
|
|
1789
1873
|
proton?: PredictionBase1D;
|
|
1790
1874
|
carbon?: PredictionBase1D;
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
export declare interface Predicted2DSpectra {
|
|
1791
1878
|
cosy?: PredictionBase2D;
|
|
1792
1879
|
hsqc?: PredictionBase2D;
|
|
1793
1880
|
hmbc?: PredictionBase2D;
|
|
1794
1881
|
}
|
|
1795
1882
|
|
|
1883
|
+
export declare interface PredictedSpectra extends Predicted1DSpectra, Predicted2DSpectra {
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
declare interface PredictedSpectrum1D {
|
|
1887
|
+
data: {
|
|
1888
|
+
x: NumberArray;
|
|
1889
|
+
re: NumberArray;
|
|
1890
|
+
im: null;
|
|
1891
|
+
};
|
|
1892
|
+
info: Spectrum1DInfo;
|
|
1893
|
+
ranges: {
|
|
1894
|
+
values: Array<{
|
|
1895
|
+
from: number;
|
|
1896
|
+
to: number;
|
|
1897
|
+
}>;
|
|
1898
|
+
};
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
declare interface PredictedSpectrum2D {
|
|
1902
|
+
data: {
|
|
1903
|
+
rr: MinMaxContent & {
|
|
1904
|
+
noise: number;
|
|
1905
|
+
};
|
|
1906
|
+
};
|
|
1907
|
+
info: Spectrum2DInfo;
|
|
1908
|
+
zones: {
|
|
1909
|
+
values: Array<{
|
|
1910
|
+
x: FromTo;
|
|
1911
|
+
y: FromTo;
|
|
1912
|
+
}>;
|
|
1913
|
+
};
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1796
1916
|
/**
|
|
1797
1917
|
* Generate the correlation bidimensional nmr peaks based on the number of bonds between a pair of atoms
|
|
1798
1918
|
* @returns {Promise<object>} - object with molfile, diaIDs, 2D signals joined signals and zones.
|
|
@@ -1920,12 +2040,14 @@ export declare interface PredictProtonOptions {
|
|
|
1920
2040
|
cache?: PredictionCacheFn;
|
|
1921
2041
|
}
|
|
1922
2042
|
|
|
1923
|
-
export declare function predictSpectra(molecule: Molecule, options?: PredictAllSpectraOptions): Promise<
|
|
1924
|
-
|
|
1925
|
-
|
|
2043
|
+
export declare function predictSpectra(molecule: Molecule, options?: PredictAllSpectraOptions): Promise<PredictSpectraResult>;
|
|
2044
|
+
|
|
2045
|
+
declare interface PredictSpectraResult {
|
|
2046
|
+
spectra: Array<PredictedSpectrum1D | PredictedSpectrum2D>;
|
|
2047
|
+
molecules: Array<{
|
|
1926
2048
|
molfile: string;
|
|
1927
|
-
}
|
|
1928
|
-
}
|
|
2049
|
+
}>;
|
|
2050
|
+
}
|
|
1929
2051
|
|
|
1930
2052
|
declare type Properties = ListField | SelectField | StringField | NumberField | BooleanField | LabelField;
|
|
1931
2053
|
|
|
@@ -2059,7 +2181,7 @@ export declare interface RangeToXYOptions {
|
|
|
2059
2181
|
shape: Shape1D;
|
|
2060
2182
|
}
|
|
2061
2183
|
|
|
2062
|
-
declare namespace RangeUtilities {
|
|
2184
|
+
export declare namespace RangeUtilities {
|
|
2063
2185
|
export {
|
|
2064
2186
|
getDiaIDs,
|
|
2065
2187
|
getNbAtoms,
|
|
@@ -2071,7 +2193,6 @@ declare namespace RangeUtilities {
|
|
|
2071
2193
|
checkSignalKinds
|
|
2072
2194
|
}
|
|
2073
2195
|
}
|
|
2074
|
-
export { RangeUtilities }
|
|
2075
2196
|
|
|
2076
2197
|
declare function reapplyFilters(datum: Entry1D, options?: {
|
|
2077
2198
|
filters?: Filter1DOptions[];
|
|
@@ -2083,6 +2204,11 @@ declare function reapplyFilters_2(datum: Entry2D, options?: {
|
|
|
2083
2204
|
logger?: Logger;
|
|
2084
2205
|
}): void;
|
|
2085
2206
|
|
|
2207
|
+
export declare function reimComplexBackwardLinearPrediction(data: DataReIm, options: BackwardLPOptions): {
|
|
2208
|
+
re: Float64Array<ArrayBuffer>;
|
|
2209
|
+
im: Float64Array<ArrayBuffer>;
|
|
2210
|
+
};
|
|
2211
|
+
|
|
2086
2212
|
declare function resetDiaIDs(range: Range_2): void;
|
|
2087
2213
|
|
|
2088
2214
|
declare interface RestrictionByCS {
|
|
@@ -2103,6 +2229,13 @@ export declare interface ResurrectOptions {
|
|
|
2103
2229
|
logger?: Logger;
|
|
2104
2230
|
}
|
|
2105
2231
|
|
|
2232
|
+
declare interface ScoreEntry {
|
|
2233
|
+
key: string;
|
|
2234
|
+
value: string;
|
|
2235
|
+
}
|
|
2236
|
+
|
|
2237
|
+
declare type SectionData = AnalysisInfoSection | ScoreEntry[] | ParsedRow[];
|
|
2238
|
+
|
|
2106
2239
|
declare interface SelectField extends Field<any> {
|
|
2107
2240
|
type: 'select';
|
|
2108
2241
|
choices: any[];
|
|
@@ -2212,6 +2345,8 @@ declare interface SignalAxis {
|
|
|
2212
2345
|
* Join couplings smaller than a define tolerance.
|
|
2213
2346
|
* The resulting coupling should be an average of the existing one.
|
|
2214
2347
|
* If pathLength is specified and is not always the same this property will be removed.
|
|
2348
|
+
* @param signal
|
|
2349
|
+
* @param options
|
|
2215
2350
|
*/
|
|
2216
2351
|
export declare function signalJoinCouplings(signal: NMRSignal1D, options?: SignalJoinCouplingsOptions): NMRSignal1D;
|
|
2217
2352
|
|
|
@@ -2242,7 +2377,9 @@ export declare const SignalKindsToInclude: string[];
|
|
|
2242
2377
|
|
|
2243
2378
|
/**
|
|
2244
2379
|
* Return
|
|
2245
|
-
* @param
|
|
2380
|
+
* @param signal
|
|
2381
|
+
* @param options
|
|
2382
|
+
* @param options.acsFormat
|
|
2246
2383
|
*/
|
|
2247
2384
|
export declare function signalMultiplicityPattern(signal: NMRSignal1D, options?: {
|
|
2248
2385
|
acsFormat?: boolean;
|
|
@@ -2255,7 +2392,15 @@ declare interface SignalProcessingFilter extends BaseFilter {
|
|
|
2255
2392
|
value: MatrixOptions;
|
|
2256
2393
|
}
|
|
2257
2394
|
|
|
2258
|
-
export declare function signals2DToZ(signals: NMRSignal2D[], options?: Signals2DToZOptions):
|
|
2395
|
+
export declare function signals2DToZ(signals: NMRSignal2D[], options?: Signals2DToZOptions): {
|
|
2396
|
+
minX: number;
|
|
2397
|
+
maxX: number;
|
|
2398
|
+
minY: number;
|
|
2399
|
+
maxY: number;
|
|
2400
|
+
minZ: number;
|
|
2401
|
+
maxZ: number;
|
|
2402
|
+
z: Float64Array<ArrayBufferLike>[];
|
|
2403
|
+
};
|
|
2259
2404
|
|
|
2260
2405
|
declare interface Signals2DToZOptions {
|
|
2261
2406
|
/**
|
|
@@ -2285,6 +2430,9 @@ declare interface Signals2DToZOptions {
|
|
|
2285
2430
|
|
|
2286
2431
|
/**
|
|
2287
2432
|
* Join signals if all the same diaID
|
|
2433
|
+
* @param signals
|
|
2434
|
+
* @param options
|
|
2435
|
+
* @returns
|
|
2288
2436
|
*/
|
|
2289
2437
|
export declare function signalsJoin(signals: NMRSignal1D[], options?: SignalsJoinOptions): Signal1DWidthJsAndDiaID[];
|
|
2290
2438
|
|
|
@@ -2301,6 +2449,8 @@ export declare interface SignalsJoinOptions {
|
|
|
2301
2449
|
* It does not propagate the hamiltonian of the spin system, instead it simulate all the
|
|
2302
2450
|
* frequencies in the spectrum (including second order) and add all the waves in a real and
|
|
2303
2451
|
* imaginary parts, that is why the couplings should be assigned in order to generate the spin system.
|
|
2452
|
+
* @param signals
|
|
2453
|
+
* @param options
|
|
2304
2454
|
*/
|
|
2305
2455
|
export declare function signalsToFID(signals: NMRSignal1D[], options: SignalsToFIDOptions): {
|
|
2306
2456
|
re: Float64Array<ArrayBuffer>;
|
|
@@ -2361,11 +2511,15 @@ declare interface SignalsToRangesOptions {
|
|
|
2361
2511
|
|
|
2362
2512
|
/**
|
|
2363
2513
|
* Generate a spectrum from an array of singals
|
|
2514
|
+
* @param signals
|
|
2515
|
+
* @param options
|
|
2364
2516
|
*/
|
|
2365
2517
|
export declare function signalsToXY(signals: NMRSignal1D[], options?: OptionsSignalsToXY): DataXY<Float64Array<ArrayBufferLike>>;
|
|
2366
2518
|
|
|
2367
2519
|
/**
|
|
2368
2520
|
* This function simulates a one dimensional nmr spectrum. This function returns an array containing the relative intensities of the spectrum in the specified simulation window (from-to).
|
|
2521
|
+
* @param spinSystemInput
|
|
2522
|
+
* @param options
|
|
2369
2523
|
*/
|
|
2370
2524
|
export declare function simulate1D(spinSystemInput: SpinSystem, options?: Simulate1DOptions): DataXY<Float64Array<ArrayBufferLike>>;
|
|
2371
2525
|
|
|
@@ -2407,6 +2561,11 @@ declare interface Simulate1DOptions {
|
|
|
2407
2561
|
shape?: Shape1D;
|
|
2408
2562
|
}
|
|
2409
2563
|
|
|
2564
|
+
/**
|
|
2565
|
+
* This function will generate an object compatible with NMR-ium
|
|
2566
|
+
* @param molecule
|
|
2567
|
+
* @param options
|
|
2568
|
+
*/
|
|
2410
2569
|
declare interface SimulationOptions {
|
|
2411
2570
|
frequency: number;
|
|
2412
2571
|
oneD?: Partial<OneDOptions>;
|
|
@@ -2470,6 +2629,25 @@ export declare interface SpectraData2DWithIds extends Omit<SpectraData2D, 'zones
|
|
|
2470
2629
|
|
|
2471
2630
|
export declare type SpectraDataWithIds = SpectraData1DWithIds | SpectraData2DWithIds;
|
|
2472
2631
|
|
|
2632
|
+
declare interface Spectrum1DInfo {
|
|
2633
|
+
nucleus: string;
|
|
2634
|
+
dimension: number;
|
|
2635
|
+
isComplex: boolean;
|
|
2636
|
+
originFrequency: number;
|
|
2637
|
+
baseFrequency: number;
|
|
2638
|
+
pulseSequence: string;
|
|
2639
|
+
experiment: string;
|
|
2640
|
+
isFt: boolean;
|
|
2641
|
+
}
|
|
2642
|
+
|
|
2643
|
+
declare interface Spectrum2DInfo {
|
|
2644
|
+
nucleus: string[];
|
|
2645
|
+
originFrequency: string;
|
|
2646
|
+
baseFrequency: string | number;
|
|
2647
|
+
pulseSequence: string;
|
|
2648
|
+
experiment: string;
|
|
2649
|
+
}
|
|
2650
|
+
|
|
2473
2651
|
export declare interface SpinSystem {
|
|
2474
2652
|
/**
|
|
2475
2653
|
* isolated clusters from a similarity/connectivity matrix
|
|
@@ -2607,6 +2785,8 @@ declare function unlink(range: Range_2, options?: UnlinkOptions): Range_2;
|
|
|
2607
2785
|
/**
|
|
2608
2786
|
* Predict back points by singular value decomposition.
|
|
2609
2787
|
* to append the predicted points is it needed to append nbPoints zeros at the beginning of input data.
|
|
2788
|
+
* @param data
|
|
2789
|
+
* @param options
|
|
2610
2790
|
*/
|
|
2611
2791
|
export declare function xBackwardLinearPrediction(data: DoubleArray, options: BackwardLPOptions): {
|
|
2612
2792
|
output: Float64Array<ArrayBufferLike>;
|
|
@@ -2616,6 +2796,8 @@ declare function unlink(range: Range_2, options?: UnlinkOptions): Range_2;
|
|
|
2616
2796
|
/**
|
|
2617
2797
|
* Predict back points by singular value decomposition.
|
|
2618
2798
|
* to append the predicted points is it needed to append nbPoints zeros at the beginning of input data.
|
|
2799
|
+
* @param data
|
|
2800
|
+
* @param options
|
|
2619
2801
|
*/
|
|
2620
2802
|
export declare function xForwardLinearPrediction(data: DoubleArray, options: ForwardLPOptions): {
|
|
2621
2803
|
output: Float64Array<ArrayBufferLike>;
|
|
@@ -2630,6 +2812,8 @@ declare function unlink(range: Range_2, options?: UnlinkOptions): Range_2;
|
|
|
2630
2812
|
/**
|
|
2631
2813
|
* Determination of J couplings by recursive deconvolution in the frequency domain,
|
|
2632
2814
|
* it use the method published by Damien Jeannerat and Geoffrey Bodenhausen @link{https://doi.org/10.1006/jmre.1999.1845}
|
|
2815
|
+
* @param data
|
|
2816
|
+
* @param options
|
|
2633
2817
|
*/
|
|
2634
2818
|
export declare function xreimMultipletAnalysis(
|
|
2635
2819
|
/**
|
|
@@ -2650,11 +2834,15 @@ declare function unlink(range: Range_2, options?: UnlinkOptions): Range_2;
|
|
|
2650
2834
|
|
|
2651
2835
|
/**
|
|
2652
2836
|
* Detect peaks, optimize parameters and compile multiplicity if required.
|
|
2837
|
+
* @param data
|
|
2838
|
+
* @param options
|
|
2653
2839
|
*/
|
|
2654
2840
|
export declare function xyAutoRangesPicking(data: DataXY<Float64Array>, options: OptionsXYAutoRangesPicking): NMRRange[];
|
|
2655
2841
|
|
|
2656
2842
|
/**
|
|
2657
2843
|
* Estimate the diffusion coefficient of an independent component by fitting of imput data with the Stejskal–Tanner equation.
|
|
2844
|
+
* @param data
|
|
2845
|
+
* @param options
|
|
2658
2846
|
*/
|
|
2659
2847
|
export declare function xyCalculateDiffussionCoefficient(
|
|
2660
2848
|
/**
|
|
@@ -2705,10 +2893,12 @@ declare function unlink(range: Range_2, options?: UnlinkOptions): Range_2;
|
|
|
2705
2893
|
* Bidimensional automatic phase correction, based in the idea to see the spectrum as a bitmap,
|
|
2706
2894
|
* where the number of white pixels will be bigger in a phased spectrum (whitening concept). Further information can be found in the
|
|
2707
2895
|
* publication of Balacco and Cobas (DOI: {@link https://doi.org/10.1002/mrc.2394}). This method use a incremental search instead of simplex algorithm.
|
|
2896
|
+
* @param data
|
|
2897
|
+
* @param options
|
|
2708
2898
|
*/
|
|
2709
2899
|
export declare function xyzAutoPhaseCorrection(data: NmrData2DFt, options?: AutoPhaseCorrection2D): Required<PhaseCorrectionTwoDOptions>;
|
|
2710
2900
|
|
|
2711
|
-
export declare function xyzAutoSignalsPicking(spectraData: NmrData2DContent, options: XYZAutoSignalsPickingOptions): NMRSignal2DWithID<
|
|
2901
|
+
export declare function xyzAutoSignalsPicking(spectraData: NmrData2DContent, options: XYZAutoSignalsPickingOptions): NMRSignal2DWithID<Peak2D_2 & {
|
|
2712
2902
|
id: string;
|
|
2713
2903
|
}>[];
|
|
2714
2904
|
|