nmr-processing 17.3.0 → 18.0.0
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 +2 -2
- package/nmr-processing.d.ts +16 -71
- package/nmr-processing.mjs +2 -2
- package/package.json +3 -3
package/nmr-processing.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { AnalizeMultipletOptions } from 'multiplet-analysis';
|
|
2
|
+
import { AtomMapping } from './ctMolfileParser';
|
|
2
3
|
import { BaseRegression } from 'ml-regression-base';
|
|
4
|
+
import { CTSignal } from './ctCreateSignals';
|
|
3
5
|
import type { DataReIm } from 'ml-spectra-processing';
|
|
4
6
|
import type { DataXReIm } from 'ml-spectra-processing';
|
|
5
7
|
import { DataXY } from 'cheminfo-types';
|
|
@@ -12,23 +14,30 @@ import type { GroupedDiaID } from 'openchemlib-utils';
|
|
|
12
14
|
import type { GSDOptions } from 'ml-gsd';
|
|
13
15
|
import { GSDPeakOptimized } from 'ml-gsd';
|
|
14
16
|
import { GSDPeakOptimizedID } from 'ml-gsd';
|
|
17
|
+
import { Jcoupling as Jcoupling_2 } from './Jcoupling';
|
|
15
18
|
import type { JoinBroadPeaksOptions } from 'ml-gsd';
|
|
16
19
|
import { LightLogger } from 'cheminfo-types';
|
|
17
20
|
import type { Logger } from 'cheminfo-types';
|
|
21
|
+
import { MatchingMultiplicity as MatchingMultiplicity_2 } from '..';
|
|
18
22
|
import { Matrix } from 'ml-matrix';
|
|
19
|
-
import type { Molecule } from 'openchemlib
|
|
23
|
+
import type { Molecule } from 'openchemlib';
|
|
20
24
|
import type { NmrData1D } from 'cheminfo-types';
|
|
21
25
|
import type { NmrData2D } from 'cheminfo-types';
|
|
22
26
|
import type { NmrData2DContent } from 'cheminfo-types';
|
|
23
27
|
import type { NmrData2DFt } from 'cheminfo-types';
|
|
28
|
+
import { NMRRange as NMRRange_2 } from './NMRRange';
|
|
24
29
|
import type { NumberArray } from 'cheminfo-types';
|
|
25
30
|
import type { OCLMolecule } from 'cheminfo-types';
|
|
31
|
+
import { OneLetterMultiplet as OneLetterMultiplet_2 } from './MultiplicityPatterns';
|
|
26
32
|
import type { OptimizePeaksOptions } from 'ml-gsd';
|
|
27
33
|
import type { OptionsSG1D } from 'spectrum-generator';
|
|
34
|
+
import { ParsedCoupling } from './ctJSONParser';
|
|
35
|
+
import { ParsedShift } from './ctJSONParser';
|
|
28
36
|
import type { Peak2D as Peak2D_2 } from 'ml-matrix-peaks-finder';
|
|
29
37
|
import type { PeakXYWidth } from 'cheminfo-types';
|
|
30
38
|
import { PointXY } from 'cheminfo-types';
|
|
31
39
|
import type { Shape1D } from 'ml-peak-shape-generator';
|
|
40
|
+
import { SpectraDataWithIds as SpectraDataWithIds_2 } from './nmrAssigment';
|
|
32
41
|
import type { TopicMolecule } from 'openchemlib-utils';
|
|
33
42
|
import type { XDistributionStats } from 'ml-spectra-processing';
|
|
34
43
|
import type { XYEquallySpacedOptions } from 'ml-spectra-processing';
|
|
@@ -127,8 +136,6 @@ export declare interface ApplyWindowOptions {
|
|
|
127
136
|
output?: DoubleArray;
|
|
128
137
|
}
|
|
129
138
|
|
|
130
|
-
declare type Atom = ReturnType<typeof getAtoms>[0];
|
|
131
|
-
|
|
132
139
|
declare interface AtomInput {
|
|
133
140
|
id: ID;
|
|
134
141
|
pid: ID;
|
|
@@ -149,36 +156,6 @@ declare interface AtomInput {
|
|
|
149
156
|
s: ID | null;
|
|
150
157
|
}
|
|
151
158
|
|
|
152
|
-
/**
|
|
153
|
-
* Interface for atom mapping information
|
|
154
|
-
*/
|
|
155
|
-
declare interface AtomMapping {
|
|
156
|
-
label: string;
|
|
157
|
-
atom: number;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
declare interface AtomOutput {
|
|
161
|
-
id: ID;
|
|
162
|
-
parentID: ID;
|
|
163
|
-
name: string;
|
|
164
|
-
remarks: string;
|
|
165
|
-
nucleusType: NucleusType;
|
|
166
|
-
cipRank: {
|
|
167
|
-
canonical: number;
|
|
168
|
-
rd: number;
|
|
169
|
-
nmr: number;
|
|
170
|
-
};
|
|
171
|
-
ordinal: number;
|
|
172
|
-
stereochemistryFlags: number[];
|
|
173
|
-
spinSystemFlags: number[];
|
|
174
|
-
formalcharge: number;
|
|
175
|
-
partialCharge: number;
|
|
176
|
-
coordinates2D: [number, number, number];
|
|
177
|
-
coordinates3D: [number, number, number];
|
|
178
|
-
parent2D: string | null;
|
|
179
|
-
shift: ID | null;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
159
|
declare type AtomTypes = 'H' | 'C';
|
|
183
160
|
|
|
184
161
|
export declare interface AutoPhaseCorrection2D {
|
|
@@ -394,7 +371,7 @@ declare interface CouplingInput {
|
|
|
394
371
|
s: [ID, ID];
|
|
395
372
|
}
|
|
396
373
|
|
|
397
|
-
export declare const couplingPatterns:
|
|
374
|
+
export declare const couplingPatterns: OneLetterMultiplet_2[];
|
|
398
375
|
|
|
399
376
|
export declare function createApodizationWindowData(options: {
|
|
400
377
|
windowOptions: {
|
|
@@ -445,14 +422,6 @@ declare interface CTJSONInput {
|
|
|
445
422
|
b: BondInput[];
|
|
446
423
|
}
|
|
447
424
|
|
|
448
|
-
declare interface CTSignal {
|
|
449
|
-
delta: number;
|
|
450
|
-
diaIDs: string[];
|
|
451
|
-
js: Jcoupling[];
|
|
452
|
-
nbAtoms: number;
|
|
453
|
-
atoms: number[];
|
|
454
|
-
}
|
|
455
|
-
|
|
456
425
|
export declare type DataBaseLevelEntry = number | [number] | [number, number, number, number | null, number] | undefined | XDistributionStats;
|
|
457
426
|
|
|
458
427
|
export declare type DataBaseLevelStructure = Record<string, DataBaseLevelEntry>;
|
|
@@ -730,7 +699,7 @@ export declare namespace Filters2DManager {
|
|
|
730
699
|
* Look for a multiplet based on the pattern name or abbreviation.
|
|
731
700
|
* @param name - pattern name or abbreviation.
|
|
732
701
|
*/
|
|
733
|
-
export declare function findMultiplet(name: string):
|
|
702
|
+
export declare function findMultiplet(name: string): MatchingMultiplicity_2 | undefined;
|
|
734
703
|
|
|
735
704
|
/**
|
|
736
705
|
* Finds a peak that can serve as a pivot point within specified boundaries.
|
|
@@ -871,7 +840,7 @@ export declare function get2DErrorFactor(spectrum: Entry2D): Zone2DError;
|
|
|
871
840
|
|
|
872
841
|
export declare function getAssignments(input: GetAutoAssignmentInput, options?: GetAssignmentsOptions): Promise<{
|
|
873
842
|
score: any;
|
|
874
|
-
assignment:
|
|
843
|
+
assignment: SpectraDataWithIds_2[];
|
|
875
844
|
}[]>;
|
|
876
845
|
|
|
877
846
|
export declare interface GetAssignmentsOptions {
|
|
@@ -919,8 +888,6 @@ export declare interface GetAssignmentsOptions {
|
|
|
919
888
|
};
|
|
920
889
|
}
|
|
921
890
|
|
|
922
|
-
declare function getAtoms(a: AtomInput[]): AtomOutput[];
|
|
923
|
-
|
|
924
891
|
export declare interface GetAutoAssignmentInput {
|
|
925
892
|
spectra: SpectraData[];
|
|
926
893
|
/**
|
|
@@ -1007,7 +974,7 @@ declare interface HOSEPrediction {
|
|
|
1007
974
|
/**
|
|
1008
975
|
* The HOSE code used to make the prediction.
|
|
1009
976
|
*/
|
|
1010
|
-
|
|
977
|
+
hose: string;
|
|
1011
978
|
}
|
|
1012
979
|
|
|
1013
980
|
declare type ID = string;
|
|
@@ -1417,11 +1384,6 @@ declare interface NMRZoneWithIds extends Omit<NMRZone, 'signals' | 'id'> {
|
|
|
1417
1384
|
*/
|
|
1418
1385
|
export declare function normalizeNucleus(nucleus: string): string;
|
|
1419
1386
|
|
|
1420
|
-
declare interface NucleusType {
|
|
1421
|
-
atomicNumber: number;
|
|
1422
|
-
isotope: number;
|
|
1423
|
-
}
|
|
1424
|
-
|
|
1425
1387
|
declare interface NumberField extends Field<number> {
|
|
1426
1388
|
type: 'number';
|
|
1427
1389
|
}
|
|
@@ -1459,7 +1421,7 @@ export declare type OneLetterMultiplet = 's' | 'd' | 't' | 'q' | 'i' | 'h' | 'p'
|
|
|
1459
1421
|
|
|
1460
1422
|
export declare function optimizeSignals(data: DataXY, signals: Signal[], options: OptimizeSignalsOptions): {
|
|
1461
1423
|
delta: number;
|
|
1462
|
-
js:
|
|
1424
|
+
js: Jcoupling_2[];
|
|
1463
1425
|
shape: {
|
|
1464
1426
|
kind: "gaussian" | "lorentzian" | "pseudoVoigt" | "generalizedLorentzian";
|
|
1465
1427
|
fwhm: number;
|
|
@@ -1652,23 +1614,6 @@ export declare function parseCT(json: CTJSONInput, molfile: string, options: {
|
|
|
1652
1614
|
couplings: ParsedCoupling[];
|
|
1653
1615
|
};
|
|
1654
1616
|
|
|
1655
|
-
/**
|
|
1656
|
-
* Interface for coupling data between atoms
|
|
1657
|
-
*/
|
|
1658
|
-
declare interface ParsedCoupling {
|
|
1659
|
-
from: Atom[];
|
|
1660
|
-
to: Atom[];
|
|
1661
|
-
value: number;
|
|
1662
|
-
}
|
|
1663
|
-
|
|
1664
|
-
/**
|
|
1665
|
-
* Interface for chemical shift data
|
|
1666
|
-
*/
|
|
1667
|
-
declare interface ParsedShift {
|
|
1668
|
-
atoms: Atom[];
|
|
1669
|
-
value: number;
|
|
1670
|
-
}
|
|
1671
|
-
|
|
1672
1617
|
export declare interface Peak1D extends Omit<NMRPeak1D, 'id'>, BasePeak {
|
|
1673
1618
|
originalX?: number;
|
|
1674
1619
|
}
|
|
@@ -2930,7 +2875,7 @@ declare function unlink(range: Range_2, options?: UnlinkOptions): Range_2;
|
|
|
2930
2875
|
* @param data
|
|
2931
2876
|
* @param options
|
|
2932
2877
|
*/
|
|
2933
|
-
export declare function xyAutoRangesPicking(data: DataXY<Float64Array>, options: OptionsXYAutoRangesPicking):
|
|
2878
|
+
export declare function xyAutoRangesPicking(data: DataXY<Float64Array>, options: OptionsXYAutoRangesPicking): NMRRange_2[];
|
|
2934
2879
|
|
|
2935
2880
|
/**
|
|
2936
2881
|
* Estimate the diffusion coefficient of an independent component by fitting of imput data with the Stejskal–Tanner equation.
|