@kent-tokyo/chematic 1.0.37 → 1.0.38
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 +1 -1
- package/chematic_wasm.d.ts +9 -0
- package/chematic_wasm.js +26 -0
- package/chematic_wasm_bg.wasm +0 -0
- package/package.json +1 -1
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.0.
|
|
7
|
+
The current workspace line is 1.0.38. 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
|
|
package/chematic_wasm.d.ts
CHANGED
|
@@ -430,6 +430,14 @@ export class MolHandle {
|
|
|
430
430
|
* χ₀ = Σ 1/√(d_i × d_j) over all bonds, where d is heavy-atom degree.
|
|
431
431
|
*/
|
|
432
432
|
randic_index(): number;
|
|
433
|
+
/**
|
|
434
|
+
* Canonical SMILES exactly as RDKit 2026.03.1 writes it
|
|
435
|
+
* (`Chem.MolToSmiles(Chem.MolFromSmiles(s))` for a molecule parsed
|
|
436
|
+
* from the SMILES `s`). Throws instead of returning a string for
|
|
437
|
+
* inputs the RDKit port does not model or that RDKit's sanitization
|
|
438
|
+
* rejects; `canonical_smiles` is unchanged.
|
|
439
|
+
*/
|
|
440
|
+
rdkit_smiles(): string;
|
|
433
441
|
/**
|
|
434
442
|
* Returns `true` if the molecule passes the REOS (Rapid Elimination Of Swill) filter.
|
|
435
443
|
*/
|
|
@@ -3321,6 +3329,7 @@ export interface InitOutput {
|
|
|
3321
3329
|
readonly molhandle_potential_stereocenter_indices: (a: number) => [number, number];
|
|
3322
3330
|
readonly molhandle_qed: (a: number) => number;
|
|
3323
3331
|
readonly molhandle_randic_index: (a: number) => number;
|
|
3332
|
+
readonly molhandle_rdkit_smiles: (a: number) => [number, number, number, number];
|
|
3324
3333
|
readonly molhandle_reos_passes: (a: number) => number;
|
|
3325
3334
|
readonly molhandle_ring_count: (a: number) => number;
|
|
3326
3335
|
readonly molhandle_rotatable_bond_count: (a: number) => number;
|
package/chematic_wasm.js
CHANGED
|
@@ -1008,6 +1008,32 @@ export class MolHandle {
|
|
|
1008
1008
|
const ret = wasm.molhandle_randic_index(this.__wbg_ptr);
|
|
1009
1009
|
return ret;
|
|
1010
1010
|
}
|
|
1011
|
+
/**
|
|
1012
|
+
* Canonical SMILES exactly as RDKit 2026.03.1 writes it
|
|
1013
|
+
* (`Chem.MolToSmiles(Chem.MolFromSmiles(s))` for a molecule parsed
|
|
1014
|
+
* from the SMILES `s`). Throws instead of returning a string for
|
|
1015
|
+
* inputs the RDKit port does not model or that RDKit's sanitization
|
|
1016
|
+
* rejects; `canonical_smiles` is unchanged.
|
|
1017
|
+
* @returns {string}
|
|
1018
|
+
*/
|
|
1019
|
+
rdkit_smiles() {
|
|
1020
|
+
let deferred2_0;
|
|
1021
|
+
let deferred2_1;
|
|
1022
|
+
try {
|
|
1023
|
+
const ret = wasm.molhandle_rdkit_smiles(this.__wbg_ptr);
|
|
1024
|
+
var ptr1 = ret[0];
|
|
1025
|
+
var len1 = ret[1];
|
|
1026
|
+
if (ret[3]) {
|
|
1027
|
+
ptr1 = 0; len1 = 0;
|
|
1028
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1029
|
+
}
|
|
1030
|
+
deferred2_0 = ptr1;
|
|
1031
|
+
deferred2_1 = len1;
|
|
1032
|
+
return getStringFromWasm0(ptr1, len1);
|
|
1033
|
+
} finally {
|
|
1034
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1011
1037
|
/**
|
|
1012
1038
|
* Returns `true` if the molecule passes the REOS (Rapid Elimination Of Swill) filter.
|
|
1013
1039
|
* @returns {boolean}
|
package/chematic_wasm_bg.wasm
CHANGED
|
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.0.
|
|
8
|
+
"version": "1.0.38",
|
|
9
9
|
"license": "MIT OR Apache-2.0",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|