sci-form-wasm 2.2.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/README.md +56 -18
- package/alpha/index.d.ts +0 -15
- package/cjs/alpha/index.d.ts +0 -15
- package/cjs/sci_form_wasm.d.ts +249 -21
- package/cjs/sci_form_wasm.js +802 -50
- package/cjs/sci_form_wasm_bg.wasm +0 -0
- package/cjs/sci_form_wasm_bg.wasm.d.ts +172 -129
- package/package.json +9 -2
- package/parallel.d.ts +9 -0
- package/parallel.js +45 -0
- package/sci_form_wasm.d.ts +462 -188
- package/sci_form_wasm.js +818 -66
- package/sci_form_wasm_bg.wasm +0 -0
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
|
|
@@ -292,46 +612,6 @@ export function alpha_compute_aevs(elements_json, coords_flat_json, params_json)
|
|
|
292
612
|
}
|
|
293
613
|
}
|
|
294
614
|
|
|
295
|
-
/**
|
|
296
|
-
* Run a Kohn-Sham DFT single-point calculation.
|
|
297
|
-
*
|
|
298
|
-
* `method`: `"svwn"` (LDA) | `"pbe"` (GGA, default).
|
|
299
|
-
*
|
|
300
|
-
* Returns JSON `DftResult`:
|
|
301
|
-
* ```json
|
|
302
|
-
* { "energy": -1.12, "homo_energy": -0.5, "lumo_energy": 0.1, "gap": 0.6,
|
|
303
|
-
* "converged": true, "n_basis": 5, "scf_iterations": 12,
|
|
304
|
-
* "mulliken_charges": [...], "orbital_energies": [...],
|
|
305
|
-
* "nuclear_repulsion": 0.72, "xc_energy": -0.3 }
|
|
306
|
-
* ```
|
|
307
|
-
* @param {string} elements_json
|
|
308
|
-
* @param {string} coords_flat_json
|
|
309
|
-
* @param {string} method
|
|
310
|
-
* @returns {string}
|
|
311
|
-
*/
|
|
312
|
-
export function alpha_compute_dft(elements_json, coords_flat_json, method) {
|
|
313
|
-
let deferred4_0;
|
|
314
|
-
let deferred4_1;
|
|
315
|
-
try {
|
|
316
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
317
|
-
const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
318
|
-
const len0 = WASM_VECTOR_LEN;
|
|
319
|
-
const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
320
|
-
const len1 = WASM_VECTOR_LEN;
|
|
321
|
-
const ptr2 = passStringToWasm0(method, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
322
|
-
const len2 = WASM_VECTOR_LEN;
|
|
323
|
-
wasm.alpha_compute_dft(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
324
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
325
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
326
|
-
deferred4_0 = r0;
|
|
327
|
-
deferred4_1 = r1;
|
|
328
|
-
return getStringFromWasm0(r0, r1);
|
|
329
|
-
} finally {
|
|
330
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
331
|
-
wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
|
|
335
615
|
/**
|
|
336
616
|
* Solve EEM charges for a molecule using the ReaxFF charge model.
|
|
337
617
|
*
|
|
@@ -2016,7 +2296,8 @@ export function build_bloch_hamiltonian_wasm(blocks_json, k_x, k_y, k_z) {
|
|
|
2016
2296
|
* Build a periodic molecular graph from fractional coordinates and a unit cell.
|
|
2017
2297
|
*
|
|
2018
2298
|
* `cell_json`: JSON array `[a, b, c, alpha, beta, gamma]` (Å, degrees).
|
|
2019
|
-
* `bond_tolerance`: extra bonding tolerance in
|
|
2299
|
+
* `bond_tolerance`: extra bonding tolerance in Å; `0` disables the extra
|
|
2300
|
+
* tolerance (the Rust default of 0.3 Å is not applied on this surface).
|
|
2020
2301
|
* @param {string} elements_json
|
|
2021
2302
|
* @param {string} frac_coords_json
|
|
2022
2303
|
* @param {string} cell_json
|
|
@@ -2368,7 +2649,72 @@ export function compute_all_nmr(elements, coords_flat, config_json) {
|
|
|
2368
2649
|
const len1 = WASM_VECTOR_LEN;
|
|
2369
2650
|
const ptr2 = passStringToWasm0(config_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2370
2651
|
const len2 = WASM_VECTOR_LEN;
|
|
2371
|
-
wasm.compute_all_nmr(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
2652
|
+
wasm.compute_all_nmr(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
2653
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2654
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2655
|
+
deferred4_0 = r0;
|
|
2656
|
+
deferred4_1 = r1;
|
|
2657
|
+
return getStringFromWasm0(r0, r1);
|
|
2658
|
+
} finally {
|
|
2659
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2660
|
+
wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
|
|
2661
|
+
}
|
|
2662
|
+
}
|
|
2663
|
+
|
|
2664
|
+
/**
|
|
2665
|
+
* Compute ALPB-style Born radii.
|
|
2666
|
+
*
|
|
2667
|
+
* Returns JSON `{radii, intrinsic}`.
|
|
2668
|
+
* @param {string} elements
|
|
2669
|
+
* @param {string} coords_flat
|
|
2670
|
+
* @param {number} probe_radius
|
|
2671
|
+
* @returns {string}
|
|
2672
|
+
*/
|
|
2673
|
+
export function compute_alpb_born_radii(elements, coords_flat, probe_radius) {
|
|
2674
|
+
let deferred3_0;
|
|
2675
|
+
let deferred3_1;
|
|
2676
|
+
try {
|
|
2677
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2678
|
+
const ptr0 = passStringToWasm0(elements, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2679
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2680
|
+
const ptr1 = passStringToWasm0(coords_flat, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2681
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2682
|
+
wasm.compute_alpb_born_radii(retptr, ptr0, len0, ptr1, len1, probe_radius);
|
|
2683
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2684
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2685
|
+
deferred3_0 = r0;
|
|
2686
|
+
deferred3_1 = r1;
|
|
2687
|
+
return getStringFromWasm0(r0, r1);
|
|
2688
|
+
} finally {
|
|
2689
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2690
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
2691
|
+
}
|
|
2692
|
+
}
|
|
2693
|
+
|
|
2694
|
+
/**
|
|
2695
|
+
* Compute ALPB implicit solvation energy.
|
|
2696
|
+
*
|
|
2697
|
+
* Returns JSON `{electrostatic_energy, nonpolar_energy, total_energy, born_radii, alpb_factor}`.
|
|
2698
|
+
* @param {string} elements
|
|
2699
|
+
* @param {string} coords_flat
|
|
2700
|
+
* @param {string} charges
|
|
2701
|
+
* @param {number} solvent_dielectric
|
|
2702
|
+
* @param {number} probe_radius
|
|
2703
|
+
* @param {number} surface_tension
|
|
2704
|
+
* @returns {string}
|
|
2705
|
+
*/
|
|
2706
|
+
export function compute_alpb_solvation(elements, coords_flat, charges, solvent_dielectric, probe_radius, surface_tension) {
|
|
2707
|
+
let deferred4_0;
|
|
2708
|
+
let deferred4_1;
|
|
2709
|
+
try {
|
|
2710
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2711
|
+
const ptr0 = passStringToWasm0(elements, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2712
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2713
|
+
const ptr1 = passStringToWasm0(coords_flat, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2714
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2715
|
+
const ptr2 = passStringToWasm0(charges, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2716
|
+
const len2 = WASM_VECTOR_LEN;
|
|
2717
|
+
wasm.compute_alpb_solvation(retptr, ptr0, len0, ptr1, len1, ptr2, len2, solvent_dielectric, probe_radius, surface_tension);
|
|
2372
2718
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2373
2719
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2374
2720
|
deferred4_0 = r0;
|
|
@@ -2502,8 +2848,8 @@ export function compute_bond_orders(elements, coords_flat) {
|
|
|
2502
2848
|
/**
|
|
2503
2849
|
* Build a capacitance scan chart (visualization payload).
|
|
2504
2850
|
*
|
|
2505
|
-
* The interfacial charge is obtained
|
|
2506
|
-
*
|
|
2851
|
+
* The interfacial charge is obtained from the model's potential-charge
|
|
2852
|
+
* relation.
|
|
2507
2853
|
*
|
|
2508
2854
|
* Returns JSON ChartPayload with potential vs capacitance series.
|
|
2509
2855
|
* @param {number} v_min
|
|
@@ -2618,6 +2964,89 @@ export function compute_cisd(elements_json, coords_flat_json, n_states) {
|
|
|
2618
2964
|
}
|
|
2619
2965
|
}
|
|
2620
2966
|
|
|
2967
|
+
/**
|
|
2968
|
+
* Compute CPM charges at a given electrochemical potential.
|
|
2969
|
+
*
|
|
2970
|
+
* Returns JSON `{charges, total_charge, grand_potential, electrostatic_energy, mu_ev, iterations, converged}`.
|
|
2971
|
+
* @param {string} elements
|
|
2972
|
+
* @param {string} coords_flat
|
|
2973
|
+
* @param {number} mu_ev
|
|
2974
|
+
* @param {number} dielectric
|
|
2975
|
+
* @returns {string}
|
|
2976
|
+
*/
|
|
2977
|
+
export function compute_cpm_charges(elements, coords_flat, mu_ev, dielectric) {
|
|
2978
|
+
let deferred3_0;
|
|
2979
|
+
let deferred3_1;
|
|
2980
|
+
try {
|
|
2981
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2982
|
+
const ptr0 = passStringToWasm0(elements, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2983
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2984
|
+
const ptr1 = passStringToWasm0(coords_flat, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2985
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2986
|
+
wasm.compute_cpm_charges(retptr, ptr0, len0, ptr1, len1, mu_ev, dielectric);
|
|
2987
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2988
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2989
|
+
deferred3_0 = r0;
|
|
2990
|
+
deferred3_1 = r1;
|
|
2991
|
+
return getStringFromWasm0(r0, r1);
|
|
2992
|
+
} finally {
|
|
2993
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2994
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
2995
|
+
}
|
|
2996
|
+
}
|
|
2997
|
+
|
|
2998
|
+
/**
|
|
2999
|
+
* @param {string} elements
|
|
3000
|
+
* @param {string} coords_flat
|
|
3001
|
+
* @param {number} mu_ev
|
|
3002
|
+
* @param {number} dielectric
|
|
3003
|
+
* @param {string} execution_mode
|
|
3004
|
+
* @returns {Promise<string>}
|
|
3005
|
+
*/
|
|
3006
|
+
export function compute_cpm_charges_accelerated(elements, coords_flat, mu_ev, dielectric, execution_mode) {
|
|
3007
|
+
const ptr0 = passStringToWasm0(elements, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
3008
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3009
|
+
const ptr1 = passStringToWasm0(coords_flat, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
3010
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3011
|
+
const ptr2 = passStringToWasm0(execution_mode, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
3012
|
+
const len2 = WASM_VECTOR_LEN;
|
|
3013
|
+
const ret = wasm.compute_cpm_charges_accelerated(ptr0, len0, ptr1, len1, mu_ev, dielectric, ptr2, len2);
|
|
3014
|
+
return takeObject(ret);
|
|
3015
|
+
}
|
|
3016
|
+
|
|
3017
|
+
/**
|
|
3018
|
+
* Scan electrochemical surface over a potential range.
|
|
3019
|
+
*
|
|
3020
|
+
* Returns JSON `{mu_values, total_charge, free_energy, capacitance, all_converged}`.
|
|
3021
|
+
* @param {string} elements
|
|
3022
|
+
* @param {string} coords_flat
|
|
3023
|
+
* @param {number} mu_min
|
|
3024
|
+
* @param {number} mu_max
|
|
3025
|
+
* @param {number} n_points
|
|
3026
|
+
* @param {number} dielectric
|
|
3027
|
+
* @returns {string}
|
|
3028
|
+
*/
|
|
3029
|
+
export function compute_cpm_surface(elements, coords_flat, mu_min, mu_max, n_points, dielectric) {
|
|
3030
|
+
let deferred3_0;
|
|
3031
|
+
let deferred3_1;
|
|
3032
|
+
try {
|
|
3033
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3034
|
+
const ptr0 = passStringToWasm0(elements, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
3035
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3036
|
+
const ptr1 = passStringToWasm0(coords_flat, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
3037
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3038
|
+
wasm.compute_cpm_surface(retptr, ptr0, len0, ptr1, len1, mu_min, mu_max, n_points, dielectric);
|
|
3039
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3040
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3041
|
+
deferred3_0 = r0;
|
|
3042
|
+
deferred3_1 = r1;
|
|
3043
|
+
return getStringFromWasm0(r0, r1);
|
|
3044
|
+
} finally {
|
|
3045
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3046
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
3047
|
+
}
|
|
3048
|
+
}
|
|
3049
|
+
|
|
2621
3050
|
/**
|
|
2622
3051
|
* **ALPHA** — Run Kohn-Sham DFT calculation.
|
|
2623
3052
|
*
|
|
@@ -3485,14 +3914,15 @@ export function compute_gcmc_isotherm(framework_json, guest_json, config_json) {
|
|
|
3485
3914
|
* @param {number} surface_potential_v
|
|
3486
3915
|
* @param {number} ionic_strength_m
|
|
3487
3916
|
* @param {number} stern_thickness_a
|
|
3917
|
+
* @param {number | null} [temperature_k]
|
|
3488
3918
|
* @returns {string}
|
|
3489
3919
|
*/
|
|
3490
|
-
export function compute_gcs_profile(surface_potential_v, ionic_strength_m, stern_thickness_a) {
|
|
3920
|
+
export function compute_gcs_profile(surface_potential_v, ionic_strength_m, stern_thickness_a, temperature_k) {
|
|
3491
3921
|
let deferred1_0;
|
|
3492
3922
|
let deferred1_1;
|
|
3493
3923
|
try {
|
|
3494
3924
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3495
|
-
wasm.compute_gcs_profile(retptr, surface_potential_v, ionic_strength_m, stern_thickness_a);
|
|
3925
|
+
wasm.compute_gcs_profile(retptr, surface_potential_v, ionic_strength_m, stern_thickness_a, !isLikeNone(temperature_k), isLikeNone(temperature_k) ? 0 : temperature_k);
|
|
3496
3926
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3497
3927
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3498
3928
|
deferred1_0 = r0;
|
|
@@ -3633,14 +4063,15 @@ export function compute_giao_nmr(elements_json, coords_flat_json, nucleus, charg
|
|
|
3633
4063
|
* Returns JSON EDL profile result.
|
|
3634
4064
|
* @param {number} surface_potential_v
|
|
3635
4065
|
* @param {number} ionic_strength_m
|
|
4066
|
+
* @param {number | null} [temperature_k]
|
|
3636
4067
|
* @returns {string}
|
|
3637
4068
|
*/
|
|
3638
|
-
export function compute_gouy_chapman_profile(surface_potential_v, ionic_strength_m) {
|
|
4069
|
+
export function compute_gouy_chapman_profile(surface_potential_v, ionic_strength_m, temperature_k) {
|
|
3639
4070
|
let deferred1_0;
|
|
3640
4071
|
let deferred1_1;
|
|
3641
4072
|
try {
|
|
3642
4073
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3643
|
-
wasm.compute_gouy_chapman_profile(retptr, surface_potential_v, ionic_strength_m);
|
|
4074
|
+
wasm.compute_gouy_chapman_profile(retptr, surface_potential_v, ionic_strength_m, !isLikeNone(temperature_k), isLikeNone(temperature_k) ? 0 : temperature_k);
|
|
3644
4075
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3645
4076
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3646
4077
|
deferred1_0 = r0;
|
|
@@ -3658,14 +4089,15 @@ export function compute_gouy_chapman_profile(surface_potential_v, ionic_strength
|
|
|
3658
4089
|
* Returns JSON EDL profile result.
|
|
3659
4090
|
* @param {number} surface_potential_v
|
|
3660
4091
|
* @param {number} ionic_strength_m
|
|
4092
|
+
* @param {number | null} [temperature_k]
|
|
3661
4093
|
* @returns {string}
|
|
3662
4094
|
*/
|
|
3663
|
-
export function compute_helmholtz_profile(surface_potential_v, ionic_strength_m) {
|
|
4095
|
+
export function compute_helmholtz_profile(surface_potential_v, ionic_strength_m, temperature_k) {
|
|
3664
4096
|
let deferred1_0;
|
|
3665
4097
|
let deferred1_1;
|
|
3666
4098
|
try {
|
|
3667
4099
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3668
|
-
wasm.compute_helmholtz_profile(retptr, surface_potential_v, ionic_strength_m);
|
|
4100
|
+
wasm.compute_helmholtz_profile(retptr, surface_potential_v, ionic_strength_m, !isLikeNone(temperature_k), isLikeNone(temperature_k) ? 0 : temperature_k);
|
|
3669
4101
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3670
4102
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3671
4103
|
deferred1_0 = r0;
|
|
@@ -4048,6 +4480,37 @@ export function compute_md_trajectory_nvt_seed64(smiles, coords_json, n_steps, d
|
|
|
4048
4480
|
}
|
|
4049
4481
|
}
|
|
4050
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
|
+
|
|
4051
4514
|
/**
|
|
4052
4515
|
* Run short NVE molecular dynamics with UFF force field, 64-bit seed.
|
|
4053
4516
|
*
|
|
@@ -4080,6 +4543,35 @@ export function compute_md_trajectory_seed64(smiles, coords_json, n_steps, dt_fs
|
|
|
4080
4543
|
}
|
|
4081
4544
|
}
|
|
4082
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
|
+
|
|
4083
4575
|
/**
|
|
4084
4576
|
* Run velocity-Verlet MD with a configurable energy backend.
|
|
4085
4577
|
*
|
|
@@ -4273,6 +4765,32 @@ export function compute_mmff94_energy_breakdown(smiles, coords) {
|
|
|
4273
4765
|
}
|
|
4274
4766
|
}
|
|
4275
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
|
+
|
|
4276
4794
|
/**
|
|
4277
4795
|
* Compute molecular descriptors from SMILES.
|
|
4278
4796
|
*
|
|
@@ -5507,6 +6025,35 @@ export function compute_uff_energy(smiles, coords) {
|
|
|
5507
6025
|
}
|
|
5508
6026
|
}
|
|
5509
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
|
+
|
|
5510
6057
|
/**
|
|
5511
6058
|
* Per-term-type UFF energy breakdown (kcal/mol).
|
|
5512
6059
|
*
|
|
@@ -5538,6 +6085,32 @@ export function compute_uff_energy_breakdown(smiles, coords) {
|
|
|
5538
6085
|
}
|
|
5539
6086
|
}
|
|
5540
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
|
+
|
|
5541
6114
|
/**
|
|
5542
6115
|
* Compute UFF energy with aromaticity-informed heuristic correction metadata.
|
|
5543
6116
|
* @param {string} smiles
|
|
@@ -5843,6 +6416,37 @@ export function compute_xtb_gradient(elements_json, coords_flat_json) {
|
|
|
5843
6416
|
}
|
|
5844
6417
|
}
|
|
5845
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
|
+
|
|
5846
6450
|
/**
|
|
5847
6451
|
* Fit a split-conformal calibration radius.
|
|
5848
6452
|
* @param {string} predictions_json
|
|
@@ -5955,6 +6559,30 @@ export function discover_reaction_network(config_json) {
|
|
|
5955
6559
|
}
|
|
5956
6560
|
}
|
|
5957
6561
|
|
|
6562
|
+
/**
|
|
6563
|
+
* Canonical alias of [`discover_reaction_network`] for template-rule JSON.
|
|
6564
|
+
* @param {string} config_json
|
|
6565
|
+
* @returns {string}
|
|
6566
|
+
*/
|
|
6567
|
+
export function discover_template_network(config_json) {
|
|
6568
|
+
let deferred2_0;
|
|
6569
|
+
let deferred2_1;
|
|
6570
|
+
try {
|
|
6571
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
6572
|
+
const ptr0 = passStringToWasm0(config_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
6573
|
+
const len0 = WASM_VECTOR_LEN;
|
|
6574
|
+
wasm.discover_template_network(retptr, ptr0, len0);
|
|
6575
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
6576
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
6577
|
+
deferred2_0 = r0;
|
|
6578
|
+
deferred2_1 = r1;
|
|
6579
|
+
return getStringFromWasm0(r0, r1);
|
|
6580
|
+
} finally {
|
|
6581
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
6582
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
6583
|
+
}
|
|
6584
|
+
}
|
|
6585
|
+
|
|
5958
6586
|
/**
|
|
5959
6587
|
* Run an EHT calculation on a molecule.
|
|
5960
6588
|
*
|
|
@@ -5987,6 +6615,33 @@ export function eht_calculate(elements, coords_flat, k) {
|
|
|
5987
6615
|
}
|
|
5988
6616
|
}
|
|
5989
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
|
+
|
|
5990
6645
|
/**
|
|
5991
6646
|
* @param {string} elements
|
|
5992
6647
|
* @param {string} coords_flat
|
|
@@ -6462,6 +7117,58 @@ export function embed_seed64(smiles, seed) {
|
|
|
6462
7117
|
}
|
|
6463
7118
|
}
|
|
6464
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
|
+
|
|
6465
7172
|
/**
|
|
6466
7173
|
* Estimate an alchemical free-energy difference from JSON samples.
|
|
6467
7174
|
* @param {string} samples_json
|
|
@@ -6687,7 +7394,12 @@ export function init_webgpu() {
|
|
|
6687
7394
|
/**
|
|
6688
7395
|
* List available NEB backend methods for a given set of elements.
|
|
6689
7396
|
*
|
|
7397
|
+
* `available` means that every element in the input has parameters for that
|
|
7398
|
+
* backend. It does not guarantee SCF convergence; a supported composition can
|
|
7399
|
+
* still fail for an individual geometry.
|
|
7400
|
+
*
|
|
6690
7401
|
* Returns JSON array of `{"method": string, "available": bool, "note": string}`.
|
|
7402
|
+
* Empty element lists and atomic numbers outside `1..=118` are rejected.
|
|
6691
7403
|
* @param {string} elements_json
|
|
6692
7404
|
* @returns {string}
|
|
6693
7405
|
*/
|
|
@@ -8002,6 +8714,9 @@ export function validate_electron_count(n_electrons, n_bands, n_kpoints) {
|
|
|
8002
8714
|
|
|
8003
8715
|
/**
|
|
8004
8716
|
* Check that the electron count fits into the available band/k-point states.
|
|
8717
|
+
*
|
|
8718
|
+
* Each band at each k-point is spin-degenerate and holds two electrons, so
|
|
8719
|
+
* the capacity is `2 * n_bands * n_kpoints`.
|
|
8005
8720
|
* @param {number} n_electrons
|
|
8006
8721
|
* @param {number} n_bands
|
|
8007
8722
|
* @param {number} n_kpoints
|
|
@@ -8312,6 +9027,10 @@ function __wbg_get_imports() {
|
|
|
8312
9027
|
const ret = getObject(arg0).getMappedRange(arg1, arg2);
|
|
8313
9028
|
return addHeapObject(ret);
|
|
8314
9029
|
}, arguments); },
|
|
9030
|
+
__wbg_get_3ef1eba1850ade27: function() { return handleError(function (arg0, arg1) {
|
|
9031
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
9032
|
+
return addHeapObject(ret);
|
|
9033
|
+
}, arguments); },
|
|
8315
9034
|
__wbg_gpu_e85436d24e893506: function(arg0) {
|
|
8316
9035
|
const ret = getObject(arg0).gpu;
|
|
8317
9036
|
return addHeapObject(ret);
|
|
@@ -8514,7 +9233,7 @@ function __wbg_get_imports() {
|
|
|
8514
9233
|
const a = state0.a;
|
|
8515
9234
|
state0.a = 0;
|
|
8516
9235
|
try {
|
|
8517
|
-
return
|
|
9236
|
+
return __wasm_bindgen_func_elem_642(a, state0.b, arg0, arg1);
|
|
8518
9237
|
} finally {
|
|
8519
9238
|
state0.a = a;
|
|
8520
9239
|
}
|
|
@@ -8525,6 +9244,10 @@ function __wbg_get_imports() {
|
|
|
8525
9244
|
state0.a = state0.b = 0;
|
|
8526
9245
|
}
|
|
8527
9246
|
},
|
|
9247
|
+
__wbg_new_from_slice_22da9388ac046e50: function(arg0, arg1) {
|
|
9248
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
9249
|
+
return addHeapObject(ret);
|
|
9250
|
+
},
|
|
8528
9251
|
__wbg_new_typed_aaaeaf29cf802876: function(arg0, arg1) {
|
|
8529
9252
|
try {
|
|
8530
9253
|
var state0 = {a: arg0, b: arg1};
|
|
@@ -8532,7 +9255,7 @@ function __wbg_get_imports() {
|
|
|
8532
9255
|
const a = state0.a;
|
|
8533
9256
|
state0.a = 0;
|
|
8534
9257
|
try {
|
|
8535
|
-
return
|
|
9258
|
+
return __wasm_bindgen_func_elem_642(a, state0.b, arg0, arg1);
|
|
8536
9259
|
} finally {
|
|
8537
9260
|
state0.a = a;
|
|
8538
9261
|
}
|
|
@@ -8818,18 +9541,18 @@ function __wbg_get_imports() {
|
|
|
8818
9541
|
return addHeapObject(ret);
|
|
8819
9542
|
},
|
|
8820
9543
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
8821
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
8822
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
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`.
|
|
9545
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4858, __wasm_bindgen_func_elem_4867);
|
|
8823
9546
|
return addHeapObject(ret);
|
|
8824
9547
|
},
|
|
8825
9548
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
8826
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
8827
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
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`.
|
|
9550
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4858, __wasm_bindgen_func_elem_660);
|
|
8828
9551
|
return addHeapObject(ret);
|
|
8829
9552
|
},
|
|
8830
9553
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
8831
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
8832
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
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`.
|
|
9555
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4858, __wasm_bindgen_func_elem_4867_2);
|
|
8833
9556
|
return addHeapObject(ret);
|
|
8834
9557
|
},
|
|
8835
9558
|
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
@@ -8875,18 +9598,18 @@ function __wbg_get_imports() {
|
|
|
8875
9598
|
};
|
|
8876
9599
|
}
|
|
8877
9600
|
|
|
8878
|
-
function
|
|
8879
|
-
wasm.
|
|
9601
|
+
function __wasm_bindgen_func_elem_4867(arg0, arg1, arg2) {
|
|
9602
|
+
wasm.__wasm_bindgen_func_elem_4867(arg0, arg1, addHeapObject(arg2));
|
|
8880
9603
|
}
|
|
8881
9604
|
|
|
8882
|
-
function
|
|
8883
|
-
wasm.
|
|
9605
|
+
function __wasm_bindgen_func_elem_4867_2(arg0, arg1, arg2) {
|
|
9606
|
+
wasm.__wasm_bindgen_func_elem_4867_2(arg0, arg1, addHeapObject(arg2));
|
|
8884
9607
|
}
|
|
8885
9608
|
|
|
8886
|
-
function
|
|
9609
|
+
function __wasm_bindgen_func_elem_660(arg0, arg1, arg2) {
|
|
8887
9610
|
try {
|
|
8888
9611
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
8889
|
-
wasm.
|
|
9612
|
+
wasm.__wasm_bindgen_func_elem_660(retptr, arg0, arg1, addHeapObject(arg2));
|
|
8890
9613
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
8891
9614
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
8892
9615
|
if (r1) {
|
|
@@ -8897,8 +9620,8 @@ function __wasm_bindgen_func_elem_650(arg0, arg1, arg2) {
|
|
|
8897
9620
|
}
|
|
8898
9621
|
}
|
|
8899
9622
|
|
|
8900
|
-
function
|
|
8901
|
-
wasm.
|
|
9623
|
+
function __wasm_bindgen_func_elem_642(arg0, arg1, arg2, arg3) {
|
|
9624
|
+
wasm.__wasm_bindgen_func_elem_642(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
8902
9625
|
}
|
|
8903
9626
|
|
|
8904
9627
|
|
|
@@ -8924,6 +9647,21 @@ const __wbindgen_enum_GpuTextureViewDimension = ["1d", "2d", "2d-array", "cube",
|
|
|
8924
9647
|
const LiveSimulationFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
8925
9648
|
? { register: () => {}, unregister: () => {} }
|
|
8926
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));
|
|
8927
9665
|
const wbg_rayon_PoolBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
8928
9666
|
? { register: () => {}, unregister: () => {} }
|
|
8929
9667
|
: new FinalizationRegistry(ptr => wasm.__wbg_wbg_rayon_poolbuilder_free(ptr >>> 0, 1));
|
|
@@ -9111,6 +9849,20 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
9111
9849
|
return real;
|
|
9112
9850
|
}
|
|
9113
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
|
+
|
|
9114
9866
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
9115
9867
|
if (realloc === undefined) {
|
|
9116
9868
|
const buf = cachedTextEncoder.encode(arg);
|