@kent-tokyo/chematic 0.22.0 → 0.24.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/chematic_wasm.d.ts +29 -0
- package/chematic_wasm.js +68 -0
- package/chematic_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/chematic_wasm.d.ts
CHANGED
|
@@ -1321,6 +1321,25 @@ export function maxmin_picks_ecfp4_json(smiles_json: string, n: number): string;
|
|
|
1321
1321
|
*/
|
|
1322
1322
|
export function mcs_smiles_json(smiles_json: string): string;
|
|
1323
1323
|
|
|
1324
|
+
/**
|
|
1325
|
+
* Full `McsConfig` + `McsOutcome`-aware MCS search.
|
|
1326
|
+
*
|
|
1327
|
+
* `smiles_json` — JSON array of at least 2 SMILES strings.
|
|
1328
|
+
* `config_json` — a JSON object with any subset of `McsConfig`'s fields
|
|
1329
|
+
* (camelCase keys, all optional, defaulting to `McsConfig::default()`):
|
|
1330
|
+
* `matchBonds`, `minAtoms`, `timeoutMs`, `ringMatchesRingOnly`,
|
|
1331
|
+
* `completeRingsOnly`, `atomCompare` (`"elements"` | `"any_heavy_atom"` |
|
|
1332
|
+
* `"any"`), `bondCompare` (`"order_or_aromatic"` | `"any"`),
|
|
1333
|
+
* `matchChiralTag`, `matchCharge`, `matchIsotope`, `maximizeBonds`.
|
|
1334
|
+
*
|
|
1335
|
+
* Returns a JSON object `{"smiles": string|null, "wasTimedOut": bool}` --
|
|
1336
|
+
* `smiles` is `null` when there is no common substructure; `wasTimedOut` is
|
|
1337
|
+
* `true` if `timeoutMs` was reached before the search finished exhaustively
|
|
1338
|
+
* (the returned `smiles`, if any, is then the best result found so far, not
|
|
1339
|
+
* proven optimal).
|
|
1340
|
+
*/
|
|
1341
|
+
export function mcs_smiles_json_with_config(smiles_json: string, config_json: string): string;
|
|
1342
|
+
|
|
1324
1343
|
/**
|
|
1325
1344
|
* MCS with ring-awareness constraints.
|
|
1326
1345
|
*
|
|
@@ -2323,6 +2342,14 @@ export function tanimoto_topo_path(a: MolHandle, b: MolHandle): number;
|
|
|
2323
2342
|
*/
|
|
2324
2343
|
export function tanimoto_torsion(a: MolHandle, b: MolHandle): number;
|
|
2325
2344
|
|
|
2345
|
+
/**
|
|
2346
|
+
* Compute the tautomer parent with explicit resource limits.
|
|
2347
|
+
* Returns `{"smiles":"...","status":"completed"}` (or a structured
|
|
2348
|
+
* error) so callers can distinguish a definite result from a budget-limited
|
|
2349
|
+
* one.
|
|
2350
|
+
*/
|
|
2351
|
+
export function tautomer_parent_json(mol: MolHandle, max_transforms: number, max_tautomers: number, timeout_ms?: bigint | null): string;
|
|
2352
|
+
|
|
2326
2353
|
/**
|
|
2327
2354
|
* Serialise a `MolHandle` to a CML string with 2D coordinates.
|
|
2328
2355
|
*
|
|
@@ -2627,6 +2654,7 @@ export interface InitOutput {
|
|
|
2627
2654
|
readonly match_smarts_smiles: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
2628
2655
|
readonly maxmin_picks_ecfp4_json: (a: number, b: number, c: number) => [number, number, number, number];
|
|
2629
2656
|
readonly mcs_smiles_json: (a: number, b: number) => [number, number, number, number];
|
|
2657
|
+
readonly mcs_smiles_json_with_config: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
2630
2658
|
readonly mcs_smiles_json_with_ring_config: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
2631
2659
|
readonly mhfp_hashes_json: (a: number) => [number, number];
|
|
2632
2660
|
readonly mhfplshhandle_add_smiles: (a: number, b: number, c: number) => [number, number, number];
|
|
@@ -2813,6 +2841,7 @@ export interface InitOutput {
|
|
|
2813
2841
|
readonly tanimoto_smiles: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
2814
2842
|
readonly tanimoto_topo_path: (a: number, b: number) => number;
|
|
2815
2843
|
readonly tanimoto_torsion: (a: number, b: number) => number;
|
|
2844
|
+
readonly tautomer_parent_json: (a: number, b: number, c: number, d: number, e: bigint) => [number, number];
|
|
2816
2845
|
readonly to_cml: (a: number) => [number, number];
|
|
2817
2846
|
readonly to_extxyz_json: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
2818
2847
|
readonly to_mol_block: (a: number) => [number, number];
|
package/chematic_wasm.js
CHANGED
|
@@ -3179,6 +3179,49 @@ export function mcs_smiles_json(smiles_json) {
|
|
|
3179
3179
|
}
|
|
3180
3180
|
}
|
|
3181
3181
|
|
|
3182
|
+
/**
|
|
3183
|
+
* Full `McsConfig` + `McsOutcome`-aware MCS search.
|
|
3184
|
+
*
|
|
3185
|
+
* `smiles_json` — JSON array of at least 2 SMILES strings.
|
|
3186
|
+
* `config_json` — a JSON object with any subset of `McsConfig`'s fields
|
|
3187
|
+
* (camelCase keys, all optional, defaulting to `McsConfig::default()`):
|
|
3188
|
+
* `matchBonds`, `minAtoms`, `timeoutMs`, `ringMatchesRingOnly`,
|
|
3189
|
+
* `completeRingsOnly`, `atomCompare` (`"elements"` | `"any_heavy_atom"` |
|
|
3190
|
+
* `"any"`), `bondCompare` (`"order_or_aromatic"` | `"any"`),
|
|
3191
|
+
* `matchChiralTag`, `matchCharge`, `matchIsotope`, `maximizeBonds`.
|
|
3192
|
+
*
|
|
3193
|
+
* Returns a JSON object `{"smiles": string|null, "wasTimedOut": bool}` --
|
|
3194
|
+
* `smiles` is `null` when there is no common substructure; `wasTimedOut` is
|
|
3195
|
+
* `true` if `timeoutMs` was reached before the search finished exhaustively
|
|
3196
|
+
* (the returned `smiles`, if any, is then the best result found so far, not
|
|
3197
|
+
* proven optimal).
|
|
3198
|
+
* @param {string} smiles_json
|
|
3199
|
+
* @param {string} config_json
|
|
3200
|
+
* @returns {string}
|
|
3201
|
+
*/
|
|
3202
|
+
export function mcs_smiles_json_with_config(smiles_json, config_json) {
|
|
3203
|
+
let deferred4_0;
|
|
3204
|
+
let deferred4_1;
|
|
3205
|
+
try {
|
|
3206
|
+
const ptr0 = passStringToWasm0(smiles_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3207
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3208
|
+
const ptr1 = passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3209
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3210
|
+
const ret = wasm.mcs_smiles_json_with_config(ptr0, len0, ptr1, len1);
|
|
3211
|
+
var ptr3 = ret[0];
|
|
3212
|
+
var len3 = ret[1];
|
|
3213
|
+
if (ret[3]) {
|
|
3214
|
+
ptr3 = 0; len3 = 0;
|
|
3215
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
3216
|
+
}
|
|
3217
|
+
deferred4_0 = ptr3;
|
|
3218
|
+
deferred4_1 = len3;
|
|
3219
|
+
return getStringFromWasm0(ptr3, len3);
|
|
3220
|
+
} finally {
|
|
3221
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
3222
|
+
}
|
|
3223
|
+
}
|
|
3224
|
+
|
|
3182
3225
|
/**
|
|
3183
3226
|
* MCS with ring-awareness constraints.
|
|
3184
3227
|
*
|
|
@@ -5867,6 +5910,31 @@ export function tanimoto_torsion(a, b) {
|
|
|
5867
5910
|
return ret;
|
|
5868
5911
|
}
|
|
5869
5912
|
|
|
5913
|
+
/**
|
|
5914
|
+
* Compute the tautomer parent with explicit resource limits.
|
|
5915
|
+
* Returns `{"smiles":"...","status":"completed"}` (or a structured
|
|
5916
|
+
* error) so callers can distinguish a definite result from a budget-limited
|
|
5917
|
+
* one.
|
|
5918
|
+
* @param {MolHandle} mol
|
|
5919
|
+
* @param {number} max_transforms
|
|
5920
|
+
* @param {number} max_tautomers
|
|
5921
|
+
* @param {bigint | null} [timeout_ms]
|
|
5922
|
+
* @returns {string}
|
|
5923
|
+
*/
|
|
5924
|
+
export function tautomer_parent_json(mol, max_transforms, max_tautomers, timeout_ms) {
|
|
5925
|
+
let deferred1_0;
|
|
5926
|
+
let deferred1_1;
|
|
5927
|
+
try {
|
|
5928
|
+
_assertClass(mol, MolHandle);
|
|
5929
|
+
const ret = wasm.tautomer_parent_json(mol.__wbg_ptr, max_transforms, max_tautomers, !isLikeNone(timeout_ms), isLikeNone(timeout_ms) ? BigInt(0) : timeout_ms);
|
|
5930
|
+
deferred1_0 = ret[0];
|
|
5931
|
+
deferred1_1 = ret[1];
|
|
5932
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
5933
|
+
} finally {
|
|
5934
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
5935
|
+
}
|
|
5936
|
+
}
|
|
5937
|
+
|
|
5870
5938
|
/**
|
|
5871
5939
|
* Serialise a `MolHandle` to a CML string with 2D coordinates.
|
|
5872
5940
|
*
|
package/chematic_wasm_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"kent-tokyo <kent-tokyo@users.noreply.github.com>"
|
|
6
6
|
],
|
|
7
7
|
"description": "WebAssembly bindings for chematic — use chematic from JavaScript/TypeScript",
|
|
8
|
-
"version": "0.
|
|
8
|
+
"version": "0.24.0",
|
|
9
9
|
"license": "MIT OR Apache-2.0",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|