openchemlib 8.2.0 → 8.3.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/dist/openchemlib-core.js +142 -142
- package/dist/openchemlib-full.js +157 -157
- package/dist/openchemlib-full.pretty.js +6146 -5569
- package/dist/openchemlib-minimal.js +110 -110
- package/minimal.d.ts +3 -0
- package/package.json +7 -12
- package/types.d.ts +75 -11
package/minimal.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openchemlib",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.3.0",
|
|
4
4
|
"description": "Manipulate molecules",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chemistry",
|
|
@@ -27,9 +27,6 @@
|
|
|
27
27
|
"test": "npm run build && npm run test-only && npm run eslint",
|
|
28
28
|
"test-only": "jest"
|
|
29
29
|
},
|
|
30
|
-
"jest": {
|
|
31
|
-
"testEnvironment": "node"
|
|
32
|
-
},
|
|
33
30
|
"main": "./core.js",
|
|
34
31
|
"files": [
|
|
35
32
|
"dist",
|
|
@@ -56,14 +53,12 @@
|
|
|
56
53
|
"homepage": "https://github.com/cheminfo/openchemlib-js",
|
|
57
54
|
"devDependencies": {
|
|
58
55
|
"benchmark": "^2.1.4",
|
|
59
|
-
"eslint": "^8.
|
|
60
|
-
"eslint-config-cheminfo": "^8.0
|
|
61
|
-
"fs-extra": "^10.1.0",
|
|
56
|
+
"eslint": "^8.37.0",
|
|
57
|
+
"eslint-config-cheminfo": "^8.2.0",
|
|
62
58
|
"gwt-api-exporter": "^2.0.0",
|
|
63
|
-
"jest": "^29.
|
|
64
|
-
"openchemlib-utils": "^2.
|
|
65
|
-
"prettier": "^2.7
|
|
66
|
-
"
|
|
67
|
-
"yargs": "^17.6.0"
|
|
59
|
+
"jest": "^29.5.0",
|
|
60
|
+
"openchemlib-utils": "^2.4.0",
|
|
61
|
+
"prettier": "^2.8.7",
|
|
62
|
+
"yargs": "^17.7.1"
|
|
68
63
|
}
|
|
69
64
|
}
|
package/types.d.ts
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
export interface IMoleculeFromSmilesOptions {
|
|
4
4
|
/**
|
|
5
|
-
* Disable
|
|
5
|
+
* Disable coordinate invention.
|
|
6
|
+
* @default `false`
|
|
6
7
|
*/
|
|
7
8
|
noCoordinates?: boolean;
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
|
-
* Disable stereo features parsing.
|
|
11
|
+
* Disable stereo features parsing.
|
|
12
|
+
* @default `false`
|
|
11
13
|
*/
|
|
12
14
|
noStereo?: boolean;
|
|
13
15
|
}
|
|
@@ -2573,6 +2575,77 @@ export declare class Molecule {
|
|
|
2573
2575
|
setAssignParitiesToNitrogen(b: boolean): void;
|
|
2574
2576
|
}
|
|
2575
2577
|
|
|
2578
|
+
export interface ISmilesParserOptions {
|
|
2579
|
+
/**
|
|
2580
|
+
* Enable SMARTS parsing with `'smarts'` or `'guess'`.
|
|
2581
|
+
* @default `'smiles'`
|
|
2582
|
+
*/
|
|
2583
|
+
smartsMode?: 'smiles' | 'smarts' | 'guess';
|
|
2584
|
+
|
|
2585
|
+
createSmartsWarnings?: boolean;
|
|
2586
|
+
|
|
2587
|
+
skipCoordinateTemplates?: boolean;
|
|
2588
|
+
|
|
2589
|
+
makeHydrogenExplicit?: boolean;
|
|
2590
|
+
|
|
2591
|
+
/**
|
|
2592
|
+
* Disable parsing of CACTVS syntax.
|
|
2593
|
+
*/
|
|
2594
|
+
noCactvs?: boolean;
|
|
2595
|
+
}
|
|
2596
|
+
|
|
2597
|
+
export interface ISmilesParserParseMoleculeOptions {
|
|
2598
|
+
/**
|
|
2599
|
+
* Molecule to parse into.
|
|
2600
|
+
*/
|
|
2601
|
+
molecule?: Molecule;
|
|
2602
|
+
|
|
2603
|
+
/**
|
|
2604
|
+
* Disable coordinate invention.
|
|
2605
|
+
* @default `false`
|
|
2606
|
+
*/
|
|
2607
|
+
noCoordinates?: boolean;
|
|
2608
|
+
|
|
2609
|
+
/**
|
|
2610
|
+
* Disable stereo features parsing.
|
|
2611
|
+
* @default `false`
|
|
2612
|
+
*/
|
|
2613
|
+
noStereo?: boolean;
|
|
2614
|
+
}
|
|
2615
|
+
|
|
2616
|
+
export declare class SmilesParser {
|
|
2617
|
+
/**
|
|
2618
|
+
* Create a SMILES parser.
|
|
2619
|
+
*/
|
|
2620
|
+
constructor(options?: ISmilesParserOptions);
|
|
2621
|
+
|
|
2622
|
+
/**
|
|
2623
|
+
* Set the random seed used to invent coordinates.
|
|
2624
|
+
* @param seed
|
|
2625
|
+
*/
|
|
2626
|
+
setRandomSeed(seed: number): void;
|
|
2627
|
+
|
|
2628
|
+
/**
|
|
2629
|
+
* Parse a SMILES string and return a molecule.
|
|
2630
|
+
*/
|
|
2631
|
+
parseMolecule(
|
|
2632
|
+
smiles: string,
|
|
2633
|
+
options?: ISmilesParserParseMoleculeOptions,
|
|
2634
|
+
): Molecule;
|
|
2635
|
+
|
|
2636
|
+
/**
|
|
2637
|
+
* Parse a SMILES string and return a reaction.
|
|
2638
|
+
*/
|
|
2639
|
+
parseReaction(smiles: string): Reaction;
|
|
2640
|
+
|
|
2641
|
+
/**
|
|
2642
|
+
* If createSmartsWarnings in the constructor was passed as true, then this method
|
|
2643
|
+
* returns a list of all SMARTS features, which could not be interpreted in the most recently
|
|
2644
|
+
* parsed SMILES/SMARTS pattern.
|
|
2645
|
+
*/
|
|
2646
|
+
getSmartsWarning(): string;
|
|
2647
|
+
}
|
|
2648
|
+
|
|
2576
2649
|
export interface MolecularFormula {
|
|
2577
2650
|
absoluteWeight: number;
|
|
2578
2651
|
|
|
@@ -3289,15 +3362,6 @@ export declare class ConformerGenerator {
|
|
|
3289
3362
|
*/
|
|
3290
3363
|
getPotentialConformerCount(): number;
|
|
3291
3364
|
|
|
3292
|
-
/**
|
|
3293
|
-
* With best current knowledge about colliding torsion combinations
|
|
3294
|
-
* and based on the individual frequencies of currently active torsions
|
|
3295
|
-
* this method returns the conformers's overall contribution to the
|
|
3296
|
-
* total set of non colliding conformers.
|
|
3297
|
-
* @returns - This conformer's contribution to all conformers.
|
|
3298
|
-
*/
|
|
3299
|
-
getPreviousConformerContribution(): number;
|
|
3300
|
-
|
|
3301
3365
|
/**
|
|
3302
3366
|
* Returns an iterator of molecule conformers.
|
|
3303
3367
|
*/
|