@kent-tokyo/chematic 1.0.6 → 1.0.8
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 +12 -2
- package/chematic_wasm.js +49 -16
- package/chematic_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -162,7 +162,7 @@ and enforced correctly on all of them.
|
|
|
162
162
|
|
|
163
163
|
## Bundle Size
|
|
164
164
|
|
|
165
|
-
The optimized v1.0.
|
|
165
|
+
The optimized v1.0.8 candidate artifact was measured at **3.58 MB raw / 1.31 MB gzip**. Bundle size depends on features and toolchain; see [`benchmarks/2026-09-06-wasm-size-v1.0.8.md`](../../benchmarks/2026-09-06-wasm-size-v1.0.8.md) for exact tools, digest, and reproduction steps.
|
|
166
166
|
|
|
167
167
|
PNG rasterization (`tiny_skia`) is excluded from the WASM build — use SVG output instead. All SVG depiction APIs remain fully available.
|
|
168
168
|
|
package/chematic_wasm.d.ts
CHANGED
|
@@ -584,6 +584,15 @@ export function canonical_tautomer(mol: MolHandle): MolHandle;
|
|
|
584
584
|
*/
|
|
585
585
|
export function canonical_tautomer_with_blocked_atoms_json(mol: MolHandle, blocked_atom_indices_json: string): string;
|
|
586
586
|
|
|
587
|
+
/**
|
|
588
|
+
* Canonicalize a bounded delimiter-separated SMILES batch.
|
|
589
|
+
*
|
|
590
|
+
* Each result retains its input index and original text. Invalid records are
|
|
591
|
+
* returned inline with `status: "rejected"`; later records are still
|
|
592
|
+
* processed in deterministic input order.
|
|
593
|
+
*/
|
|
594
|
+
export function canonicalize_smiles_batch_json(smiles_batch: string, delimiter: string): string;
|
|
595
|
+
|
|
587
596
|
/**
|
|
588
597
|
* Parse a CDXML document while preserving page and presentation objects.
|
|
589
598
|
* The returned JSON contains an opaque `raw_xml` for each object so unknown
|
|
@@ -2664,6 +2673,7 @@ export interface InitOutput {
|
|
|
2664
2673
|
readonly butina_cluster_ecfp4_json: (a: number, b: number, c: number) => [number, number, number, number];
|
|
2665
2674
|
readonly canonical_tautomer: (a: number) => number;
|
|
2666
2675
|
readonly canonical_tautomer_with_blocked_atoms_json: (a: number, b: number, c: number) => [number, number];
|
|
2676
|
+
readonly canonicalize_smiles_batch_json: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
2667
2677
|
readonly cdxml_document_json: (a: number, b: number) => [number, number, number, number];
|
|
2668
2678
|
readonly cdxml_to_smiles_json: (a: number, b: number) => [number, number, number, number];
|
|
2669
2679
|
readonly charge_parent_json: (a: number) => [number, number];
|
|
@@ -2814,6 +2824,7 @@ export interface InitOutput {
|
|
|
2814
2824
|
readonly molecule_report_json: (a: number, b: number) => [number, number, number, number];
|
|
2815
2825
|
readonly molhandle_aromatic_ring_count: (a: number) => number;
|
|
2816
2826
|
readonly molhandle_assign_cip_json: (a: number) => [number, number];
|
|
2827
|
+
readonly molhandle_atom_count: (a: number) => number;
|
|
2817
2828
|
readonly molhandle_bbb_passes: (a: number) => number;
|
|
2818
2829
|
readonly molhandle_bbb_score: (a: number) => number;
|
|
2819
2830
|
readonly molhandle_bertz_ct: (a: number) => number;
|
|
@@ -2949,6 +2960,7 @@ export interface InitOutput {
|
|
|
2949
2960
|
readonly sssr_rings_json: (a: number) => [number, number];
|
|
2950
2961
|
readonly standardize_smiles: (a: number, b: number) => [number, number];
|
|
2951
2962
|
readonly standardize_smiles_report_json: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
2963
|
+
readonly start: () => void;
|
|
2952
2964
|
readonly stereo_parent_json: (a: number) => [number, number];
|
|
2953
2965
|
readonly super_parent_json: (a: number, b: number, c: number, d: number, e: bigint) => [number, number];
|
|
2954
2966
|
readonly super_parent_report_json: (a: number, b: number, c: number, d: number, e: bigint) => [number, number];
|
|
@@ -2987,8 +2999,6 @@ export interface InitOutput {
|
|
|
2987
2999
|
readonly write_smiles: (a: number) => [number, number];
|
|
2988
3000
|
readonly xlogp3_json: (a: number) => [number, number];
|
|
2989
3001
|
readonly xlogp3_per_atom_json: (a: number) => [number, number];
|
|
2990
|
-
readonly molhandle_atom_count: (a: number) => number;
|
|
2991
|
-
readonly start: () => void;
|
|
2992
3002
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
2993
3003
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
2994
3004
|
readonly __externref_table_alloc: () => number;
|
package/chematic_wasm.js
CHANGED
|
@@ -1368,6 +1368,39 @@ export function canonical_tautomer_with_blocked_atoms_json(mol, blocked_atom_ind
|
|
|
1368
1368
|
}
|
|
1369
1369
|
}
|
|
1370
1370
|
|
|
1371
|
+
/**
|
|
1372
|
+
* Canonicalize a bounded delimiter-separated SMILES batch.
|
|
1373
|
+
*
|
|
1374
|
+
* Each result retains its input index and original text. Invalid records are
|
|
1375
|
+
* returned inline with `status: "rejected"`; later records are still
|
|
1376
|
+
* processed in deterministic input order.
|
|
1377
|
+
* @param {string} smiles_batch
|
|
1378
|
+
* @param {string} delimiter
|
|
1379
|
+
* @returns {string}
|
|
1380
|
+
*/
|
|
1381
|
+
export function canonicalize_smiles_batch_json(smiles_batch, delimiter) {
|
|
1382
|
+
let deferred4_0;
|
|
1383
|
+
let deferred4_1;
|
|
1384
|
+
try {
|
|
1385
|
+
const ptr0 = passStringToWasm0(smiles_batch, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1386
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1387
|
+
const ptr1 = passStringToWasm0(delimiter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1388
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1389
|
+
const ret = wasm.canonicalize_smiles_batch_json(ptr0, len0, ptr1, len1);
|
|
1390
|
+
var ptr3 = ret[0];
|
|
1391
|
+
var len3 = ret[1];
|
|
1392
|
+
if (ret[3]) {
|
|
1393
|
+
ptr3 = 0; len3 = 0;
|
|
1394
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1395
|
+
}
|
|
1396
|
+
deferred4_0 = ptr3;
|
|
1397
|
+
deferred4_1 = len3;
|
|
1398
|
+
return getStringFromWasm0(ptr3, len3);
|
|
1399
|
+
} finally {
|
|
1400
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1371
1404
|
/**
|
|
1372
1405
|
* Parse a CDXML document while preserving page and presentation objects.
|
|
1373
1406
|
* The returned JSON contains an opaque `raw_xml` for each object so unknown
|
|
@@ -6954,11 +6987,11 @@ export function xlogp3_per_atom_json(mol) {
|
|
|
6954
6987
|
function __wbg_get_imports() {
|
|
6955
6988
|
const import0 = {
|
|
6956
6989
|
__proto__: null,
|
|
6957
|
-
|
|
6990
|
+
__wbg___wbindgen_is_undefined_8c687d0b90d5b524: function(arg0) {
|
|
6958
6991
|
const ret = arg0 === undefined;
|
|
6959
6992
|
return ret;
|
|
6960
6993
|
},
|
|
6961
|
-
|
|
6994
|
+
__wbg___wbindgen_string_get_92ab86bb19cbc12f: function(arg0, arg1) {
|
|
6962
6995
|
const obj = arg1;
|
|
6963
6996
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
6964
6997
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -6966,18 +6999,18 @@ function __wbg_get_imports() {
|
|
|
6966
6999
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
6967
7000
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
6968
7001
|
},
|
|
6969
|
-
|
|
7002
|
+
__wbg___wbindgen_throw_5d9e815e6fdf150f: function(arg0, arg1) {
|
|
6970
7003
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
6971
7004
|
},
|
|
6972
|
-
|
|
7005
|
+
__wbg_error_756c5934221e6fee: function(arg0) {
|
|
6973
7006
|
console.error(arg0);
|
|
6974
7007
|
},
|
|
6975
|
-
|
|
6976
|
-
const ret = new
|
|
7008
|
+
__wbg_new_from_slice_3b4c7f1456059f80: function(arg0, arg1) {
|
|
7009
|
+
const ret = new Float64Array(getArrayF64FromWasm0(arg0, arg1));
|
|
6977
7010
|
return ret;
|
|
6978
7011
|
},
|
|
6979
|
-
|
|
6980
|
-
const ret = new
|
|
7012
|
+
__wbg_new_from_slice_a500ec81601be48f: function(arg0, arg1) {
|
|
7013
|
+
const ret = new Uint32Array(getArrayU32FromWasm0(arg0, arg1));
|
|
6981
7014
|
return ret;
|
|
6982
7015
|
},
|
|
6983
7016
|
__wbg_now_e7c6795a7f81e10f: function(arg0) {
|
|
@@ -6988,28 +7021,28 @@ function __wbg_get_imports() {
|
|
|
6988
7021
|
const ret = arg0.performance;
|
|
6989
7022
|
return ret;
|
|
6990
7023
|
},
|
|
6991
|
-
|
|
6992
|
-
const ret = typeof
|
|
7024
|
+
__wbg_static_accessor_GLOBAL_8eb4cd83130a11a0: function() {
|
|
7025
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
6993
7026
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
6994
7027
|
},
|
|
6995
|
-
|
|
6996
|
-
const ret = typeof
|
|
7028
|
+
__wbg_static_accessor_GLOBAL_THIS_1e7044f654e934db: function() {
|
|
7029
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
6997
7030
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
6998
7031
|
},
|
|
6999
|
-
|
|
7032
|
+
__wbg_static_accessor_SELF_d8b50611246a6d92: function() {
|
|
7000
7033
|
const ret = typeof self === 'undefined' ? null : self;
|
|
7001
7034
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
7002
7035
|
},
|
|
7003
|
-
|
|
7036
|
+
__wbg_static_accessor_WINDOW_fd0bc376bf0f8b42: function() {
|
|
7004
7037
|
const ret = typeof window === 'undefined' ? null : window;
|
|
7005
7038
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
7006
7039
|
},
|
|
7007
|
-
|
|
7040
|
+
__wbindgen_generic_0000000000000001: function(arg0) {
|
|
7008
7041
|
// Cast intrinsic for `F64 -> Externref`.
|
|
7009
7042
|
const ret = arg0;
|
|
7010
7043
|
return ret;
|
|
7011
7044
|
},
|
|
7012
|
-
|
|
7045
|
+
__wbindgen_generic_0000000000000002: function(arg0, arg1) {
|
|
7013
7046
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
7014
7047
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
7015
7048
|
return ret;
|
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.8",
|
|
9
9
|
"license": "MIT OR Apache-2.0",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|