rdkit-esm 0.5.0 → 0.5.1-rc.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/dist/index.d.ts CHANGED
@@ -2,9 +2,7 @@
2
2
  // Type definitons for RDKit.js
3
3
  // Based on Project: https://github.com/rdkit/rdkit-js
4
4
  // Adapted from definitions by: adam-of-barot <https://github.com/adam-of-barot>
5
-
6
5
  type JSONString = string;
7
-
8
6
  /**
9
7
  * Represents a molecule object generated by RDKit.js
10
8
  *
@@ -17,24 +15,16 @@ interface JSMol {
17
15
  * See {@link https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html#memory-management | Emscripten docs} for more details
18
16
  */
19
17
  delete(): void;
20
-
21
18
  /** Returns true if the underlying C++ object has already been deleted (added by Emscripten) */
22
- isDeleted(): boolean;
23
-
24
- // string representations
25
-
19
+ isDeleted(): boolean; // string representations
26
20
  /** Returns the SMILES string */
27
21
  get_smiles(details_json?: JSONString): string;
28
-
29
22
  /** Returns the Chemaxon Extended SMILES string */
30
23
  get_cxsmiles(details_json?: JSONString): string;
31
-
32
24
  /** Returns the SMARTS string */
33
25
  get_smarts(details_json?: JSONString): string;
34
-
35
26
  /** Returns the Chemaxon Extended SMARTS string */
36
27
  get_cxsmarts(details_json?: JSONString): string;
37
-
38
28
  /**
39
29
  * Returns the V2000 Molfile string, unless the molecule contains V3000 features,
40
30
  * in which case it returns a V3000 Molfile string
@@ -42,19 +32,16 @@ interface JSMol {
42
32
  */
43
33
  get_molblock(): string;
44
34
  get_molblock(options: JSONString): string;
45
-
46
35
  /** Returns the V3000 Molfile string
47
36
  * @param RDKitGetMolBlockOpt as a stringifyed JSON
48
37
  */
49
38
  get_v2Kmolblock(): string;
50
39
  get_v2Kmolblock(options: JSONString): string;
51
-
52
40
  /** Returns the V3000 Molfile string
53
41
  * @param RDKitGetMolBlockOpt as a stringifyed JSON
54
42
  */
55
43
  get_v3Kmolblock(): string;
56
44
  get_v3Kmolblock(options: JSONString): string;
57
-
58
45
  /** Return the InChI string */
59
46
  get_inchi(): string;
60
47
  /**
@@ -62,29 +49,18 @@ interface JSMol {
62
49
  * @example mol.get_inchi("-FixedH -RecMet -SaveOpt -SUU -SLUUD")
63
50
  */
64
51
  get_inchi(args: string): string;
65
-
66
52
  /** Returns the JSON representation */
67
- get_json(): string;
68
-
69
- // array representation
70
-
53
+ get_json(): string; // array representation
71
54
  /** Returns an unsigned integer array representation */
72
- get_as_uint8array(options?: JSONString): Uint8Array;
73
-
74
- // SVG representations
75
-
55
+ get_as_uint8array(options?: JSONString): Uint8Array; // SVG representations
76
56
  /** Returns an SVG of the molecule */
77
57
  get_svg(): string;
78
-
79
58
  /**
80
59
  * Returns an SVG of the molcule, with atoms highlighted
81
60
  *
82
61
  * @param details A stringified JSON object containing any of the following options https://www.rdkitjs.com/#drawing-molecules-all-options
83
62
  */
84
- get_svg_with_highlights(details: string): string;
85
-
86
- // substructure match methods
87
-
63
+ get_svg_with_highlights(details: string): string; // substructure match methods
88
64
  /**
89
65
  * Returns a substructure match string
90
66
  *
@@ -92,27 +68,19 @@ interface JSMol {
92
68
  * @returns A stringified JSON object containing the matched atoms and bonds of the parent molecule
93
69
  */
94
70
  get_substruct_match(q: JSMol): string;
95
-
96
71
  /**
97
72
  * Returns all substructure matches
98
73
  *
99
74
  * @param q query molecule
100
75
  * @returns A stringified JSON object containing the matched atoms and bonds of the parent molecule
101
76
  */
102
- get_substruct_matches(q: JSMol): string;
103
-
104
- // molecular descriptors
105
-
77
+ get_substruct_matches(q: JSMol): string; // molecular descriptors
106
78
  /** Returns a stringified JSON object of molecular descriptors */
107
- get_descriptors(): string;
108
-
109
- // fingerprint methods
110
-
79
+ get_descriptors(): string; // fingerprint methods
111
80
  /**
112
81
  * Returns the Morgan fingerprint as string
113
82
  */
114
83
  get_morgan_fp(): string;
115
-
116
84
  /**
117
85
  * Returns the Morgan fingerprint as string.
118
86
  *
@@ -122,12 +90,10 @@ interface JSMol {
122
90
  * @param {number} nBits fingerprint length
123
91
  */
124
92
  get_morgan_fp(options: JSONString): string;
125
-
126
93
  /**
127
94
  * Returns the Morgan fingerprint as an unsigned integer array
128
95
  */
129
96
  get_morgan_fp_as_uint8array(): Uint8Array;
130
-
131
97
  /**
132
98
  * Returns the Morgan fingerprint as an unsigned integer array
133
99
  *
@@ -137,12 +103,10 @@ interface JSMol {
137
103
  * @param {number} nBits fingerprint length
138
104
  */
139
105
  get_morgan_fp_as_uint8array(options: JSONString): Uint8Array;
140
-
141
106
  /**
142
107
  * Returns the pattern fingerprint as string
143
108
  */
144
109
  get_pattern_fp(): string;
145
-
146
110
  /**
147
111
  * Returns the pattern fingerprint as string
148
112
  *
@@ -151,12 +115,10 @@ interface JSMol {
151
115
  * @param {number} nBits fingerprint length
152
116
  */
153
117
  get_pattern_fp(options: JSONString): string;
154
-
155
118
  /**
156
119
  * Returns the pattern fingerprint as an unsigned integer array
157
120
  */
158
121
  get_pattern_fp_as_uint8array(): Uint8Array;
159
-
160
122
  /**
161
123
  * Returns the pattern fingerprint as an unsigned integer array
162
124
  *
@@ -165,12 +127,10 @@ interface JSMol {
165
127
  * @param {number} nBits fingerprint length
166
128
  */
167
129
  get_pattern_fp_as_uint8array(options: JSONString): Uint8Array;
168
-
169
130
  /**
170
131
  * Returns the topological torsion fingerprint as string
171
132
  */
172
133
  get_topological_torsion_fp(): string;
173
-
174
134
  /**
175
135
  * Returns the topological torsion fingerprint as string
176
136
  *
@@ -179,12 +139,10 @@ interface JSMol {
179
139
  * @param {number} nBits fingerprint length
180
140
  */
181
141
  get_topological_torsion_fp(options: JSONString): string;
182
-
183
142
  /**
184
143
  * Returns the topological torsion fingerprint as an unsigned integer array
185
144
  */
186
145
  get_topological_torsion_fp_as_uint8array(): Uint8Array;
187
-
188
146
  /**
189
147
  * Returns the topological torsion fingerprint as an unsigned integer array
190
148
  *
@@ -193,12 +151,10 @@ interface JSMol {
193
151
  * @param {number} nBits fingerprint length
194
152
  */
195
153
  get_topological_torsion_fp_as_uint8array(options: JSONString): Uint8Array;
196
-
197
154
  /**
198
155
  * Returns the rdkit fingerprint as string
199
156
  */
200
157
  get_rdkit_fp(): string;
201
-
202
158
  /**
203
159
  * Returns the rdkit fingerprint as string
204
160
  *
@@ -207,12 +163,10 @@ interface JSMol {
207
163
  * @param {number} nBits fingerprint length
208
164
  */
209
165
  get_rdkit_fp(options: JSONString): string;
210
-
211
166
  /**
212
167
  * Returns the rdkit fingerprint as an unsigned integer array
213
168
  */
214
169
  get_rdkit_fp_as_uint8array(): Uint8Array;
215
-
216
170
  /**
217
171
  * Returns the rdkit fingerprint as an unsigned integer array
218
172
  *
@@ -221,12 +175,10 @@ interface JSMol {
221
175
  * @param {number} nBits fingerprint length
222
176
  */
