sci-form-wasm 0.10.6 → 0.12.3

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/sci_form_wasm.js CHANGED
@@ -1,85 +1,965 @@
1
1
  /* @ts-self-types="./sci_form_wasm.d.ts" */
2
2
  import { startWorkers } from './snippets/wasm-bindgen-rayon-38edf6e439f6d70d/src/workerHelpers.js';
3
3
 
4
+ /**
5
+ * Persistent live simulation state accessible from JavaScript.
6
+ *
7
+ * The browser creates one instance via `live_simulation_create`, then calls
8
+ * `live_simulation_step` and reads the flat coordinate buffer each
9
+ * animation frame.
10
+ */
11
+ export class LiveSimulation {
12
+ __destroy_into_raw() {
13
+ const ptr = this.__wbg_ptr;
14
+ this.__wbg_ptr = 0;
15
+ LiveSimulationFinalization.unregister(this);
16
+ return ptr;
17
+ }
18
+ free() {
19
+ const ptr = this.__destroy_into_raw();
20
+ wasm.__wbg_livesimulation_free(ptr, 0);
21
+ }
22
+ /**
23
+ * Apply a harmonic steering force pulling atom `atom_index` toward `(tx, ty, tz)`.
24
+ * @param {number} atom_index
25
+ * @param {number} tx
26
+ * @param {number} ty
27
+ * @param {number} tz
28
+ * @param {number} spring_k
29
+ */
30
+ apply_steering_force(atom_index, tx, ty, tz, spring_k) {
31
+ wasm.livesimulation_apply_steering_force(this.__wbg_ptr, atom_index, tx, ty, tz, spring_k);
32
+ }
33
+ /**
34
+ * Apply a Berendsen thermostat coupling towards `target_temp` K.
35
+ * @param {number} target_temp
36
+ * @param {number} tau_fs
37
+ * @param {number} dt_fs
38
+ */
39
+ apply_thermostat(target_temp, tau_fs, dt_fs) {
40
+ wasm.livesimulation_apply_thermostat(this.__wbg_ptr, target_temp, tau_fs, dt_fs);
41
+ }
42
+ /**
43
+ * Clear all accumulated steering forces (call before next IMD frame).
44
+ */
45
+ clear_steering() {
46
+ wasm.livesimulation_clear_steering(this.__wbg_ptr);
47
+ }
48
+ /**
49
+ * Return current kinetic energy.
50
+ * @returns {number}
51
+ */
52
+ kinetic_energy() {
53
+ const ret = wasm.livesimulation_kinetic_energy(this.__wbg_ptr);
54
+ return ret;
55
+ }
56
+ /**
57
+ * Create a new live simulation from SMILES, flat coordinates, and backend name.
58
+ *
59
+ * `backend`: `"uff"` | `"pm3"` | `"xtb"`.
60
+ * @param {string} smiles
61
+ * @param {string} coords_flat
62
+ * @param {string} backend
63
+ */
64
+ constructor(smiles, coords_flat, backend) {
65
+ try {
66
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
67
+ const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
68
+ const len0 = WASM_VECTOR_LEN;
69
+ const ptr1 = passStringToWasm0(coords_flat, wasm.__wbindgen_export, wasm.__wbindgen_export2);
70
+ const len1 = WASM_VECTOR_LEN;
71
+ const ptr2 = passStringToWasm0(backend, wasm.__wbindgen_export, wasm.__wbindgen_export2);
72
+ const len2 = WASM_VECTOR_LEN;
73
+ wasm.livesimulation_new(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
74
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
75
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
76
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
77
+ if (r2) {
78
+ throw takeObject(r1);
79
+ }
80
+ this.__wbg_ptr = r0 >>> 0;
81
+ LiveSimulationFinalization.register(this, this.__wbg_ptr, this);
82
+ return this;
83
+ } finally {
84
+ wasm.__wbindgen_add_to_stack_pointer(16);
85
+ }
86
+ }
87
+ /**
88
+ * Get the number of atoms.
89
+ * @returns {number}
90
+ */
91
+ num_atoms() {
92
+ const ret = wasm.livesimulation_num_atoms(this.__wbg_ptr);
93
+ return ret >>> 0;
94
+ }
95
+ /**
96
+ * Return current flat positions as a JSON array.
97
+ * @returns {string}
98
+ */
99
+ positions_json() {
100
+ let deferred1_0;
101
+ let deferred1_1;
102
+ try {
103
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
104
+ wasm.livesimulation_positions_json(retptr, this.__wbg_ptr);
105
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
106
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
107
+ deferred1_0 = r0;
108
+ deferred1_1 = r1;
109
+ return getStringFromWasm0(r0, r1);
110
+ } finally {
111
+ wasm.__wbindgen_add_to_stack_pointer(16);
112
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
113
+ }
114
+ }
115
+ /**
116
+ * Sync internal buffers and return a pointer to the flat positions array.
117
+ *
118
+ * The caller (JS side) can construct a `Float64Array` view over WASM memory
119
+ * at this pointer, with length = `num_atoms * 3`.
120
+ * @returns {number}
121
+ */
122
+ positions_ptr() {
123
+ const ret = wasm.livesimulation_positions_ptr(this.__wbg_ptr);
124
+ return ret >>> 0;
125
+ }
126
+ /**
127
+ * Return current potential energy (from last force computation).
128
+ * @returns {number}
129
+ */
130
+ potential_energy() {
131
+ const ret = wasm.livesimulation_potential_energy(this.__wbg_ptr);
132
+ return ret;
133
+ }
134
+ /**
135
+ * Set velocities from a Maxwell-Boltzmann distribution at `temperature` K.
136
+ * @param {number} temperature
137
+ * @param {bigint} seed
138
+ */
139
+ set_temperature(temperature, seed) {
140
+ wasm.livesimulation_set_temperature(this.__wbg_ptr, temperature, seed);
141
+ }
142
+ /**
143
+ * Advance the simulation by `n_steps` with time step `dt_fs` (femtoseconds).
144
+ * @param {number} n_steps
145
+ * @param {number} dt_fs
146
+ */
147
+ step(n_steps, dt_fs) {
148
+ wasm.livesimulation_step(this.__wbg_ptr, n_steps, dt_fs);
149
+ }
150
+ /**
151
+ * Return simulation step count.
152
+ * @returns {number}
153
+ */
154
+ step_count() {
155
+ const ret = wasm.livesimulation_step_count(this.__wbg_ptr);
156
+ return ret >>> 0;
157
+ }
158
+ /**
159
+ * Return current kinetic temperature in Kelvin.
160
+ * @returns {number}
161
+ */
162
+ temperature() {
163
+ const ret = wasm.livesimulation_temperature(this.__wbg_ptr);
164
+ return ret;
165
+ }
166
+ }
167
+ if (Symbol.dispose) LiveSimulation.prototype[Symbol.dispose] = LiveSimulation.prototype.free;
168
+
169
+ /**
170
+ * Compute the Boys function F_n(x).
171
+ *
172
+ * Returns JSON: `{ "value": 0.9846 }`
173
+ * @param {number} n
174
+ * @param {number} x
175
+ * @returns {string}
176
+ */
177
+ export function alpha_boys_function(n, x) {
178
+ let deferred1_0;
179
+ let deferred1_1;
180
+ try {
181
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
182
+ wasm.alpha_boys_function(retptr, n, x);
183
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
184
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
185
+ deferred1_0 = r0;
186
+ deferred1_1 = r1;
187
+ return getStringFromWasm0(r0, r1);
188
+ } finally {
189
+ wasm.__wbindgen_add_to_stack_pointer(16);
190
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
191
+ }
192
+ }
193
+
194
+ /**
195
+ * Compute Atomic Environment Vectors (AEVs) for each atom.
196
+ *
197
+ * Uses default symmetry function parameters unless `params_json` is provided.
198
+ *
199
+ * Returns JSON: `{ "n_atoms": 5, "aev_length": 384, "aevs": [[...], [...]] }`
200
+ * @param {string} elements_json
201
+ * @param {string} coords_flat_json
202
+ * @param {string} params_json
203
+ * @returns {string}
204
+ */
205
+ export function alpha_compute_aevs(elements_json, coords_flat_json, params_json) {
206
+ let deferred4_0;
207
+ let deferred4_1;
208
+ try {
209
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
210
+ const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
211
+ const len0 = WASM_VECTOR_LEN;
212
+ const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
213
+ const len1 = WASM_VECTOR_LEN;
214
+ const ptr2 = passStringToWasm0(params_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
215
+ const len2 = WASM_VECTOR_LEN;
216
+ wasm.alpha_compute_aevs(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
217
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
218
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
219
+ deferred4_0 = r0;
220
+ deferred4_1 = r1;
221
+ return getStringFromWasm0(r0, r1);
222
+ } finally {
223
+ wasm.__wbindgen_add_to_stack_pointer(16);
224
+ wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
225
+ }
226
+ }
227
+
228
+ /**
229
+ * Run a Kohn-Sham DFT single-point calculation.
230
+ *
231
+ * `method`: `"svwn"` (LDA) | `"pbe"` (GGA, default).
232
+ *
233
+ * Returns JSON `DftResult`:
234
+ * ```json
235
+ * { "energy": -1.12, "homo_energy": -0.5, "lumo_energy": 0.1, "gap": 0.6,
236
+ * "converged": true, "n_basis": 5, "scf_iterations": 12,
237
+ * "mulliken_charges": [...], "orbital_energies": [...],
238
+ * "nuclear_repulsion": 0.72, "xc_energy": -0.3 }
239
+ * ```
240
+ * @param {string} elements_json
241
+ * @param {string} coords_flat_json
242
+ * @param {string} method
243
+ * @returns {string}
244
+ */
245
+ export function alpha_compute_dft(elements_json, coords_flat_json, method) {
246
+ let deferred4_0;
247
+ let deferred4_1;
248
+ try {
249
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
250
+ const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
251
+ const len0 = WASM_VECTOR_LEN;
252
+ const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
253
+ const len1 = WASM_VECTOR_LEN;
254
+ const ptr2 = passStringToWasm0(method, wasm.__wbindgen_export, wasm.__wbindgen_export2);
255
+ const len2 = WASM_VECTOR_LEN;
256
+ wasm.alpha_compute_dft(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
257
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
258
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
259
+ deferred4_0 = r0;
260
+ deferred4_1 = r1;
261
+ return getStringFromWasm0(r0, r1);
262
+ } finally {
263
+ wasm.__wbindgen_add_to_stack_pointer(16);
264
+ wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
265
+ }
266
+ }
267
+
268
+ /**
269
+ * Solve EEM charges for a molecule using the ReaxFF charge model.
270
+ *
271
+ * Returns JSON: `{ "charges": [...], "total_charge": 0.0 }`
272
+ * @param {string} elements_json
273
+ * @param {string} coords_flat_json
274
+ * @returns {string}
275
+ */
276
+ export function alpha_compute_eem_charges(elements_json, coords_flat_json) {
277
+ let deferred3_0;
278
+ let deferred3_1;
279
+ try {
280
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
281
+ const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
282
+ const len0 = WASM_VECTOR_LEN;
283
+ const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
284
+ const len1 = WASM_VECTOR_LEN;
285
+ wasm.alpha_compute_eem_charges(retptr, ptr0, len0, ptr1, len1);
286
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
287
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
288
+ deferred3_0 = r0;
289
+ deferred3_1 = r1;
290
+ return getStringFromWasm0(r0, r1);
291
+ } finally {
292
+ wasm.__wbindgen_add_to_stack_pointer(16);
293
+ wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
294
+ }
295
+ }
296
+
297
+ /**
298
+ * Compute MLFF energy and forces using pre-configured element networks.
299
+ *
300
+ * `config_json` is a JSON object matching `MlffConfig`:
301
+ * ```json
302
+ * {
303
+ * "aev_params": { "radial_cutoff": 6.0, "angular_cutoff": 3.5, ... },
304
+ * "element_nets": {
305
+ * "1": { "layers": [[...weights...]], "biases": [[...]] },
306
+ * "6": { ... }
307
+ * }
308
+ * }
309
+ * ```
310
+ *
311
+ * Returns JSON: `{ "energy": -1.23, "atomic_energies": [...], "forces": [...] }`
312
+ * @param {string} elements_json
313
+ * @param {string} coords_flat_json
314
+ * @param {string} config_json
315
+ * @returns {string}
316
+ */
317
+ export function alpha_compute_mlff(elements_json, coords_flat_json, config_json) {
318
+ let deferred4_0;
319
+ let deferred4_1;
320
+ try {
321
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
322
+ const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
323
+ const len0 = WASM_VECTOR_LEN;
324
+ const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
325
+ const len1 = WASM_VECTOR_LEN;
326
+ const ptr2 = passStringToWasm0(config_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
327
+ const len2 = WASM_VECTOR_LEN;
328
+ wasm.alpha_compute_mlff(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
329
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
330
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
331
+ deferred4_0 = r0;
332
+ deferred4_1 = r1;
333
+ return getStringFromWasm0(r0, r1);
334
+ } finally {
335
+ wasm.__wbindgen_add_to_stack_pointer(16);
336
+ wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
337
+ }
338
+ }
339
+
340
+ /**
341
+ * Compute ReaxFF energy components for a molecule (no gradient).
342
+ *
343
+ * Returns JSON with keys `bonded`, `coulomb`, `van_der_waals`, `total`.
344
+ * @param {string} elements_json
345
+ * @param {string} coords_flat_json
346
+ * @returns {string}
347
+ */
348
+ export function alpha_compute_reaxff_energy(elements_json, coords_flat_json) {
349
+ let deferred3_0;
350
+ let deferred3_1;
351
+ try {
352
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
353
+ const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
354
+ const len0 = WASM_VECTOR_LEN;
355
+ const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
356
+ const len1 = WASM_VECTOR_LEN;
357
+ wasm.alpha_compute_reaxff_energy(retptr, ptr0, len0, ptr1, len1);
358
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
359
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
360
+ deferred3_0 = r0;
361
+ deferred3_1 = r1;
362
+ return getStringFromWasm0(r0, r1);
363
+ } finally {
364
+ wasm.__wbindgen_add_to_stack_pointer(16);
365
+ wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
366
+ }
367
+ }
368
+
369
+ /**
370
+ * Compute ReaxFF energy and gradient for a molecule.
371
+ *
372
+ * Returns JSON:
373
+ * ```json
374
+ * { "energy_kcal_mol": 12.3,
375
+ * "gradient": [gx0, gy0, gz0, gx1, gy1, gz1, ...] }
376
+ * ```
377
+ * @param {string} elements_json
378
+ * @param {string} coords_flat_json
379
+ * @returns {string}
380
+ */
381
+ export function alpha_compute_reaxff_gradient(elements_json, coords_flat_json) {
382
+ let deferred3_0;
383
+ let deferred3_1;
384
+ try {
385
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
386
+ const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
387
+ const len0 = WASM_VECTOR_LEN;
388
+ const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
389
+ const len1 = WASM_VECTOR_LEN;
390
+ wasm.alpha_compute_reaxff_gradient(retptr, ptr0, len0, ptr1, len1);
391
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
392
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
393
+ deferred3_0 = r0;
394
+ deferred3_1 = r1;
395
+ return getStringFromWasm0(r0, r1);
396
+ } finally {
397
+ wasm.__wbindgen_add_to_stack_pointer(16);
398
+ wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
399
+ }
400
+ }
401
+
402
+ /**
403
+ * Compute a single (ss|ss) two-electron repulsion integral using Obara-Saika.
404
+ *
405
+ * `shell_a_json` / `shell_b_json` / `shell_c_json` / `shell_d_json` are JSON
406
+ * objects `{ "alpha": 1.0, "center": [x, y, z] }`.
407
+ *
408
+ * Returns JSON: `{ "eri": 4.37 }`
409
+ * @param {string} shell_a_json
410
+ * @param {string} shell_b_json
411
+ * @param {string} shell_c_json
412
+ * @param {string} shell_d_json
413
+ * @returns {string}
414
+ */
415
+ export function alpha_eri_ssss(shell_a_json, shell_b_json, shell_c_json, shell_d_json) {
416
+ let deferred5_0;
417
+ let deferred5_1;
418
+ try {
419
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
420
+ const ptr0 = passStringToWasm0(shell_a_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
421
+ const len0 = WASM_VECTOR_LEN;
422
+ const ptr1 = passStringToWasm0(shell_b_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
423
+ const len1 = WASM_VECTOR_LEN;
424
+ const ptr2 = passStringToWasm0(shell_c_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
425
+ const len2 = WASM_VECTOR_LEN;
426
+ const ptr3 = passStringToWasm0(shell_d_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
427
+ const len3 = WASM_VECTOR_LEN;
428
+ wasm.alpha_eri_ssss(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
429
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
430
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
431
+ deferred5_0 = r0;
432
+ deferred5_1 = r1;
433
+ return getStringFromWasm0(r0, r1);
434
+ } finally {
435
+ wasm.__wbindgen_add_to_stack_pointer(16);
436
+ wasm.__wbindgen_export4(deferred5_0, deferred5_1, 1);
437
+ }
438
+ }
439
+
440
+ /**
441
+ * Grow the reaction string and find the transition state node between
442
+ * reactant and product geometries using UFF energy.
443
+ *
444
+ * Returns JSON `GsmResult`:
445
+ * ```json
446
+ * { "ts_coords": [...], "ts_energy": 12.3,
447
+ * "path_energies": [...], "n_nodes": 5, "converged": true }
448
+ * ```
449
+ * @param {string} smiles
450
+ * @param {string} reactant_coords_json
451
+ * @param {string} product_coords_json
452
+ * @param {string} config_json
453
+ * @returns {string}
454
+ */
455
+ export function alpha_gsm_find_ts(smiles, reactant_coords_json, product_coords_json, config_json) {
456
+ let deferred5_0;
457
+ let deferred5_1;
458
+ try {
459
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
460
+ const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
461
+ const len0 = WASM_VECTOR_LEN;
462
+ const ptr1 = passStringToWasm0(reactant_coords_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
463
+ const len1 = WASM_VECTOR_LEN;
464
+ const ptr2 = passStringToWasm0(product_coords_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
465
+ const len2 = WASM_VECTOR_LEN;
466
+ const ptr3 = passStringToWasm0(config_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
467
+ const len3 = WASM_VECTOR_LEN;
468
+ wasm.alpha_gsm_find_ts(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
469
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
470
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
471
+ deferred5_0 = r0;
472
+ deferred5_1 = r1;
473
+ return getStringFromWasm0(r0, r1);
474
+ } finally {
475
+ wasm.__wbindgen_add_to_stack_pointer(16);
476
+ wasm.__wbindgen_export4(deferred5_0, deferred5_1, 1);
477
+ }
478
+ }
479
+
480
+ /**
481
+ * Interpolate a node along the reaction path at parameter t ∈ [0, 1].
482
+ *
483
+ * `reactant_json` / `product_json` — flat coordinate arrays.
484
+ *
485
+ * Returns JSON: `{ "coords": [...] }`
486
+ * @param {string} reactant_json
487
+ * @param {string} product_json
488
+ * @param {number} t
489
+ * @returns {string}
490
+ */
491
+ export function alpha_gsm_interpolate(reactant_json, product_json, t) {
492
+ let deferred3_0;
493
+ let deferred3_1;
494
+ try {
495
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
496
+ const ptr0 = passStringToWasm0(reactant_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
497
+ const len0 = WASM_VECTOR_LEN;
498
+ const ptr1 = passStringToWasm0(product_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
499
+ const len1 = WASM_VECTOR_LEN;
500
+ wasm.alpha_gsm_interpolate(retptr, ptr0, len0, ptr1, len1, t);
501
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
502
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
503
+ deferred3_0 = r0;
504
+ deferred3_1 = r1;
505
+ return getStringFromWasm0(r0, r1);
506
+ } finally {
507
+ wasm.__wbindgen_add_to_stack_pointer(16);
508
+ wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
509
+ }
510
+ }
511
+
512
+ /**
513
+ * Return alpha module metadata.
514
+ *
515
+ * Returns JSON: `{ "alpha_modules": ["dft", "reaxff", "mlff", "obara-saika",
516
+ * "cga", "gsm", "sdr", "dynamics-live"] }`
517
+ * @returns {string}
518
+ */
519
+ export function alpha_modules_info() {
520
+ let deferred1_0;
521
+ let deferred1_1;
522
+ try {
523
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
524
+ wasm.alpha_modules_info(retptr);
525
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
526
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
527
+ deferred1_0 = r0;
528
+ deferred1_1 = r1;
529
+ return getStringFromWasm0(r0, r1);
530
+ } finally {
531
+ wasm.__wbindgen_add_to_stack_pointer(16);
532
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
533
+ }
534
+ }
535
+
536
+ /**
537
+ * Refine a single dihedral torsion to a target angle using CGA.
538
+ *
539
+ * `smiles` — SMILES string for bond connectivity.
540
+ * `torsion_indices_json` — 4 atom indices [i, j, k, l].
541
+ * `target_angle_rad` — target dihedral angle in radians.
542
+ *
543
+ * Returns JSON: `{ "coords": [...] }`
544
+ * @param {string} elements_json
545
+ * @param {string} coords_flat_json
546
+ * @param {string} smiles
547
+ * @param {string} torsion_indices_json
548
+ * @param {number} target_angle_rad
549
+ * @returns {string}
550
+ */
551
+ export function alpha_refine_torsion_cga(elements_json, coords_flat_json, smiles, torsion_indices_json, target_angle_rad) {
552
+ let deferred5_0;
553
+ let deferred5_1;
554
+ try {
555
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
556
+ const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
557
+ const len0 = WASM_VECTOR_LEN;
558
+ const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
559
+ const len1 = WASM_VECTOR_LEN;
560
+ const ptr2 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
561
+ const len2 = WASM_VECTOR_LEN;
562
+ const ptr3 = passStringToWasm0(torsion_indices_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
563
+ const len3 = WASM_VECTOR_LEN;
564
+ wasm.alpha_refine_torsion_cga(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, target_angle_rad);
565
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
566
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
567
+ deferred5_0 = r0;
568
+ deferred5_1 = r1;
569
+ return getStringFromWasm0(r0, r1);
570
+ } finally {
571
+ wasm.__wbindgen_add_to_stack_pointer(16);
572
+ wasm.__wbindgen_export4(deferred5_0, deferred5_1, 1);
573
+ }
574
+ }
575
+
576
+ /**
577
+ * Apply a CGA dihedral rotation to a sub-tree of atoms.
578
+ *
579
+ * `coords_flat_json` — flat [x0,y0,z0,...] for all atoms.
580
+ * `subtree_indices_json` — atom indices to rotate.
581
+ * `axis_a_json` / `axis_b_json` — the two atoms defining the rotation axis ([x,y,z]).
582
+ * `angle_rad` — rotation angle in radians.
583
+ *
584
+ * Returns JSON: `{ "coords": [x0,y0,z0,...] }`
585
+ * @param {string} coords_flat_json
586
+ * @param {string} subtree_indices_json
587
+ * @param {string} axis_a_json
588
+ * @param {string} axis_b_json
589
+ * @param {number} angle_rad
590
+ * @returns {string}
591
+ */
592
+ export function alpha_rotate_dihedral_cga(coords_flat_json, subtree_indices_json, axis_a_json, axis_b_json, angle_rad) {
593
+ let deferred5_0;
594
+ let deferred5_1;
595
+ try {
596
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
597
+ const ptr0 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
598
+ const len0 = WASM_VECTOR_LEN;
599
+ const ptr1 = passStringToWasm0(subtree_indices_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
600
+ const len1 = WASM_VECTOR_LEN;
601
+ const ptr2 = passStringToWasm0(axis_a_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
602
+ const len2 = WASM_VECTOR_LEN;
603
+ const ptr3 = passStringToWasm0(axis_b_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
604
+ const len3 = WASM_VECTOR_LEN;
605
+ wasm.alpha_rotate_dihedral_cga(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, angle_rad);
606
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
607
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
608
+ deferred5_0 = r0;
609
+ deferred5_1 = r1;
610
+ return getStringFromWasm0(r0, r1);
611
+ } finally {
612
+ wasm.__wbindgen_add_to_stack_pointer(16);
613
+ wasm.__wbindgen_export4(deferred5_0, deferred5_1, 1);
614
+ }
615
+ }
616
+
617
+ /**
618
+ * Compute Schwarz pre-screening bound Q_ab = √〈ab|ab〉.
619
+ *
620
+ * Returns JSON: `{ "schwarz_bound": 0.8432 }`.
621
+ * @param {number} alpha
622
+ * @param {string} center_a_json
623
+ * @param {number} beta
624
+ * @param {string} center_b_json
625
+ * @returns {string}
626
+ */
627
+ export function alpha_schwarz_bound(alpha, center_a_json, beta, center_b_json) {
628
+ let deferred3_0;
629
+ let deferred3_1;
630
+ try {
631
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
632
+ const ptr0 = passStringToWasm0(center_a_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
633
+ const len0 = WASM_VECTOR_LEN;
634
+ const ptr1 = passStringToWasm0(center_b_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
635
+ const len1 = WASM_VECTOR_LEN;
636
+ wasm.alpha_schwarz_bound(retptr, alpha, ptr0, len0, beta, ptr1, len1);
637
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
638
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
639
+ deferred3_0 = r0;
640
+ deferred3_1 = r1;
641
+ return getStringFromWasm0(r0, r1);
642
+ } finally {
643
+ wasm.__wbindgen_add_to_stack_pointer(16);
644
+ wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
645
+ }
646
+ }
647
+
648
+ /**
649
+ * Embed a molecule from pairwise distance constraints using Semidefinite Relaxation.
650
+ *
651
+ * `distance_pairs_json` — array of `[[i, j, d_ij], ...]` where d_ij is in Å.
652
+ * `n_atoms` — total number of atoms.
653
+ * `config_json` — optional SdrConfig JSON or `{}` for defaults.
654
+ *
655
+ * Returns JSON `SdrResult`:
656
+ * ```json
657
+ * { "coords": [...], "residual": 0.001, "converged": true, "iterations": 45 }
658
+ * ```
659
+ * @param {string} distance_pairs_json
660
+ * @param {number} n_atoms
661
+ * @param {string} config_json
662
+ * @returns {string}
663
+ */
664
+ export function alpha_sdr_embed(distance_pairs_json, n_atoms, config_json) {
665
+ let deferred3_0;
666
+ let deferred3_1;
667
+ try {
668
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
669
+ const ptr0 = passStringToWasm0(distance_pairs_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
670
+ const len0 = WASM_VECTOR_LEN;
671
+ const ptr1 = passStringToWasm0(config_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
672
+ const len1 = WASM_VECTOR_LEN;
673
+ wasm.alpha_sdr_embed(retptr, ptr0, len0, n_atoms, ptr1, len1);
674
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
675
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
676
+ deferred3_0 = r0;
677
+ deferred3_1 = r1;
678
+ return getStringFromWasm0(r0, r1);
679
+ } finally {
680
+ wasm.__wbindgen_add_to_stack_pointer(16);
681
+ wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
682
+ }
683
+ }
684
+
4
685
  /**
5
686
  * Analyze aromaticity and graph-level stereocenters from SMILES.
6
687
  * @param {string} smiles
7
688
  * @returns {string}
8
689
  */
9
- export function analyze_graph_features(smiles) {
10
- let deferred2_0;
11
- let deferred2_1;
690
+ export function analyze_graph_features(smiles) {
691
+ let deferred2_0;
692
+ let deferred2_1;
693
+ try {
694
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
695
+ const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
696
+ const len0 = WASM_VECTOR_LEN;
697
+ wasm.analyze_graph_features(retptr, ptr0, len0);
698
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
699
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
700
+ deferred2_0 = r0;
701
+ deferred2_1 = r1;
702
+ return getStringFromWasm0(r0, r1);
703
+ } finally {
704
+ wasm.__wbindgen_add_to_stack_pointer(16);
705
+ wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
706
+ }
707
+ }
708
+
709
+ /**
710
+ * Analyze stereochemistry: detect R/S stereocenters and E/Z double bonds.
711
+ *
712
+ * `coords_flat` is a JSON array of flat coordinates (may be empty `"[]"` for topology-only).
713
+ * Returns JSON `StereoAnalysis`.
714
+ * @param {string} smiles
715
+ * @param {string} coords_flat
716
+ * @returns {string}
717
+ */
718
+ export function analyze_stereo(smiles, coords_flat) {
719
+ let deferred3_0;
720
+ let deferred3_1;
721
+ try {
722
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
723
+ const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
724
+ const len0 = WASM_VECTOR_LEN;
725
+ const ptr1 = passStringToWasm0(coords_flat, wasm.__wbindgen_export, wasm.__wbindgen_export2);
726
+ const len1 = WASM_VECTOR_LEN;
727
+ wasm.analyze_stereo(retptr, ptr0, len0, ptr1, len1);
728
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
729
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
730
+ deferred3_0 = r0;
731
+ deferred3_1 = r1;
732
+ return getStringFromWasm0(r0, r1);
733
+ } finally {
734
+ wasm.__wbindgen_add_to_stack_pointer(16);
735
+ wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
736
+ }
737
+ }
738
+
739
+ /**
740
+ * Assemble a framework crystal structure.
741
+ *
742
+ * `topology`: "pcu", "dia", or "sql".
743
+ * `metal`: atomic number of the metal center.
744
+ * `geometry`: "linear", "tetrahedral", "octahedral", "square_planar", "trigonal".
745
+ * `lattice_a`: cubic lattice parameter in Å.
746
+ * `supercell`: replication factor (1 = no replication).
747
+ * @param {string} topology
748
+ * @param {number} metal
749
+ * @param {string} geometry
750
+ * @param {number} lattice_a
751
+ * @param {number} supercell
752
+ * @returns {string}
753
+ */
754
+ export function assemble_framework(topology, metal, geometry, lattice_a, supercell) {
755
+ let deferred3_0;
756
+ let deferred3_1;
757
+ try {
758
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
759
+ const ptr0 = passStringToWasm0(topology, wasm.__wbindgen_export, wasm.__wbindgen_export2);
760
+ const len0 = WASM_VECTOR_LEN;
761
+ const ptr1 = passStringToWasm0(geometry, wasm.__wbindgen_export, wasm.__wbindgen_export2);
762
+ const len1 = WASM_VECTOR_LEN;
763
+ wasm.assemble_framework(retptr, ptr0, len0, metal, ptr1, len1, lattice_a, supercell);
764
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
765
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
766
+ deferred3_0 = r0;
767
+ deferred3_1 = r1;
768
+ return getStringFromWasm0(r0, r1);
769
+ } finally {
770
+ wasm.__wbindgen_add_to_stack_pointer(16);
771
+ wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
772
+ }
773
+ }
774
+
775
+ /**
776
+ * Compute constant-potential charges using the CPM model.
777
+ *
778
+ * `potential` — target electrode potential in eV.
779
+ *
780
+ * Returns JSON: `{ "charges": [...], "total_charge": 0.5, "energy": -1.2 }`
781
+ * @param {string} elements_json
782
+ * @param {string} coords_flat_json
783
+ * @param {number} potential
784
+ * @returns {string}
785
+ */
786
+ export function beta_compute_cpm_charges(elements_json, coords_flat_json, potential) {
787
+ let deferred3_0;
788
+ let deferred3_1;
789
+ try {
790
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
791
+ const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
792
+ const len0 = WASM_VECTOR_LEN;
793
+ const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
794
+ const len1 = WASM_VECTOR_LEN;
795
+ wasm.beta_compute_cpm_charges(retptr, ptr0, len0, ptr1, len1, potential);
796
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
797
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
798
+ deferred3_0 = r0;
799
+ deferred3_1 = r1;
800
+ return getStringFromWasm0(r0, r1);
801
+ } finally {
802
+ wasm.__wbindgen_add_to_stack_pointer(16);
803
+ wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
804
+ }
805
+ }
806
+
807
+ /**
808
+ * Compute EHT Density of States using the Kernel Polynomial Method (O(N)).
809
+ *
810
+ * Builds the EHT Hamiltonian internally from geometry, then runs KPM.
811
+ *
812
+ * `config_json` fields (all optional):
813
+ * - `order` (int, default 100): Chebyshev expansion order
814
+ * - `n_points` (int, default 200): Energy grid points
815
+ * - `e_min` (float): Override spectral minimum
816
+ * - `e_max` (float): Override spectral maximum
817
+ * - `temperature` (float, default 0): Electronic temperature in K
818
+ *
819
+ * Returns JSON `KpmDosResult`:
820
+ * ```json
821
+ * { "energies": [...], "total_dos": [...], "e_min": -30.0, "e_max": 5.0,
822
+ * "order": 100 }
823
+ * ```
824
+ * @param {string} elements_json
825
+ * @param {string} coords_flat_json
826
+ * @param {string} config_json
827
+ * @returns {string}
828
+ */
829
+ export function beta_compute_kpm_dos(elements_json, coords_flat_json, config_json) {
830
+ let deferred4_0;
831
+ let deferred4_1;
832
+ try {
833
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
834
+ const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
835
+ const len0 = WASM_VECTOR_LEN;
836
+ const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
837
+ const len1 = WASM_VECTOR_LEN;
838
+ const ptr2 = passStringToWasm0(config_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
839
+ const len2 = WASM_VECTOR_LEN;
840
+ wasm.beta_compute_kpm_dos(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
841
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
842
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
843
+ deferred4_0 = r0;
844
+ deferred4_1 = r1;
845
+ return getStringFromWasm0(r0, r1);
846
+ } finally {
847
+ wasm.__wbindgen_add_to_stack_pointer(16);
848
+ wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
849
+ }
850
+ }
851
+
852
+ /**
853
+ * Compute EHT Mulliken populations using KPM (O(N) stochastic trace).
854
+ *
855
+ * Returns JSON: `{ "mulliken_charges": [...], "orbital_populations": [...] }`
856
+ * @param {string} elements_json
857
+ * @param {string} coords_flat_json
858
+ * @returns {string}
859
+ */
860
+ export function beta_compute_kpm_mulliken(elements_json, coords_flat_json) {
861
+ let deferred3_0;
862
+ let deferred3_1;
12
863
  try {
13
864
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
14
- const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
865
+ const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
15
866
  const len0 = WASM_VECTOR_LEN;
16
- wasm.analyze_graph_features(retptr, ptr0, len0);
867
+ const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
868
+ const len1 = WASM_VECTOR_LEN;
869
+ wasm.beta_compute_kpm_mulliken(retptr, ptr0, len0, ptr1, len1);
17
870
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
18
871
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
19
- deferred2_0 = r0;
20
- deferred2_1 = r1;
872
+ deferred3_0 = r0;
873
+ deferred3_1 = r1;
21
874
  return getStringFromWasm0(r0, r1);
22
875
  } finally {
23
876
  wasm.__wbindgen_add_to_stack_pointer(16);
24
- wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
877
+ wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
25
878
  }
26
879
  }
27
880
 
28
881
  /**
29
- * Analyze stereochemistry: detect R/S stereocenters and E/Z double bonds.
882
+ * Compute vibrational frequencies using Mobile Block Hessian (reduced DOF).
30
883
  *
31
- * `coords_flat` is a JSON array of flat coordinates (may be empty `"[]"` for topology-only).
32
- * Returns JSON `StereoAnalysis`.
884
+ * Uses UFF as the energy evaluator internally.
885
+ *
886
+ * Returns JSON `MbhResult`:
887
+ * ```json
888
+ * { "frequencies": [...], "n_blocks": 3, "n_flexible": 2,
889
+ * "n_dof_reduced": 12, "n_dof_full": 24, "speedup": 2.0 }
890
+ * ```
891
+ * @param {string} elements_json
892
+ * @param {string} coords_flat_json
33
893
  * @param {string} smiles
34
- * @param {string} coords_flat
35
894
  * @returns {string}
36
895
  */
37
- export function analyze_stereo(smiles, coords_flat) {
38
- let deferred3_0;
39
- let deferred3_1;
896
+ export function beta_compute_mbh_frequencies(elements_json, coords_flat_json, smiles) {
897
+ let deferred4_0;
898
+ let deferred4_1;
40
899
  try {
41
900
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
42
- const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
901
+ const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
43
902
  const len0 = WASM_VECTOR_LEN;
44
- const ptr1 = passStringToWasm0(coords_flat, wasm.__wbindgen_export, wasm.__wbindgen_export2);
903
+ const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
45
904
  const len1 = WASM_VECTOR_LEN;
46
- wasm.analyze_stereo(retptr, ptr0, len0, ptr1, len1);
905
+ const ptr2 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
906
+ const len2 = WASM_VECTOR_LEN;
907
+ wasm.beta_compute_mbh_frequencies(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
47
908
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
48
909
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
49
- deferred3_0 = r0;
50
- deferred3_1 = r1;
910
+ deferred4_0 = r0;
911
+ deferred4_1 = r1;
51
912
  return getStringFromWasm0(r0, r1);
52
913
  } finally {
53
914
  wasm.__wbindgen_add_to_stack_pointer(16);
54
- wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
915
+ wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
55
916
  }
56
917
  }
57
918
 
58
919
  /**
59
- * Assemble a framework crystal structure.
920
+ * Return beta module metadata.
60
921
  *
61
- * `topology`: "pcu", "dia", or "sql".
62
- * `metal`: atomic number of the metal center.
63
- * `geometry`: "linear", "tetrahedral", "octahedral", "square_planar", "trigonal".
64
- * `lattice_a`: cubic lattice parameter in Å.
65
- * `supercell`: replication factor (1 = no replication).
66
- * @param {string} topology
67
- * @param {number} metal
68
- * @param {string} geometry
69
- * @param {number} lattice_a
70
- * @param {number} supercell
922
+ * Returns JSON: `{ "beta_modules": ["kpm", "mbh", "randnla", "riemannian", "cpm"] }`
71
923
  * @returns {string}
72
924
  */
73
- export function assemble_framework(topology, metal, geometry, lattice_a, supercell) {
925
+ export function beta_modules_info() {
926
+ let deferred1_0;
927
+ let deferred1_1;
928
+ try {
929
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
930
+ wasm.beta_modules_info(retptr);
931
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
932
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
933
+ deferred1_0 = r0;
934
+ deferred1_1 = r1;
935
+ return getStringFromWasm0(r0, r1);
936
+ } finally {
937
+ wasm.__wbindgen_add_to_stack_pointer(16);
938
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
939
+ }
940
+ }
941
+
942
+ /**
943
+ * Compute Riemannian distance between two PSD matrices.
944
+ *
945
+ * `matrix_a_json` / `matrix_b_json` — flat row-major arrays with `dim` dimension.
946
+ *
947
+ * Returns JSON: `{ "distance": 0.12 }`
948
+ * @param {string} matrix_a_json
949
+ * @param {string} matrix_b_json
950
+ * @param {number} dim
951
+ * @returns {string}
952
+ */
953
+ export function beta_psd_distance(matrix_a_json, matrix_b_json, dim) {
74
954
  let deferred3_0;
75
955
  let deferred3_1;
76
956
  try {
77
957
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
78
- const ptr0 = passStringToWasm0(topology, wasm.__wbindgen_export, wasm.__wbindgen_export2);
958
+ const ptr0 = passStringToWasm0(matrix_a_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
79
959
  const len0 = WASM_VECTOR_LEN;
80
- const ptr1 = passStringToWasm0(geometry, wasm.__wbindgen_export, wasm.__wbindgen_export2);
960
+ const ptr1 = passStringToWasm0(matrix_b_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
81
961
  const len1 = WASM_VECTOR_LEN;
82
- wasm.assemble_framework(retptr, ptr0, len0, metal, ptr1, len1, lattice_a, supercell);
962
+ wasm.beta_psd_distance(retptr, ptr0, len0, ptr1, len1, dim);
83
963
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
84
964
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
85
965
  deferred3_0 = r0;
@@ -91,6 +971,78 @@ export function assemble_framework(topology, metal, geometry, lattice_a, superce
91
971
  }
92
972
  }
93
973
 
974
+ /**
975
+ * Project a symmetric matrix onto the PSD (positive semidefinite) cone.
976
+ *
977
+ * `matrix_json` — flat row-major array with `dim` dimension.
978
+ *
979
+ * Returns JSON: `{ "matrix": [...flat psd projection...], "was_psd": false }`
980
+ * @param {string} matrix_json
981
+ * @param {number} dim
982
+ * @returns {string}
983
+ */
984
+ export function beta_psd_projection(matrix_json, dim) {
985
+ let deferred2_0;
986
+ let deferred2_1;
987
+ try {
988
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
989
+ const ptr0 = passStringToWasm0(matrix_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
990
+ const len0 = WASM_VECTOR_LEN;
991
+ wasm.beta_psd_projection(retptr, ptr0, len0, dim);
992
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
993
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
994
+ deferred2_0 = r0;
995
+ deferred2_1 = r1;
996
+ return getStringFromWasm0(r0, r1);
997
+ } finally {
998
+ wasm.__wbindgen_add_to_stack_pointer(16);
999
+ wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
1000
+ }
1001
+ }
1002
+
1003
+ /**
1004
+ * Solve EHT with a randomized Nyström eigensolver instead of O(N³) exact diag.
1005
+ *
1006
+ * `config_json` fields (all optional):
1007
+ * - `sketch_size` (int): Nyström rank k. Default: √N
1008
+ * - `seed` (int, default 42)
1009
+ * - `max_error` (float, default 0.001): Max relative residual before fallback
1010
+ * - `fallback_enabled` (bool, default true)
1011
+ *
1012
+ * Returns JSON:
1013
+ * ```json
1014
+ * { "orbital_energies": [...], "homo_index": 4, "homo_energy": -0.5,
1015
+ * "lumo_energy": 0.1, "gap": 0.6,
1016
+ * "k": 12, "residual_error": 0.0003, "used_fallback": false }
1017
+ * ```
1018
+ * @param {string} elements_json
1019
+ * @param {string} coords_flat_json
1020
+ * @param {string} config_json
1021
+ * @returns {string}
1022
+ */
1023
+ export function beta_solve_eht_randnla(elements_json, coords_flat_json, config_json) {
1024
+ let deferred4_0;
1025
+ let deferred4_1;
1026
+ try {
1027
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1028
+ const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1029
+ const len0 = WASM_VECTOR_LEN;
1030
+ const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1031
+ const len1 = WASM_VECTOR_LEN;
1032
+ const ptr2 = passStringToWasm0(config_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1033
+ const len2 = WASM_VECTOR_LEN;
1034
+ wasm.beta_solve_eht_randnla(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
1035
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1036
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1037
+ deferred4_0 = r0;
1038
+ deferred4_1 = r1;
1039
+ return getStringFromWasm0(r0, r1);
1040
+ } finally {
1041
+ wasm.__wbindgen_add_to_stack_pointer(16);
1042
+ wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
1043
+ }
1044
+ }
1045
+
94
1046
  /**
95
1047
  * Butina clustering on conformers (flat coordinate arrays in JSON).
96
1048
  *
@@ -228,6 +1180,39 @@ export function compute_charges(smiles) {
228
1180
  }
229
1181
  }
230
1182
 
1183
+ /**
1184
+ * **ALPHA** — Run Kohn-Sham DFT calculation.
1185
+ *
1186
+ * `method`: `"svwn"` (LDA) or `"pbe"` (GGA).
1187
+ * Returns JSON DftResult with energy, orbital energies, gap, Mulliken charges.
1188
+ * @param {string} elements_json
1189
+ * @param {string} coords_flat_json
1190
+ * @param {string} method
1191
+ * @returns {string}
1192
+ */
1193
+ export function compute_dft(elements_json, coords_flat_json, method) {
1194
+ let deferred4_0;
1195
+ let deferred4_1;
1196
+ try {
1197
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1198
+ const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1199
+ const len0 = WASM_VECTOR_LEN;
1200
+ const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1201
+ const len1 = WASM_VECTOR_LEN;
1202
+ const ptr2 = passStringToWasm0(method, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1203
+ const len2 = WASM_VECTOR_LEN;
1204
+ wasm.compute_dft(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
1205
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1206
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1207
+ deferred4_0 = r0;
1208
+ deferred4_1 = r1;
1209
+ return getStringFromWasm0(r0, r1);
1210
+ } finally {
1211
+ wasm.__wbindgen_add_to_stack_pointer(16);
1212
+ wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
1213
+ }
1214
+ }
1215
+
231
1216
  /**
232
1217
  * Compute molecular dipole moment.
233
1218
  * @param {string} elements
@@ -541,6 +1526,95 @@ export function compute_gb_solvation(elements, coords_flat, charges, solvent_die
541
1526
  }
542
1527
  }
543
1528
 
1529
+ /**
1530
+ * Run a GFN1-xTB tight-binding calculation.
1531
+ * @param {string} elements_json
1532
+ * @param {string} coords_flat_json
1533
+ * @returns {string}
1534
+ */
1535
+ export function compute_gfn1(elements_json, coords_flat_json) {
1536
+ let deferred3_0;
1537
+ let deferred3_1;
1538
+ try {
1539
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1540
+ const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1541
+ const len0 = WASM_VECTOR_LEN;
1542
+ const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1543
+ const len1 = WASM_VECTOR_LEN;
1544
+ wasm.compute_gfn1(retptr, ptr0, len0, ptr1, len1);
1545
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1546
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1547
+ deferred3_0 = r0;
1548
+ deferred3_1 = r1;
1549
+ return getStringFromWasm0(r0, r1);
1550
+ } finally {
1551
+ wasm.__wbindgen_add_to_stack_pointer(16);
1552
+ wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
1553
+ }
1554
+ }
1555
+
1556
+ /**
1557
+ * Run a GFN2-xTB tight-binding calculation.
1558
+ * @param {string} elements_json
1559
+ * @param {string} coords_flat_json
1560
+ * @returns {string}
1561
+ */
1562
+ export function compute_gfn2(elements_json, coords_flat_json) {
1563
+ let deferred3_0;
1564
+ let deferred3_1;
1565
+ try {
1566
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1567
+ const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1568
+ const len0 = WASM_VECTOR_LEN;
1569
+ const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1570
+ const len1 = WASM_VECTOR_LEN;
1571
+ wasm.compute_gfn2(retptr, ptr0, len0, ptr1, len1);
1572
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1573
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1574
+ deferred3_0 = r0;
1575
+ deferred3_1 = r1;
1576
+ return getStringFromWasm0(r0, r1);
1577
+ } finally {
1578
+ wasm.__wbindgen_add_to_stack_pointer(16);
1579
+ wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
1580
+ }
1581
+ }
1582
+
1583
+ /**
1584
+ * Run the public SCF-backed GIAO NMR route for a specific nucleus.
1585
+ * @param {string} elements_json
1586
+ * @param {string} coords_flat_json
1587
+ * @param {string} nucleus
1588
+ * @param {number} charge
1589
+ * @param {number} multiplicity
1590
+ * @param {number} max_scf_iter
1591
+ * @param {boolean} allow_basis_fallback
1592
+ * @param {boolean} use_parallel_eri
1593
+ * @returns {string}
1594
+ */
1595
+ export function compute_giao_nmr(elements_json, coords_flat_json, nucleus, charge, multiplicity, max_scf_iter, allow_basis_fallback, use_parallel_eri) {
1596
+ let deferred4_0;
1597
+ let deferred4_1;
1598
+ try {
1599
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1600
+ const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1601
+ const len0 = WASM_VECTOR_LEN;
1602
+ const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1603
+ const len1 = WASM_VECTOR_LEN;
1604
+ const ptr2 = passStringToWasm0(nucleus, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1605
+ const len2 = WASM_VECTOR_LEN;
1606
+ wasm.compute_giao_nmr(retptr, ptr0, len0, ptr1, len1, ptr2, len2, charge, multiplicity, max_scf_iter, allow_basis_fallback, use_parallel_eri);
1607
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1608
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1609
+ deferred4_0 = r0;
1610
+ deferred4_1 = r1;
1611
+ return getStringFromWasm0(r0, r1);
1612
+ } finally {
1613
+ wasm.__wbindgen_add_to_stack_pointer(16);
1614
+ wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
1615
+ }
1616
+ }
1617
+
544
1618
  /**
545
1619
  * Run a HF-3c calculation with default configuration.
546
1620
  * @param {string} elements_json
@@ -802,7 +1876,7 @@ export function compute_molecular_descriptors(smiles) {
802
1876
  /**
803
1877
  * Generate a complete NMR spectrum.
804
1878
  *
805
- * `nucleus`: "1H", "13C", "19F", "31P", "15N", "11B", "29Si", "77Se", "17O", or "33S".
1879
+ * `nucleus`: any supported nucleus alias, such as "1H", "13C", "35Cl", "79Br", or "195Pt".
806
1880
  * @param {string} smiles
807
1881
  * @param {string} nucleus
808
1882
  * @param {number} gamma
@@ -1963,6 +3037,33 @@ export function predict_nmr_shifts(smiles) {
1963
3037
  }
1964
3038
  }
1965
3039
 
3040
+ /**
3041
+ * Predict NMR chemical shifts for a specific nucleus.
3042
+ * @param {string} smiles
3043
+ * @param {string} nucleus
3044
+ * @returns {string}
3045
+ */
3046
+ export function predict_nmr_shifts_for_nucleus(smiles, nucleus) {
3047
+ let deferred3_0;
3048
+ let deferred3_1;
3049
+ try {
3050
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3051
+ const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3052
+ const len0 = WASM_VECTOR_LEN;
3053
+ const ptr1 = passStringToWasm0(nucleus, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3054
+ const len1 = WASM_VECTOR_LEN;
3055
+ wasm.predict_nmr_shifts_for_nucleus(retptr, ptr0, len0, ptr1, len1);
3056
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3057
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3058
+ deferred3_0 = r0;
3059
+ deferred3_1 = r1;
3060
+ return getStringFromWasm0(r0, r1);
3061
+ } finally {
3062
+ wasm.__wbindgen_add_to_stack_pointer(16);
3063
+ wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
3064
+ }
3065
+ }
3066
+
1966
3067
  /**
1967
3068
  * Search conformers by sampling, torsion refinement, and UFF ranking.
1968
3069
  *
@@ -2478,7 +3579,7 @@ function __wbg_get_imports(memory) {
2478
3579
  const a = state0.a;
2479
3580
  state0.a = 0;
2480
3581
  try {
2481
- return __wasm_bindgen_func_elem_623(a, state0.b, arg0, arg1);
3582
+ return __wasm_bindgen_func_elem_737(a, state0.b, arg0, arg1);
2482
3583
  } finally {
2483
3584
  state0.a = a;
2484
3585
  }
@@ -2496,7 +3597,7 @@ function __wbg_get_imports(memory) {
2496
3597
  const a = state0.a;
2497
3598
  state0.a = 0;
2498
3599
  try {
2499
- return __wasm_bindgen_func_elem_623(a, state0.b, arg0, arg1);
3600
+ return __wasm_bindgen_func_elem_737(a, state0.b, arg0, arg1);
2500
3601
  } finally {
2501
3602
  state0.a = a;
2502
3603
  }
@@ -2782,18 +3883,18 @@ function __wbg_get_imports(memory) {
2782
3883
  return addHeapObject(ret);
2783
3884
  },
2784
3885
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
2785
- // Cast intrinsic for `Closure(Closure { dtor_idx: 10, function: Function { arguments: [Externref], shim_idx: 11, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2786
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_2470, __wasm_bindgen_func_elem_2476);
3886
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 125, function: Function { arguments: [Externref], shim_idx: 126, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3887
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_2814, __wasm_bindgen_func_elem_2820);
2787
3888
  return addHeapObject(ret);
2788
3889
  },
2789
3890
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
2790
- // Cast intrinsic for `Closure(Closure { dtor_idx: 10, function: Function { arguments: [Externref], shim_idx: 47, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2791
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_2470, __wasm_bindgen_func_elem_709);
3891
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 125, function: Function { arguments: [Externref], shim_idx: 36, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3892
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_2814, __wasm_bindgen_func_elem_823);
2792
3893
  return addHeapObject(ret);
2793
3894
  },
2794
3895
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
2795
- // Cast intrinsic for `Closure(Closure { dtor_idx: 10, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 11, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2796
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_2470, __wasm_bindgen_func_elem_2476_2);
3896
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 125, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 126, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3897
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_2814, __wasm_bindgen_func_elem_2820_2);
2797
3898
  return addHeapObject(ret);
2798
3899
  },
2799
3900
  __wbindgen_cast_0000000000000004: function(arg0) {
@@ -2832,7 +3933,7 @@ function __wbg_get_imports(memory) {
2832
3933
  __wbindgen_object_drop_ref: function(arg0) {
2833
3934
  takeObject(arg0);
2834
3935
  },
2835
- memory: memory || new WebAssembly.Memory({initial:21,maximum:16384,shared:true}),
3936
+ memory: memory || new WebAssembly.Memory({initial:22,maximum:16384,shared:true}),
2836
3937
  };
2837
3938
  return {
2838
3939
  __proto__: null,
@@ -2840,18 +3941,18 @@ function __wbg_get_imports(memory) {
2840
3941
  };
2841
3942
  }
2842
3943
 
2843
- function __wasm_bindgen_func_elem_2476(arg0, arg1, arg2) {
2844
- wasm.__wasm_bindgen_func_elem_2476(arg0, arg1, addHeapObject(arg2));
3944
+ function __wasm_bindgen_func_elem_2820(arg0, arg1, arg2) {
3945
+ wasm.__wasm_bindgen_func_elem_2820(arg0, arg1, addHeapObject(arg2));
2845
3946
  }
2846
3947
 
2847
- function __wasm_bindgen_func_elem_2476_2(arg0, arg1, arg2) {
2848
- wasm.__wasm_bindgen_func_elem_2476_2(arg0, arg1, addHeapObject(arg2));
3948
+ function __wasm_bindgen_func_elem_2820_2(arg0, arg1, arg2) {
3949
+ wasm.__wasm_bindgen_func_elem_2820_2(arg0, arg1, addHeapObject(arg2));
2849
3950
  }
2850
3951
 
2851
- function __wasm_bindgen_func_elem_709(arg0, arg1, arg2) {
3952
+ function __wasm_bindgen_func_elem_823(arg0, arg1, arg2) {
2852
3953
  try {
2853
3954
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2854
- wasm.__wasm_bindgen_func_elem_709(retptr, arg0, arg1, addHeapObject(arg2));
3955
+ wasm.__wasm_bindgen_func_elem_823(retptr, arg0, arg1, addHeapObject(arg2));
2855
3956
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2856
3957
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2857
3958
  if (r1) {
@@ -2862,8 +3963,8 @@ function __wasm_bindgen_func_elem_709(arg0, arg1, arg2) {
2862
3963
  }
2863
3964
  }
2864
3965
 
2865
- function __wasm_bindgen_func_elem_623(arg0, arg1, arg2, arg3) {
2866
- wasm.__wasm_bindgen_func_elem_623(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
3966
+ function __wasm_bindgen_func_elem_737(arg0, arg1, arg2, arg3) {
3967
+ wasm.__wasm_bindgen_func_elem_737(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
2867
3968
  }
2868
3969
 
2869
3970
 
@@ -2886,6 +3987,9 @@ const __wbindgen_enum_GpuTextureSampleType = ["float", "unfilterable-float", "de
2886
3987
 
2887
3988
 
2888
3989
  const __wbindgen_enum_GpuTextureViewDimension = ["1d", "2d", "2d-array", "cube", "cube-array", "3d"];
3990
+ const LiveSimulationFinalization = (typeof FinalizationRegistry === 'undefined')
3991
+ ? { register: () => {}, unregister: () => {} }
3992
+ : new FinalizationRegistry(ptr => wasm.__wbg_livesimulation_free(ptr >>> 0, 1));
2889
3993
  const wbg_rayon_PoolBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
2890
3994
  ? { register: () => {}, unregister: () => {} }
2891
3995
  : new FinalizationRegistry(ptr => wasm.__wbg_wbg_rayon_poolbuilder_free(ptr >>> 0, 1));