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 CHANGED
@@ -11,16 +11,19 @@ Native bindings for **Rust**, **Python**, **TypeScript/JavaScript (WASM)**, and
11
11
  [![npm](https://img.shields.io/npm/v/sci-form-wasm)](https://www.npmjs.com/package/sci-form-wasm)
12
12
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
13
13
 
14
- See also: [CHANGELOG.md](CHANGELOG.md) · [**Migrating to 2.0**](docs/guide/migration-2.0.md) · [Migrating to 1.0 (historical)](docs/guide/migration-1.0.md) · [Release checklist](docs/release-checklist-2.0.md) · [TESTING.md](TESTING.md) · [Roadmap: v2.x feature roadmap](docs/v2-roadmap.md) · [Dynamics & reactivity](docs/dynamics_reactivity_roadmap.md)
15
-
16
- > **Status: 2.0.0 — complete MMFF94, typed errors and promoted core modules.**
17
- > The library no longer panics on malformed input, the force-field results are
18
- > bit-for-bit reproducible regardless of the machine's core count, and every
19
- > public item is documented. Read the
20
- > [2.0 migration guide](docs/guide/migration-2.0.md) before upgrading from 1.x:
21
- > the root Rust API now returns `SciFormError`, and the validated experimental
22
- > modules moved to top-level core paths. The
23
- > [1.0 guide](docs/guide/migration-1.0.md) remains for the 0.15 → 1.0 step.
14
+ See also: [CHANGELOG.md](CHANGELOG.md) · [**Migrating to 2.0**](docs/guide/migration-2.0.md) · [Migrating to 1.0 (historical)](docs/guide/migration-1.0.md) · [Release checklist](docs/release-checklist-2.3.md) · [TESTING.md](TESTING.md) · [Roadmap: v2.x feature roadmap](docs/v2-roadmap.md) · [Dynamics & reactivity](docs/dynamics_reactivity_roadmap.md)
15
+
16
+ > **Status: 2.3.0 — stable CLI/API plus the complete v2 alpha-inclusive release.**
17
+ > The 2.0 baseline removed panics on malformed input and made force-field
18
+ > results reproducible. 2.1 promoted GCMC, reaction networks and kMC to core;
19
+ > 2.2 promoted enhanced sampling and active learning. 2.3 ships all three v2
20
+ > waves together — PBE0/MP2, EPR/XPS, Raman/VCD/ROA, QM/MM, pKa/redox,
21
+ > FEP/BAR/MBAR, metadynamics/OPES, 3D-RISM, all-nuclide NMR, periodic
22
+ > KPM/RandNLA adapters and conformal active learning. The candidates that have
23
+ > not passed their L3/L4 promotion gate remain clearly labelled experimental;
24
+ > see the [2.3 release checklist](docs/release-checklist-2.3.md). Read the [2.0 migration guide](docs/guide/migration-2.0.md) before
25
+ > upgrading from 1.x; the [1.0 guide](docs/guide/migration-1.0.md) remains for
26
+ > the 0.15 → 1.0 step.
24
27
 
25
28
  ## Features
26
29
 
@@ -96,6 +99,14 @@ See also: [CHANGELOG.md](CHANGELOG.md) · [**Migrating to 2.0**](docs/guide/migr
96
99
  - **230 space groups** — full ITC space group library with equivalent position generation
97
100
  - **CIF import/export** — parse and write CIF 1.1 crystallographic files with uncertainty notation support
98
101
 
102
+ ### v2.3 research & electrochemistry
103
+ - **Electrochemistry** — explicit-pair pKa/redox cycles, EDL profiles and capacitance scans
104
+ - **Free energy & sampling** — FEP/BAR/MBAR, well-tempered metadynamics, OPES, GCMC and Gillespie kMC
105
+ - **Quantum extensions** — PBE0/3-21G, conventional MP2, mechanical-embedding QM/MM, EPR hyperfine, XPS and 3D-RISM
106
+ - **Spectroscopy** — Raman, VCD, ROA, all-nuclide GIAO NMR
107
+ - **Networks & ML** — SMIRKS/template reaction networks, GSM barrier refinement, conformal calibration and active learning
108
+ - **Periodic adapters** — k-meshes, Bloch sums, KPM DOS and randomized eigensolves
109
+
99
110
  ### Platform
100
111
  - **Multi-platform** — Rust lib, Python (PyO3), TypeScript/JS (WASM), CLI (Linux/macOS/Windows)
101
112
  - **Zero runtime dependencies** — pure Rust, no C++ toolchain needed
@@ -111,7 +122,7 @@ See also: [CHANGELOG.md](CHANGELOG.md) · [**Migrating to 2.0**](docs/guide/migr
111
122
  [dependencies]
112
123
  sci-form = "1.0"
113
124
  # For parallel batch + ESP:
114
- sci-form = { version = "2.0", features = ["parallel"] }
125
+ sci-form = { version = "2.3", features = ["parallel"] }
115
126
  ```
116
127
 
117
128
  ```rust
@@ -498,7 +509,7 @@ cargo clippy --all-targets -- -D warnings
498
509
  Use the provided bump script. It updates all version strings, commits, tags, and pushes:
499
510
 
500
511
  ```bash
501
- # Auto-increment patch (2.0.0 → 2.0.1)
512
+ # Auto-increment patch (2.3.0 → 2.3.1)
502
513
  ./scripts/bump_version.sh
503
514
 
504
515
  # Set a specific version
@@ -518,7 +529,10 @@ Then creates a `vX.Y.Z` git tag, which triggers the [release workflow](.github/w
518
529
 
519
530
  The workflow refuses to publish a tag that does not match the manifest
520
531
  versions, so a mismatch fails fast instead of shipping mislabelled artefacts.
521
- Before tagging, walk through the [release checklist](docs/release-checklist-2.0.md).
532
+ Before tagging, walk through the [release checklist](docs/release-checklist-2.3.md).
533
+ The local gate builds the test binaries once and runs them in a bounded pool
534
+ (`SCI_FORM_TEST_JOBS`, default 8, x `SCI_FORM_TEST_THREADS`, default 3); set it to 1 to reproduce the historical
535
+ serial execution.
522
536
 
523
537
  **Required repository secrets:**
524
538
 
package/alpha/index.d.ts CHANGED
@@ -95,21 +95,6 @@ export function alpha_boys_function(n: number, x: number): string;
95
95
  */
96
96
  export function alpha_compute_aevs(elements_json: string, coords_flat_json: string, params_json: string): string;
97
97
 
98
- /**
99
- * Run a Kohn-Sham DFT single-point calculation.
100
- *
101
- * `method`: `"svwn"` (LDA) | `"pbe"` (GGA, default).
102
- *
103
- * Returns JSON `DftResult`:
104
- * ```json
105
- * { "energy": -1.12, "homo_energy": -0.5, "lumo_energy": 0.1, "gap": 0.6,
106
- * "converged": true, "n_basis": 5, "scf_iterations": 12,
107
- * "mulliken_charges": [...], "orbital_energies": [...],
108
- * "nuclear_repulsion": 0.72, "xc_energy": -0.3 }
109
- * ```
110
- */
111
- export function alpha_compute_dft(elements_json: string, coords_flat_json: string, method: string): string;
112
-
113
98
  /**
114
99
  * Solve EEM charges for a molecule using the ReaxFF charge model.
115
100
  *
@@ -95,21 +95,6 @@ export function alpha_boys_function(n: number, x: number): string;
95
95
  */
96
96
  export function alpha_compute_aevs(elements_json: string, coords_flat_json: string, params_json: string): string;
97
97
 
98
- /**
99
- * Run a Kohn-Sham DFT single-point calculation.
100
- *
101
- * `method`: `"svwn"` (LDA) | `"pbe"` (GGA, default).
102
- *
103
- * Returns JSON `DftResult`:
104
- * ```json
105
- * { "energy": -1.12, "homo_energy": -0.5, "lumo_energy": 0.1, "gap": 0.6,
106
- * "converged": true, "n_basis": 5, "scf_iterations": 12,
107
- * "mulliken_charges": [...], "orbital_energies": [...],
108
- * "nuclear_repulsion": 0.72, "xc_energy": -0.3 }
109
- * ```
110
- */
111
- export function alpha_compute_dft(elements_json: string, coords_flat_json: string, method: string): string;
112
-
113
98
  /**
114
99
  * Solve EEM charges for a molecule using the ReaxFF charge model.
115
100
  *
@@ -101,21 +101,6 @@ export function alpha_boys_function(n: number, x: number): string;
101
101
  */
102
102
  export function alpha_compute_aevs(elements_json: string, coords_flat_json: string, params_json: string): string;
103
103
 
104
- /**
105
- * Run a Kohn-Sham DFT single-point calculation.
106
- *
107
- * `method`: `"svwn"` (LDA) | `"pbe"` (GGA, default).
108
- *
109
- * Returns JSON `DftResult`:
110
- * ```json
111
- * { "energy": -1.12, "homo_energy": -0.5, "lumo_energy": 0.1, "gap": 0.6,
112
- * "converged": true, "n_basis": 5, "scf_iterations": 12,
113
- * "mulliken_charges": [...], "orbital_energies": [...],
114
- * "nuclear_repulsion": 0.72, "xc_energy": -0.3 }
115
- * ```
116
- */
117
- export function alpha_compute_dft(elements_json: string, coords_flat_json: string, method: string): string;
118
-
119
104
  /**
120
105
  * Solve EEM charges for a molecule using the ReaxFF charge model.
121
106
  *
@@ -614,7 +599,8 @@ export function build_bloch_hamiltonian_wasm(blocks_json: string, k_x: number, k
614
599
  * Build a periodic molecular graph from fractional coordinates and a unit cell.
615
600
  *
616
601
  * `cell_json`: JSON array `[a, b, c, alpha, beta, gamma]` (Å, degrees).
617
- * `bond_tolerance`: extra bonding tolerance in Å (0 = default 0.3).
602
+ * `bond_tolerance`: extra bonding tolerance in Å; `0` disables the extra
603
+ * tolerance (the Rust default of 0.3 Å is not applied on this surface).
618
604
  */
619
605
  export function build_periodic_molecule(elements_json: string, frac_coords_json: string, cell_json: string, bond_tolerance: number): string;
620
606
 
@@ -695,6 +681,20 @@ export function compute_aevs_tm(elements_json: string, coords_flat_json: string)
695
681
  */
696
682
  export function compute_all_nmr(elements: string, coords_flat: string, config_json: string): string;
697
683
 
684
+ /**
685
+ * Compute ALPB-style Born radii.
686
+ *
687
+ * Returns JSON `{radii, intrinsic}`.
688
+ */
689
+ export function compute_alpb_born_radii(elements: string, coords_flat: string, probe_radius: number): string;
690
+
691
+ /**
692
+ * Compute ALPB implicit solvation energy.
693
+ *
694
+ * Returns JSON `{electrostatic_energy, nonpolar_energy, total_energy, born_radii, alpb_factor}`.
695
+ */
696
+ export function compute_alpb_solvation(elements: string, coords_flat: string, charges: string, solvent_dielectric: number, probe_radius: number, surface_tension: number): string;
697
+
698
698
  /**
699
699
  * Compute ANI neural-network potential energy.
700
700
  */
@@ -725,8 +725,8 @@ export function compute_bond_orders(elements: string, coords_flat: string): stri
725
725
  /**
726
726
  * Build a capacitance scan chart (visualization payload).
727
727
  *
728
- * The interfacial charge is obtained by integrating the computed charge
729
- * density of every EDL profile in the scan.
728
+ * The interfacial charge is obtained from the model's potential-charge
729
+ * relation.
730
730
  *
731
731
  * Returns JSON ChartPayload with potential vs capacitance series.
732
732
  */
@@ -754,6 +754,20 @@ export function compute_charges_configured(smiles: string, max_iter: number, ini
754
754
  */
755
755
  export function compute_cisd(elements_json: string, coords_flat_json: string, n_states: number): string;
756
756
 
757
+ /**
758
+ * Compute CPM charges at a given electrochemical potential.
759
+ *
760
+ * Returns JSON `{charges, total_charge, grand_potential, electrostatic_energy, mu_ev, iterations, converged}`.
761
+ */
762
+ export function compute_cpm_charges(elements: string, coords_flat: string, mu_ev: number, dielectric: number): string;
763
+
764
+ /**
765
+ * Scan electrochemical surface over a potential range.
766
+ *
767
+ * Returns JSON `{mu_values, total_charge, free_energy, capacitance, all_converged}`.
768
+ */
769
+ export function compute_cpm_surface(elements: string, coords_flat: string, mu_min: number, mu_max: number, n_points: number, dielectric: number): string;
770
+
757
771
  /**
758
772
  * **ALPHA** — Run Kohn-Sham DFT calculation.
759
773
  *
@@ -933,7 +947,7 @@ export function compute_gcmc_isotherm(framework_json: string, guest_json: string
933
947
  *
934
948
  * Returns JSON EDL profile result.
935
949
  */
936
- export function compute_gcs_profile(surface_potential_v: number, ionic_strength_m: number, stern_thickness_a: number): string;
950
+ export function compute_gcs_profile(surface_potential_v: number, ionic_strength_m: number, stern_thickness_a: number, temperature_k?: number | null): string;
937
951
 
938
952
  /**
939
953
  * Compute GETAWAY 3D molecular descriptors.
@@ -963,14 +977,14 @@ export function compute_giao_nmr(elements_json: string, coords_flat_json: string
963
977
  *
964
978
  * Returns JSON EDL profile result.
965
979
  */
966
- export function compute_gouy_chapman_profile(surface_potential_v: number, ionic_strength_m: number): string;
980
+ export function compute_gouy_chapman_profile(surface_potential_v: number, ionic_strength_m: number, temperature_k?: number | null): string;
967
981
 
968
982
  /**
969
983
  * Compute Helmholtz-only profile.
970
984
  *
971
985
  * Returns JSON EDL profile result.
972
986
  */
973
- export function compute_helmholtz_profile(surface_potential_v: number, ionic_strength_m: number): string;
987
+ export function compute_helmholtz_profile(surface_potential_v: number, ionic_strength_m: number, temperature_k?: number | null): string;
974
988
 
975
989
  /**
976
990
  * Run a HF-3c calculation with default configuration.
@@ -1470,6 +1484,11 @@ export function detect_hapticity(elements_json: string, coords_flat_json: string
1470
1484
  */
1471
1485
  export function discover_reaction_network(config_json: string): string;
1472
1486
 
1487
+ /**
1488
+ * Canonical alias of [`discover_reaction_network`] for template-rule JSON.
1489
+ */
1490
+ export function discover_template_network(config_json: string): string;
1491
+
1473
1492
  /**
1474
1493
  * Run an EHT calculation on a molecule.
1475
1494
  *
@@ -1655,7 +1674,12 @@ export function get_system_method_plan(elements: string): string;
1655
1674
  /**
1656
1675
  * List available NEB backend methods for a given set of elements.
1657
1676
  *
1677
+ * `available` means that every element in the input has parameters for that
1678
+ * backend. It does not guarantee SCF convergence; a supported composition can
1679
+ * still fail for an individual geometry.
1680
+ *
1658
1681
  * Returns JSON array of `{"method": string, "available": bool, "note": string}`.
1682
+ * Empty element lists and atomic numbers outside `1..=118` are rejected.
1659
1683
  */
1660
1684
  export function list_neb_backends(elements_json: string): string;
1661
1685
 
@@ -1981,6 +2005,9 @@ export function validate_electron_count(n_electrons: number, n_bands: number, n_
1981
2005
 
1982
2006
  /**
1983
2007
  * Check that the electron count fits into the available band/k-point states.
2008
+ *
2009
+ * Each band at each k-point is spin-degenerate and holds two electrons, so
2010
+ * the capacity is `2 * n_bands * n_kpoints`.
1984
2011
  */
1985
2012
  export function validate_electron_count_wasm(n_electrons: number, n_bands: number, n_kpoints: number): string;
1986
2013
 
@@ -297,47 +297,6 @@ function alpha_compute_aevs(elements_json, coords_flat_json, params_json) {
297
297
  }
298
298
  exports.alpha_compute_aevs = alpha_compute_aevs;
299
299
 
300
- /**
301
- * Run a Kohn-Sham DFT single-point calculation.
302
- *
303
- * `method`: `"svwn"` (LDA) | `"pbe"` (GGA, default).
304
- *
305
- * Returns JSON `DftResult`:
306
- * ```json
307
- * { "energy": -1.12, "homo_energy": -0.5, "lumo_energy": 0.1, "gap": 0.6,
308
- * "converged": true, "n_basis": 5, "scf_iterations": 12,
309
- * "mulliken_charges": [...], "orbital_energies": [...],
310
- * "nuclear_repulsion": 0.72, "xc_energy": -0.3 }
311
- * ```
312
- * @param {string} elements_json
313
- * @param {string} coords_flat_json
314
- * @param {string} method
315
- * @returns {string}
316
- */
317
- function alpha_compute_dft(elements_json, coords_flat_json, method) {
318
- let deferred4_0;
319
- let deferred4_1;
320
- try {
321
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
322
- const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
323
- const len0 = WASM_VECTOR_LEN;
324
- const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
325
- const len1 = WASM_VECTOR_LEN;
326
- const ptr2 = passStringToWasm0(method, wasm.__wbindgen_export, wasm.__wbindgen_export2);
327
- const len2 = WASM_VECTOR_LEN;
328
- wasm.alpha_compute_dft(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
329
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
330
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
331
- deferred4_0 = r0;
332
- deferred4_1 = r1;
333
- return getStringFromWasm0(r0, r1);
334
- } finally {
335
- wasm.__wbindgen_add_to_stack_pointer(16);
336
- wasm.__wbindgen_export3(deferred4_0, deferred4_1, 1);
337
- }
338
- }
339
- exports.alpha_compute_dft = alpha_compute_dft;
340
-
341
300
  /**
342
301
  * Solve EEM charges for a molecule using the ReaxFF charge model.
343
302
  *
@@ -2076,7 +2035,8 @@ exports.build_bloch_hamiltonian_wasm = build_bloch_hamiltonian_wasm;
2076
2035
  * Build a periodic molecular graph from fractional coordinates and a unit cell.
2077
2036
  *
2078
2037
  * `cell_json`: JSON array `[a, b, c, alpha, beta, gamma]` (Å, degrees).
2079
- * `bond_tolerance`: extra bonding tolerance in Å (0 = default 0.3).
2038
+ * `bond_tolerance`: extra bonding tolerance in Å; `0` disables the extra
2039
+ * tolerance (the Rust default of 0.3 Å is not applied on this surface).
2080
2040
  * @param {string} elements_json
2081
2041
  * @param {string} frac_coords_json
2082
2042
  * @param {string} cell_json
@@ -2453,6 +2413,73 @@ function compute_all_nmr(elements, coords_flat, config_json) {
2453
2413
  }
2454
2414
  exports.compute_all_nmr = compute_all_nmr;
2455
2415
 
2416
+ /**
2417
+ * Compute ALPB-style Born radii.
2418
+ *
2419
+ * Returns JSON `{radii, intrinsic}`.
2420
+ * @param {string} elements
2421
+ * @param {string} coords_flat
2422
+ * @param {number} probe_radius
2423
+ * @returns {string}
2424
+ */
2425
+ function compute_alpb_born_radii(elements, coords_flat, probe_radius) {
2426
+ let deferred3_0;
2427
+ let deferred3_1;
2428
+ try {
2429
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2430
+ const ptr0 = passStringToWasm0(elements, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2431
+ const len0 = WASM_VECTOR_LEN;
2432
+ const ptr1 = passStringToWasm0(coords_flat, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2433
+ const len1 = WASM_VECTOR_LEN;
2434
+ wasm.compute_alpb_born_radii(retptr, ptr0, len0, ptr1, len1, probe_radius);
2435
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2436
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2437
+ deferred3_0 = r0;
2438
+ deferred3_1 = r1;
2439
+ return getStringFromWasm0(r0, r1);
2440
+ } finally {
2441
+ wasm.__wbindgen_add_to_stack_pointer(16);
2442
+ wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
2443
+ }
2444
+ }
2445
+ exports.compute_alpb_born_radii = compute_alpb_born_radii;
2446
+
2447
+ /**
2448
+ * Compute ALPB implicit solvation energy.
2449
+ *
2450
+ * Returns JSON `{electrostatic_energy, nonpolar_energy, total_energy, born_radii, alpb_factor}`.
2451
+ * @param {string} elements
2452
+ * @param {string} coords_flat
2453
+ * @param {string} charges
2454
+ * @param {number} solvent_dielectric
2455
+ * @param {number} probe_radius
2456
+ * @param {number} surface_tension
2457
+ * @returns {string}
2458
+ */
2459
+ function compute_alpb_solvation(elements, coords_flat, charges, solvent_dielectric, probe_radius, surface_tension) {
2460
+ let deferred4_0;
2461
+ let deferred4_1;
2462
+ try {
2463
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2464
+ const ptr0 = passStringToWasm0(elements, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2465
+ const len0 = WASM_VECTOR_LEN;
2466
+ const ptr1 = passStringToWasm0(coords_flat, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2467
+ const len1 = WASM_VECTOR_LEN;
2468
+ const ptr2 = passStringToWasm0(charges, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2469
+ const len2 = WASM_VECTOR_LEN;
2470
+ wasm.compute_alpb_solvation(retptr, ptr0, len0, ptr1, len1, ptr2, len2, solvent_dielectric, probe_radius, surface_tension);
2471
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2472
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2473
+ deferred4_0 = r0;
2474
+ deferred4_1 = r1;
2475
+ return getStringFromWasm0(r0, r1);
2476
+ } finally {
2477
+ wasm.__wbindgen_add_to_stack_pointer(16);
2478
+ wasm.__wbindgen_export3(deferred4_0, deferred4_1, 1);
2479
+ }
2480
+ }
2481
+ exports.compute_alpb_solvation = compute_alpb_solvation;
2482
+
2456
2483
  /**
2457
2484
  * Compute ANI neural-network potential energy.
2458
2485
  * @param {string} elements_json
@@ -2579,8 +2606,8 @@ exports.compute_bond_orders = compute_bond_orders;
2579
2606
  /**
2580
2607
  * Build a capacitance scan chart (visualization payload).
2581
2608
  *
2582
- * The interfacial charge is obtained by integrating the computed charge
2583
- * density of every EDL profile in the scan.
2609
+ * The interfacial charge is obtained from the model's potential-charge
2610
+ * relation.
2584
2611
  *
2585
2612
  * Returns JSON ChartPayload with potential vs capacitance series.
2586
2613
  * @param {number} v_min
@@ -2699,6 +2726,72 @@ function compute_cisd(elements_json, coords_flat_json, n_states) {
2699
2726
  }
2700
2727
  exports.compute_cisd = compute_cisd;
2701
2728
 
2729
+ /**
2730
+ * Compute CPM charges at a given electrochemical potential.
2731
+ *
2732
+ * Returns JSON `{charges, total_charge, grand_potential, electrostatic_energy, mu_ev, iterations, converged}`.
2733
+ * @param {string} elements
2734
+ * @param {string} coords_flat
2735
+ * @param {number} mu_ev
2736
+ * @param {number} dielectric
2737
+ * @returns {string}
2738
+ */
2739
+ function compute_cpm_charges(elements, coords_flat, mu_ev, dielectric) {
2740
+ let deferred3_0;
2741
+ let deferred3_1;
2742
+ try {
2743
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2744
+ const ptr0 = passStringToWasm0(elements, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2745
+ const len0 = WASM_VECTOR_LEN;
2746
+ const ptr1 = passStringToWasm0(coords_flat, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2747
+ const len1 = WASM_VECTOR_LEN;
2748
+ wasm.compute_cpm_charges(retptr, ptr0, len0, ptr1, len1, mu_ev, dielectric);
2749
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2750
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2751
+ deferred3_0 = r0;
2752
+ deferred3_1 = r1;
2753
+ return getStringFromWasm0(r0, r1);
2754
+ } finally {
2755
+ wasm.__wbindgen_add_to_stack_pointer(16);
2756
+ wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
2757
+ }
2758
+ }
2759
+ exports.compute_cpm_charges = compute_cpm_charges;
2760
+
2761
+ /**
2762
+ * Scan electrochemical surface over a potential range.
2763
+ *
2764
+ * Returns JSON `{mu_values, total_charge, free_energy, capacitance, all_converged}`.
2765
+ * @param {string} elements
2766
+ * @param {string} coords_flat
2767
+ * @param {number} mu_min
2768
+ * @param {number} mu_max
2769
+ * @param {number} n_points
2770
+ * @param {number} dielectric
2771
+ * @returns {string}
2772
+ */
2773
+ function compute_cpm_surface(elements, coords_flat, mu_min, mu_max, n_points, dielectric) {
2774
+ let deferred3_0;
2775
+ let deferred3_1;
2776
+ try {
2777
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2778
+ const ptr0 = passStringToWasm0(elements, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2779
+ const len0 = WASM_VECTOR_LEN;
2780
+ const ptr1 = passStringToWasm0(coords_flat, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2781
+ const len1 = WASM_VECTOR_LEN;
2782
+ wasm.compute_cpm_surface(retptr, ptr0, len0, ptr1, len1, mu_min, mu_max, n_points, dielectric);
2783
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2784
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2785
+ deferred3_0 = r0;
2786
+ deferred3_1 = r1;
2787
+ return getStringFromWasm0(r0, r1);
2788
+ } finally {
2789
+ wasm.__wbindgen_add_to_stack_pointer(16);
2790
+ wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
2791
+ }
2792
+ }
2793
+ exports.compute_cpm_surface = compute_cpm_surface;
2794
+
2702
2795
  /**
2703
2796
  * **ALPHA** — Run Kohn-Sham DFT calculation.
2704
2797
  *
@@ -3537,14 +3630,15 @@ exports.compute_gcmc_isotherm = compute_gcmc_isotherm;
3537
3630
  * @param {number} surface_potential_v
3538
3631
  * @param {number} ionic_strength_m
3539
3632
  * @param {number} stern_thickness_a
3633
+ * @param {number | null} [temperature_k]
3540
3634
  * @returns {string}
3541
3635
  */
3542
- function compute_gcs_profile(surface_potential_v, ionic_strength_m, stern_thickness_a) {
3636
+ function compute_gcs_profile(surface_potential_v, ionic_strength_m, stern_thickness_a, temperature_k) {
3543
3637
  let deferred1_0;
3544
3638
  let deferred1_1;
3545
3639
  try {
3546
3640
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3547
- wasm.compute_gcs_profile(retptr, surface_potential_v, ionic_strength_m, stern_thickness_a);
3641
+ wasm.compute_gcs_profile(retptr, surface_potential_v, ionic_strength_m, stern_thickness_a, !isLikeNone(temperature_k), isLikeNone(temperature_k) ? 0 : temperature_k);
3548
3642
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3549
3643
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3550
3644
  deferred1_0 = r0;
@@ -3690,14 +3784,15 @@ exports.compute_giao_nmr = compute_giao_nmr;
3690
3784
  * Returns JSON EDL profile result.
3691
3785
  * @param {number} surface_potential_v
3692
3786
  * @param {number} ionic_strength_m
3787
+ * @param {number | null} [temperature_k]
3693
3788
  * @returns {string}
3694
3789
  */
3695
- function compute_gouy_chapman_profile(surface_potential_v, ionic_strength_m) {
3790
+ function compute_gouy_chapman_profile(surface_potential_v, ionic_strength_m, temperature_k) {
3696
3791
  let deferred1_0;
3697
3792
  let deferred1_1;
3698
3793
  try {
3699
3794
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3700
- wasm.compute_gouy_chapman_profile(retptr, surface_potential_v, ionic_strength_m);
3795
+ wasm.compute_gouy_chapman_profile(retptr, surface_potential_v, ionic_strength_m, !isLikeNone(temperature_k), isLikeNone(temperature_k) ? 0 : temperature_k);
3701
3796
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3702
3797
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3703
3798
  deferred1_0 = r0;
@@ -3716,14 +3811,15 @@ exports.compute_gouy_chapman_profile = compute_gouy_chapman_profile;
3716
3811
  * Returns JSON EDL profile result.
3717
3812
  * @param {number} surface_potential_v
3718
3813
  * @param {number} ionic_strength_m
3814
+ * @param {number | null} [temperature_k]
3719
3815
  * @returns {string}
3720
3816
  */
3721
- function compute_helmholtz_profile(surface_potential_v, ionic_strength_m) {
3817
+ function compute_helmholtz_profile(surface_potential_v, ionic_strength_m, temperature_k) {
3722
3818
  let deferred1_0;
3723
3819
  let deferred1_1;
3724
3820
  try {
3725
3821
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3726
- wasm.compute_helmholtz_profile(retptr, surface_potential_v, ionic_strength_m);
3822
+ wasm.compute_helmholtz_profile(retptr, surface_potential_v, ionic_strength_m, !isLikeNone(temperature_k), isLikeNone(temperature_k) ? 0 : temperature_k);
3727
3823
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3728
3824
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3729
3825
  deferred1_0 = r0;
@@ -6062,6 +6158,31 @@ function discover_reaction_network(config_json) {
6062
6158
  }
6063
6159
  exports.discover_reaction_network = discover_reaction_network;
6064
6160
 
6161
+ /**
6162
+ * Canonical alias of [`discover_reaction_network`] for template-rule JSON.
6163
+ * @param {string} config_json
6164
+ * @returns {string}
6165
+ */
6166
+ function discover_template_network(config_json) {
6167
+ let deferred2_0;
6168
+ let deferred2_1;
6169
+ try {
6170
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6171
+ const ptr0 = passStringToWasm0(config_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
6172
+ const len0 = WASM_VECTOR_LEN;
6173
+ wasm.discover_template_network(retptr, ptr0, len0);
6174
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6175
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6176
+ deferred2_0 = r0;
6177
+ deferred2_1 = r1;
6178
+ return getStringFromWasm0(r0, r1);
6179
+ } finally {
6180
+ wasm.__wbindgen_add_to_stack_pointer(16);
6181
+ wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
6182
+ }
6183
+ }
6184
+ exports.discover_template_network = discover_template_network;
6185
+
6065
6186
  /**
6066
6187
  * Run an EHT calculation on a molecule.
6067
6188
  *
@@ -6723,7 +6844,12 @@ exports.get_system_method_plan = get_system_method_plan;
6723
6844
  /**
6724
6845
  * List available NEB backend methods for a given set of elements.
6725
6846
  *
6847
+ * `available` means that every element in the input has parameters for that
6848
+ * backend. It does not guarantee SCF convergence; a supported composition can
6849
+ * still fail for an individual geometry.
6850
+ *
6726
6851
  * Returns JSON array of `{"method": string, "available": bool, "note": string}`.
6852
+ * Empty element lists and atomic numbers outside `1..=118` are rejected.
6727
6853
  * @param {string} elements_json
6728
6854
  * @returns {string}
6729
6855
  */
@@ -8084,6 +8210,9 @@ exports.validate_electron_count = validate_electron_count;
8084
8210
 
8085
8211
  /**
8086
8212
  * Check that the electron count fits into the available band/k-point states.
8213
+ *
8214
+ * Each band at each k-point is spin-degenerate and holds two electrons, so
8215
+ * the capacity is `2 * n_bands * n_kpoints`.
8087
8216
  * @param {number} n_electrons
8088
8217
  * @param {number} n_bands
8089
8218
  * @param {number} n_kpoints
Binary file