223
177
  get_rdkit_fp_as_uint8array(options: JSONString): Uint8Array;
224
-
225
178
  /**
226
179
  * Returns the atom pair fingerprint as string
227
180
  */
228
181
  get_atom_pair_fp(): string;
229
-
230
182
  /**
231
183
  * Returns the atom pair fingerprint as string
232
184
  *
@@ -235,12 +187,10 @@ interface JSMol {
235
187
  * @param {number} nBits fingerprint length
236
188
  */
237
189
  get_atom_pair_fp(options: JSONString): string;
238
-
239
190
  /**
240
191
  * Returns the atom pair fingerprint as an unsigned integer array
241
192
  */
242
193
  get_atom_pair_fp_as_uint8array(): Uint8Array;
243
-
244
194
  /**
245
195
  * Returns the atom pair fingerprint as an unsigned integer array
246
196
  *
@@ -249,12 +199,10 @@ interface JSMol {
249
199
  * @param {number} nBits fingerprint length
250
200
  */
251
201
  get_atom_pair_fp_as_uint8array(options: JSONString): Uint8Array;
252
-
253
202
  /**
254
203
  * Returns the maccs fingerprint as string
255
204
  */
256
205
  get_maccs_fp(): string;
257
-
258
206
  /**
259
207
  * Returns the maccs fingerprint as string
260
208
  *
@@ -263,43 +211,34 @@ interface JSMol {
263
211
  * @param {number} nBits fingerprint length
264
212
  */
265
213
  get_maccs_fp(options: JSONString): string;
266
-
267
214
  /**
268
215
  * Returns the maccs fingerprint as an unsigned integer array
269
216
  */
270
217
  get_maccs_fp_as_uint8array(): Uint8Array;
271
-
272
218
  /**
273
219
  * Returns the Avalon fingerprint as string.
274
220
  * Requires RDKit to be built with Avalon support (RDK_BUILD_AVALON_SUPPORT).
275
221
  */
276
222
  get_avalon_fp(): string;
277
-
278
223
  /**
279
224
  * Returns the Avalon fingerprint as string.
280
225
  * Requires RDKit to be built with Avalon support (RDK_BUILD_AVALON_SUPPORT).
281
226
  * @param options stringified JSON with fingerprint options (nBits, isQuery, bitFlags)
282
227
  */
283
228
  get_avalon_fp(options: JSONString): string;
284
-
285
229
  /**
286
230
  * Returns the Avalon fingerprint as an unsigned integer array.
287
231
  * Requires RDKit to be built with Avalon support (RDK_BUILD_AVALON_SUPPORT).
288
232
  */
289
233
  get_avalon_fp_as_uint8array(): Uint8Array;
290
-
291
234
  /**
292
235
  * Returns the Avalon fingerprint as an unsigned integer array.
293
236
  * Requires RDKit to be built with Avalon support (RDK_BUILD_AVALON_SUPPORT).
294
237
  * @param options stringified JSON with fingerprint options (nBits, isQuery, bitFlags)
295
238
  */
296
- get_avalon_fp_as_uint8array(options: JSONString): Uint8Array;
297
-
298
- // abbreviation methods
299
-
239
+ get_avalon_fp_as_uint8array(options: JSONString): Uint8Array; // abbreviation methods
300
240
  condense_abbreviations(): string;
301
241
  condense_abbreviations(maxCoverage: number, useLinkers: boolean): string;
302
-
303
242
  /**
304
243
  * Condense abbreviations using custom definitions.
305
244
  *
@@ -323,9 +262,7 @@ interface JSMol {
323
262
  * @private This method is not exposed
324
263
  */
325
264
  //condense_abbreviations_from_defs(definitions: string, maxCoverage: number, areLinkers: boolean): string;
326
-
327
265
  // coord generation
328
-
329
266
  /**
330
267
  * Aligns molecule with the template.
331
268
  * you can also specify the following options
@@ -335,10 +272,8 @@ interface JSMol {
335
272
  * @param {boolean} acceptFailure
336
273
  */
337
274
  generate_aligned_coords(templateMol: JSMol, options: JSONString): string;
338
-
339
275
  /** Returns true if the molecule's structure is valid */
340
276
  is_valid(): boolean;
341
-
342
277
  /** Returns the total number of atoms in the molecule */
343
278
  get_num_atoms(): number;
344
279
  /**
@@ -347,59 +282,45 @@ interface JSMol {
347
282
  */
348
283
  get_num_atoms(heavyOnly: boolean): number;
349
284
  get_num_bonds(): number;
350
-
351
285
  /** Check is the molecule has any 2D coordinates generated */
352
286
  has_coords(): 0 | 2 | 3;
353
-
354
287
  /** Returns a stringified JSON object containing the atoms and bonds of stereo centers */
355
288
  get_stereo_tags(): string;
356
-
357
289
  /** Returns the V2000 Molfile representation of the aromatic form of the molecule */
358
290
  get_aromatic_form(): string;
359
-
360
291
  /** Returns the V2000 Molfile representation of the kekule form of the molecule */
361
292
  get_kekule_form(): string;
362
-
363
293
  /** Returns the disconnected fragments of the molecule */
364
294
  get_frags(): {
365
295
  mappings: JSONString;
366
296
  molList: MolList;
367
297
  };
368
-
369
298
  /** Generate new 2D coordinates */
370
299
  set_new_coords(): boolean;
371
-
372
300
  /**
373
301
  * Generate new 2D coordinates
374
302
  *
375
303
  * @param useCoordGen use the CoordGen algorithm
376
304
  */
377
305
  set_new_coords(useCoordGen: boolean): boolean;
378
-
379
306
  /** Return a V2000 Molfile string with newly generated coordinates */
380
307
  get_new_coords(): string;
381
-
382
308
  /**
383
309
  * Return a V2000 Molfile string with newly generated coordinates
384
310
  *
385
311
  * @param useCoordGen use the CoordGen algorithm
386
312
  */
387
- get_new_coords(useCoordGen: boolean): string;
388
-
389
- // property methods
390
-
313
+ get_new_coords(useCoordGen: boolean): string; // property methods
391
314
  /**
392
315
  * Check whether the molecule has a certain property
393
316
  *
394
317
  * @param key property name
395
318
  */
396
319
  has_prop(key: string): boolean;
397
-
398
320
  /** Returns the list of property names */
399
321
  get_prop_list(): StringList;
400
322
  get_prop_list(includePrivate: boolean): StringList;
401
323
  get_prop_list(includePrivate: boolean, includeComputed: boolean): StringList;
402
-
403
324
  /**
404
325
  * Sets a property on the molecule
405
326
  *
@@ -407,7 +328,6 @@ interface JSMol {
407
328
  * @param val property value
408
329
  */
409
330
  set_prop(key: string, val: string): boolean;
410
-
411
331
  /**
412
332
  * Sets a property on the molecule
413
333
  *
@@ -416,23 +336,18 @@ interface JSMol {
416
336
  * @param computed set true to flag the value as computed
417
337
  */
418
338
  set_prop(key: string, val: string, computed: boolean): boolean;
419
-
420
339
  /**
421
340
  * Get a property on the molecule
422
341
  *
423
342
  * @param key property name
424
343
  */
425
344
  get_prop(key: string): string;
426
-
427
345
  /**
428
346
  * Clears a property from the molecule
429
347
  *
430
348
  * @param key property name
431
349
  */
432
- clear_prop(key: string): boolean;
433
-
434
- // hydrogen methods
435
-
350
+ clear_prop(key: string): boolean; // hydrogen methods
436
351
  /**
437
352
  * Remove explicit hydrogens
438
353
  *
@@ -440,43 +355,29 @@ interface JSMol {
440
355
  */
441
356
  remove_hs(): string;
442
357
  remove_hs(options: JSONString): string;
443
-
444
358
  /** Remove explicit hydrogens from the molecule */
445
359
  remove_hs_in_place(): boolean;
446
360
  remove_hs_in_place(options: JSONString): boolean;
447
-
448
361
  /**
449
362
  * Add explicit hydrogens
450
363
  *
451
364
  * @returns V2000 Molfile string with explicit hydrogens
452
365
  */
453
366
  add_hs(): string;
