sci-form-wasm 2.2.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 +48 -21
- package/cjs/sci_form_wasm.js +179 -50
- package/cjs/sci_form_wasm_bg.wasm +0 -0
- package/cjs/sci_form_wasm_bg.wasm.d.ts +116 -112
- package/package.json +1 -1
- package/sci_form_wasm.d.ts +236 -202
- package/sci_form_wasm.js +213 -65
- package/sci_form_wasm_bg.wasm +0 -0
package/sci_form_wasm.js
CHANGED
|
@@ -292,46 +292,6 @@ export function alpha_compute_aevs(elements_json, coords_flat_json, params_json)
|
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
294
|
|
|
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
295
|
/**
|
|
336
296
|
* Solve EEM charges for a molecule using the ReaxFF charge model.
|
|
337
297
|
*
|
|
@@ -2016,7 +1976,8 @@ export function build_bloch_hamiltonian_wasm(blocks_json, k_x, k_y, k_z) {
|
|
|
2016
1976
|
* Build a periodic molecular graph from fractional coordinates and a unit cell.
|
|
2017
1977
|
*
|
|
2018
1978
|
* `cell_json`: JSON array `[a, b, c, alpha, beta, gamma]` (Å, degrees).
|
|
2019
|
-
* `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).
|
|
2020
1981
|
* @param {string} elements_json
|
|
2021
1982
|
* @param {string} frac_coords_json
|
|
2022
1983
|
* @param {string} cell_json
|
|
@@ -2380,6 +2341,71 @@ export function compute_all_nmr(elements, coords_flat, config_json) {
|
|
|
2380
2341
|
}
|
|
2381
2342
|
}
|
|
2382
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
|
+
|
|
2383
2409
|
/**
|
|
2384
2410
|
* Compute ANI neural-network potential energy.
|
|
2385
2411
|
* @param {string} elements_json
|
|
@@ -2502,8 +2528,8 @@ export function compute_bond_orders(elements, coords_flat) {
|
|
|
2502
2528
|
/**
|
|
2503
2529
|
* Build a capacitance scan chart (visualization payload).
|
|
2504
2530
|
*
|
|
2505
|
-
* The interfacial charge is obtained
|
|
2506
|
-
*
|
|
2531
|
+
* The interfacial charge is obtained from the model's potential-charge
|
|
2532
|
+
* relation.
|
|
2507
2533
|
*
|
|
2508
2534
|
* Returns JSON ChartPayload with potential vs capacitance series.
|
|
2509
2535
|
* @param {number} v_min
|
|
@@ -2618,6 +2644,89 @@ export function compute_cisd(elements_json, coords_flat_json, n_states) {
|
|
|
2618
2644
|
}
|
|
2619
2645
|
}
|
|
2620
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
|
+
|
|
2621
2730
|
/**
|
|
2622
2731
|
* **ALPHA** — Run Kohn-Sham DFT calculation.
|
|
2623
2732
|
*
|
|
@@ -3485,14 +3594,15 @@ export function compute_gcmc_isotherm(framework_json, guest_json, config_json) {
|
|
|
3485
3594
|
* @param {number} surface_potential_v
|
|
3486
3595
|
* @param {number} ionic_strength_m
|
|
3487
3596
|
* @param {number} stern_thickness_a
|
|
3597
|
+
* @param {number | null} [temperature_k]
|
|
3488
3598
|
* @returns {string}
|
|
3489
3599
|
*/
|
|
3490
|
-
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) {
|
|
3491
3601
|
let deferred1_0;
|
|
3492
3602
|
let deferred1_1;
|
|
3493
3603
|
try {
|
|
3494
3604
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3495
|
-
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);
|
|
3496
3606
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3497
3607
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3498
3608
|
deferred1_0 = r0;
|
|
@@ -3633,14 +3743,15 @@ export function compute_giao_nmr(elements_json, coords_flat_json, nucleus, charg
|
|
|
3633
3743
|
* Returns JSON EDL profile result.
|
|
3634
3744
|
* @param {number} surface_potential_v
|
|
3635
3745
|
* @param {number} ionic_strength_m
|
|
3746
|
+
* @param {number | null} [temperature_k]
|
|
3636
3747
|
* @returns {string}
|
|
3637
3748
|
*/
|
|
3638
|
-
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) {
|
|
3639
3750
|
let deferred1_0;
|
|
3640
3751
|
let deferred1_1;
|
|
3641
3752
|
try {
|
|
3642
3753
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3643
|
-
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);
|
|
3644
3755
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3645
3756
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3646
3757
|
deferred1_0 = r0;
|
|
@@ -3658,14 +3769,15 @@ export function compute_gouy_chapman_profile(surface_potential_v, ionic_strength
|
|
|
3658
3769
|
* Returns JSON EDL profile result.
|
|
3659
3770
|
* @param {number} surface_potential_v
|
|
3660
3771
|
* @param {number} ionic_strength_m
|
|
3772
|
+
* @param {number | null} [temperature_k]
|
|
3661
3773
|
* @returns {string}
|
|
3662
3774
|
*/
|
|
3663
|
-
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) {
|
|
3664
3776
|
let deferred1_0;
|
|
3665
3777
|
let deferred1_1;
|
|
3666
3778
|
try {
|
|
3667
3779
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3668
|
-
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);
|
|
3669
3781
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3670
3782
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3671
3783
|
deferred1_0 = r0;
|
|
@@ -5955,6 +6067,30 @@ export function discover_reaction_network(config_json) {
|
|
|
5955
6067
|
}
|
|
5956
6068
|
}
|
|
5957
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
|
+
|
|
5958
6094
|
/**
|
|
5959
6095
|
* Run an EHT calculation on a molecule.
|
|
5960
6096
|
*
|
|
@@ -6687,7 +6823,12 @@ export function init_webgpu() {
|
|
|
6687
6823
|
/**
|
|
6688
6824
|
* List available NEB backend methods for a given set of elements.
|
|
6689
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
|
+
*
|
|
6690
6830
|
* Returns JSON array of `{"method": string, "available": bool, "note": string}`.
|
|
6831
|
+
* Empty element lists and atomic numbers outside `1..=118` are rejected.
|
|
6691
6832
|
* @param {string} elements_json
|
|
6692
6833
|
* @returns {string}
|
|
6693
6834
|
*/
|
|
@@ -8002,6 +8143,9 @@ export function validate_electron_count(n_electrons, n_bands, n_kpoints) {
|
|
|
8002
8143
|
|
|
8003
8144
|
/**
|
|
8004
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`.
|
|
8005
8149
|
* @param {number} n_electrons
|
|
8006
8150
|
* @param {number} n_bands
|
|
8007
8151
|
* @param {number} n_kpoints
|
|
@@ -8312,6 +8456,10 @@ function __wbg_get_imports() {
|
|
|
8312
8456
|
const ret = getObject(arg0).getMappedRange(arg1, arg2);
|
|
8313
8457
|
return addHeapObject(ret);
|
|
8314
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); },
|
|
8315
8463
|
__wbg_gpu_e85436d24e893506: function(arg0) {
|
|
8316
8464
|
const ret = getObject(arg0).gpu;
|
|
8317
8465
|
return addHeapObject(ret);
|
|
@@ -8514,7 +8662,7 @@ function __wbg_get_imports() {
|
|
|
8514
8662
|
const a = state0.a;
|
|
8515
8663
|
state0.a = 0;
|
|
8516
8664
|
try {
|
|
8517
|
-
return
|
|
8665
|
+
return __wasm_bindgen_func_elem_640(a, state0.b, arg0, arg1);
|
|
8518
8666
|
} finally {
|
|
8519
8667
|
state0.a = a;
|
|
8520
8668
|
}
|
|
@@ -8532,7 +8680,7 @@ function __wbg_get_imports() {
|
|
|
8532
8680
|
const a = state0.a;
|
|
8533
8681
|
state0.a = 0;
|
|
8534
8682
|
try {
|
|
8535
|
-
return
|
|
8683
|
+
return __wasm_bindgen_func_elem_640(a, state0.b, arg0, arg1);
|
|
8536
8684
|
} finally {
|
|
8537
8685
|
state0.a = a;
|
|
8538
8686
|
}
|
|
@@ -8818,18 +8966,18 @@ function __wbg_get_imports() {
|
|
|
8818
8966
|
return addHeapObject(ret);
|
|
8819
8967
|
},
|
|
8820
8968
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
8821
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
8822
|
-
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);
|
|
8823
8971
|
return addHeapObject(ret);
|
|
8824
8972
|
},
|
|
8825
8973
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
8826
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
8827
|
-
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);
|
|
8828
8976
|
return addHeapObject(ret);
|
|
8829
8977
|
},
|
|
8830
8978
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
8831
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
8832
|
-
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);
|
|
8833
8981
|
return addHeapObject(ret);
|
|
8834
8982
|
},
|
|
8835
8983
|
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
@@ -8875,18 +9023,18 @@ function __wbg_get_imports() {
|
|
|
8875
9023
|
};
|
|
8876
9024
|
}
|
|
8877
9025
|
|
|
8878
|
-
function
|
|
8879
|
-
wasm.
|
|
9026
|
+
function __wasm_bindgen_func_elem_4610(arg0, arg1, arg2) {
|
|
9027
|
+
wasm.__wasm_bindgen_func_elem_4610(arg0, arg1, addHeapObject(arg2));
|
|
8880
9028
|
}
|
|
8881
9029
|
|
|
8882
|
-
function
|
|
8883
|
-
wasm.
|
|
9030
|
+
function __wasm_bindgen_func_elem_4610_2(arg0, arg1, arg2) {
|
|
9031
|
+
wasm.__wasm_bindgen_func_elem_4610_2(arg0, arg1, addHeapObject(arg2));
|
|
8884
9032
|
}
|
|
8885
9033
|
|
|
8886
|
-
function
|
|
9034
|
+
function __wasm_bindgen_func_elem_658(arg0, arg1, arg2) {
|
|
8887
9035
|
try {
|
|
8888
9036
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
8889
|
-
wasm.
|
|
9037
|
+
wasm.__wasm_bindgen_func_elem_658(retptr, arg0, arg1, addHeapObject(arg2));
|
|
8890
9038
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
8891
9039
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
8892
9040
|
if (r1) {
|
|
@@ -8897,8 +9045,8 @@ function __wasm_bindgen_func_elem_650(arg0, arg1, arg2) {
|
|
|
8897
9045
|
}
|
|
8898
9046
|
}
|
|
8899
9047
|
|
|
8900
|
-
function
|
|
8901
|
-
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));
|
|
8902
9050
|
}
|
|
8903
9051
|
|
|
8904
9052
|
|
package/sci_form_wasm_bg.wasm
CHANGED
|
Binary file
|