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.
@@ -166,6 +166,331 @@ class LiveSimulation {
166
166
  if (Symbol.dispose) LiveSimulation.prototype[Symbol.dispose] = LiveSimulation.prototype.free;
167
167
  exports.LiveSimulation = LiveSimulation;
168
168
 
169
+ /**
170
+ * Typed EHT result.
171
+ */
172
+ 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
+ exports.TypedEht = TypedEht;
249
+
250
+ /**
251
+ * Typed embedding result: coordinates plus element numbers.
252
+ */
253
+ class TypedEmbedding {
254
+ static __wrap(ptr) {
255
+ ptr = ptr >>> 0;
256
+ const obj = Object.create(TypedEmbedding.prototype);
257
+ obj.__wbg_ptr = ptr;
258
+ TypedEmbeddingFinalization.register(obj, obj.__wbg_ptr, obj);
259
+ return obj;
260
+ }
261
+ __destroy_into_raw() {
262
+ const ptr = this.__wbg_ptr;
263
+ this.__wbg_ptr = 0;
264
+ TypedEmbeddingFinalization.unregister(this);
265
+ return ptr;
266
+ }
267
+ free() {
268
+ const ptr = this.__destroy_into_raw();
269
+ wasm.__wbg_typedembedding_free(ptr, 0);
270
+ }
271
+ /**
272
+ * Flat coordinates `[x0,y0,z0,...]` in Å.
273
+ * @returns {Float64Array}
274
+ */
275
+ get coords() {
276
+ const ret = wasm.typedembedding_coords(this.__wbg_ptr);
277
+ return takeObject(ret);
278
+ }
279
+ /**
280
+ * Atomic numbers in atom order.
281
+ * @returns {Uint8Array}
282
+ */
283
+ get elements() {
284
+ const ret = wasm.typedembedding_elements(this.__wbg_ptr);
285
+ return takeObject(ret);
286
+ }
287
+ /**
288
+ * Number of atoms.
289
+ * @returns {number}
290
+ */
291
+ get num_atoms() {
292
+ const ret = wasm.typedembedding_num_atoms(this.__wbg_ptr);
293
+ return ret >>> 0;
294
+ }
295
+ }
296
+ if (Symbol.dispose) TypedEmbedding.prototype[Symbol.dispose] = TypedEmbedding.prototype.free;
297
+ exports.TypedEmbedding = TypedEmbedding;
298
+
299
+ /**
300
+ * Typed force-field result: energy and Cartesian gradient.
301
+ */
302
+ class TypedForceField {
303
+ static __wrap(ptr) {
304
+ ptr = ptr >>> 0;
305
+ const obj = Object.create(TypedForceField.prototype);
306
+ obj.__wbg_ptr = ptr;
307
+ TypedForceFieldFinalization.register(obj, obj.__wbg_ptr, obj);
308
+ return obj;
309
+ }
310
+ __destroy_into_raw() {
311
+ const ptr = this.__wbg_ptr;
312
+ this.__wbg_ptr = 0;
313
+ TypedForceFieldFinalization.unregister(this);
314
+ return ptr;
315
+ }
316
+ free() {
317
+ const ptr = this.__destroy_into_raw();
318
+ wasm.__wbg_typedforcefield_free(ptr, 0);
319
+ }
320
+ /**
321
+ * Energy in kcal/mol.
322
+ * @returns {number}
323
+ */
324
+ get energy() {
325
+ const ret = wasm.typedforcefield_energy(this.__wbg_ptr);
326
+ return ret;
327
+ }
328
+ /**
329
+ * Flat gradient `[gx0,gy0,gz0,...]` in kcal/mol/Å.
330
+ * @returns {Float64Array}
331
+ */
332
+ get gradients() {
333
+ const ret = wasm.typedforcefield_gradients(this.__wbg_ptr);
334
+ return takeObject(ret);
335
+ }
336
+ }
337
+ if (Symbol.dispose) TypedForceField.prototype[Symbol.dispose] = TypedForceField.prototype.free;
338
+ exports.TypedForceField = TypedForceField;
339
+
340
+ /**
341
+ * Typed MD trajectory: all frames flattened into typed arrays.
342
+ */
343
+ class TypedTrajectory {
344
+ static __wrap(ptr) {
345
+ ptr = ptr >>> 0;
346
+ const obj = Object.create(TypedTrajectory.prototype);
347
+ obj.__wbg_ptr = ptr;
348
+ TypedTrajectoryFinalization.register(obj, obj.__wbg_ptr, obj);
349
+ return obj;
350
+ }
351
+ __destroy_into_raw() {
352
+ const ptr = this.__wbg_ptr;
353
+ this.__wbg_ptr = 0;
354
+ TypedTrajectoryFinalization.unregister(this);
355
+ return ptr;
356
+ }
357
+ free() {
358
+ const ptr = this.__destroy_into_raw();
359
+ wasm.__wbg_typedtrajectory_free(ptr, 0);
360
+ }
361
+ /**
362
+ * Flat coordinates `[frame][atom][xyz]`.
363
+ * @returns {Float64Array}
364
+ */
365
+ get coords() {
366
+ const ret = wasm.typedtrajectory_coords(this.__wbg_ptr);
367
+ return takeObject(ret);
368
+ }
369
+ /**
370
+ * Timestep in femtoseconds.
371
+ * @returns {number}
372
+ */
373
+ get dt_fs() {
374
+ const ret = wasm.typedtrajectory_dt_fs(this.__wbg_ptr);
375
+ return ret;
376
+ }
377
+ /**
378
+ * Potential energy per frame in kcal/mol.
379
+ * @returns {Float64Array}
380
+ */
381
+ get energies() {
382
+ const ret = wasm.typedtrajectory_energies(this.__wbg_ptr);
383
+ return takeObject(ret);
384
+ }
385
+ /**
386
+ * Number of atoms per frame.
387
+ * @returns {number}
388
+ */
389
+ get n_atoms() {
390
+ const ret = wasm.typedtrajectory_n_atoms(this.__wbg_ptr);
391
+ return ret >>> 0;
392
+ }
393
+ /**
394
+ * Number of frames.
395
+ * @returns {number}
396
+ */
397
+ get n_frames() {
398
+ const ret = wasm.typedtrajectory_n_frames(this.__wbg_ptr);
399
+ return ret >>> 0;
400
+ }
401
+ /**
402
+ * Temperature per frame in K.
403
+ * @returns {Float64Array}
404
+ */
405
+ get temperatures() {
406
+ const ret = wasm.typedtrajectory_temperatures(this.__wbg_ptr);
407
+ return takeObject(ret);
408
+ }
409
+ }
410
+ if (Symbol.dispose) TypedTrajectory.prototype[Symbol.dispose] = TypedTrajectory.prototype.free;
411
+ exports.TypedTrajectory = TypedTrajectory;
412
+
413
+ /**
414
+ * Typed xTB result: energies, charges and optional gradient.
415
+ */
416
+ class TypedXtb {
417
+ static __wrap(ptr) {
418
+ ptr = ptr >>> 0;
419
+ const obj = Object.create(TypedXtb.prototype);
420
+ obj.__wbg_ptr = ptr;
421
+ TypedXtbFinalization.register(obj, obj.__wbg_ptr, obj);
422
+ return obj;
423
+ }
424
+ __destroy_into_raw() {
425
+ const ptr = this.__wbg_ptr;
426
+ this.__wbg_ptr = 0;
427
+ TypedXtbFinalization.unregister(this);
428
+ return ptr;
429
+ }
430
+ free() {
431
+ const ptr = this.__destroy_into_raw();
432
+ wasm.__wbg_typedxtb_free(ptr, 0);
433
+ }
434
+ /**
435
+ * Whether the SCC converged.
436
+ * @returns {boolean}
437
+ */
438
+ get converged() {
439
+ const ret = wasm.typedxtb_converged(this.__wbg_ptr);
440
+ return ret !== 0;
441
+ }
442
+ /**
443
+ * Electronic energy in eV.
444
+ * @returns {number}
445
+ */
446
+ get electronic_energy() {
447
+ const ret = wasm.typedxtb_electronic_energy(this.__wbg_ptr);
448
+ return ret;
449
+ }
450
+ /**
451
+ * Flat gradient in eV/Å; empty when the caller requested energy only.
452
+ * @returns {Float64Array}
453
+ */
454
+ get gradients() {
455
+ const ret = wasm.typedxtb_gradients(this.__wbg_ptr);
456
+ return takeObject(ret);
457
+ }
458
+ /**
459
+ * Mulliken charges in e.
460
+ * @returns {Float64Array}
461
+ */
462
+ get mulliken_charges() {
463
+ const ret = wasm.typedxtb_mulliken_charges(this.__wbg_ptr);
464
+ return takeObject(ret);
465
+ }
466
+ /**
467
+ * Orbital energies in eV.
468
+ * @returns {Float64Array}
469
+ */
470
+ get orbital_energies() {
471
+ const ret = wasm.typedxtb_orbital_energies(this.__wbg_ptr);
472
+ return takeObject(ret);
473
+ }
474
+ /**
475
+ * Repulsive energy in eV.
476
+ * @returns {number}
477
+ */
478
+ get repulsive_energy() {
479
+ const ret = wasm.typedxtb_repulsive_energy(this.__wbg_ptr);
480
+ return ret;
481
+ }
482
+ /**
483
+ * Total energy in eV.
484
+ * @returns {number}
485
+ */
486
+ get total_energy() {
487
+ const ret = wasm.typedxtb_total_energy(this.__wbg_ptr);
488
+ return ret;
489
+ }
490
+ }
491
+ if (Symbol.dispose) TypedXtb.prototype[Symbol.dispose] = TypedXtb.prototype.free;
492
+ exports.TypedXtb = TypedXtb;
493
+
169
494
  /**
170
495
  * Propose active-learning labels from a JSON request.
171
496
  * @param {string} request_json
@@ -4215,6 +4540,38 @@ function compute_md_trajectory_nvt_seed64(smiles, coords_json, n_steps, dt_fs, s
4215
4540
  }
4216
4541
  exports.compute_md_trajectory_nvt_seed64 = compute_md_trajectory_nvt_seed64;
4217
4542
 
4543
+ /**
4544
+ * Run NVT UFF dynamics and return all frames as typed arrays.
4545
+ * @param {string} smiles
4546
+ * @param {Float64Array} coords
4547
+ * @param {number} n_steps
4548
+ * @param {number} dt_fs
4549
+ * @param {bigint} seed
4550
+ * @param {number} target_temp_k
4551
+ * @param {number} thermostat_tau_fs
4552
+ * @returns {TypedTrajectory}
4553
+ */
4554
+ function compute_md_trajectory_nvt_typed(smiles, coords, n_steps, dt_fs, seed, target_temp_k, thermostat_tau_fs) {
4555
+ try {
4556
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4557
+ const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4558
+ const len0 = WASM_VECTOR_LEN;
4559
+ const ptr1 = passArrayF64ToWasm0(coords, wasm.__wbindgen_export);
4560
+ const len1 = WASM_VECTOR_LEN;
4561
+ wasm.compute_md_trajectory_nvt_typed(retptr, ptr0, len0, ptr1, len1, n_steps, dt_fs, seed, target_temp_k, thermostat_tau_fs);
4562
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4563
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4564
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4565
+ if (r2) {
4566
+ throw takeObject(r1);
4567
+ }
4568
+ return TypedTrajectory.__wrap(r0);
4569
+ } finally {
4570
+ wasm.__wbindgen_add_to_stack_pointer(16);
4571
+ }
4572
+ }
4573
+ exports.compute_md_trajectory_nvt_typed = compute_md_trajectory_nvt_typed;
4574
+
4218
4575
  /**
4219
4576
  * Run short NVE molecular dynamics with UFF force field, 64-bit seed.
4220
4577
  *
@@ -4248,6 +4605,36 @@ function compute_md_trajectory_seed64(smiles, coords_json, n_steps, dt_fs, seed)
4248
4605
  }
4249
4606
  exports.compute_md_trajectory_seed64 = compute_md_trajectory_seed64;
4250
4607
 
4608
+ /**
4609
+ * Run NVE UFF dynamics and return all frames as typed arrays.
4610
+ * @param {string} smiles
4611
+ * @param {Float64Array} coords
4612
+ * @param {number} n_steps
4613
+ * @param {number} dt_fs
4614
+ * @param {bigint} seed
4615
+ * @returns {TypedTrajectory}
4616
+ */
4617
+ function compute_md_trajectory_typed(smiles, coords, n_steps, dt_fs, seed) {
4618
+ try {
4619
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4620
+ const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4621
+ const len0 = WASM_VECTOR_LEN;
4622
+ const ptr1 = passArrayF64ToWasm0(coords, wasm.__wbindgen_export);
4623
+ const len1 = WASM_VECTOR_LEN;
4624
+ wasm.compute_md_trajectory_typed(retptr, ptr0, len0, ptr1, len1, n_steps, dt_fs, seed);
4625
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4626
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4627
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4628
+ if (r2) {
4629
+ throw takeObject(r1);
4630
+ }
4631
+ return TypedTrajectory.__wrap(r0);
4632
+ } finally {
4633
+ wasm.__wbindgen_add_to_stack_pointer(16);
4634
+ }
4635
+ }
4636
+ exports.compute_md_trajectory_typed = compute_md_trajectory_typed;
4637
+
4251
4638
  /**
4252
4639
  * Run velocity-Verlet MD with a configurable energy backend.
4253
4640
  *
@@ -4447,6 +4834,33 @@ function compute_mmff94_energy_breakdown(smiles, coords) {
4447
4834
  }
4448
4835
  exports.compute_mmff94_energy_breakdown = compute_mmff94_energy_breakdown;
4449
4836
 
4837
+ /**
4838
+ * Compute MMFF94 energy from a `Float64Array` coordinate buffer (no JSON).
4839
+ * @param {string} smiles
4840
+ * @param {Float64Array} coords
4841
+ * @returns {number}
4842
+ */
4843
+ function compute_mmff94_energy_typed(smiles, coords) {
4844
+ try {
4845
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4846
+ const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4847
+ const len0 = WASM_VECTOR_LEN;
4848
+ const ptr1 = passArrayF64ToWasm0(coords, wasm.__wbindgen_export);
4849
+ const len1 = WASM_VECTOR_LEN;
4850
+ wasm.compute_mmff94_energy_typed(retptr, ptr0, len0, ptr1, len1);
4851
+ var r0 = getDataViewMemory0().getFloat64(retptr + 8 * 0, true);
4852
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4853
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
4854
+ if (r3) {
4855
+ throw takeObject(r2);
4856
+ }
4857
+ return r0;
4858
+ } finally {
4859
+ wasm.__wbindgen_add_to_stack_pointer(16);
4860
+ }
4861
+ }
4862
+ exports.compute_mmff94_energy_typed = compute_mmff94_energy_typed;
4863
+
4450
4864
  /**
4451
4865
  * Compute molecular descriptors from SMILES.
4452
4866
  *
@@ -5695,6 +6109,36 @@ function compute_uff_energy(smiles, coords) {
5695
6109
  }
5696
6110
  exports.compute_uff_energy = compute_uff_energy;
5697
6111
 
6112
+ /**
6113
+ * Compute UFF energy and its analytic gradient in one pass.
6114
+ *
6115
+ * Returns a [`crate::typed::TypedForceField`] whose `gradients` getter is a
6116
+ * `Float64Array` in kcal/mol/Å.
6117
+ * @param {string} smiles
6118
+ * @param {Float64Array} coords
6119
+ * @returns {TypedForceField}
6120
+ */
6121
+ function compute_uff_energy_and_gradient_typed(smiles, coords) {
6122
+ try {
6123
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6124
+ const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
6125
+ const len0 = WASM_VECTOR_LEN;
6126
+ const ptr1 = passArrayF64ToWasm0(coords, wasm.__wbindgen_export);
6127
+ const len1 = WASM_VECTOR_LEN;
6128
+ wasm.compute_uff_energy_and_gradient_typed(retptr, ptr0, len0, ptr1, len1);
6129
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6130
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6131
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
6132
+ if (r2) {
6133
+ throw takeObject(r1);
6134
+ }
6135
+ return TypedForceField.__wrap(r0);
6136
+ } finally {
6137
+ wasm.__wbindgen_add_to_stack_pointer(16);
6138
+ }
6139
+ }
6140
+ exports.compute_uff_energy_and_gradient_typed = compute_uff_energy_and_gradient_typed;
6141
+
5698
6142
  /**
5699
6143
  * Per-term-type UFF energy breakdown (kcal/mol).
5700
6144
  *
@@ -5727,6 +6171,33 @@ function compute_uff_energy_breakdown(smiles, coords) {
5727
6171
  }
5728
6172
  exports.compute_uff_energy_breakdown = compute_uff_energy_breakdown;
5729
6173
 
6174
+ /**
6175
+ * Compute UFF energy from a `Float64Array` coordinate buffer (no JSON).
6176
+ * @param {string} smiles
6177
+ * @param {Float64Array} coords
6178
+ * @returns {number}
6179
+ */
6180
+ function compute_uff_energy_typed(smiles, coords) {
6181
+ try {
6182
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6183
+ const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
6184
+ const len0 = WASM_VECTOR_LEN;
6185
+ const ptr1 = passArrayF64ToWasm0(coords, wasm.__wbindgen_export);
6186
+ const len1 = WASM_VECTOR_LEN;
6187
+ wasm.compute_uff_energy_typed(retptr, ptr0, len0, ptr1, len1);
6188
+ var r0 = getDataViewMemory0().getFloat64(retptr + 8 * 0, true);
6189
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
6190
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
6191
+ if (r3) {
6192
+ throw takeObject(r2);
6193
+ }
6194
+ return r0;
6195
+ } finally {
6196
+ wasm.__wbindgen_add_to_stack_pointer(16);
6197
+ }
6198
+ }
6199
+ exports.compute_uff_energy_typed = compute_uff_energy_typed;
6200
+
5730
6201
  /**
5731
6202
  * Compute UFF energy with aromaticity-informed heuristic correction metadata.
5732
6203
  * @param {string} smiles
@@ -6042,6 +6513,38 @@ function compute_xtb_gradient(elements_json, coords_flat_json) {
6042
6513
  }
6043
6514
  exports.compute_xtb_gradient = compute_xtb_gradient;
6044
6515
 
6516
+ /**
6517
+ * Compute xTB and return typed energy, charges and optional gradient.
6518
+ *
6519
+ * When `with_gradient` is true the analytic gradient is evaluated as well and
6520
+ * exposed through the `gradients` getter (eV/Å). Without it the call is
6521
+ * energy-only and the gradient array is empty.
6522
+ * @param {Uint8Array} elements
6523
+ * @param {Float64Array} coords
6524
+ * @param {boolean} with_gradient
6525
+ * @returns {TypedXtb}
6526
+ */
6527
+ function compute_xtb_typed(elements, coords, with_gradient) {
6528
+ try {
6529
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6530
+ const ptr0 = passArray8ToWasm0(elements, wasm.__wbindgen_export);
6531
+ const len0 = WASM_VECTOR_LEN;
6532
+ const ptr1 = passArrayF64ToWasm0(coords, wasm.__wbindgen_export);
6533
+ const len1 = WASM_VECTOR_LEN;
6534
+ wasm.compute_xtb_typed(retptr, ptr0, len0, ptr1, len1, with_gradient);
6535
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6536
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6537
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
6538
+ if (r2) {
6539
+ throw takeObject(r1);
6540
+ }
6541
+ return TypedXtb.__wrap(r0);
6542
+ } finally {
6543
+ wasm.__wbindgen_add_to_stack_pointer(16);
6544
+ }
6545
+ }
6546
+ exports.compute_xtb_typed = compute_xtb_typed;
6547
+
6045
6548
  /**
6046
6549
  * Fit a split-conformal calibration radius.
6047
6550
  * @param {string} predictions_json
@@ -6216,6 +6719,34 @@ function eht_calculate(elements, coords_flat, k) {
6216
6719
  }
6217
6720
  exports.eht_calculate = eht_calculate;
6218
6721
 
6722
+ /**
6723
+ * Solve EHT from typed buffers and return typed orbital arrays.
6724
+ * @param {Uint8Array} elements
6725
+ * @param {Float64Array} coords
6726
+ * @param {number} k
6727
+ * @returns {TypedEht}
6728
+ */
6729
+ function eht_calculate_typed(elements, coords, k) {
6730
+ try {
6731
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6732
+ const ptr0 = passArray8ToWasm0(elements, wasm.__wbindgen_export);
6733
+ const len0 = WASM_VECTOR_LEN;
6734
+ const ptr1 = passArrayF64ToWasm0(coords, wasm.__wbindgen_export);
6735
+ const len1 = WASM_VECTOR_LEN;
6736
+ wasm.eht_calculate_typed(retptr, ptr0, len0, ptr1, len1, k);
6737
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6738
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6739
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
6740
+ if (r2) {
6741
+ throw takeObject(r1);
6742
+ }
6743
+ return TypedEht.__wrap(r0);
6744
+ } finally {
6745
+ wasm.__wbindgen_add_to_stack_pointer(16);
6746
+ }
6747
+ }
6748
+ exports.eht_calculate_typed = eht_calculate_typed;
6749
+
6219
6750
  /**
6220
6751
  * Run EHT or route to UFF fallback based on support/confidence.
6221
6752
  * @param {string} smiles
@@ -6628,6 +7159,60 @@ function embed_seed64(smiles, seed) {
6628
7159
  }
6629
7160
  exports.embed_seed64 = embed_seed64;
6630
7161
 
7162
+ /**
7163
+ * Generate a conformer and return typed buffers (no JSON).
7164
+ *
7165
+ * Coordinates are a `Float64Array`, elements a `Uint8Array`. This is the
7166
+ * JSON-free counterpart of [`embed`] and is bit-identical to it for the same
7167
+ * SMILES and seed.
7168
+ * @param {string} smiles
7169
+ * @param {bigint} seed
7170
+ * @returns {TypedEmbedding}
7171
+ */
7172
+ function embed_typed(smiles, seed) {
7173
+ try {
7174
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
7175
+ const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
7176
+ const len0 = WASM_VECTOR_LEN;
7177
+ wasm.embed_typed(retptr, ptr0, len0, seed);
7178
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
7179
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
7180
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
7181
+ if (r2) {
7182
+ throw takeObject(r1);
7183
+ }
7184
+ return TypedEmbedding.__wrap(r0);
7185
+ } finally {
7186
+ wasm.__wbindgen_add_to_stack_pointer(16);
7187
+ }
7188
+ }
7189
+ exports.embed_typed = embed_typed;
7190
+
7191
+ /**
7192
+ * 32-bit-seed variant of [`embed_typed`].
7193
+ * @param {string} smiles
7194
+ * @param {number} seed
7195
+ * @returns {TypedEmbedding}
7196
+ */
7197
+ function embed_typed_seed32(smiles, seed) {
7198
+ try {
7199
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
7200
+ const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
7201
+ const len0 = WASM_VECTOR_LEN;
7202
+ wasm.embed_typed_seed32(retptr, ptr0, len0, seed);
7203
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
7204
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
7205
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
7206
+ if (r2) {
7207
+ throw takeObject(r1);
7208
+ }
7209
+ return TypedEmbedding.__wrap(r0);
7210
+ } finally {
7211
+ wasm.__wbindgen_add_to_stack_pointer(16);
7212
+ }
7213
+ }
7214
+ exports.embed_typed_seed32 = embed_typed_seed32;
7215
+
6631
7216
  /**
6632
7217
  * Estimate an alchemical free-energy difference from JSON samples.
6633
7218
  * @param {string} samples_json
@@ -8354,6 +8939,10 @@ function __wbg_get_imports() {
8354
8939
  const ret = getObject(arg0).length;
8355
8940
  return ret;
8356
8941
  },
8942
+ __wbg_new_from_slice_22da9388ac046e50: function(arg0, arg1) {
8943
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
8944
+ return addHeapObject(ret);
8945
+ },
8357
8946
  __wbg_new_with_length_81c1c31d4432cb9f: function(arg0) {
8358
8947
  const ret = new Float32Array(arg0 >>> 0);
8359
8948
  return addHeapObject(ret);
@@ -8383,6 +8972,21 @@ function __wbg_get_imports() {
8383
8972
  const LiveSimulationFinalization = (typeof FinalizationRegistry === 'undefined')
8384
8973
  ? { register: () => {}, unregister: () => {} }
8385
8974
  : new FinalizationRegistry(ptr => wasm.__wbg_livesimulation_free(ptr >>> 0, 1));
8975
+ const TypedEhtFinalization = (typeof FinalizationRegistry === 'undefined')
8976
+ ? { register: () => {}, unregister: () => {} }
8977
+ : new FinalizationRegistry(ptr => wasm.__wbg_typedeht_free(ptr >>> 0, 1));
8978
+ const TypedEmbeddingFinalization = (typeof FinalizationRegistry === 'undefined')
8979
+ ? { register: () => {}, unregister: () => {} }
8980
+ : new FinalizationRegistry(ptr => wasm.__wbg_typedembedding_free(ptr >>> 0, 1));
8981
+ const TypedForceFieldFinalization = (typeof FinalizationRegistry === 'undefined')
8982
+ ? { register: () => {}, unregister: () => {} }
8983
+ : new FinalizationRegistry(ptr => wasm.__wbg_typedforcefield_free(ptr >>> 0, 1));
8984
+ const TypedTrajectoryFinalization = (typeof FinalizationRegistry === 'undefined')
8985
+ ? { register: () => {}, unregister: () => {} }
8986
+ : new FinalizationRegistry(ptr => wasm.__wbg_typedtrajectory_free(ptr >>> 0, 1));
8987
+ const TypedXtbFinalization = (typeof FinalizationRegistry === 'undefined')
8988
+ ? { register: () => {}, unregister: () => {} }
8989
+ : new FinalizationRegistry(ptr => wasm.__wbg_typedxtb_free(ptr >>> 0, 1));
8386
8990
 
8387
8991
  function addHeapObject(obj) {
8388
8992
  if (heap_next === heap.length) heap.push(heap.length + 1);
@@ -8409,6 +9013,11 @@ function getArrayF64FromWasm0(ptr, len) {
8409
9013
  return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
8410
9014
  }
8411
9015
 
9016
+ function getArrayU8FromWasm0(ptr, len) {
9017
+ ptr = ptr >>> 0;
9018
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
9019
+ }
9020
+
8412
9021
  let cachedDataViewMemory0 = null;
8413
9022
  function getDataViewMemory0() {
8414
9023
  if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
@@ -8457,6 +9066,20 @@ function isLikeNone(x) {
8457
9066
  return x === undefined || x === null;
8458
9067
  }
8459
9068
 
9069
+ function passArray8ToWasm0(arg, malloc) {
9070
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
9071
+ getUint8ArrayMemory0().set(arg, ptr / 1);
9072
+ WASM_VECTOR_LEN = arg.length;
9073
+ return ptr;
9074
+ }
9075
+
9076
+ function passArrayF64ToWasm0(arg, malloc) {
9077
+ const ptr = malloc(arg.length * 8, 8) >>> 0;
9078
+ getFloat64ArrayMemory0().set(arg, ptr / 8);
9079
+ WASM_VECTOR_LEN = arg.length;
9080
+ return ptr;
9081
+ }
9082
+
8460
9083
  function passStringToWasm0(arg, malloc, realloc) {
8461
9084
  if (realloc === undefined) {
8462
9085
  const buf = cachedTextEncoder.encode(arg);
Binary file