454
-
455
367
  /** Add explicit hydrogens on the molecule */
456
- add_hs_in_place(): boolean;
457
-
458
- // aromaticity methods
459
-
368
+ add_hs_in_place(): boolean; // aromaticity methods
460
369
  convert_to_aromatic_form(): void;
461
370
  convert_to_kekule_form(): void;
462
-
463
371
  /** Add component to the molecule object
464
372
  * @param options stringified JSON object with { offset: [number, number, number] }
465
373
  */
466
374
  combine_with(other: JSMol, options?: string): void;
467
-
468
375
  /** Returns a copy of the molecule */
469
- copy(): JSMol;
470
-
471
- // depiction methods
472
-
376
+ copy(): JSMol; // depiction methods
473
377
  normalize_depiction(): number;
474
378
  normalize_depiction(canonicalize: number): number;
475
379
  normalize_depiction(canonicalize: number, scaleFactor: number): number;
476
- straighten_depiction(smallRotation?: boolean): void;
477
-
478
- // canvas methods
479
-
380
+ straighten_depiction(smallRotation?: boolean): void; // canvas methods
480
381
  /**
481
382
  * Draw the molecule to an HTML5 canvas
482
383
  *
@@ -485,7 +386,6 @@ interface JSMol {
485
386
  * @param height height in pixels
486
387
  */
487
388
  draw_to_canvas(canvas: HTMLCanvasElement, width: number, height: number): void;
488
-
489
389
  /**
490
390
  * Draw the molecule to an HTML5 canvas, with atom highlights
491
391
  *
@@ -493,7 +393,6 @@ interface JSMol {
493
393
  * @param details A stringified JSON object containing any of the following options https://www.rdkitjs.com/#drawing-molecules-all-options
494
394
  */
495
395
  draw_to_canvas_with_highlights(canvas: HTMLCanvasElement, details: string): void;
496
-
497
396
  /**
498
397
  * Draw the molecule to an HTML5 canvas with an offset
499
398
  *
@@ -503,10 +402,7 @@ interface JSMol {
503
402
  * @param width width in pixels
504
403
  * @param height height in pixels
505
404
  */
506
- draw_to_canvas_with_offset(canvas: HTMLCanvasElement, offsetx: number, offsety: number, width: number, height: number): void;
507
-
508
- // PNG I/O
509
-
405
+ draw_to_canvas_with_offset(canvas: HTMLCanvasElement, offsetx: number, offsety: number, width: number, height: number): void; // PNG I/O
510
406
  /**
511
407
  * Embeds molecule data (pickle, SMILES, molblock) into a PNG.
512
408
  * Returns the updated PNG as a Uint8Array.
@@ -515,18 +411,12 @@ interface JSMol {
515
411
  */
516
412
  add_to_png_blob(png: Uint8Array): Uint8Array;
517
413
  /** @see add_to_png_blob */
518
- add_to_png_blob(png: Uint8Array, details: JSONString): Uint8Array;
519
-
520
- // coordinates
521
-
414
+ add_to_png_blob(png: Uint8Array, details: JSONString): Uint8Array; // coordinates
522
415
  /**
523
416
  * Returns the 3D atom coordinates of the molecule's conformer.
524
417
  * Each entry is a `[x, y, z]` triple.
525
418
  */
526
- get_coords(): [number, number, number][];
527
-
528
- // MMPA fragmentation
529
-
419
+ get_coords(): [number, number, number][]; // MMPA fragmentation
530
420
  /**
531
421
  * Performs MMPA (Matched Molecular Pairs Analysis) fragmentation.
532
422
  * Returns cores and sidechains as two `MolList` objects.
@@ -561,14 +451,12 @@ interface SubstructLibrary {
561
451
  * @param m molecule
562
452
  */
563
453
  add_mol(m: JSMol): number;
564
-
565
454
  /**
566
455
  * Add a molecule to the library
567
456
  *
568
457
  * @param smi SMILES string
569
458
  */
570
459
  add_smiles(smi: string): number;
571
-
572
460
  /**
573
461
  * Add a molecule to the library.
574
462
  *
@@ -577,7 +465,6 @@ interface SubstructLibrary {
577
465
  * @param smi SMILES string (trusted to be valid)
578
466
  */
579
467
  add_trusted_smiles(smi: string): number;
580
-
581
468
  /**
582
469
  * Add a molecule to the library with a pre-computed pattern fingerprint.
583
470
  * Skips fingerprint computation — use when you already have the fingerprint.
@@ -586,35 +473,30 @@ interface SubstructLibrary {
586
473
  * @param patternFp pre-computed pattern fingerprint as Uint8Array
587
474
  */
588
475
  add_trusted_smiles_and_pattern_fp(smi: string, patternFp: Uint8Array): number;
589
-
590
476
  /**
591
477
  * Get the stored SMILES string for a molecule in the library
592
478
  *
593
479
  * @param i index of the molecule
594
480
  */
595
481
  get_trusted_smiles(i: number): string;
596
-
597
482
  /**
598
483
  * Get the pattern fingerprint for a molecule in the library
599
484
  *
600
485
  * @param i index of the molecule
601
486
  */
602
487
  get_pattern_fp_as_uint8array(i: number): Uint8Array;
603
-
604
488
  /**
605
489
  * Get a molecule from the library
606
490
  *
607
491
  * @param i index of the molecule
608
492
  */
609
493
  get_mol(i: number): JSMol;
610
-
611
494
  /**
612
495
  * Get all molecules from the library matching the substructure query
613
496
  *
614
497
  * @param q query molecule
615
498
  */
616
499
  get_matches(q: JSMol): string;
617
-
618
500
  /**
619
501
  * Get all molecules from the library matching the substructure query
620
502
  *
@@ -622,7 +504,6 @@ interface SubstructLibrary {
622
504
  * @param maxResults maximum number of results
623
505
  */
624
506
  get_matches(q: JSMol, maxResults: number): string;
625
-
626
507
  /**
627
508
  * Get all molecules from the library matching the substructure query
628
509
  *
@@ -632,14 +513,12 @@ interface SubstructLibrary {
632
513
  * @param maxResults maximum number of results
633
514
  */
634
515
  get_matches(q: JSMol, useChirality: boolean, numThreads: number, maxResults: number): string;
635
-
636
516
  /**
637
517
  * Return the number of substructure matches
638
518
  *
639
519
  * @param q query molecule
640
520
  */
641
521
  count_matches(q: JSMol): number;
642
-
643
522
  /**
644
523
  * Return the number of substructure matches
645
524
  *
@@ -648,10 +527,8 @@ interface SubstructLibrary {
648
527
  * @param numThreads number of threads to use
649
528
  */
650
529
  count_matches(q: JSMol, useChirality: boolean, numThreads: number): number;
651
-
652
530
  /** Return the number of molecules in the library */
653
531
  size(): number;
654
-
655
532
  /**
656
533
  * Get all molecules from the library matching the substructure query.
657
534
  * Returns matching indices as a Uint32Array (more efficient than `get_matches`).
@@ -678,13 +555,11 @@ interface MolList {
678
555
  * @param m molecule
679
556
  */
680
557
  append(m: JSMol): number;
681
-
682
558
  /**
683
559
  * return the molecule at index i, or null if i is out of bounds
684
560
  * @param i position in the list (0-based index)
685
561
  */
686
562
  at(i: number): JSMol | null;
687
-
688
563
  /**
689
564
  * returns true if the current index for iteration is at the end of the list
690
565
  * @returns boolean
@@ -693,7 +568,6 @@ interface MolList {
693
568
  clone: () => MolList;
694
569
  delete: () => void;
695
570
  isDeleted: () => boolean;
696
-
697
571
  /**
698
572
  * Insert a molecule at the specified index
699
573
  * @param i index at which to insert the molecule
@@ -701,25 +575,21 @@ interface MolList {
701
575
  * @returns new size of the list
702
576
  */
703
577
  insert(i: number, m: JSMol): number;
704
-
705
578
  /**
706
579
  * Return the next molecule in the list, or null if at the end of the list. Advances the internal index by 1.
707
580
  * @returns next molecule or null
708
581
  */
709
582
  next: () => JSMol | null;
710
-
711
583
  /**
712
584
  * Returns the molecule at index i and removes it and all subsequent molecules from the list. Returns null if i is out of bounds.
713
585
  * @param i index at which to pop the molecule
714
586
  */
