openchemlib 8.9.0 → 8.10.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 +144 -142
- package/dist/openchemlib-full.js +156 -155
- package/dist/openchemlib-full.pretty.js +1110 -737
- package/dist/openchemlib-minimal.js +110 -108
- package/package.json +2 -1
- package/types.d.ts +31 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openchemlib",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.10.0",
|
|
4
4
|
"description": "Manipulate molecules",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chemistry",
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"homepage": "https://github.com/cheminfo/openchemlib-js",
|
|
72
72
|
"devDependencies": {
|
|
73
|
+
"@types/jest": "^29.5.12",
|
|
73
74
|
"benchmark": "^2.1.4",
|
|
74
75
|
"eslint": "^8.56.0",
|
|
75
76
|
"eslint-config-cheminfo": "^9.1.1",
|
package/types.d.ts
CHANGED
|
@@ -61,6 +61,24 @@ export interface IHoseCodesOptions {
|
|
|
61
61
|
type: 0 | 1;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
export interface ISmilesGeneratorOptions {
|
|
65
|
+
/**
|
|
66
|
+
* Whether to create SMILES with SMARTS capabilities.
|
|
67
|
+
* @default `false`
|
|
68
|
+
*/
|
|
69
|
+
createSmarts?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Whether to include mapping information (atomMapNo) in the SMILES.
|
|
72
|
+
* @default `false`
|
|
73
|
+
*/
|
|
74
|
+
includeMapping?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Should localisation of double bonds be attempted?
|
|
77
|
+
* @default `false`
|
|
78
|
+
*/
|
|
79
|
+
kekulizedOutput?: boolean;
|
|
80
|
+
}
|
|
81
|
+
|
|
64
82
|
export interface Rectangle {
|
|
65
83
|
/**
|
|
66
84
|
* X-coordinate of the top-left corner.
|
|
@@ -93,6 +111,8 @@ export declare class Molecule {
|
|
|
93
111
|
|
|
94
112
|
// based on JSMolecule.java you can do a regexp ".*static.* (int|long|double)(.*) = .*;" and replace with "$2: number;"
|
|
95
113
|
|
|
114
|
+
// bonds to represent aromaticity
|
|
115
|
+
|
|
96
116
|
static CANONIZER_CREATE_SYMMETRY_RANK: number;
|
|
97
117
|
static CANONIZER_CONSIDER_DIASTEREOTOPICITY: number;
|
|
98
118
|
static CANONIZER_CONSIDER_ENANTIOTOPICITY: number;
|
|
@@ -437,7 +457,9 @@ export declare class Molecule {
|
|
|
437
457
|
|
|
438
458
|
toSmiles(): string;
|
|
439
459
|
|
|
440
|
-
|
|
460
|
+
toSmarts(): string;
|
|
461
|
+
|
|
462
|
+
toIsomericSmiles(options?: ISmilesGeneratorOptions): string;
|
|
441
463
|
|
|
442
464
|
/**
|
|
443
465
|
* Returns a MDL Molfile V2000 string.
|
|
@@ -1302,7 +1324,7 @@ export declare class Molecule {
|
|
|
1302
1324
|
* @param mapNo
|
|
1303
1325
|
* @param autoMapped
|
|
1304
1326
|
*/
|
|
1305
|
-
setAtomMapNo(atom: number, mapNo: number, autoMapped
|
|
1327
|
+
setAtomMapNo(atom: number, mapNo: number, autoMapped?: boolean): void;
|
|
1306
1328
|
|
|
1307
1329
|
/**
|
|
1308
1330
|
* Set atom to specific isotop or to have a natural isotop distribution
|
|
@@ -2592,8 +2614,6 @@ export interface ISmilesParserOptions {
|
|
|
2592
2614
|
*/
|
|
2593
2615
|
smartsMode?: 'smiles' | 'smarts' | 'guess';
|
|
2594
2616
|
|
|
2595
|
-
createSmartsWarnings?: boolean;
|
|
2596
|
-
|
|
2597
2617
|
skipCoordinateTemplates?: boolean;
|
|
2598
2618
|
|
|
2599
2619
|
makeHydrogenExplicit?: boolean;
|
|
@@ -2602,6 +2622,13 @@ export interface ISmilesParserOptions {
|
|
|
2602
2622
|
* Disable parsing of CACTVS syntax.
|
|
2603
2623
|
*/
|
|
2604
2624
|
noCactvs?: boolean;
|
|
2625
|
+
|
|
2626
|
+
/**
|
|
2627
|
+
* Consider single dots '.' (rather than '..') as molecule separator when parsing reactions.
|
|
2628
|
+
*/
|
|
2629
|
+
singleDotSeparator?: boolean;
|
|
2630
|
+
|
|
2631
|
+
createSmartsWarnings?: boolean;
|
|
2605
2632
|
}
|
|
2606
2633
|
|
|
2607
2634
|
export interface ISmilesParserParseMoleculeOptions {
|