@kent-tokyo/chematic 0.21.0 → 0.22.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 +15 -0
- package/chematic_wasm.js +31 -0
- package/chematic_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/chematic_wasm.d.ts
CHANGED
|
@@ -823,6 +823,20 @@ export function ecfp6_bitvec_with_chirality(mol: MolHandle, use_chirality: boole
|
|
|
823
823
|
*/
|
|
824
824
|
export function ecfp_bitvec_custom(mol: MolHandle, radius: number, nbits: number, use_chirality: boolean): Uint8Array;
|
|
825
825
|
|
|
826
|
+
/**
|
|
827
|
+
* Run `embed_ensemble_v2` on `mol`'s own atom order (never canonicalizes/
|
|
828
|
+
* reparses, same convention as `embed_pipeline_v2_json`). See the module doc
|
|
829
|
+
* for the config JSON shape and the success/failure envelope shape.
|
|
830
|
+
*
|
|
831
|
+
* Never throws. Always returns a JSON string tagged `schemaVersion: 1` and
|
|
832
|
+
* `ok: true`/`false`. `ok: false` covers both a WASM-level rejection
|
|
833
|
+
* (oversized input, too many atoms, malformed/incomplete config JSON) and a
|
|
834
|
+
* config `embed_ensemble_v2` itself rejects (currently only an invalid
|
|
835
|
+
* `rmsdThreshold`) -- distinguished by `error.stage` /
|
|
836
|
+
* `error.cause.kind`, same as `embed_pipeline_v2_json`.
|
|
837
|
+
*/
|
|
838
|
+
export function embed_ensemble_v2_json(mol: MolHandle, config_json: string): string;
|
|
839
|
+
|
|
826
840
|
/**
|
|
827
841
|
* Run the opt-in v2 embedding pipeline, applied directly to `mol`'s own atom
|
|
828
842
|
* order (never canonicalizes/reparses -- see the module doc).
|
|
@@ -2566,6 +2580,7 @@ export interface InitOutput {
|
|
|
2566
2580
|
readonly ecfp6_bitvec: (a: number) => [number, number];
|
|
2567
2581
|
readonly ecfp6_bitvec_with_chirality: (a: number, b: number) => [number, number];
|
|
2568
2582
|
readonly ecfp_bitvec_custom: (a: number, b: number, c: number, d: number) => [number, number];
|
|
2583
|
+
readonly embed_ensemble_v2_json: (a: number, b: number, c: number) => [number, number];
|
|
2569
2584
|
readonly embed_pipeline_v2_json: (a: number, b: number, c: number) => [number, number];
|
|
2570
2585
|
readonly enumerate_library_2way: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
2571
2586
|
readonly enumerate_stereo_isomers_json: (a: number) => [number, number, number, number];
|
package/chematic_wasm.js
CHANGED
|
@@ -1972,6 +1972,37 @@ export function ecfp_bitvec_custom(mol, radius, nbits, use_chirality) {
|
|
|
1972
1972
|
return v1;
|
|
1973
1973
|
}
|
|
1974
1974
|
|
|
1975
|
+
/**
|
|
1976
|
+
* Run `embed_ensemble_v2` on `mol`'s own atom order (never canonicalizes/
|
|
1977
|
+
* reparses, same convention as `embed_pipeline_v2_json`). See the module doc
|
|
1978
|
+
* for the config JSON shape and the success/failure envelope shape.
|
|
1979
|
+
*
|
|
1980
|
+
* Never throws. Always returns a JSON string tagged `schemaVersion: 1` and
|
|
1981
|
+
* `ok: true`/`false`. `ok: false` covers both a WASM-level rejection
|
|
1982
|
+
* (oversized input, too many atoms, malformed/incomplete config JSON) and a
|
|
1983
|
+
* config `embed_ensemble_v2` itself rejects (currently only an invalid
|
|
1984
|
+
* `rmsdThreshold`) -- distinguished by `error.stage` /
|
|
1985
|
+
* `error.cause.kind`, same as `embed_pipeline_v2_json`.
|
|
1986
|
+
* @param {MolHandle} mol
|
|
1987
|
+
* @param {string} config_json
|
|
1988
|
+
* @returns {string}
|
|
1989
|
+
*/
|
|
1990
|
+
export function embed_ensemble_v2_json(mol, config_json) {
|
|
1991
|
+
let deferred2_0;
|
|
1992
|
+
let deferred2_1;
|
|
1993
|
+
try {
|
|
1994
|
+
_assertClass(mol, MolHandle);
|
|
1995
|
+
const ptr0 = passStringToWasm0(config_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1996
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1997
|
+
const ret = wasm.embed_ensemble_v2_json(mol.__wbg_ptr, ptr0, len0);
|
|
1998
|
+
deferred2_0 = ret[0];
|
|
1999
|
+
deferred2_1 = ret[1];
|
|
2000
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2001
|
+
} finally {
|
|
2002
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
|
|
1975
2006
|
/**
|
|
1976
2007
|
* Run the opt-in v2 embedding pipeline, applied directly to `mol`'s own atom
|
|
1977
2008
|
* order (never canonicalizes/reparses -- see the module doc).
|
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.22.0",
|
|
9
9
|
"license": "MIT OR Apache-2.0",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|