@kent-tokyo/chematic 0.10.0 → 0.12.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.
@@ -794,15 +794,20 @@ export function ecfp_bitvec_custom(mol: MolHandle, radius: number, nbits: number
794
794
  * Run the opt-in v2 embedding pipeline, applied directly to `mol`'s own atom
795
795
  * order (never canonicalizes/reparses -- see the module doc).
796
796
  *
797
- * `config_json` must be an object with exactly the 15 fields `PipelineV2Config`
798
- * requires (camelCase keys: `embedSeed`, `maxAttempts`, `embedTimeoutMs`,
799
- * `useExpTorsions`, `useSmallRingTorsions`, `useMacrocycleTorsions`,
800
- * `useMacrocycle14Bounds`, `includeLegacyTorsionHeuristic`, `stereoPolicy`,
801
- * `failOnUnevaluableStereo`, `forceFieldPolicy`, `forceFieldMaxIterations`,
802
- * `gateMmff94TorsionOop`, `ringTorsionPolicy`, `totalTimeoutMs`) -- an unknown
803
- * field, a missing field, an unknown `stereoPolicy`/`ringTorsionPolicy`/
804
- * `forceFieldPolicy` string, or a wrong-typed/out-of-range integer all fail
805
- * closed rather than silently defaulting.
797
+ * `config_json` must be an object with the 15 required fields
798
+ * `PipelineV2Config` requires (camelCase keys: `embedSeed`, `maxAttempts`,
799
+ * `embedTimeoutMs`, `useExpTorsions`, `useSmallRingTorsions`,
800
+ * `useMacrocycleTorsions`, `useMacrocycle14Bounds`,
801
+ * `includeLegacyTorsionHeuristic`, `stereoPolicy`, `failOnUnevaluableStereo`,
802
+ * `forceFieldPolicy`, `forceFieldMaxIterations`, `gateMmff94TorsionOop`,
803
+ * `ringTorsionPolicy`, `totalTimeoutMs`), plus one optional field added in
804
+ * Priority 2 (issue #227): `gateMmff94StretchBend` (`#[serde(default)]` ->
805
+ * `false` if omitted, so pre-Priority-2 caller configs keep working
806
+ * unmodified, matching `false`'s meaning of "existing/unchanged behavior"
807
+ * everywhere else in this codebase). An unknown field, a missing *required*
808
+ * field, an unknown `stereoPolicy`/`ringTorsionPolicy`/`forceFieldPolicy`
809
+ * string, or a wrong-typed/out-of-range integer all fail closed rather than
810
+ * silently defaulting.
806
811
  *
807
812
  * Never throws. Always returns a JSON string tagged with `schemaVersion: 1` and
808
813
  * `ok: true`/`false` -- see the module doc for both shapes.
package/chematic_wasm.js CHANGED
@@ -104,7 +104,7 @@ export class ConformerHandle {
104
104
  const ret = wasm.conformerhandle_get_conformer_pdb(this.__wbg_ptr, idx);
105
105
  let v1;
106
106
  if (ret[0] !== 0) {
107
- v1 = getStringFromWasm0(ret[0], ret[1]).slice();
107
+ v1 = getStringFromWasm0(ret[0], ret[1]);
108
108
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
109
109
  }
110
110
  return v1;
@@ -1890,15 +1890,20 @@ export function ecfp_bitvec_custom(mol, radius, nbits, use_chirality) {
1890
1890
  * Run the opt-in v2 embedding pipeline, applied directly to `mol`'s own atom
1891
1891
  * order (never canonicalizes/reparses -- see the module doc).
1892
1892
  *
1893
- * `config_json` must be an object with exactly the 15 fields `PipelineV2Config`
1894
- * requires (camelCase keys: `embedSeed`, `maxAttempts`, `embedTimeoutMs`,
1895
- * `useExpTorsions`, `useSmallRingTorsions`, `useMacrocycleTorsions`,
1896
- * `useMacrocycle14Bounds`, `includeLegacyTorsionHeuristic`, `stereoPolicy`,
1897
- * `failOnUnevaluableStereo`, `forceFieldPolicy`, `forceFieldMaxIterations`,
1898
- * `gateMmff94TorsionOop`, `ringTorsionPolicy`, `totalTimeoutMs`) -- an unknown
1899
- * field, a missing field, an unknown `stereoPolicy`/`ringTorsionPolicy`/
1900
- * `forceFieldPolicy` string, or a wrong-typed/out-of-range integer all fail
1901
- * closed rather than silently defaulting.
1893
+ * `config_json` must be an object with the 15 required fields
1894
+ * `PipelineV2Config` requires (camelCase keys: `embedSeed`, `maxAttempts`,
1895
+ * `embedTimeoutMs`, `useExpTorsions`, `useSmallRingTorsions`,
1896
+ * `useMacrocycleTorsions`, `useMacrocycle14Bounds`,
1897
+ * `includeLegacyTorsionHeuristic`, `stereoPolicy`, `failOnUnevaluableStereo`,
1898
+ * `forceFieldPolicy`, `forceFieldMaxIterations`, `gateMmff94TorsionOop`,
1899
+ * `ringTorsionPolicy`, `totalTimeoutMs`), plus one optional field added in
1900
+ * Priority 2 (issue #227): `gateMmff94StretchBend` (`#[serde(default)]` ->
1901
+ * `false` if omitted, so pre-Priority-2 caller configs keep working
1902
+ * unmodified, matching `false`'s meaning of "existing/unchanged behavior"
1903
+ * everywhere else in this codebase). An unknown field, a missing *required*
1904
+ * field, an unknown `stereoPolicy`/`ringTorsionPolicy`/`forceFieldPolicy`
1905
+ * string, or a wrong-typed/out-of-range integer all fail closed rather than
1906
+ * silently defaulting.
1902
1907
  *
1903
1908
  * Never throws. Always returns a JSON string tagged with `schemaVersion: 1` and
1904
1909
  * `ok: true`/`false` -- see the module doc for both shapes.
@@ -5194,11 +5199,11 @@ export function xlogp3_per_atom_json(mol) {
5194
5199
  function __wbg_get_imports() {
5195
5200
  const import0 = {
5196
5201
  __proto__: null,
5197
- __wbg___wbindgen_is_undefined_c05833b95a3cf397: function(arg0) {
5202
+ __wbg___wbindgen_is_undefined_6cff064c44e0d823: function(arg0) {
5198
5203
  const ret = arg0 === undefined;
5199
5204
  return ret;
5200
5205
  },
5201
- __wbg___wbindgen_string_get_b0ca35b86a603356: function(arg0, arg1) {
5206
+ __wbg___wbindgen_string_get_d154f1e671052120: function(arg0, arg1) {
5202
5207
  const obj = arg1;
5203
5208
  const ret = typeof(obj) === 'string' ? obj : undefined;
5204
5209
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -5206,10 +5211,10 @@ function __wbg_get_imports() {
5206
5211
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
5207
5212
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
5208
5213
  },
5209
- __wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
5214
+ __wbg___wbindgen_throw_bb96b2010945f0bc: function(arg0, arg1) {
5210
5215
  throw new Error(getStringFromWasm0(arg0, arg1));
5211
5216
  },
5212
- __wbg_error_744744ff0c9861e6: function(arg0) {
5217
+ __wbg_error_dd408a7b3cb542dd: function(arg0) {
5213
5218
  console.error(arg0);
5214
5219
  },
5215
5220
  __wbg_now_e7c6795a7f81e10f: function(arg0) {
@@ -5220,19 +5225,19 @@ function __wbg_get_imports() {
5220
5225
  const ret = arg0.performance;
5221
5226
  return ret;
5222
5227
  },
5223
- __wbg_static_accessor_GLOBAL_4ef717fb391d88b7: function() {
5224
- const ret = typeof global === 'undefined' ? null : global;
5228
+ __wbg_static_accessor_GLOBAL_THIS_466428f93b4eaa76: function() {
5229
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
5225
5230
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5226
5231
  },
5227
- __wbg_static_accessor_GLOBAL_THIS_8d1badc68b5a74f4: function() {
5228
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
5232
+ __wbg_static_accessor_GLOBAL_c7aea38d4de089bc: function() {
5233
+ const ret = typeof global === 'undefined' ? null : global;
5229
5234
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5230
5235
  },
5231
- __wbg_static_accessor_SELF_146583524fe1469b: function() {
5236
+ __wbg_static_accessor_SELF_42d4fae05e59267a: function() {
5232
5237
  const ret = typeof self === 'undefined' ? null : self;
5233
5238
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5234
5239
  },
5235
- __wbg_static_accessor_WINDOW_f2829a2234d7819e: function() {
5240
+ __wbg_static_accessor_WINDOW_e0db14a0eba6a812: function() {
5236
5241
  const ret = typeof window === 'undefined' ? null : window;
5237
5242
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5238
5243
  },
@@ -5417,11 +5422,15 @@ function __wbg_finalize_init(instance, module) {
5417
5422
 
5418
5423
  async function __wbg_load(module, imports) {
5419
5424
  if (typeof Response === 'function' && module instanceof Response) {
5425
+ if (!module.ok) {
5426
+ throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
5427
+ }
5428
+
5420
5429
  if (typeof WebAssembly.instantiateStreaming === 'function') {
5421
5430
  try {
5422
5431
  return await WebAssembly.instantiateStreaming(module, imports);
5423
5432
  } catch (e) {
5424
- const validResponse = module.ok && expectedResponseType(module.type);
5433
+ const validResponse = expectedResponseType(module.type);
5425
5434
 
5426
5435
  if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
5427
5436
  console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
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.10.0",
8
+ "version": "0.12.0",
9
9
  "license": "MIT OR Apache-2.0",
10
10
  "repository": {
11
11
  "type": "git",