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/README.md
CHANGED
|
@@ -11,16 +11,19 @@ Native bindings for **Rust**, **Python**, **TypeScript/JavaScript (WASM)**, and
|
|
|
11
11
|
[](https://www.npmjs.com/package/sci-form-wasm)
|
|
12
12
|
[](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.
|
|
15
|
-
|
|
16
|
-
> **Status: 2.
|
|
17
|
-
> The
|
|
18
|
-
>
|
|
19
|
-
>
|
|
20
|
-
>
|
|
21
|
-
>
|
|
22
|
-
>
|
|
23
|
-
>
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
*
|
package/cjs/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
|
*
|
package/cjs/sci_form_wasm.d.ts
CHANGED
|
@@ -70,6 +70,11 @@ export class LiveSimulation {
|
|
|
70
70
|
temperature(): number;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
/**
|
|
74
|
+
* Propose active-learning labels from a JSON request.
|
|
75
|
+
*/
|
|
76
|
+
export function active_learning_propose(request_json: string): string;
|
|
77
|
+
|
|
73
78
|
/**
|
|
74
79
|
* List every NMR-active isotope registered for an element.
|
|
75
80
|
*/
|
|
@@ -96,21 +101,6 @@ export function alpha_boys_function(n: number, x: number): string;
|
|
|
96
101
|
*/
|
|
97
102
|
export function alpha_compute_aevs(elements_json: string, coords_flat_json: string, params_json: string): string;
|
|
98
103
|
|
|
99
|
-
/**
|
|
100
|
-
* Run a Kohn-Sham DFT single-point calculation.
|
|
101
|
-
*
|
|
102
|
-
* `method`: `"svwn"` (LDA) | `"pbe"` (GGA, default).
|
|
103
|
-
*
|
|
104
|
-
* Returns JSON `DftResult`:
|
|
105
|
-
* ```json
|
|
106
|
-
* { "energy": -1.12, "homo_energy": -0.5, "lumo_energy": 0.1, "gap": 0.6,
|
|
107
|
-
* "converged": true, "n_basis": 5, "scf_iterations": 12,
|
|
108
|
-
* "mulliken_charges": [...], "orbital_energies": [...],
|
|
109
|
-
* "nuclear_repulsion": 0.72, "xc_energy": -0.3 }
|
|
110
|
-
* ```
|
|
111
|
-
*/
|
|
112
|
-
export function alpha_compute_dft(elements_json: string, coords_flat_json: string, method: string): string;
|
|
113
|
-
|
|
114
104
|
/**
|
|
115
105
|
* Solve EEM charges for a molecule using the ReaxFF charge model.
|
|
116
106
|
*
|
|
@@ -609,7 +599,8 @@ export function build_bloch_hamiltonian_wasm(blocks_json: string, k_x: number, k
|
|
|
609
599
|
* Build a periodic molecular graph from fractional coordinates and a unit cell.
|
|
610
600
|
*
|
|
611
601
|
* `cell_json`: JSON array `[a, b, c, alpha, beta, gamma]` (Å, degrees).
|
|
612
|
-
* `bond_tolerance`: extra bonding tolerance in
|
|
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).
|
|
613
604
|
*/
|
|
614
605
|
export function build_periodic_molecule(elements_json: string, frac_coords_json: string, cell_json: string, bond_tolerance: number): string;
|
|
615
606
|
|
|
@@ -690,6 +681,20 @@ export function compute_aevs_tm(elements_json: string, coords_flat_json: string)
|
|
|
690
681
|
*/
|
|
691
682
|
export function compute_all_nmr(elements: string, coords_flat: string, config_json: string): string;
|
|
692
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
|
+
|
|
693
698
|
/**
|
|
694
699
|
* Compute ANI neural-network potential energy.
|
|
695
700
|
*/
|
|
@@ -720,8 +725,8 @@ export function compute_bond_orders(elements: string, coords_flat: string): stri
|
|
|
720
725
|
/**
|
|
721
726
|
* Build a capacitance scan chart (visualization payload).
|
|
722
727
|
*
|
|
723
|
-
* The interfacial charge is obtained
|
|
724
|
-
*
|
|
728
|
+
* The interfacial charge is obtained from the model's potential-charge
|
|
729
|
+
* relation.
|
|
725
730
|
*
|
|
726
731
|
* Returns JSON ChartPayload with potential vs capacitance series.
|
|
727
732
|
*/
|
|
@@ -749,6 +754,20 @@ export function compute_charges_configured(smiles: string, max_iter: number, ini
|
|
|
749
754
|
*/
|
|
750
755
|
export function compute_cisd(elements_json: string, coords_flat_json: string, n_states: number): string;
|
|
751
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
|
+
|
|
752
771
|
/**
|
|
753
772
|
* **ALPHA** — Run Kohn-Sham DFT calculation.
|
|
754
773
|
*
|
|
@@ -928,7 +947,7 @@ export function compute_gcmc_isotherm(framework_json: string, guest_json: string
|
|
|
928
947
|
*
|
|
929
948
|
* Returns JSON EDL profile result.
|
|
930
949
|
*/
|
|
931
|
-
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;
|
|
932
951
|
|
|
933
952
|
/**
|
|
934
953
|
* Compute GETAWAY 3D molecular descriptors.
|
|
@@ -958,14 +977,14 @@ export function compute_giao_nmr(elements_json: string, coords_flat_json: string
|
|
|
958
977
|
*
|
|
959
978
|
* Returns JSON EDL profile result.
|
|
960
979
|
*/
|
|
961
|
-
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;
|
|
962
981
|
|
|
963
982
|
/**
|
|
964
983
|
* Compute Helmholtz-only profile.
|
|
965
984
|
*
|
|
966
985
|
* Returns JSON EDL profile result.
|
|
967
986
|
*/
|
|
968
|
-
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;
|
|
969
988
|
|
|
970
989
|
/**
|
|
971
990
|
* Run a HF-3c calculation with default configuration.
|
|
@@ -1465,6 +1484,11 @@ export function detect_hapticity(elements_json: string, coords_flat_json: string
|
|
|
1465
1484
|
*/
|
|
1466
1485
|
export function discover_reaction_network(config_json: string): string;
|
|
1467
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
|
+
|
|
1468
1492
|
/**
|
|
1469
1493
|
* Run an EHT calculation on a molecule.
|
|
1470
1494
|
*
|
|
@@ -1650,7 +1674,12 @@ export function get_system_method_plan(elements: string): string;
|
|
|
1650
1674
|
/**
|
|
1651
1675
|
* List available NEB backend methods for a given set of elements.
|
|
1652
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
|
+
*
|
|
1653
1681
|
* Returns JSON array of `{"method": string, "available": bool, "note": string}`.
|
|
1682
|
+
* Empty element lists and atomic numbers outside `1..=118` are rejected.
|
|
1654
1683
|
*/
|
|
1655
1684
|
export function list_neb_backends(elements_json: string): string;
|
|
1656
1685
|
|
|
@@ -1976,6 +2005,9 @@ export function validate_electron_count(n_electrons: number, n_bands: number, n_
|
|
|
1976
2005
|
|
|
1977
2006
|
/**
|
|
1978
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`.
|
|
1979
2011
|
*/
|
|
1980
2012
|
export function validate_electron_count_wasm(n_electrons: number, n_bands: number, n_kpoints: number): string;
|
|
1981
2013
|
|