sci-form-wasm 2.3.0 → 3.0.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/sci_form_wasm.js CHANGED
@@ -166,6 +166,326 @@ export class LiveSimulation {
166
166
  }
167
167
  if (Symbol.dispose) LiveSimulation.prototype[Symbol.dispose] = LiveSimulation.prototype.free;
168
168
 
169
+ /**
170
+ * Typed EHT result.
171
+ */
172
+ export class TypedEht {
173
+ static __wrap(ptr) {
174
+ ptr = ptr >>> 0;
175
+ const obj = Object.create(TypedEht.prototype);
176
+ obj.__wbg_ptr = ptr;
177
+ TypedEhtFinalization.register(obj, obj.__wbg_ptr, obj);
178
+ return obj;
179
+ }
180
+ __destroy_into_raw() {
181
+ const ptr = this.__wbg_ptr;
182
+ this.__wbg_ptr = 0;
183
+ TypedEhtFinalization.unregister(this);
184
+ return ptr;
185
+ }
186
+ free() {
187
+ const ptr = this.__destroy_into_raw();
188
+ wasm.__wbg_typedeht_free(ptr, 0);
189
+ }
190
+ /**
191
+ * MO coefficients, row-major `[ao * n_mo + mo]`.
192
+ * @returns {Float64Array}
193
+ */
194
+ get coefficients() {
195
+ const ret = wasm.typedeht_coefficients(this.__wbg_ptr);
196
+ return takeObject(ret);
197
+ }
198
+ /**
199
+ * Orbital energies in eV, ascending.
200
+ * @returns {Float64Array}
201
+ */
202
+ get energies() {
203
+ const ret = wasm.typedeht_energies(this.__wbg_ptr);
204
+ return takeObject(ret);
205
+ }
206
+ /**
207
+ * HOMO-LUMO gap in eV.
208
+ * @returns {number}
209
+ */
210
+ get gap() {
211
+ const ret = wasm.typedeht_gap(this.__wbg_ptr);
212
+ return ret;
213
+ }
214
+ /**
215
+ * HOMO energy in eV.
216
+ * @returns {number}
217
+ */
218
+ get homo_energy() {
219
+ const ret = wasm.typedeht_homo_energy(this.__wbg_ptr);
220
+ return ret;
221
+ }
222
+ /**
223
+ * LUMO energy in eV.
224
+ * @returns {number}
225
+ */
226
+ get lumo_energy() {
227
+ const ret = wasm.typedeht_lumo_energy(this.__wbg_ptr);
228
+ return ret;
229
+ }
230
+ /**
231
+ * Number of basis functions (rows in `coefficients`).
232
+ * @returns {number}
233
+ */
234
+ get n_basis() {
235
+ const ret = wasm.typedeht_n_basis(this.__wbg_ptr);
236
+ return ret >>> 0;
237
+ }
238
+ /**
239
+ * Number of valence electrons.
240
+ * @returns {number}
241
+ */
242
+ get n_electrons() {
243
+ const ret = wasm.typedeht_n_electrons(this.__wbg_ptr);
244
+ return ret >>> 0;
245
+ }
246
+ }
247
+ if (Symbol.dispose) TypedEht.prototype[Symbol.dispose] = TypedEht.prototype.free;
248
+
249
+ /**
250
+ * Typed embedding result: coordinates plus element numbers.
251
+ */
252
+ export class TypedEmbedding {
253
+ static __wrap(ptr) {
254
+ ptr = ptr >>> 0;
255
+ const obj = Object.create(TypedEmbedding.prototype);
256
+ obj.__wbg_ptr = ptr;
257
+ TypedEmbeddingFinalization.register(obj, obj.__wbg_ptr, obj);
258
+ return obj;
259
+ }
260
+ __destroy_into_raw() {
261
+ const ptr = this.__wbg_ptr;
262
+ this.__wbg_ptr = 0;
263
+ TypedEmbeddingFinalization.unregister(this);
264
+ return ptr;
265
+ }
266
+ free() {
267
+ const ptr = this.__destroy_into_raw();
268
+ wasm.__wbg_typedembedding_free(ptr, 0);
269
+ }
270
+ /**
271
+ * Flat coordinates `[x0,y0,z0,...]` in Å.
272
+ * @returns {Float64Array}
273
+ */
274
+ get coords() {
275
+ const ret = wasm.typedembedding_coords(this.__wbg_ptr);
276
+ return takeObject(ret);
277
+ }
278
+ /**
279
+ * Atomic numbers in atom order.
280
+ * @returns {Uint8Array}
281
+ */
282
+ get elements() {
283
+ const ret = wasm.typedembedding_elements(this.__wbg_ptr);
284
+ return takeObject(ret);
285
+ }
286
+ /**
287
+ * Number of atoms.
288
+ * @returns {number}
289
+ */
290
+ get num_atoms() {
291
+ const ret = wasm.typedembedding_num_atoms(this.__wbg_ptr);
292
+ return ret >>> 0;
293
+ }
294
+ }
295
+ if (Symbol.dispose) TypedEmbedding.prototype[Symbol.dispose] = TypedEmbedding.prototype.free;
296
+
297
+ /**
298
+ * Typed force-field result: energy and Cartesian gradient.
299
+ */
300
+ export class TypedForceField {
301
+ static __wrap(ptr) {
302
+ ptr = ptr >>> 0;
303
+ const obj = Object.create(TypedForceField.prototype);
304
+ obj.__wbg_ptr = ptr;
305
+ TypedForceFieldFinalization.register(obj, obj.__wbg_ptr, obj);
306
+ return obj;
307
+ }
308
+ __destroy_into_raw() {
309
+ const ptr = this.__wbg_ptr;
310
+ this.__wbg_ptr = 0;
311
+ TypedForceFieldFinalization.unregister(this);
312
+ return ptr;
313
+ }
314
+ free() {
315
+ const ptr = this.__destroy_into_raw();
316
+ wasm.__wbg_typedforcefield_free(ptr, 0);
317
+ }
318
+ /**
319
+ * Energy in kcal/mol.
320
+ * @returns {number}
321
+ */
322
+ get energy() {
323
+ const ret = wasm.typedforcefield_energy(this.__wbg_ptr);
324
+ return ret;
325
+ }
326
+ /**
327
+ * Flat gradient `[gx0,gy0,gz0,...]` in kcal/mol/Å.
328
+ * @returns {Float64Array}
329
+ */
330
+ get gradients() {
331
+ const ret = wasm.typedforcefield_gradients(this.__wbg_ptr);
332
+ return takeObject(ret);
333
+ }
334
+ }
335
+ if (Symbol.dispose) TypedForceField.prototype[Symbol.dispose] = TypedForceField.prototype.free;
336
+
337
+ /**
338
+ * Typed MD trajectory: all frames flattened into typed arrays.
339
+ */
340
+ export class TypedTrajectory {
341
+ static __wrap(ptr) {
342
+ ptr = ptr >>> 0;
343
+ const obj = Object.create(TypedTrajectory.prototype);
344
+ obj.__wbg_ptr = ptr;
345
+ TypedTrajectoryFinalization.register(obj, obj.__wbg_ptr, obj);
346
+ return obj;
347
+ }
348
+ __destroy_into_raw() {
349
+ const ptr = this.__wbg_ptr;
350
+ this.__wbg_ptr = 0;
351
+ TypedTrajectoryFinalization.unregister(this);
352
+ return ptr;
353
+ }
354
+ free() {
355
+ const ptr = this.__destroy_into_raw();
356
+ wasm.__wbg_typedtrajectory_free(ptr, 0);
357
+ }
358
+ /**
359
+ * Flat coordinates `[frame][atom][xyz]`.
360
+ * @returns {Float64Array}
361
+ */
362
+ get coords() {
363
+ const ret = wasm.typedtrajectory_coords(this.__wbg_ptr);
364
+ return takeObject(ret);
365
+ }
366
+ /**
367
+ * Timestep in femtoseconds.
368
+ * @returns {number}
369
+ */
370
+ get dt_fs() {
371
+ const ret = wasm.typedtrajectory_dt_fs(this.__wbg_ptr);
372
+ return ret;
373
+ }
374
+ /**
375
+ * Potential energy per frame in kcal/mol.
376
+ * @returns {Float64Array}
377
+ */
378
+ get energies() {
379
+ const ret = wasm.typedtrajectory_energies(this.__wbg_ptr);
380
+ return takeObject(ret);
381
+ }
382
+ /**
383
+ * Number of atoms per frame.
384
+ * @returns {number}
385
+ */
386
+ get n_atoms() {
387
+ const ret = wasm.typedtrajectory_n_atoms(this.__wbg_ptr);
388
+ return ret >>> 0;
389
+ }
390
+ /**
391
+ * Number of frames.
392
+ * @returns {number}
393
+ */
394
+ get n_frames() {
395
+ const ret = wasm.typedtrajectory_n_frames(this.__wbg_ptr);
396
+ return ret >>> 0;
397
+ }
398
+ /**
399
+ * Temperature per frame in K.
400
+ * @returns {Float64Array}
401
+ */
402
+ get temperatures() {
403
+ const ret = wasm.typedtrajectory_temperatures(this.__wbg_ptr);
404
+ return takeObject(ret);
405
+ }
406
+ }
407
+ if (Symbol.dispose) TypedTrajectory.prototype[Symbol.dispose] = TypedTrajectory.prototype.free;
408
+
409
+ /**
410
+ * Typed xTB result: energies, charges and optional gradient.
411
+ */
412
+ export class TypedXtb {
413
+ static __wrap(ptr) {
414
+ ptr = ptr >>> 0;
415
+ const obj = Object.create(TypedXtb.prototype);
416
+ obj.__wbg_ptr = ptr;
417
+ TypedXtbFinalization.register(obj, obj.__wbg_ptr, obj);
418
+ return obj;
419
+ }
420
+ __destroy_into_raw() {
421
+ const ptr = this.__wbg_ptr;
422
+ this.__wbg_ptr = 0;
423
+ TypedXtbFinalization.unregister(this);
424
+ return ptr;
425
+ }
426
+ free() {
427
+ const ptr = this.__destroy_into_raw();
428
+ wasm.__wbg_typedxtb_free(ptr, 0);
429
+ }
430
+ /**
431
+ * Whether the SCC converged.
432
+ * @returns {boolean}
433
+ */
434
+ get converged() {
435
+ const ret = wasm.typedxtb_converged(this.__wbg_ptr);
436
+ return ret !== 0;
437
+ }
438
+ /**
439
+ * Electronic energy in eV.
440
+ * @returns {number}
441
+ */
442
+ get electronic_energy() {
443
+ const ret = wasm.typedxtb_electronic_energy(this.__wbg_ptr);
444
+ return ret;
445
+ }
446
+ /**
447
+ * Flat gradient in eV/Å; empty when the caller requested energy only.
448
+ * @returns {Float64Array}
449
+ */
450
+ get gradients() {
451
+ const ret = wasm.typedxtb_gradients(this.__wbg_ptr);
452
+ return takeObject(ret);
453
+ }
454
+ /**
455
+ * Mulliken charges in e.
456
+ * @returns {Float64Array}
457
+ */
458
+ get mulliken_charges() {
459
+ const ret = wasm.typedxtb_mulliken_charges(this.__wbg_ptr);
460
+ return takeObject(ret);
461
+ }
462
+ /**
463
+ * Orbital energies in eV.
464
+ * @returns {Float64Array}
465
+ */
466
+ get orbital_energies() {
467
+ const ret = wasm.typedxtb_orbital_energies(this.__wbg_ptr);
468
+ return takeObject(ret);
469
+ }
470
+ /**
471
+ * Repulsive energy in eV.
472
+ * @returns {number}
473
+ */
474
+ get repulsive_energy() {
475
+ const ret = wasm.typedxtb_repulsive_energy(this.__wbg_ptr);
476
+ return ret;
477
+ }
478
+ /**
479
+ * Total energy in eV.
480
+ * @returns {number}
481
+ */
482
+ get total_energy() {
483
+ const ret = wasm.typedxtb_total_energy(this.__wbg_ptr);
484
+ return ret;
485
+ }
486
+ }
487
+ if (Symbol.dispose) TypedXtb.prototype[Symbol.dispose] = TypedXtb.prototype.free;
488
+
169
489
  /**
170
490
  * Propose active-learning labels from a JSON request.
171
491
  * @param {string} request_json
@@ -4160,6 +4480,37 @@ export function compute_md_trajectory_nvt_seed64(smiles, coords_json, n_steps, d
4160
4480
  }
4161
4481
  }
4162
4482
 
4483
+ /**
4484
+ * Run NVT UFF dynamics and return all frames as typed arrays.
4485
+ * @param {string} smiles
4486
+ * @param {Float64Array} coords
4487
+ * @param {number} n_steps
4488
+ * @param {number} dt_fs
4489
+ * @param {bigint} seed
4490
+ * @param {number} target_temp_k
4491
+ * @param {number} thermostat_tau_fs
4492
+ * @returns {TypedTrajectory}
4493
+ */
4494
+ export function compute_md_trajectory_nvt_typed(smiles, coords, n_steps, dt_fs, seed, target_temp_k, thermostat_tau_fs) {
4495
+ try {
4496
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4497
+ const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4498
+ const len0 = WASM_VECTOR_LEN;
4499
+ const ptr1 = passArrayF64ToWasm0(coords, wasm.__wbindgen_export);
4500
+ const len1 = WASM_VECTOR_LEN;
4501
+ wasm.compute_md_trajectory_nvt_typed(retptr, ptr0, len0, ptr1, len1, n_steps, dt_fs, seed, target_temp_k, thermostat_tau_fs);
4502
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4503
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4504
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4505
+ if (r2) {
4506
+ throw takeObject(r1);
4507
+ }
4508
+ return TypedTrajectory.__wrap(r0);
4509
+ } finally {
4510
+ wasm.__wbindgen_add_to_stack_pointer(16);
4511
+ }
4512
+ }
4513
+
4163
4514
  /**
4164
4515
  * Run short NVE molecular dynamics with UFF force field, 64-bit seed.
4165
4516
  *
@@ -4192,6 +4543,35 @@ export function compute_md_trajectory_seed64(smiles, coords_json, n_steps, dt_fs
4192
4543
  }
4193
4544
  }
4194
4545
 
4546
+ /**
4547
+ * Run NVE UFF dynamics and return all frames as typed arrays.
4548
+ * @param {string} smiles
4549
+ * @param {Float64Array} coords
4550
+ * @param {number} n_steps
4551
+ * @param {number} dt_fs
4552
+ * @param {bigint} seed
4553
+ * @returns {TypedTrajectory}
4554
+ */
4555
+ export function compute_md_trajectory_typed(smiles, coords, n_steps, dt_fs, seed) {
4556
+ try {
4557
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4558
+ const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4559
+ const len0 = WASM_VECTOR_LEN;
4560
+ const ptr1 = passArrayF64ToWasm0(coords, wasm.__wbindgen_export);
4561
+ const len1 = WASM_VECTOR_LEN;
4562
+ wasm.compute_md_trajectory_typed(retptr, ptr0, len0, ptr1, len1, n_steps, dt_fs, seed);
4563
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4564
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4565
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4566
+ if (r2) {
4567
+ throw takeObject(r1);
4568
+ }
4569
+ return TypedTrajectory.__wrap(r0);
4570
+ } finally {
4571
+ wasm.__wbindgen_add_to_stack_pointer(16);
4572
+ }
4573
+ }
4574
+
4195
4575
  /**
4196
4576
  * Run velocity-Verlet MD with a configurable energy backend.
4197
4577
  *
@@ -4385,6 +4765,32 @@ export function compute_mmff94_energy_breakdown(smiles, coords) {
4385
4765
  }
4386
4766
  }
4387
4767
 
4768
+ /**
4769
+ * Compute MMFF94 energy from a `Float64Array` coordinate buffer (no JSON).
4770
+ * @param {string} smiles
4771
+ * @param {Float64Array} coords
4772
+ * @returns {number}
4773
+ */
4774
+ export function compute_mmff94_energy_typed(smiles, coords) {
4775
+ try {
4776
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4777
+ const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4778
+ const len0 = WASM_VECTOR_LEN;
4779
+ const ptr1 = passArrayF64ToWasm0(coords, wasm.__wbindgen_export);
4780
+ const len1 = WASM_VECTOR_LEN;
4781
+ wasm.compute_mmff94_energy_typed(retptr, ptr0, len0, ptr1, len1);
4782
+ var r0 = getDataViewMemory0().getFloat64(retptr + 8 * 0, true);
4783
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4784
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
4785
+ if (r3) {
4786
+ throw takeObject(r2);
4787
+ }
4788
+ return r0;
4789
+ } finally {
4790
+ wasm.__wbindgen_add_to_stack_pointer(16);
4791
+ }
4792
+ }
4793
+
4388
4794
  /**
4389
4795
  * Compute molecular descriptors from SMILES.
4390
4796
  *
@@ -5619,6 +6025,35 @@ export function compute_uff_energy(smiles, coords) {
5619
6025
  }
5620
6026
  }
5621
6027
 
6028
+ /**
6029
+ * Compute UFF energy and its analytic gradient in one pass.
6030
+ *
6031
+ * Returns a [`crate::typed::TypedForceField`] whose `gradients` getter is a
6032
+ * `Float64Array` in kcal/mol/Å.
6033
+ * @param {string} smiles
6034
+ * @param {Float64Array} coords
6035
+ * @returns {TypedForceField}
6036
+ */
6037
+ export function compute_uff_energy_and_gradient_typed(smiles, coords) {
6038
+ try {
6039
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6040
+ const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
6041
+ const len0 = WASM_VECTOR_LEN;
6042
+ const ptr1 = passArrayF64ToWasm0(coords, wasm.__wbindgen_export);
6043
+ const len1 = WASM_VECTOR_LEN;
6044
+ wasm.compute_uff_energy_and_gradient_typed(retptr, ptr0, len0, ptr1, len1);
6045
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6046
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6047
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
6048
+ if (r2) {
6049
+ throw takeObject(r1);
6050
+ }
6051
+ return TypedForceField.__wrap(r0);
6052
+ } finally {
6053
+ wasm.__wbindgen_add_to_stack_pointer(16);
6054
+ }
6055
+ }
6056
+
5622
6057
  /**
5623
6058
  * Per-term-type UFF energy breakdown (kcal/mol).
5624
6059
  *
@@ -5650,6 +6085,32 @@ export function compute_uff_energy_breakdown(smiles, coords) {
5650
6085
  }
5651
6086
  }
5652
6087
 
6088
+ /**
6089
+ * Compute UFF energy from a `Float64Array` coordinate buffer (no JSON).
6090
+ * @param {string} smiles
6091
+ * @param {Float64Array} coords
6092
+ * @returns {number}
6093
+ */
6094
+ export function compute_uff_energy_typed(smiles, coords) {
6095
+ try {
6096
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6097
+ const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
6098
+ const len0 = WASM_VECTOR_LEN;
6099
+ const ptr1 = passArrayF64ToWasm0(coords, wasm.__wbindgen_export);
6100
+ const len1 = WASM_VECTOR_LEN;
6101
+ wasm.compute_uff_energy_typed(retptr, ptr0, len0, ptr1, len1);
6102
+ var r0 = getDataViewMemory0().getFloat64(retptr + 8 * 0, true);
6103
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
6104
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
6105
+ if (r3) {
6106
+ throw takeObject(r2);
6107
+ }
6108
+ return r0;
6109
+ } finally {
6110
+ wasm.__wbindgen_add_to_stack_pointer(16);
6111
+ }
6112
+ }
6113
+
5653
6114
  /**
5654
6115
  * Compute UFF energy with aromaticity-informed heuristic correction metadata.
5655
6116
  * @param {string} smiles
@@ -5955,6 +6416,37 @@ export function compute_xtb_gradient(elements_json, coords_flat_json) {
5955
6416
  }
5956
6417
  }
5957
6418
 
6419
+ /**
6420
+ * Compute xTB and return typed energy, charges and optional gradient.
6421
+ *
6422
+ * When `with_gradient` is true the analytic gradient is evaluated as well and
6423
+ * exposed through the `gradients` getter (eV/Å). Without it the call is
6424
+ * energy-only and the gradient array is empty.
6425
+ * @param {Uint8Array} elements
6426
+ * @param {Float64Array} coords
6427
+ * @param {boolean} with_gradient
6428
+ * @returns {TypedXtb}
6429
+ */
6430
+ export function compute_xtb_typed(elements, coords, with_gradient) {
6431
+ try {
6432
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6433
+ const ptr0 = passArray8ToWasm0(elements, wasm.__wbindgen_export);
6434
+ const len0 = WASM_VECTOR_LEN;
6435
+ const ptr1 = passArrayF64ToWasm0(coords, wasm.__wbindgen_export);
6436
+ const len1 = WASM_VECTOR_LEN;
6437
+ wasm.compute_xtb_typed(retptr, ptr0, len0, ptr1, len1, with_gradient);
6438
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6439
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6440
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
6441
+ if (r2) {
6442
+ throw takeObject(r1);
6443
+ }
6444
+ return TypedXtb.__wrap(r0);
6445
+ } finally {
6446
+ wasm.__wbindgen_add_to_stack_pointer(16);
6447
+ }
6448
+ }
6449
+
5958
6450
  /**
5959
6451
  * Fit a split-conformal calibration radius.
5960
6452
  * @param {string} predictions_json
@@ -6123,6 +6615,33 @@ export function eht_calculate(elements, coords_flat, k) {
6123
6615
  }
6124
6616
  }
6125
6617
 
6618
+ /**
6619
+ * Solve EHT from typed buffers and return typed orbital arrays.
6620
+ * @param {Uint8Array} elements
6621
+ * @param {Float64Array} coords
6622
+ * @param {number} k
6623
+ * @returns {TypedEht}
6624
+ */
6625
+ export function eht_calculate_typed(elements, coords, k) {
6626
+ try {
6627
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6628
+ const ptr0 = passArray8ToWasm0(elements, wasm.__wbindgen_export);
6629
+ const len0 = WASM_VECTOR_LEN;
6630
+ const ptr1 = passArrayF64ToWasm0(coords, wasm.__wbindgen_export);
6631
+ const len1 = WASM_VECTOR_LEN;
6632
+ wasm.eht_calculate_typed(retptr, ptr0, len0, ptr1, len1, k);
6633
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6634
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6635
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
6636
+ if (r2) {
6637
+ throw takeObject(r1);
6638
+ }
6639
+ return TypedEht.__wrap(r0);
6640
+ } finally {
6641
+ wasm.__wbindgen_add_to_stack_pointer(16);
6642
+ }
6643
+ }
6644
+
6126
6645
  /**
6127
6646
  * @param {string} elements
6128
6647
  * @param {string} coords_flat
@@ -6598,6 +7117,58 @@ export function embed_seed64(smiles, seed) {
6598
7117
  }
6599
7118
  }
6600
7119
 
7120
+ /**
7121
+ * Generate a conformer and return typed buffers (no JSON).
7122
+ *
7123
+ * Coordinates are a `Float64Array`, elements a `Uint8Array`. This is the
7124
+ * JSON-free counterpart of [`embed`] and is bit-identical to it for the same
7125
+ * SMILES and seed.
7126
+ * @param {string} smiles
7127
+ * @param {bigint} seed
7128
+ * @returns {TypedEmbedding}
7129
+ */
7130
+ export function embed_typed(smiles, seed) {
7131
+ try {
7132
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
7133
+ const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
7134
+ const len0 = WASM_VECTOR_LEN;
7135
+ wasm.embed_typed(retptr, ptr0, len0, seed);
7136
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
7137
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
7138
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
7139
+ if (r2) {
7140
+ throw takeObject(r1);
7141
+ }
7142
+ return TypedEmbedding.__wrap(r0);
7143
+ } finally {
7144
+ wasm.__wbindgen_add_to_stack_pointer(16);
7145
+ }
7146
+ }
7147
+
7148
+ /**
7149
+ * 32-bit-seed variant of [`embed_typed`].
7150
+ * @param {string} smiles
7151
+ * @param {number} seed
7152
+ * @returns {TypedEmbedding}
7153
+ */
7154
+ export function embed_typed_seed32(smiles, seed) {
7155
+ try {
7156
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
7157
+ const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
7158
+ const len0 = WASM_VECTOR_LEN;
7159
+ wasm.embed_typed_seed32(retptr, ptr0, len0, seed);
7160
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
7161
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
7162
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
7163
+ if (r2) {
7164
+ throw takeObject(r1);
7165
+ }
7166
+ return TypedEmbedding.__wrap(r0);
7167
+ } finally {
7168
+ wasm.__wbindgen_add_to_stack_pointer(16);
7169
+ }
7170
+ }
7171
+
6601
7172
  /**
6602
7173
  * Estimate an alchemical free-energy difference from JSON samples.
6603
7174
  * @param {string} samples_json
@@ -8662,7 +9233,7 @@ function __wbg_get_imports() {
8662
9233
  const a = state0.a;
8663
9234
  state0.a = 0;
8664
9235
  try {
8665
- return __wasm_bindgen_func_elem_640(a, state0.b, arg0, arg1);
9236
+ return __wasm_bindgen_func_elem_642(a, state0.b, arg0, arg1);
8666
9237
  } finally {
8667
9238
  state0.a = a;
8668
9239
  }
@@ -8673,6 +9244,10 @@ function __wbg_get_imports() {
8673
9244
  state0.a = state0.b = 0;
8674
9245
  }
8675
9246
  },
9247
+ __wbg_new_from_slice_22da9388ac046e50: function(arg0, arg1) {
9248
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
9249
+ return addHeapObject(ret);
9250
+ },
8676
9251
  __wbg_new_typed_aaaeaf29cf802876: function(arg0, arg1) {
8677
9252
  try {
8678
9253
  var state0 = {a: arg0, b: arg1};
@@ -8680,7 +9255,7 @@ function __wbg_get_imports() {
8680
9255
  const a = state0.a;
8681
9256
  state0.a = 0;
8682
9257
  try {
8683
- return __wasm_bindgen_func_elem_640(a, state0.b, arg0, arg1);
9258
+ return __wasm_bindgen_func_elem_642(a, state0.b, arg0, arg1);
8684
9259
  } finally {
8685
9260
  state0.a = a;
8686
9261
  }
@@ -8967,17 +9542,17 @@ function __wbg_get_imports() {
8967
9542
  },
8968
9543
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
8969
9544
  // Cast intrinsic for `Closure(Closure { dtor_idx: 184, function: Function { arguments: [Externref], shim_idx: 185, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
8970
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4601, __wasm_bindgen_func_elem_4610);
9545
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4858, __wasm_bindgen_func_elem_4867);
8971
9546
  return addHeapObject(ret);
8972
9547
  },
8973
9548
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
8974
9549
  // Cast intrinsic for `Closure(Closure { dtor_idx: 184, function: Function { arguments: [Externref], shim_idx: 33, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
8975
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4601, __wasm_bindgen_func_elem_658);
9550
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4858, __wasm_bindgen_func_elem_660);
8976
9551
  return addHeapObject(ret);
8977
9552
  },
8978
9553
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
8979
9554
  // Cast intrinsic for `Closure(Closure { dtor_idx: 184, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 185, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
8980
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4601, __wasm_bindgen_func_elem_4610_2);
9555
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4858, __wasm_bindgen_func_elem_4867_2);
8981
9556
  return addHeapObject(ret);
8982
9557
  },
8983
9558
  __wbindgen_cast_0000000000000004: function(arg0) {
@@ -9023,18 +9598,18 @@ function __wbg_get_imports() {
9023
9598
  };
9024
9599
  }
9025
9600
 
9026
- function __wasm_bindgen_func_elem_4610(arg0, arg1, arg2) {
9027
- wasm.__wasm_bindgen_func_elem_4610(arg0, arg1, addHeapObject(arg2));
9601
+ function __wasm_bindgen_func_elem_4867(arg0, arg1, arg2) {
9602
+ wasm.__wasm_bindgen_func_elem_4867(arg0, arg1, addHeapObject(arg2));
9028
9603
  }
9029
9604
 
9030
- function __wasm_bindgen_func_elem_4610_2(arg0, arg1, arg2) {
9031
- wasm.__wasm_bindgen_func_elem_4610_2(arg0, arg1, addHeapObject(arg2));
9605
+ function __wasm_bindgen_func_elem_4867_2(arg0, arg1, arg2) {
9606
+ wasm.__wasm_bindgen_func_elem_4867_2(arg0, arg1, addHeapObject(arg2));
9032
9607
  }
9033
9608
 
9034
- function __wasm_bindgen_func_elem_658(arg0, arg1, arg2) {
9609
+ function __wasm_bindgen_func_elem_660(arg0, arg1, arg2) {
9035
9610
  try {
9036
9611
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
9037
- wasm.__wasm_bindgen_func_elem_658(retptr, arg0, arg1, addHeapObject(arg2));
9612
+ wasm.__wasm_bindgen_func_elem_660(retptr, arg0, arg1, addHeapObject(arg2));
9038
9613
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
9039
9614
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
9040
9615
  if (r1) {
@@ -9045,8 +9620,8 @@ function __wasm_bindgen_func_elem_658(arg0, arg1, arg2) {
9045
9620
  }
9046
9621
  }
9047
9622
 
9048
- function __wasm_bindgen_func_elem_640(arg0, arg1, arg2, arg3) {
9049
- wasm.__wasm_bindgen_func_elem_640(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
9623
+ function __wasm_bindgen_func_elem_642(arg0, arg1, arg2, arg3) {
9624
+ wasm.__wasm_bindgen_func_elem_642(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
9050
9625
  }
9051
9626
 
9052
9627
 
@@ -9072,6 +9647,21 @@ const __wbindgen_enum_GpuTextureViewDimension = ["1d", "2d", "2d-array", "cube",
9072
9647
  const LiveSimulationFinalization = (typeof FinalizationRegistry === 'undefined')
9073
9648
  ? { register: () => {}, unregister: () => {} }
9074
9649
  : new FinalizationRegistry(ptr => wasm.__wbg_livesimulation_free(ptr >>> 0, 1));
9650
+ const TypedEhtFinalization = (typeof FinalizationRegistry === 'undefined')
9651
+ ? { register: () => {}, unregister: () => {} }
9652
+ : new FinalizationRegistry(ptr => wasm.__wbg_typedeht_free(ptr >>> 0, 1));
9653
+ const TypedEmbeddingFinalization = (typeof FinalizationRegistry === 'undefined')
9654
+ ? { register: () => {}, unregister: () => {} }
9655
+ : new FinalizationRegistry(ptr => wasm.__wbg_typedembedding_free(ptr >>> 0, 1));
9656
+ const TypedForceFieldFinalization = (typeof FinalizationRegistry === 'undefined')
9657
+ ? { register: () => {}, unregister: () => {} }
9658
+ : new FinalizationRegistry(ptr => wasm.__wbg_typedforcefield_free(ptr >>> 0, 1));
9659
+ const TypedTrajectoryFinalization = (typeof FinalizationRegistry === 'undefined')
9660
+ ? { register: () => {}, unregister: () => {} }
9661
+ : new FinalizationRegistry(ptr => wasm.__wbg_typedtrajectory_free(ptr >>> 0, 1));
9662
+ const TypedXtbFinalization = (typeof FinalizationRegistry === 'undefined')
9663
+ ? { register: () => {}, unregister: () => {} }
9664
+ : new FinalizationRegistry(ptr => wasm.__wbg_typedxtb_free(ptr >>> 0, 1));
9075
9665
  const wbg_rayon_PoolBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
9076
9666
  ? { register: () => {}, unregister: () => {} }
9077
9667
  : new FinalizationRegistry(ptr => wasm.__wbg_wbg_rayon_poolbuilder_free(ptr >>> 0, 1));
@@ -9259,6 +9849,20 @@ function makeMutClosure(arg0, arg1, dtor, f) {
9259
9849
  return real;
9260
9850
  }
9261
9851
 
9852
+ function passArray8ToWasm0(arg, malloc) {
9853
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
9854
+ getUint8ArrayMemory0().set(arg, ptr / 1);
9855
+ WASM_VECTOR_LEN = arg.length;
9856
+ return ptr;
9857
+ }
9858
+
9859
+ function passArrayF64ToWasm0(arg, malloc) {
9860
+ const ptr = malloc(arg.length * 8, 8) >>> 0;
9861
+ getFloat64ArrayMemory0().set(arg, ptr / 8);
9862
+ WASM_VECTOR_LEN = arg.length;
9863
+ return ptr;
9864
+ }
9865
+
9262
9866
  function passStringToWasm0(arg, malloc, realloc) {
9263
9867
  if (realloc === undefined) {
9264
9868
  const buf = cachedTextEncoder.encode(arg);