@kent-tokyo/chematic 1.1.2 → 1.1.3

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/README.md CHANGED
@@ -4,7 +4,7 @@ WebAssembly bindings for [chematic](https://github.com/kent-tokyo/chematic), a p
4
4
 
5
5
  Published to npm as [`@kent-tokyo/chematic`](https://www.npmjs.com/package/@kent-tokyo/chematic).
6
6
 
7
- The current workspace line is 1.1.2. The binding keeps bounded parsing,
7
+ The current workspace line is 1.1.3. The binding keeps bounded parsing,
8
8
  typed failures, and opt-in `embed_pipeline_v2_json`; 3D/MMFF94 behavior remains
9
9
  Experimental and is not a claim of full RDKit parity.
10
10
 
@@ -261,6 +261,13 @@ export class MolHandle {
261
261
  * (TPSA ≤ 131.6 Ų and LogP ≤ 5.88).
262
262
  */
263
263
  egan_passes(): boolean;
264
+ /**
265
+ * Seeded ETKDGv3 coordinates using the exact sixth-order torsion
266
+ * gradient tracked by RDKit issue #8715. At most 512 atoms are accepted.
267
+ * The result may intentionally differ from `rdkit_embed_json` for
268
+ * molecules with a non-zero sixth-order experimental torsion term.
269
+ */
270
+ etkdg_embed_corrected_json(random_seed: number, max_iterations: number): string;
264
271
  /**
265
272
  * Monoisotopic (exact) mass.
266
273
  */
@@ -1160,6 +1167,15 @@ export function edit_cdxml_document_json_v1(document_json: string, edit_json: st
1160
1167
  */
1161
1168
  export function edit_reaction_document_json_v1(document_json: string, edit_json: string): string;
1162
1169
 
1170
+ /**
1171
+ * EEM partial charges from caller-supplied 3D coordinates.
1172
+ *
1173
+ * Returns `{"charges":[...]}`. Unlike RDKit 2026.09.1 and earlier (issue
1174
+ * #9688), ionic charges sum to the molecule's formal charge rather than its
1175
+ * negation. Errors are returned as `{"error":"..."}`.
1176
+ */
1177
+ export function eem_charges_json(mol: MolHandle, coords_json: string): string;
1178
+
1163
1179
  /**
1164
1180
  * Run `embed_ensemble_v2` on `mol`'s own atom order (never canonicalizes/
1165
1181
  * reparses, same convention as `embed_pipeline_v2_json`). See the module doc
@@ -2705,6 +2721,8 @@ export function roundtrip_mol_v3000_block(block: string): string;
2705
2721
  * `reactants_smiles`: pipe-separated SMILES, one per reactant slot in the SMIRKS.
2706
2722
  * Returns a JSON array of arrays: `[["product_smi", …], …]`.
2707
2723
  * Returns a JS error on parse failure or arity mismatch.
2724
+ * Product-template E/Z is resolved after all reactants are assembled, so an
2725
+ * unspecified product double bond does not depend on reactant order.
2708
2726
  */
2709
2727
  export function run_reactants(smirks: string, reactants_smiles: string): string;
2710
2728
 
@@ -3401,6 +3419,7 @@ export interface InitOutput {
3401
3419
  readonly edit_cdxml_document_json: (a: number, b: number, c: number, d: number) => [number, number, number, number];
3402
3420
  readonly edit_cdxml_document_json_v1: (a: number, b: number, c: number, d: number) => [number, number, number, number];
3403
3421
  readonly edit_reaction_document_json_v1: (a: number, b: number, c: number, d: number) => [number, number, number, number];
3422
+ readonly eem_charges_json: (a: number, b: number, c: number) => [number, number];
3404
3423
  readonly embed_ensemble_v2_json: (a: number, b: number, c: number) => [number, number];
3405
3424
  readonly embed_pipeline_v2_json: (a: number, b: number, c: number) => [number, number];
3406
3425
  readonly enumerate_library_2way: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
@@ -3535,6 +3554,7 @@ export interface InitOutput {
3535
3554
  readonly molhandle_depict_svg: (a: number) => [number, number];
3536
3555
  readonly molhandle_depict_svg_opts: (a: number, b: number) => [number, number];
3537
3556
  readonly molhandle_egan_passes: (a: number) => number;
3557
+ readonly molhandle_etkdg_embed_corrected_json: (a: number, b: number, c: number) => [number, number, number, number];
3538
3558
  readonly molhandle_exact_mass: (a: number) => number;
3539
3559
  readonly molhandle_formal_charge_sum: (a: number) => number;
3540
3560
  readonly molhandle_formula: (a: number) => [number, number];
package/chematic_wasm.js CHANGED
@@ -635,6 +635,33 @@ export class MolHandle {
635
635
  const ret = wasm.molhandle_egan_passes(this.__wbg_ptr);
636
636
  return ret !== 0;
637
637
  }
638
+ /**
639
+ * Seeded ETKDGv3 coordinates using the exact sixth-order torsion
640
+ * gradient tracked by RDKit issue #8715. At most 512 atoms are accepted.
641
+ * The result may intentionally differ from `rdkit_embed_json` for
642
+ * molecules with a non-zero sixth-order experimental torsion term.
643
+ * @param {number} random_seed
644
+ * @param {number} max_iterations
645
+ * @returns {string}
646
+ */
647
+ etkdg_embed_corrected_json(random_seed, max_iterations) {
648
+ let deferred2_0;
649
+ let deferred2_1;
650
+ try {
651
+ const ret = wasm.molhandle_etkdg_embed_corrected_json(this.__wbg_ptr, random_seed, max_iterations);
652
+ var ptr1 = ret[0];
653
+ var len1 = ret[1];
654
+ if (ret[3]) {
655
+ ptr1 = 0; len1 = 0;
656
+ throw takeFromExternrefTable0(ret[2]);
657
+ }
658
+ deferred2_0 = ptr1;
659
+ deferred2_1 = len1;
660
+ return getStringFromWasm0(ptr1, len1);
661
+ } finally {
662
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
663
+ }
664
+ }
638
665
  /**
639
666
  * Monoisotopic (exact) mass.
640
667
  * @returns {number}
@@ -3235,6 +3262,32 @@ export function edit_reaction_document_json_v1(document_json, edit_json) {
3235
3262
  }
3236
3263
  }
3237
3264
 
3265
+ /**
3266
+ * EEM partial charges from caller-supplied 3D coordinates.
3267
+ *
3268
+ * Returns `{"charges":[...]}`. Unlike RDKit 2026.09.1 and earlier (issue
3269
+ * #9688), ionic charges sum to the molecule's formal charge rather than its
3270
+ * negation. Errors are returned as `{"error":"..."}`.
3271
+ * @param {MolHandle} mol
3272
+ * @param {string} coords_json
3273
+ * @returns {string}
3274
+ */
3275
+ export function eem_charges_json(mol, coords_json) {
3276
+ let deferred2_0;
3277
+ let deferred2_1;
3278
+ try {
3279
+ _assertClass(mol, MolHandle);
3280
+ const ptr0 = passStringToWasm0(coords_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3281
+ const len0 = WASM_VECTOR_LEN;
3282
+ const ret = wasm.eem_charges_json(mol.__wbg_ptr, ptr0, len0);
3283
+ deferred2_0 = ret[0];
3284
+ deferred2_1 = ret[1];
3285
+ return getStringFromWasm0(ret[0], ret[1]);
3286
+ } finally {
3287
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
3288
+ }
3289
+ }
3290
+
3238
3291
  /**
3239
3292
  * Run `embed_ensemble_v2` on `mol`'s own atom order (never canonicalizes/
3240
3293
  * reparses, same convention as `embed_pipeline_v2_json`). See the module doc
@@ -7316,6 +7369,8 @@ export function roundtrip_mol_v3000_block(block) {
7316
7369
  * `reactants_smiles`: pipe-separated SMILES, one per reactant slot in the SMIRKS.
7317
7370
  * Returns a JSON array of arrays: `[["product_smi", …], …]`.
7318
7371
  * Returns a JS error on parse failure or arity mismatch.
7372
+ * Product-template E/Z is resolved after all reactants are assembled, so an
7373
+ * unspecified product double bond does not depend on reactant order.
7319
7374
  * @param {string} smirks
7320
7375
  * @param {string} reactants_smiles
7321
7376
  * @returns {string}
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "Kentaro Tanabe (kent-tokyo) <kent-tokyo@users.noreply.github.com>"
6
6
  ],
7
7
  "description": "WebAssembly bindings for chematic — use chematic from JavaScript/TypeScript",
8
- "version": "1.1.2",
8
+ "version": "1.1.3",
9
9
  "license": "MIT OR Apache-2.0",
10
10
  "repository": {
11
11
  "type": "git",