sci-form-wasm 2.1.0 → 2.3.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 +27 -13
- package/alpha/index.d.ts +0 -15
- package/cjs/alpha/index.d.ts +0 -15
- package/cjs/sci_form_wasm.d.ts +53 -21
- package/cjs/sci_form_wasm.js +946 -792
- package/cjs/sci_form_wasm_bg.wasm +0 -0
- package/cjs/sci_form_wasm_bg.wasm.d.ts +165 -160
- package/package.json +1 -1
- package/sci_form_wasm.d.ts +214 -174
- package/sci_form_wasm.js +237 -65
- package/sci_form_wasm_bg.wasm +0 -0
package/sci_form_wasm.js
CHANGED
|
@@ -166,6 +166,30 @@ export class LiveSimulation {
|
|
|
166
166
|
}
|
|
167
167
|
if (Symbol.dispose) LiveSimulation.prototype[Symbol.dispose] = LiveSimulation.prototype.free;
|
|
168
168
|
|
|
169
|
+
/**
|
|
170
|
+
* Propose active-learning labels from a JSON request.
|
|
171
|
+
* @param {string} request_json
|
|
172
|
+
* @returns {string}
|
|
173
|
+
*/
|
|
174
|
+
export function active_learning_propose(request_json) {
|
|
175
|
+
let deferred2_0;
|
|
176
|
+
let deferred2_1;
|
|
177
|
+
try {
|
|
178
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
179
|
+
const ptr0 = passStringToWasm0(request_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
180
|
+
const len0 = WASM_VECTOR_LEN;
|
|
181
|
+
wasm.active_learning_propose(retptr, ptr0, len0);
|
|
182
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
183
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
184
|
+
deferred2_0 = r0;
|
|
185
|
+
deferred2_1 = r1;
|
|
186
|
+
return getStringFromWasm0(r0, r1);
|
|
187
|
+
} finally {
|
|
188
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
189
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
169
193
|
/**
|
|
170
194
|
* List every NMR-active isotope registered for an element.
|
|
171
195
|
* @param {number} element
|
|
@@ -268,46 +292,6 @@ export function alpha_compute_aevs(elements_json, coords_flat_json, params_json)
|
|
|
268
292
|
}
|
|
269
293
|
}
|
|
270
294
|
|
|
271
|
-
/**
|
|
272
|
-
* Run a Kohn-Sham DFT single-point calculation.
|
|
273
|
-
*
|
|
274
|
-
* `method`: `"svwn"` (LDA) | `"pbe"` (GGA, default).
|
|
275
|
-
*
|
|
276
|
-
* Returns JSON `DftResult`:
|
|
277
|
-
* ```json
|
|
278
|
-
* { "energy": -1.12, "homo_energy": -0.5, "lumo_energy": 0.1, "gap": 0.6,
|
|
279
|
-
* "converged": true, "n_basis": 5, "scf_iterations": 12,
|
|
280
|
-
* "mulliken_charges": [...], "orbital_energies": [...],
|
|
281
|
-
* "nuclear_repulsion": 0.72, "xc_energy": -0.3 }
|
|
282
|
-
* ```
|
|
283
|
-
* @param {string} elements_json
|
|
284
|
-
* @param {string} coords_flat_json
|
|
285
|
-
* @param {string} method
|
|
286
|
-
* @returns {string}
|
|
287
|
-
*/
|
|
288
|
-
export function alpha_compute_dft(elements_json, coords_flat_json, method) {
|
|
289
|
-
let deferred4_0;
|
|
290
|
-
let deferred4_1;
|
|
291
|
-
try {
|
|
292
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
293
|
-
const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
294
|
-
const len0 = WASM_VECTOR_LEN;
|
|
295
|
-
const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
296
|
-
const len1 = WASM_VECTOR_LEN;
|
|
297
|
-
const ptr2 = passStringToWasm0(method, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
298
|
-
const len2 = WASM_VECTOR_LEN;
|
|
299
|
-
wasm.alpha_compute_dft(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
300
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
301
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
302
|
-
deferred4_0 = r0;
|
|
303
|
-
deferred4_1 = r1;
|
|
304
|
-
return getStringFromWasm0(r0, r1);
|
|
305
|
-
} finally {
|
|
306
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
307
|
-
wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
|
|
311
295
|
/**
|
|
312
296
|
* Solve EEM charges for a molecule using the ReaxFF charge model.
|
|
313
297
|
*
|
|
@@ -1992,7 +1976,8 @@ export function build_bloch_hamiltonian_wasm(blocks_json, k_x, k_y, k_z) {
|
|
|
1992
1976
|
* Build a periodic molecular graph from fractional coordinates and a unit cell.
|
|
1993
1977
|
*
|
|
1994
1978
|
* `cell_json`: JSON array `[a, b, c, alpha, beta, gamma]` (Å, degrees).
|
|
1995
|
-
* `bond_tolerance`: extra bonding tolerance in
|
|
1979
|
+
* `bond_tolerance`: extra bonding tolerance in Å; `0` disables the extra
|
|
1980
|
+
* tolerance (the Rust default of 0.3 Å is not applied on this surface).
|
|
1996
1981
|
* @param {string} elements_json
|
|
1997
1982
|
* @param {string} frac_coords_json
|
|
1998
1983
|
* @param {string} cell_json
|
|
@@ -2356,6 +2341,71 @@ export function compute_all_nmr(elements, coords_flat, config_json) {
|
|
|
2356
2341
|
}
|
|
2357
2342
|
}
|
|
2358
2343
|
|
|
2344
|
+
/**
|
|
2345
|
+
* Compute ALPB-style Born radii.
|
|
2346
|
+
*
|
|
2347
|
+
* Returns JSON `{radii, intrinsic}`.
|
|
2348
|
+
* @param {string} elements
|
|
2349
|
+
* @param {string} coords_flat
|
|
2350
|
+
* @param {number} probe_radius
|
|
2351
|
+
* @returns {string}
|
|
2352
|
+
*/
|
|
2353
|
+
export function compute_alpb_born_radii(elements, coords_flat, probe_radius) {
|
|
2354
|
+
let deferred3_0;
|
|
2355
|
+
let deferred3_1;
|
|
2356
|
+
try {
|
|
2357
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2358
|
+
const ptr0 = passStringToWasm0(elements, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2359
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2360
|
+
const ptr1 = passStringToWasm0(coords_flat, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2361
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2362
|
+
wasm.compute_alpb_born_radii(retptr, ptr0, len0, ptr1, len1, probe_radius);
|
|
2363
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2364
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2365
|
+
deferred3_0 = r0;
|
|
2366
|
+
deferred3_1 = r1;
|
|
2367
|
+
return getStringFromWasm0(r0, r1);
|
|
2368
|
+
} finally {
|
|
2369
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2370
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
|
|
2374
|
+
/**
|
|
2375
|
+
* Compute ALPB implicit solvation energy.
|
|
2376
|
+
*
|
|
2377
|
+
* Returns JSON `{electrostatic_energy, nonpolar_energy, total_energy, born_radii, alpb_factor}`.
|
|
2378
|
+
* @param {string} elements
|
|
2379
|
+
* @param {string} coords_flat
|
|
2380
|
+
* @param {string} charges
|
|
2381
|
+
* @param {number} solvent_dielectric
|
|
2382
|
+
* @param {number} probe_radius
|
|
2383
|
+
* @param {number} surface_tension
|
|
2384
|
+
* @returns {string}
|
|
2385
|
+
*/
|
|
2386
|
+
export function compute_alpb_solvation(elements, coords_flat, charges, solvent_dielectric, probe_radius, surface_tension) {
|
|
2387
|
+
let deferred4_0;
|
|
2388
|
+
let deferred4_1;
|
|
2389
|
+
try {
|
|
2390
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2391
|
+
const ptr0 = passStringToWasm0(elements, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2392
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2393
|
+
const ptr1 = passStringToWasm0(coords_flat, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2394
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2395
|
+
const ptr2 = passStringToWasm0(charges, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2396
|
+
const len2 = WASM_VECTOR_LEN;
|
|
2397
|
+
wasm.compute_alpb_solvation(retptr, ptr0, len0, ptr1, len1, ptr2, len2, solvent_dielectric, probe_radius, surface_tension);
|
|
2398
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2399
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2400
|
+
deferred4_0 = r0;
|
|
2401
|
+
deferred4_1 = r1;
|
|
2402
|
+
return getStringFromWasm0(r0, r1);
|
|
2403
|
+
} finally {
|
|
2404
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2405
|
+
wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
|
|
2406
|
+
}
|
|
2407
|
+
}
|
|
2408
|
+
|
|
2359
2409
|
/**
|
|
2360
2410
|
* Compute ANI neural-network potential energy.
|
|
2361
2411
|
* @param {string} elements_json
|
|
@@ -2478,8 +2528,8 @@ export function compute_bond_orders(elements, coords_flat) {
|
|
|
2478
2528
|
/**
|
|
2479
2529
|
* Build a capacitance scan chart (visualization payload).
|
|
2480
2530
|
*
|
|
2481
|
-
* The interfacial charge is obtained
|
|
2482
|
-
*
|
|
2531
|
+
* The interfacial charge is obtained from the model's potential-charge
|
|
2532
|
+
* relation.
|
|
2483
2533
|
*
|
|
2484
2534
|
* Returns JSON ChartPayload with potential vs capacitance series.
|
|
2485
2535
|
* @param {number} v_min
|
|
@@ -2594,6 +2644,89 @@ export function compute_cisd(elements_json, coords_flat_json, n_states) {
|
|
|
2594
2644
|
}
|
|
2595
2645
|
}
|
|
2596
2646
|
|
|
2647
|
+
/**
|
|
2648
|
+
* Compute CPM charges at a given electrochemical potential.
|
|
2649
|
+
*
|
|
2650
|
+
* Returns JSON `{charges, total_charge, grand_potential, electrostatic_energy, mu_ev, iterations, converged}`.
|
|
2651
|
+
* @param {string} elements
|
|
2652
|
+
* @param {string} coords_flat
|
|
2653
|
+
* @param {number} mu_ev
|
|
2654
|
+
* @param {number} dielectric
|
|
2655
|
+
* @returns {string}
|
|
2656
|
+
*/
|
|
2657
|
+
export function compute_cpm_charges(elements, coords_flat, mu_ev, dielectric) {
|
|
2658
|
+
let deferred3_0;
|
|
2659
|
+
let deferred3_1;
|
|
2660
|
+
try {
|
|
2661
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2662
|
+
const ptr0 = passStringToWasm0(elements, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2663
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2664
|
+
const ptr1 = passStringToWasm0(coords_flat, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2665
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2666
|
+
wasm.compute_cpm_charges(retptr, ptr0, len0, ptr1, len1, mu_ev, dielectric);
|
|
2667
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2668
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2669
|
+
deferred3_0 = r0;
|
|
2670
|
+
deferred3_1 = r1;
|
|
2671
|
+
return getStringFromWasm0(r0, r1);
|
|
2672
|
+
} finally {
|
|
2673
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2674
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
2675
|
+
}
|
|
2676
|
+
}
|
|
2677
|
+
|
|
2678
|
+
/**
|
|
2679
|
+
* @param {string} elements
|
|
2680
|
+
* @param {string} coords_flat
|
|
2681
|
+
* @param {number} mu_ev
|
|
2682
|
+
* @param {number} dielectric
|
|
2683
|
+
* @param {string} execution_mode
|
|
2684
|
+
* @returns {Promise<string>}
|
|
2685
|
+
*/
|
|
2686
|
+
export function compute_cpm_charges_accelerated(elements, coords_flat, mu_ev, dielectric, execution_mode) {
|
|
2687
|
+
const ptr0 = passStringToWasm0(elements, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2688
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2689
|
+
const ptr1 = passStringToWasm0(coords_flat, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2690
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2691
|
+
const ptr2 = passStringToWasm0(execution_mode, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2692
|
+
const len2 = WASM_VECTOR_LEN;
|
|
2693
|
+
const ret = wasm.compute_cpm_charges_accelerated(ptr0, len0, ptr1, len1, mu_ev, dielectric, ptr2, len2);
|
|
2694
|
+
return takeObject(ret);
|
|
2695
|
+
}
|
|
2696
|
+
|
|
2697
|
+
/**
|
|
2698
|
+
* Scan electrochemical surface over a potential range.
|
|
2699
|
+
*
|
|
2700
|
+
* Returns JSON `{mu_values, total_charge, free_energy, capacitance, all_converged}`.
|
|
2701
|
+
* @param {string} elements
|
|
2702
|
+
* @param {string} coords_flat
|
|
2703
|
+
* @param {number} mu_min
|
|
2704
|
+
* @param {number} mu_max
|
|
2705
|
+
* @param {number} n_points
|
|
2706
|
+
* @param {number} dielectric
|
|
2707
|
+
* @returns {string}
|
|
2708
|
+
*/
|
|
2709
|
+
export function compute_cpm_surface(elements, coords_flat, mu_min, mu_max, n_points, dielectric) {
|
|
2710
|
+
let deferred3_0;
|
|
2711
|
+
let deferred3_1;
|
|
2712
|
+
try {
|
|
2713
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2714
|
+
const ptr0 = passStringToWasm0(elements, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2715
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2716
|
+
const ptr1 = passStringToWasm0(coords_flat, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2717
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2718
|
+
wasm.compute_cpm_surface(retptr, ptr0, len0, ptr1, len1, mu_min, mu_max, n_points, dielectric);
|
|
2719
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2720
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2721
|
+
deferred3_0 = r0;
|
|
2722
|
+
deferred3_1 = r1;
|
|
2723
|
+
return getStringFromWasm0(r0, r1);
|
|
2724
|
+
} finally {
|
|
2725
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2726
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
2727
|
+
}
|
|
2728
|
+
}
|
|
2729
|
+
|
|
2597
2730
|
/**
|
|
2598
2731
|
* **ALPHA** — Run Kohn-Sham DFT calculation.
|
|
2599
2732
|
*
|
|
@@ -3461,14 +3594,15 @@ export function compute_gcmc_isotherm(framework_json, guest_json, config_json) {
|
|
|
3461
3594
|
* @param {number} surface_potential_v
|
|
3462
3595
|
* @param {number} ionic_strength_m
|
|
3463
3596
|
* @param {number} stern_thickness_a
|
|
3597
|
+
* @param {number | null} [temperature_k]
|
|
3464
3598
|
* @returns {string}
|
|
3465
3599
|
*/
|
|
3466
|
-
export function compute_gcs_profile(surface_potential_v, ionic_strength_m, stern_thickness_a) {
|
|
3600
|
+
export function compute_gcs_profile(surface_potential_v, ionic_strength_m, stern_thickness_a, temperature_k) {
|
|
3467
3601
|
let deferred1_0;
|
|
3468
3602
|
let deferred1_1;
|
|
3469
3603
|
try {
|
|
3470
3604
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3471
|
-
wasm.compute_gcs_profile(retptr, surface_potential_v, ionic_strength_m, stern_thickness_a);
|
|
3605
|
+
wasm.compute_gcs_profile(retptr, surface_potential_v, ionic_strength_m, stern_thickness_a, !isLikeNone(temperature_k), isLikeNone(temperature_k) ? 0 : temperature_k);
|
|
3472
3606
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3473
3607
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3474
3608
|
deferred1_0 = r0;
|
|
@@ -3609,14 +3743,15 @@ export function compute_giao_nmr(elements_json, coords_flat_json, nucleus, charg
|
|
|
3609
3743
|
* Returns JSON EDL profile result.
|
|
3610
3744
|
* @param {number} surface_potential_v
|
|
3611
3745
|
* @param {number} ionic_strength_m
|
|
3746
|
+
* @param {number | null} [temperature_k]
|
|
3612
3747
|
* @returns {string}
|
|
3613
3748
|
*/
|
|
3614
|
-
export function compute_gouy_chapman_profile(surface_potential_v, ionic_strength_m) {
|
|
3749
|
+
export function compute_gouy_chapman_profile(surface_potential_v, ionic_strength_m, temperature_k) {
|
|
3615
3750
|
let deferred1_0;
|
|
3616
3751
|
let deferred1_1;
|
|
3617
3752
|
try {
|
|
3618
3753
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3619
|
-
wasm.compute_gouy_chapman_profile(retptr, surface_potential_v, ionic_strength_m);
|
|
3754
|
+
wasm.compute_gouy_chapman_profile(retptr, surface_potential_v, ionic_strength_m, !isLikeNone(temperature_k), isLikeNone(temperature_k) ? 0 : temperature_k);
|
|
3620
3755
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3621
3756
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3622
3757
|
deferred1_0 = r0;
|
|
@@ -3634,14 +3769,15 @@ export function compute_gouy_chapman_profile(surface_potential_v, ionic_strength
|
|
|
3634
3769
|
* Returns JSON EDL profile result.
|
|
3635
3770
|
* @param {number} surface_potential_v
|
|
3636
3771
|
* @param {number} ionic_strength_m
|
|
3772
|
+
* @param {number | null} [temperature_k]
|
|
3637
3773
|
* @returns {string}
|
|
3638
3774
|
*/
|
|
3639
|
-
export function compute_helmholtz_profile(surface_potential_v, ionic_strength_m) {
|
|
3775
|
+
export function compute_helmholtz_profile(surface_potential_v, ionic_strength_m, temperature_k) {
|
|
3640
3776
|
let deferred1_0;
|
|
3641
3777
|
let deferred1_1;
|
|
3642
3778
|
try {
|
|
3643
3779
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3644
|
-
wasm.compute_helmholtz_profile(retptr, surface_potential_v, ionic_strength_m);
|
|
3780
|
+
wasm.compute_helmholtz_profile(retptr, surface_potential_v, ionic_strength_m, !isLikeNone(temperature_k), isLikeNone(temperature_k) ? 0 : temperature_k);
|
|
3645
3781
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3646
3782
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3647
3783
|
deferred1_0 = r0;
|
|
@@ -5931,6 +6067,30 @@ export function discover_reaction_network(config_json) {
|
|
|
5931
6067
|
}
|
|
5932
6068
|
}
|
|
5933
6069
|
|
|
6070
|
+
/**
|
|
6071
|
+
* Canonical alias of [`discover_reaction_network`] for template-rule JSON.
|
|
6072
|
+
* @param {string} config_json
|
|
6073
|
+
* @returns {string}
|
|
6074
|
+
*/
|
|
6075
|
+
export function discover_template_network(config_json) {
|
|
6076
|
+
let deferred2_0;
|
|
6077
|
+
let deferred2_1;
|
|
6078
|
+
try {
|
|
6079
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
6080
|
+
const ptr0 = passStringToWasm0(config_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
6081
|
+
const len0 = WASM_VECTOR_LEN;
|
|
6082
|
+
wasm.discover_template_network(retptr, ptr0, len0);
|
|
6083
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
6084
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
6085
|
+
deferred2_0 = r0;
|
|
6086
|
+
deferred2_1 = r1;
|
|
6087
|
+
return getStringFromWasm0(r0, r1);
|
|
6088
|
+
} finally {
|
|
6089
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
6090
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
6091
|
+
}
|
|
6092
|
+
}
|
|
6093
|
+
|
|
5934
6094
|
/**
|
|
5935
6095
|
* Run an EHT calculation on a molecule.
|
|
5936
6096
|
*
|
|
@@ -6663,7 +6823,12 @@ export function init_webgpu() {
|
|
|
6663
6823
|
/**
|
|
6664
6824
|
* List available NEB backend methods for a given set of elements.
|
|
6665
6825
|
*
|
|
6826
|
+
* `available` means that every element in the input has parameters for that
|
|
6827
|
+
* backend. It does not guarantee SCF convergence; a supported composition can
|
|
6828
|
+
* still fail for an individual geometry.
|
|
6829
|
+
*
|
|
6666
6830
|
* Returns JSON array of `{"method": string, "available": bool, "note": string}`.
|
|
6831
|
+
* Empty element lists and atomic numbers outside `1..=118` are rejected.
|
|
6667
6832
|
* @param {string} elements_json
|
|
6668
6833
|
* @returns {string}
|
|
6669
6834
|
*/
|
|
@@ -7978,6 +8143,9 @@ export function validate_electron_count(n_electrons, n_bands, n_kpoints) {
|
|
|
7978
8143
|
|
|
7979
8144
|
/**
|
|
7980
8145
|
* Check that the electron count fits into the available band/k-point states.
|
|
8146
|
+
*
|
|
8147
|
+
* Each band at each k-point is spin-degenerate and holds two electrons, so
|
|
8148
|
+
* the capacity is `2 * n_bands * n_kpoints`.
|
|
7981
8149
|
* @param {number} n_electrons
|
|
7982
8150
|
* @param {number} n_bands
|
|
7983
8151
|
* @param {number} n_kpoints
|
|
@@ -8288,6 +8456,10 @@ function __wbg_get_imports() {
|
|
|
8288
8456
|
const ret = getObject(arg0).getMappedRange(arg1, arg2);
|
|
8289
8457
|
return addHeapObject(ret);
|
|
8290
8458
|
}, arguments); },
|
|
8459
|
+
__wbg_get_3ef1eba1850ade27: function() { return handleError(function (arg0, arg1) {
|
|
8460
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
8461
|
+
return addHeapObject(ret);
|
|
8462
|
+
}, arguments); },
|
|
8291
8463
|
__wbg_gpu_e85436d24e893506: function(arg0) {
|
|
8292
8464
|
const ret = getObject(arg0).gpu;
|
|
8293
8465
|
return addHeapObject(ret);
|
|
@@ -8490,7 +8662,7 @@ function __wbg_get_imports() {
|
|
|
8490
8662
|
const a = state0.a;
|
|
8491
8663
|
state0.a = 0;
|
|
8492
8664
|
try {
|
|
8493
|
-
return
|
|
8665
|
+
return __wasm_bindgen_func_elem_640(a, state0.b, arg0, arg1);
|
|
8494
8666
|
} finally {
|
|
8495
8667
|
state0.a = a;
|
|
8496
8668
|
}
|
|
@@ -8508,7 +8680,7 @@ function __wbg_get_imports() {
|
|
|
8508
8680
|
const a = state0.a;
|
|
8509
8681
|
state0.a = 0;
|
|
8510
8682
|
try {
|
|
8511
|
-
return
|
|
8683
|
+
return __wasm_bindgen_func_elem_640(a, state0.b, arg0, arg1);
|
|
8512
8684
|
} finally {
|
|
8513
8685
|
state0.a = a;
|
|
8514
8686
|
}
|
|
@@ -8794,18 +8966,18 @@ function __wbg_get_imports() {
|
|
|
8794
8966
|
return addHeapObject(ret);
|
|
8795
8967
|
},
|
|
8796
8968
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
8797
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
8798
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
8969
|
+
// 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);
|
|
8799
8971
|
return addHeapObject(ret);
|
|
8800
8972
|
},
|
|
8801
8973
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
8802
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
8803
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
8974
|
+
// 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);
|
|
8804
8976
|
return addHeapObject(ret);
|
|
8805
8977
|
},
|
|
8806
8978
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
8807
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
8808
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
8979
|
+
// 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);
|
|
8809
8981
|
return addHeapObject(ret);
|
|
8810
8982
|
},
|
|
8811
8983
|
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
@@ -8851,18 +9023,18 @@ function __wbg_get_imports() {
|
|
|
8851
9023
|
};
|
|
8852
9024
|
}
|
|
8853
9025
|
|
|
8854
|
-
function
|
|
8855
|
-
wasm.
|
|
9026
|
+
function __wasm_bindgen_func_elem_4610(arg0, arg1, arg2) {
|
|
9027
|
+
wasm.__wasm_bindgen_func_elem_4610(arg0, arg1, addHeapObject(arg2));
|
|
8856
9028
|
}
|
|
8857
9029
|
|
|
8858
|
-
function
|
|
8859
|
-
wasm.
|
|
9030
|
+
function __wasm_bindgen_func_elem_4610_2(arg0, arg1, arg2) {
|
|
9031
|
+
wasm.__wasm_bindgen_func_elem_4610_2(arg0, arg1, addHeapObject(arg2));
|
|
8860
9032
|
}
|
|
8861
9033
|
|
|
8862
|
-
function
|
|
9034
|
+
function __wasm_bindgen_func_elem_658(arg0, arg1, arg2) {
|
|
8863
9035
|
try {
|
|
8864
9036
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
8865
|
-
wasm.
|
|
9037
|
+
wasm.__wasm_bindgen_func_elem_658(retptr, arg0, arg1, addHeapObject(arg2));
|
|
8866
9038
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
8867
9039
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
8868
9040
|
if (r1) {
|
|
@@ -8873,8 +9045,8 @@ function __wasm_bindgen_func_elem_647(arg0, arg1, arg2) {
|
|
|
8873
9045
|
}
|
|
8874
9046
|
}
|
|
8875
9047
|
|
|
8876
|
-
function
|
|
8877
|
-
wasm.
|
|
9048
|
+
function __wasm_bindgen_func_elem_640(arg0, arg1, arg2, arg3) {
|
|
9049
|
+
wasm.__wasm_bindgen_func_elem_640(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
8878
9050
|
}
|
|
8879
9051
|
|
|
8880
9052
|
|
package/sci_form_wasm_bg.wasm
CHANGED
|
Binary file
|