715
587
  pop(i: number): JSMol | null;
716
-
717
588
  /**
718
589
  * Reset the internal index for iteration to the beginning of the list
719
590
  * @returns void
720
591
  */
721
592
  reset: () => void;
722
-
723
593
  /**
724
594
  * Return the current size of the list
725
595
  * @returns size of the list
@@ -735,7 +605,6 @@ interface EmscriptenVector<T> {
735
605
  /** Emscripten vector<string> wrapper */
736
606
  interface StringList extends EmscriptenVector<string> {}
737
607
  // constructor interfaces
738
-
739
608
  /** Returns a new SubstructLibrary instance */
740
609
  interface SubstructLibraryConstructor {
741
610
  new (): SubstructLibrary;
@@ -755,12 +624,10 @@ interface RGroupDecomposition {
755
624
  }[];
756
625
  delete(): void;
757
626
  }
758
-
759
627
  /** The main RDKit module */
760
628
  interface RDKitModule {
761
629
  SubstructLibrary: SubstructLibraryConstructor;
762
630
  MolList: MolListConstructor;
763
-
764
631
  /**
765
632
  * Create a molecule from a variety of input strings.
766
633
  * This will return null if the input is invalid.
@@ -769,7 +636,6 @@ interface RDKitModule {
769
636
  * @param details_json RDKitGetMolOpt
770
637
  */
771
638
  get_mol(input: string, details_json?: string): JSMol | null;
772
-
773
639
  /**
774
640
  * Create a molecule from an integer array
775
641
  *
@@ -777,14 +643,12 @@ interface RDKitModule {
777
643
  * @param details_json RDKitGetMolFromPickleOtions
778
644
  */
779
645
  get_mol_from_uint8array(pklAsUInt8Array: Uint8Array, details_json?: string): JSMol;
780
-
781
646
  /**
782
647
  * Create a copy of a molecule
783
648
  *
784
649
  * @param other molecule to copy
785
650
  */
786
651
  get_mol_copy(other: JSMol): JSMol;
787
-
788
652
  /**
789
653
  * Create a query molecule
790
654
  * This will return null if the input is invalid.
@@ -792,14 +656,12 @@ interface RDKitModule {
792
656
  * @param input SMARTS string
793
657
  */
794
658
  get_qmol(input: string): JSMol | null;
795
-
796
659
  /**
797
660
  * Create a reaction instance
798
661
  * @param input
799
662
  * @param details_json RDKitRxnDetails in JSON string format
800
663
  */
801
664
  get_rxn(input: string, details_json?: JSONString): JSReaction;
802
-
803
665
  /**
804
666
  * Get the InChI key for an InChI string
805
667
  *
@@ -809,7 +671,6 @@ interface RDKitModule {
809
671
  get_mcs_as_json(list: MolList, details_json?: string): string;
810
672
  get_mcs_as_mol(list: MolList, details_json?: string): JSMol;
811
673
  get_mcs_as_smarts(list: MolList, details_json?: string): string;
812
-
813
674
  /**
814
675
  * Zip two molecules together using dummy attachments by default,
815
676
  * or specified labels in the details_json argument
@@ -823,19 +684,16 @@ interface RDKitModule {
823
684
  */
824
685
  molzip(mol1: JSMol, mol2: JSMol, details_json?: string): JSMol;
825
686
  get_rgd(core: JSMol | MolList, details_json?: string): RGroupDecomposition;
826
-
827
687
  /**
828
688
  * Get the version number of the RDKit module
829
689
  */
830
690
  version(): string;
831
-
832
691
  /**
833
692
  * Set whether to prefer the CoordGen library's algorithm for coordinate generation
834
693
  *
835
694
  * @param prefer
836
695
  */
837
696
  prefer_coordgen(prefer: boolean): void;
838
-
839
697
  /**
840
698
  * Set whether to use legacy stereo perception
841
699
  *
@@ -861,7 +719,6 @@ interface RDKitModule {
861
719
  * logHandle.clear_buffer()
862
720
  * logHandle.delete()
863
721
  */
864
-
865
722
  set_log_capture(logLevel: LogLevel): RDKitJSLog;
866
723
  allow_non_tetrahedral_chirality: (allow: boolean) => boolean;
867
724
  }
@@ -878,7 +735,6 @@ type RDKitLoaderOptions = {
878
735
  */
879
736
  locateFile?: () => string;
880
737
  };
881
-
882
738
  /**
883
739
  * Loads the RDKit module asynchronously.
884
740
  * In order to use the RDKit module, calling this function is necessary.
@@ -894,12 +750,10 @@ declare global {
894
750
  /**
895
751
  * Manually generated typings for the RDKit module functions responses and parameters
896
752
  */
897
-
898
753
  type RDKitDescriptorNames = 'exactmw' | 'amw' | 'lipinskiHBA' | 'lipinskiHBD' | 'NumRotatableBonds' | 'NumHBD' | 'NumHBA' | 'NumHeavyAtoms' | 'NumAtoms' | 'NumHeteroatoms' | 'NumAmideBonds' | 'FractionCSP3' | 'NumRings' | 'NumAromaticRings' | 'NumAliphaticRings' | 'NumSaturatedRings' | 'NumHeterocycles' | 'NumAromaticHeterocycles' | 'NumSaturatedHeterocycles' | 'NumAliphaticHeterocycles' | 'NumSpiroAtoms' | 'NumBridgeheadAtoms' | 'NumAtomStereoCenters' | 'NumUnspecifiedAtomStereoCenters' | 'labuteASA' | 'tpsa' | 'CrippenClogP' | 'CrippenMR' | 'chi0v' | 'chi1v' | 'chi2v' | 'chi3v' | 'chi4v' | 'chi0n' | 'chi1n' | 'chi2n' | 'chi3n' | 'chi4n' | 'hallKierAlpha' | 'kappa1' | 'kappa2' | 'kappa3' | 'Phi';
899
754
  type RDKitDescriptors = Record<RDKitDescriptorNames, number>;
900
755
  type RDKitJsonAtom = {
901
- chg: number;
902
- /** Implicit Hydrogens count */
756
+ chg: number; /** Implicit Hydrogens count */
903
757
  impHs: number;
904
758
  isotope: number;
905
759
  nRad: number;
@@ -907,8 +761,7 @@ type RDKitJsonAtom = {
907
761
  z: number;
908
762
  };
909
763
  type RDKitJsonBond = {
910
- /** Bond order */
911
- bo: number;
764
+ /** Bond order */bo: number;
912
765
  stereo: 'unspecified' | 'cis' | 'trans' | 'either';
913
766
  stereoAtoms: [number, number];
914
767
  atoms: [number, number];
@@ -950,180 +803,93 @@ type ColourPalette = {
950
803
  [k: number]: DrawColour;
951
804
  };
952
805
  type RDKitDepictionDetails = {
953
- /** Drawing width in pixels */
954
- width: number;
955
- /** Drawing height in pixels */
956
- height: number;
957
- /** X offset for drawing origin in pixels */
958
- offsetx: number;
959
- /** Y offset for drawing origin in pixels */
960
- offsety: number;
961
- /** Toggles replacing 2H with D and 3H with T */
962
- atomLabelDeuteriumTritium: boolean;
963
- /** Draws "breaks" at dummy atoms */
964
- dummiesAreAttachments: boolean;
965
- /** Draws circles under highlighted atoms */
966
- circleAtoms: boolean;
967
- /** Split bonds into per-atom segments; most useful for dynamic manipulation of drawing, especially for SVG */
968
- splitBonds: boolean;
969
- /** Default highlight color */
970
- highlightColour: DrawColour;
971
- /** Highlight by drawing an outline *underneath* the molecule */
972
- continuousHighlight: boolean;
973
- /** Fill the areas used to highlight atoms and atom regions */
974
- fillHighlights: boolean;
975
- /** Default highlight radius if nothing given for a particular atom; units are Angstrom */
976
- highlightRadius: number;
977
- /** If positive, used as a cutoff (in pixels) for highlighting close contacts */
978
- flagCloseContactsDist: number;
979
- /** Toggles inclusion of atom tags in the output; does not make sense for all renderers */
980
- includeAtomTags: boolean;
981
- /** Toggles clearing the background before drawing a molecule */
982
- clearBackground: boolean;
983
- /** Color to be used while clearing the background */
984
- backgroundColour: DrawColour;
985
- /** Color to be used for query bonds */
986
- queryColour: DrawColour;
987
- /** Font size (in pixels) to be used for the legend (if present) */
988
- legendFontSize: number;
989
- /** Fraction of the draw panel to be used for the legend if present */
990
- legendFraction: number;
991
- /** Maximum size in pixels for font in drawn molecule; -1 means no max */
992
- maxFontSize: number;
993
- /** Minimum size in pixels for font in drawn molecule; -1 means no min */
994
- minFontSize: number;
995
- /** Font size to use, in pixels; default -1 means not fixed. If set, always used irrespective of scale, minFontSize and maxFontSize */
996
- fixedFontSize: number;
997
- /** Scales font relative to atom labels for atom and bond annotation */
998
- annotationFontScale: number;
999
- /** Name of font file for freetype rendering; if given, over-rides default (BuiltinTelexRegular). Can also be BuiltinRobotoRegular */
1000
- fontFile: string;
1001
- /** Color to be used for the legend (if present) */
1002
- legendColour: DrawColour;
1003
- /** Offset for the extra lines in a multiple bond, as a fraction of mean bond length */
1004
- multipleBondOffset: number;
1005
- /** Fraction of empty space to leave around the molecule */
1006
- padding: number;
1007
- /** Fraction of empty space to leave around each component in a reaction drawing */
1008
- componentPadding: number;
1009
- /** Additional padding to leave around atom labels; expressed as a fraction of the font size */
1010
- additionalAtomLabelPadding: number;
1011
- /** Replacement labels for atoms */
1012
- atomLabels: Record<number, string>;
1013
- /** Disables inclusion of atom labels in the rendering */
1014
- noAtomLabels: boolean;
1015
- /** Atom regions */
1016
- atomRegions: number[][];
1017
- /** Color to be used for the symbols and arrows in reactions */
1018
- symbolColour: DrawColour;
1019
- /** Color to be used for annotations */
1020
- annotationColour: DrawColour;
1021
- /** Color to be used for atom indices and notes */
1022
- atomNoteColour: DrawColour;
1023
- /** Color to be used for bond indices and notes */
1024
- bondNoteColour: DrawColour;
1025
- /** Default line width when drawing bonds */
1026
- bondLineWidth: number;
1027
- /** Whether to apply scale() to the bond width */
1028
- scaleBondWidth: boolean;
1029
- /** Whether to apply scale() to bond highlight widths */
1030
- scaleHighlightBondWidth: boolean;
1031
- /** Multiplier for standard bond width used for highlighting */
1032
- highlightBondWidthMultiplier: number;
1033
- /** Call prepareMolForDrawing() on each molecule passed to drawMolecules() */
1034
- prepareMolsBeforeDrawing: boolean;
1035
- /** Defines 10 default colors for highlighting atoms and bonds or reactants in reactions */
1036
- highlightColourPalette: DrawColour[];
1037
- /** The palette used to assign colors to atoms based on atomic number */
1038
- atomColourPalette: ColourPalette;
1039
- /** Fixes scale to this fraction of draw window width so an average bond is this fraction of the width; -1.0 means no fix */
1040
- fixedScale: number;
1041
- /** Fixes the bond length (and hence the scale) to always be this number of pixels; -1.0 means no fix. If both fixedScale and fixedBondLength are > 0, fixedScale wins */
1042
- fixedBondLength: number;
1043
- /** Angle in degrees to rotate coords by about centre before drawing */
1044
- rotate: number;
1045
- /** Adds atom indices to drawings */
1046
- addAtomIndices: boolean;
1047
- /** Adds bond indices to drawings */
1048
- addBondIndices: boolean;
1049
- /** Adds isotope labels to non-dummy atoms */
1050
- isotopeLabels: boolean;
1051
- /** Adds isotope labels to dummy atoms */
1052
- dummyIsotopeLabels: boolean;
1053
- /** Adds E/Z and R/S stereo annotations to drawings */
1054
- addStereoAnnotation: boolean;
1055
- /** Show CIP codes for 'or' and 'and' StereoGroups that are normally hidden */
1056
- showAllCIPCodes: boolean;
1057
- /** Forces atom highlights always to be circles; default (false) puts ellipses round longer labels */
1058
- atomHighlightsAreCircles: boolean;
1059
- /** Highlight style for multi-colour highlights */
1060
- multiColourHighlightStyle: 'CIRCLEANDLINE' | 'LASSO';
1061
- /** Moves the centre of the drawn molecule to (0,0) */
1062
- centreMoleculesBeforeDrawing: boolean;
1063
- /** Which elements should be included when computing drawing extents; bitmask of DrawElement flags (PRESHAPES=1, BONDS=2, ATOMLABELS=4, HIGHLIGHTS=8, ANNOTATIONS=16, RADICALS=32, POSTSHAPES=64, ALL=0x7fffffff) */
1064
- drawingExtentsInclude: number;
1065
- /** Draw terminal methyl and related groups as CH3 */
1066
- explicitMethyl: boolean;
1067
- /** Include radicals in the drawing; can be useful to turn off for reactions and queries */
1068
- includeRadicals: boolean;
1069
- /** When possible, include metadata about molecules and reactions in the output to allow them to be reconstructed */
1070
- includeMetadata: boolean;
1071
- /** Simulate hand-drawn lines for bonds; when combined with a font like Comic-Sans or Comic-Neue, gives xkcd-like drawings */
1072
- comicMode: boolean;
1073
- /** Multiplier for standard bond width used for variable attachment points */
1074
- variableBondWidthMultiplier: number;
1075
- /** Radius value to use for atoms involved in variable attachment points */
1076
- variableAtomRadius: number;
1077
- /** Colour to use for variable attachment points */
1078
- variableAttachmentColour: DrawColour;
1079
- /** Add a molecule annotation with "ABS" if the chiral flag is set */
1080
- includeChiralFlagLabel: boolean;
1081
- /** If all specified stereocenters are in a single StereoGroup, show a molecule-level annotation instead of the individual labels */
1082
- simplifiedStereoGroupLabel: boolean;
1083
- /** If true, double bonds with unspecified stereo are drawn crossed; potential stereocenters with unspecified stereo are drawn with a wavy bond */
1084
- unspecifiedStereoIsUnknown: boolean;
1085
- /** If true, wedged and dashed bonds are drawn using symbolColour rather than inheriting their colour from the atoms */
1086
- singleColourWedgeBonds: boolean;
1087
- /** If the molecule came from a MolBlock, prefer the wedging information it provides; if false, use RDKit rules */
1088
- useMolBlockWedging: boolean;
1089
- /** Scaling factor used for pixels-to-angstrom conversion when auto scaling is being used */
1090
- scalingFactor: number;
1091
- /** When > 0, sets the baseFontSize for text drawing; reference: default DrawText::baseFontSize is 0.6 */
1092
- baseFontSize: number;
1093
- /** When drawing multiple molecules with DrawMolecules, forces them to use the same scale */
1094
- drawMolsSameScale: boolean;
1095
- /** Replace any-atom, any-hetero, any-halo queries with complex query symbols A, Q, X, M, optionally followed by H if hydrogen is included (except for AH, which stays *) */
1096
- useComplexQueryAtomSymbols: boolean;
1097
- /** If true, puts brackets round atom lists in query atoms */
1098
- bracketsAroundAtomLists: boolean;
1099
- /** Atom indices to highlight */
1100
- atoms: number[];
1101
- /** Bond indices to highlight */
1102
- bonds: number[];
1103
- /** Per-atom highlight colors, keyed by atom index */
1104
- highlightAtomColors: Record<number, DrawColour>;
1105
- /** Per-bond highlight colors, keyed by bond index */
1106
- highlightBondColors: Record<number, DrawColour>;
1107
- /** If true, highlighted hetero atoms are drawn in standard colours rather than black */
1108
- standardColoursForHighlightedAtoms: boolean;
1109
- // Drawing call parameters (parsed from the details JSON by common.h, not part of MolDrawOptions)
806
+ /** Drawing width in pixels */width: number; /** Drawing height in pixels */
807
+ height: number; /** X offset for drawing origin in pixels */
808
+ offsetx: number; /** Y offset for drawing origin in pixels */
809
+ offsety: number; /** Toggles replacing 2H with D and 3H with T */
810
+ atomLabelDeuteriumTritium: boolean; /** Draws "breaks" at dummy atoms */
811
+ dummiesAreAttachments: boolean; /** Draws circles under highlighted atoms */
812
+ circleAtoms: boolean; /** Split bonds into per-atom segments; most useful for dynamic manipulation of drawing, especially for SVG */
813
+ splitBonds: boolean; /** Default highlight color */
814
+ highlightColour: DrawColour; /** Highlight by drawing an outline *underneath* the molecule */
815
+ continuousHighlight: boolean; /** Fill the areas used to highlight atoms and atom regions */
816
+ fillHighlights: boolean; /** Default highlight radius if nothing given for a particular atom; units are Angstrom */
817
+ highlightRadius: number; /** If positive, used as a cutoff (in pixels) for highlighting close contacts */
818
+ flagCloseContactsDist: number; /** Toggles inclusion of atom tags in the output; does not make sense for all renderers */
819
+ includeAtomTags: boolean; /** Toggles clearing the background before drawing a molecule */
820
+ clearBackground: boolean; /** Color to be used while clearing the background */
821
+ backgroundColour: DrawColour; /** Color to be used for query bonds */
822
+ queryColour: DrawColour; /** Font size (in pixels) to be used for the legend (if present) */
823
+ legendFontSize: number; /** Fraction of the draw panel to be used for the legend if present */
824
+ legendFraction: number; /** Maximum size in pixels for font in drawn molecule; -1 means no max */
825
+ maxFontSize: number; /** Minimum size in pixels for font in drawn molecule; -1 means no min */
826
+ minFontSize: number; /** Font size to use, in pixels; default -1 means not fixed. If set, always used irrespective of scale, minFontSize and maxFontSize */
827
+ fixedFontSize: number; /** Scales font relative to atom labels for atom and bond annotation */
828
+ annotationFontScale: number; /** Name of font file for freetype rendering; if given, over-rides default (BuiltinTelexRegular). Can also be BuiltinRobotoRegular */
829
+ fontFile: string; /** Color to be used for the legend (if present) */
830
+ legendColour: DrawColour; /** Offset for the extra lines in a multiple bond, as a fraction of mean bond length */
831
+ multipleBondOffset: number; /** Fraction of empty space to leave around the molecule */
832
+ padding: number; /** Fraction of empty space to leave around each component in a reaction drawing */
833
+ componentPadding: number; /** Additional padding to leave around atom labels; expressed as a fraction of the font size */
834
+ additionalAtomLabelPadding: number; /** Replacement labels for atoms */
835
+ atomLabels: Record<number, string>; /** Disables inclusion of atom labels in the rendering */
836
+ noAtomLabels: boolean; /** Atom regions */
837
+ atomRegions: number[][]; /** Color to be used for the symbols and arrows in reactions */
838
+ symbolColour: DrawColour; /** Color to be used for annotations */
839
+ annotationColour: DrawColour; /** Color to be used for atom indices and notes */
840
+ atomNoteColour: DrawColour; /** Color to be used for bond indices and notes */
841
+ bondNoteColour: DrawColour; /** Default line width when drawing bonds */
842
+ bondLineWidth: number; /** Whether to apply scale() to the bond width */
843
+ scaleBondWidth: boolean; /** Whether to apply scale() to bond highlight widths */
844
+ scaleHighlightBondWidth: boolean; /** Multiplier for standard bond width used for highlighting */
845
+ highlightBondWidthMultiplier: number; /** Call prepareMolForDrawing() on each molecule passed to drawMolecules() */
846
+ prepareMolsBeforeDrawing: boolean; /** Defines 10 default colors for highlighting atoms and bonds or reactants in reactions */
847
+ highlightColourPalette: DrawColour[]; /** The palette used to assign colors to atoms based on atomic number */
848
+ atomColourPalette: ColourPalette; /** Fixes scale to this fraction of draw window width so an average bond is this fraction of the width; -1.0 means no fix */
849
+ fixedScale: number; /** Fixes the bond length (and hence the scale) to always be this number of pixels; -1.0 means no fix. If both fixedScale and fixedBondLength are > 0, fixedScale wins */
850
+ fixedBondLength: number; /** Angle in degrees to rotate coords by about centre before drawing */
851
+ rotate: number; /** Adds atom indices to drawings */
852
+ addAtomIndices: boolean; /** Adds bond indices to drawings */
853
+ addBondIndices: boolean; /** Adds isotope labels to non-dummy atoms */
854
+ isotopeLabels: boolean; /** Adds isotope labels to dummy atoms */
855
+ dummyIsotopeLabels: boolean; /** Adds E/Z and R/S stereo annotations to drawings */
856
+ addStereoAnnotation: boolean; /** Show CIP codes for 'or' and 'and' StereoGroups that are normally hidden */
857
+ showAllCIPCodes: boolean; /** Forces atom highlights always to be circles; default (false) puts ellipses round longer labels */
858
+ atomHighlightsAreCircles: boolean; /** Highlight style for multi-colour highlights */
859
+ multiColourHighlightStyle: 'CIRCLEANDLINE' | 'LASSO'; /** Moves the centre of the drawn molecule to (0,0) */
860
+ centreMoleculesBeforeDrawing: boolean; /** Which elements should be included when computing drawing extents; bitmask of DrawElement flags (PRESHAPES=1, BONDS=2, ATOMLABELS=4, HIGHLIGHTS=8, ANNOTATIONS=16, RADICALS=32, POSTSHAPES=64, ALL=0x7fffffff) */
861
+ drawingExtentsInclude: number; /** Draw terminal methyl and related groups as CH3 */
862
+ explicitMethyl: boolean; /** Include radicals in the drawing; can be useful to turn off for reactions and queries */
863
+ includeRadicals: boolean; /** When possible, include metadata about molecules and reactions in the output to allow them to be reconstructed */
864
+ includeMetadata: boolean; /** Simulate hand-drawn lines for bonds; when combined with a font like Comic-Sans or Comic-Neue, gives xkcd-like drawings */
865
+ comicMode: boolean; /** Multiplier for standard bond width used for variable attachment points */
866
+ variableBondWidthMultiplier: number; /** Radius value to use for atoms involved in variable attachment points */
867
+ variableAtomRadius: number; /** Colour to use for variable attachment points */
868
+ variableAttachmentColour: DrawColour; /** Add a molecule annotation with "ABS" if the chiral flag is set */
869
+ includeChiralFlagLabel: boolean; /** If all specified stereocenters are in a single StereoGroup, show a molecule-level annotation instead of the individual labels */
870
+ simplifiedStereoGroupLabel: boolean; /** If true, double bonds with unspecified stereo are drawn crossed; potential stereocenters with unspecified stereo are drawn with a wavy bond */
871
+ unspecifiedStereoIsUnknown: boolean; /** If true, wedged and dashed bonds are drawn using symbolColour rather than inheriting their colour from the atoms */
872
+ singleColourWedgeBonds: boolean; /** If the molecule came from a MolBlock, prefer the wedging information it provides; if false, use RDKit rules */
873
+ useMolBlockWedging: boolean; /** Scaling factor used for pixels-to-angstrom conversion when auto scaling is being used */
874
+ scalingFactor: number; /** When > 0, sets the baseFontSize for text drawing; reference: default DrawText::baseFontSize is 0.6 */
875
+ baseFontSize: number; /** When drawing multiple molecules with DrawMolecules, forces them to use the same scale */
876
+ drawMolsSameScale: boolean; /** Replace any-atom, any-hetero, any-halo queries with complex query symbols A, Q, X, M, optionally followed by H if hydrogen is included (except for AH, which stays *) */
877
+ useComplexQueryAtomSymbols: boolean; /** If true, puts brackets round atom lists in query atoms */
878
+ bracketsAroundAtomLists: boolean; /** Atom indices to highlight */
879
+ atoms: number[]; /** Bond indices to highlight */
880
+ bonds: number[]; /** Per-atom highlight colors, keyed by atom index */
881
+ highlightAtomColors: Record<number, DrawColour>; /** Per-bond highlight colors, keyed by bond index */
882
+ highlightBondColors: Record<number, DrawColour>; /** If true, highlighted hetero atoms are drawn in standard colours rather than black */
883
+ standardColoursForHighlightedAtoms: boolean; // Drawing call parameters (parsed from the details JSON by common.h, not part of MolDrawOptions)
1110
884
  /** Caption text to display below the molecule (distinct from legendFontSize/legendColour which control its appearance) */
1111
- legend: string;
1112
- /** Panel width in pixels for multi-panel or grid drawings */
1113
- panelWidth: number;
1114
- /** Panel height in pixels for multi-panel or grid drawings */
1115
- panelHeight: number;
1116
- /** Disable freetype font rendering and use the built-in font instead */
1117
- noFreetype: boolean;
1118
- /** Pre-kekulize the molecule before drawing */
1119
- kekulize: boolean;
1120
- /** Add chiral hydrogen atoms before drawing */
1121
- addChiralHs: boolean;
1122
- /** Control bond wedging in the drawing */
1123
- wedgeBonds: boolean;
1124
- /** Force use of existing coordinates rather than generating new ones */
1125
- forceCoords: boolean;
1126
- /** Draw wavy bonds for double bonds with unspecified stereo */
885
+ legend: string; /** Panel width in pixels for multi-panel or grid drawings */
886
+ panelWidth: number; /** Panel height in pixels for multi-panel or grid drawings */
887
+ panelHeight: number; /** Disable freetype font rendering and use the built-in font instead */
888
+ noFreetype: boolean; /** Pre-kekulize the molecule before drawing */
889
+ kekulize: boolean; /** Add chiral hydrogen atoms before drawing */
890
+ addChiralHs: boolean; /** Control bond wedging in the drawing */
891
+ wedgeBonds: boolean; /** Force use of existing coordinates rather than generating new ones */
892
+ forceCoords: boolean; /** Draw wavy bonds for double bonds with unspecified stereo */
1127
893
  wavyBonds: boolean;
1128
894
  /** Return atom drawing coordinates in the output JSON
1129
895
  * IMPORTANT: this changes the output format in the case of get_svg...()
@@ -1158,31 +924,21 @@ type RDKitGetMolOpt = {
1158
924
  sanitize: boolean;
1159
925
  removeHs: boolean;
1160
926
  assignStereo: boolean;
1161
- mergeQueryHs: boolean;
1162
- /** Assign chiral types from molfile parity flags */
1163
- assignChiralTypesFromMolParity: boolean;
1164
- /** Convert mapped dummy atoms to query atoms */
1165
- makeDummiesQueries: boolean;
1166
- /** Apply strict parsing rules to CXSMILES input */
1167
- strictCXSMILES: boolean;
1168
- /** Apply strict parsing rules to Molfile input */
927
+ mergeQueryHs: boolean; /** Assign chiral types from molfile parity flags */
928
+ assignChiralTypesFromMolParity: boolean; /** Convert mapped dummy atoms to query atoms */
929
+ makeDummiesQueries: boolean; /** Apply strict parsing rules to CXSMILES input */
930
+ strictCXSMILES: boolean; /** Apply strict parsing rules to Molfile input */
1169
931
  strictParsing: boolean;
1170
932
  };
1171
933
  type RDKitGetMolBlockOptions = {
1172
- /** @default true */
1173
- includeStereo: boolean;
1174
- /** @default true */
1175
- kekulize: boolean;
1176
- /** @default false */
1177
- useMolBlockWedging: boolean;
1178
- /** @default false */
1179
- addChiralHs: boolean;
1180
- /** @default 'AUTO' */
934
+ /** @default true */includeStereo: boolean; /** @default true */
935
+ kekulize: boolean; /** @default false */
936
+ useMolBlockWedging: boolean; /** @default false */
937
+ addChiralHs: boolean; /** @default 'AUTO' */
1181
938
  forceMDLVersion: 'AUTO' | 'V2000' | 'V3000';
1182
939
  };
1183
940
  type RDKitGetSmilesOptions = {
1184
- /** Include stereochemistry and isotope information @default true */
1185
- doIsomericSmiles: boolean;
941
+ /** Include stereochemistry and isotope information @default true */doIsomericSmiles: boolean;
1186
942
  /**
1187
943
  * Kekulize the molecule before generating the SMILES and output
1188
944
  * single/double bonds. NOTE that the output is not canonical and that this
@@ -1195,12 +951,9 @@ type RDKitGetSmilesOptions = {
1195
951
  * is not canonical and the value of the canonical parameter will be ignored.
1196
952
  * @default -1
1197
953
  */
1198
- rootedAtAtom: number;
1199
- /** Generate canonical SMILES @default true */
1200
- canonical: boolean;
1201
- /** Include symbols for all bonds @default false */
1202
- allBondsExplicit: boolean;
1203
- /** Provide hydrogen counts for every atom @default false */
954
+ rootedAtAtom: number; /** Generate canonical SMILES @default true */
955
+ canonical: boolean; /** Include symbols for all bonds @default false */
956
+ allBondsExplicit: boolean; /** Provide hydrogen counts for every atom @default false */
1204
957
  allHsExplicit: boolean;
1205
958
  /**
1206
959
  * Randomize the output order. The resulting SMILES is not canonical and
@@ -1213,13 +966,11 @@ type RDKitGetSmilesOptions = {
1213
966
  type CxSmilesField = 'NONE' | 'ATOM_LABELS' | 'MOLFILE_VALUES' | 'COORDS' | 'RADICALS' | 'ATOM_PROPS' | 'LINKNODES' | 'ENHANCEDSTEREO' | 'SGROUPS' | 'POLYMER' | 'BOND_CFG' | 'BOND_ATROPISOMER' | 'COORDINATE_BONDS' | 'HYDROGEN_BONDS' | 'ZERO_BONDS' | 'ALL' | 'ALL_BUT_COORDS';
1214
967
  type PropertyPickleOptionsKeys = 'NoProps' // no data pickled, single precision coordinates
1215
968
  | 'MolProps' // only public non computed properties
1216
- | 'AtomProps' | 'BondProps'
1217
- // | 'QueryAtomData' // DEPRECATED, same as AtomProps when set
969
+ | 'AtomProps' | 'BondProps' // | 'QueryAtomData' // DEPRECATED, same as AtomProps when set
1218
970
  | 'PrivateProps' | 'ComputedProps' | 'AllProps' // all data pickled
1219
971
  | 'CoordsAsDouble' // save coordinates in double precision
1220
972
  | 'NoConformers';
1221
973
  // do not include conformers or associated properties
1222
-
1223
974
  type RDKitGetMCSOptions = {
1224
975
  MaximizeBonds: boolean;
1225
976
  Threshold: number;
@@ -1262,101 +1013,58 @@ type RDKitMCSResult = {
1262
1013
  smarts: string | string[];
1263
1014
  };
1264
1015
  type RDKitMorganFPOptions = {
1265
- /** @default 2 */
1266
- radius: number;
1267
- /** @default 2048 */
1268
- nBits: number;
1269
- /** @default false */
1270
- useCountSimulation: boolean;
1271
- /** @default false */
1272
- useChirality: boolean;
1273
- /** @default true */
1274
- useBondTypes: boolean;
1275
- /** @default false */
1276
- includeRedundantEnvironments: boolean;
1277
- /** @default false */
1016
+ /** @default 2 */radius: number; /** @default 2048 */
1017
+ nBits: number; /** @default false */
1018
+ useCountSimulation: boolean; /** @default false */
1019
+ useChirality: boolean; /** @default true */
1020
+ useBondTypes: boolean; /** @default false */
1021
+ includeRedundantEnvironments: boolean; /** @default false */
1278
1022
  onlyNonzeroInvariants: boolean;
1279
1023
  };
1280
1024
  type RDKitPatternFPOptions = {
1281
- /** @default 2048 */
1282
- nBits: number;
1283
- /** @default false */
1025
+ /** @default 2048 */nBits: number; /** @default false */
1284
1026
  tautomericFingerprint: boolean;
1285
1027
  };
1286
1028
  type RDKitTopologicalTorsionFPOptions = {
1287
- /** @default 2048 */
1288
- nBits: number;
1289
- /** @default false */
1290
- useChirality: boolean;
1291
- /** @default 4 */
1292
- torsionAtomCount: number;
1293
- /** @default true */
1029
+ /** @default 2048 */nBits: number; /** @default false */
1030
+ useChirality: boolean; /** @default 4 */
1031
+ torsionAtomCount: number; /** @default true */
1294
1032
  useCountSimulation: boolean;
1295
1033
  };
1296
1034
  type RDKitRdkitFpOptions = {
1297
- /** @default 2048 */
1298
- nBits: number;
1299
- /** @default 2 */
1300
- nBitsPerHash: number;
1301
- /** @default 1 */
1302
- minPath: number;
1303
- /** @default 7 */
1304
- maxPath: number;
1305
- /** @default true */
1306
- useBondOrder: boolean;
1307
- /** @default true */
1308
- branchedPaths: boolean;
1309
- /** @default false */
1310
- useCountSimulation: boolean;
1311
- /** @default true */
1035
+ /** @default 2048 */nBits: number; /** @default 2 */
1036
+ nBitsPerHash: number; /** @default 1 */
1037
+ minPath: number; /** @default 7 */
1038
+ maxPath: number; /** @default true */
1039
+ useBondOrder: boolean; /** @default true */
1040
+ branchedPaths: boolean; /** @default false */
1041
+ useCountSimulation: boolean; /** @default true */
1312
1042
  useHs: boolean;
1313
1043
  };
1314
1044
  type RDKitAtomPairFPOptions = {
1315
- /** @default 2048 */
1316
- nBits: number;
1317
- /** @default false */
1318
- useChirality: boolean;
1319
- /** @default 1 */
1320
- minLength: number;
1321
- /** @default 30 */
1322
- maxLength: number;
1323
- /** @default true */
1324
- useCountSimulation: boolean;
1325
- /** @default true */
1045
+ /** @default 2048 */nBits: number; /** @default false */
1046
+ useChirality: boolean; /** @default 1 */
1047
+ minLength: number; /** @default 30 */
1048
+ maxLength: number; /** @default true */
1049
+ useCountSimulation: boolean; /** @default true */
1326
1050
  use2D: boolean;
1327
1051
  };
1328
1052
  type RDKitRemoveHsOptions = {
1329
- /** @default false — hydrogens that have no bonds */
1330
- removeDegreeZero: boolean;
1331
- /** @default false — hydrogens with two (or more) bonds */
1332
- removeHigherDegrees: boolean;
1333
- /** @default false — hydrogens with bonds only to other hydrogens */
1334
- removeOnlyHNeighbors: boolean;
1335
- /** @default false — hydrogens with non-default isotopes */
1336
- removeIsotopes: boolean;
1337
- /** @default false — removes isotopic Hs, tracks them via _isotopicHs property */
1338
- removeAndTrackIsotopes: boolean;
1339
- /** @default false — hydrogens with at least one dummy-atom neighbor */
1340
- removeDummyNeighbors: boolean;
1341
- /** @default false — hydrogens defining bond stereochemistry */
1342
- removeDefiningBondStereo: boolean;
1343
- /** @default true — hydrogens with wedged bonds */
1344
- removeWithWedgedBond: boolean;
1345
- /** @default false — hydrogens with queries defined */
1346
- removeWithQuery: boolean;
1347
- /** @default true — mapped hydrogens */
1348
- removeMapped: boolean;
1349
- /** @default true — hydrogens in SubstanceGroups */
1350
- removeInSGroups: boolean;
1351
- /** @default true — display warnings for Hs that are not removed */
1352
- showWarnings: boolean;
1353
- /** @default true @deprecated — equivalent of !implicitOnly */
1354
- removeNonimplicit: boolean;
1355
- /** @default false @deprecated */
1356
- updateExplicitCount: boolean;
1357
- /** @default false — remove hydrides */
1358
- removeHydrides: boolean;
1359
- /** @default false — remove Hs bonded to atoms with non-tetrahedral stereochemistry */
1053
+ /** @default false — hydrogens that have no bonds */removeDegreeZero: boolean; /** @default false — hydrogens with two (or more) bonds */
1054
+ removeHigherDegrees: boolean; /** @default false — hydrogens with bonds only to other hydrogens */
1055
+ removeOnlyHNeighbors: boolean; /** @default false — hydrogens with non-default isotopes */
1056
+ removeIsotopes: boolean; /** @default false — removes isotopic Hs, tracks them via _isotopicHs property */
1057
+ removeAndTrackIsotopes: boolean; /** @default false — hydrogens with at least one dummy-atom neighbor */
1058
+ removeDummyNeighbors: boolean; /** @default false — hydrogens defining bond stereochemistry */
1059
+ removeDefiningBondStereo: boolean; /** @default true — hydrogens with wedged bonds */
1060
+ removeWithWedgedBond: boolean; /** @default false — hydrogens with queries defined */
1061
+ removeWithQuery: boolean; /** @default true — mapped hydrogens */
1062
+ removeMapped: boolean; /** @default true — hydrogens in SubstanceGroups */
1063
+ removeInSGroups: boolean; /** @default true — display warnings for Hs that are not removed */
1064
+ showWarnings: boolean; /** @default true @deprecated — equivalent of !implicitOnly */
1065
+ removeNonimplicit: boolean; /** @default false @deprecated */
1066
+ updateExplicitCount: boolean; /** @default false — remove hydrides */
1067
+ removeHydrides: boolean; /** @default false — remove Hs bonded to atoms with non-tetrahedral stereochemistry */
1360
1068
  removeNontetrahedralNeighbors: boolean;
1361
1069
  };
1362
1070
  type RDKitAlignedCoordsOptions = {
@@ -1423,9 +1131,7 @@ type InChI_Flags = 'DoNotAddH' | 'SNon' | 'SRel' | 'SRac' | 'SUCF' | 'ChiralFlag
1423
1131
  //#region src/types/rdkit-esm.typings.d.ts
1424
1132
  /** Wrapper-level CX SMILES options with ergonomic `fields` array */
1425
1133
  type RDKitGetCxSmilesOptions = RDKitGetSmilesOptions & {
1426
- /** CX extension fields to include. Omit for all fields (default). Empty array for none. */
1427
- fields: CxSmilesField[];
1428
- /** Restore bond direction option. Accepts `true`, `'true'`, or `'clear'`. */
1134
+ /** CX extension fields to include. Omit for all fields (default). Empty array for none. */fields: CxSmilesField[]; /** Restore bond direction option. Accepts `true`, `'true'`, or `'clear'`. */
1429
1135
  restoreBondDirOption: true | 'true' | 'clear';
1430
1136
  };
1431
1137
  type RDKitGetUint8ArrayOptions = {
@@ -1435,11 +1141,8 @@ type RDKitGetUint8ArrayOptions = {
1435
1141
  properties: PropertyPickleOptionsKeys[];
1436
1142
  };
1437
1143
  type RDKitConfigureOptions = {
1438
- /** Switch between RDKit's built-in coordinate generator and CoordGen. */
1439
- preferCoordgen: boolean;
1440
- /** Use the legacy stereo perception algorithm. */
1441
- useLegacyStereoPerception: boolean;
1442
- /** Perceive chirality on non-tetrahedral stereocenters (square-planar, trigonal-bipyramidal, etc.). */
1144
+ /** Switch between RDKit's built-in coordinate generator and CoordGen. */preferCoordgen: boolean; /** Use the legacy stereo perception algorithm. */
1145
+ useLegacyStereoPerception: boolean; /** Perceive chirality on non-tetrahedral stereocenters (square-planar, trigonal-bipyramidal, etc.). */
1443
1146
  allowNonTetrahedralChirality: boolean;
1444
1147
  /** When true, RDKit error messages also appear in the console (uses set_log_tee).
1445
1148
  * Default: false (capture-only when a fail listener is set). */
@@ -1465,9 +1168,7 @@ type RDKitGetRxnOptions = RDKitRxnDetails & {
1465
1168
  throwOnError: boolean;
1466
1169
  };
1467
1170
  type RDKitCondenseAbbreviationsOptions = {
1468
- /** @default 0.4 */
1469
- maxCoverage: number;
1470
- /** @default false */
1171
+ /** @default 0.4 */maxCoverage: number; /** @default false */
1471
1172
  useLinkers: boolean;
1472
1173
  };
1473
1174
  //#endregion