sci-form-wasm 2.0.0 → 2.1.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,15 +11,16 @@ 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 1.0**](docs/guide/migration-1.0.md) · [Release checklist](docs/release-checklist-1.0.md) · [TESTING.md](TESTING.md) · [Roadmap: dynamics & reactivity](docs/dynamics_reactivity_roadmap.md)
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
15
 
16
16
  > **Status: 2.0.0 — complete MMFF94, typed errors and promoted core modules.**
17
17
  > The library no longer panics on malformed input, the force-field results are
18
18
  > bit-for-bit reproducible regardless of the machine's core count, and every
19
- > public item is documented. Read the [migration guide](docs/guide/migration-1.0.md)
20
- > before upgrading from 0.15.x: the functions that can fail now return a
21
- > `Result`, and the canonical name of every capability is the Rust root name
22
- > in all four surfaces.
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.
23
24
 
24
25
  ## Features
25
26
 
@@ -319,9 +320,9 @@ The repository now includes an isolated experimental quantum-chemistry stack und
319
320
  - Stable production APIs remain unchanged; the experimental work is isolated behind `experimental_*` feature flags
320
321
  - Real acceleration today is CPU parallelism via rayon in the ERI build path
321
322
  - GPU execution is available through the `experimental-gpu` feature (wgpu/Vulkan with a CPU fallback); the numerical paths stay gated against the CPU reference
322
- - The cross-library validation campaign gates the quantum-chemistry stack against external references (RDKit, PySCF, tblite, xtb, dftd4/s-dftd3, multicharge, pormake, YAeHMOP, MOPAC, LAMMPS, scipy, ASE, clifford, CVXPY, jsonschema): 38 active tests in `tests/cross_validation.rs`, all green (the release-profile Rust suite is green: 1038 library tests with the CI feature set as of 2026-11-08). Completed 2026-10-13: PM3 exact on 24/24 MOPAC molecules, unrestricted GFN1/GFN2 (UKS) vs tblite `uhf`, torsional/inversion barriers vs literature, CPM vs LAMMPS `electrode/conp`, ReaxFF bond orders vs LAMMPS `reaxff`. Completed 2026-10-14 (second campaign, 44 gates in `tests/{alpha,beta}_*_validation.rs`): KS-DFT vs PySCF, BP symmetry functions, Boys/ERI vs libcint, CGA motors vs clifford, GSM string vs ASE CI-NEB, SDR vs CVXPY, live-dynamics UFF forces vs RDKit, IMD steering, EDL analytics, HTST/microkinetics, periodic meshes/Bloch, chart schemas, KPM/Mulliken, MBH harmonics, randomized Nyström, PSD Riemannian optimizer. The 1.1 follow-up adds dedicated gates for complete MMFF94 vs RDKit (F100, <3e-11 kcal/mol), ReaxFF analytical gradients, ERI Cholesky, typed root-API errors and the RandNLA N>500 low-rank path.
323
+ - The cross-library validation campaign gates the quantum-chemistry stack against external references (RDKit, PySCF, tblite, xtb, dftd4/s-dftd3, multicharge, pormake, YAeHMOP, MOPAC, LAMMPS, scipy, ASE, clifford, CVXPY, jsonschema): 129 recorded validation rows (122 pass, 7 method/provenance gaps, 0 fail; the release-profile Rust suite is green: 1038 library tests with the CI feature set as of 2026-11-08). Completed 2026-10-13: PM3 exact on 24/24 MOPAC molecules, unrestricted GFN1/GFN2 (UKS) vs tblite `uhf`, torsional/inversion barriers vs literature, CPM vs LAMMPS `electrode/conp`, ReaxFF bond orders vs LAMMPS `reaxff`. Completed 2026-10-14 (second campaign, 44 gates in `tests/{alpha,beta}_*_validation.rs`): KS-DFT vs PySCF, BP symmetry functions, Boys/ERI vs libcint, CGA motors vs clifford, GSM string vs ASE CI-NEB, SDR vs CVXPY, live-dynamics UFF forces vs RDKit, IMD steering, EDL analytics, HTST/microkinetics, periodic meshes/Bloch, chart schemas, KPM/Mulliken, MBH harmonics, randomized Nyström, PSD Riemannian optimizer. The 2.0 follow-up adds dedicated gates for complete MMFF94 vs RDKit (F100, 2.8e-11 kcal/mol), ReaxFF analytical gradients, ERI Cholesky, typed root-API errors and the RandNLA N>500 low-rank path. The full per-method report is at [Scientific validation](https://jigonzalez930209.github.io/sci-form/validation/scientific-validation).
323
324
  - Known documented limitations: PM3 convergence on long alkanes, CISD excited states are not size-consistent, transition-metal EHT parameters are validated against the literature table but not against experiment, HLA J-couplings cover C/S/N/Cl substituents in the general form, CPM electrode response is within 2.5x of LAMMPS (point-charge hardness vs Gaussian self-energy), ReaxFF total energies exclude H2O shapes (EEM polarity inverts at short range) and use LJ instead of Morse+f13 nonbonded
324
- - Promoted to the library core (2026-10-13/14): `cpm` (F95), `forcefield::reaxff` (F78), `scf::{obara_saika,screening}` (F80), `cga` (F81), `sdr` (F83), `imd` (F85), `edl` (F86), `kmesh` (F88 base), `render_bridge` (F90 base), `riemannian` (F94); `alpha::`/`beta::` paths and feature flags remain as compatible aliases
325
+ - Promoted to the library core (2026-10-13 → 2026-11-08): `cpm` (F95), `forcefield::reaxff` (F78), `scf::{obara_saika,screening}` (F80), `cga` (F81), `sdr` (F83), `imd` (F85), `edl` (F86), `kmesh` (F88 base), `render_bridge` (F90 base), `riemannian` (F94), `kpm` (F91), `gsm` (F82), `kinetics` (F87), `periodic_linear` (F88 adapters), `dynamics_live` (F84) and `rand_nla` (F93 + N>500). The render-bridge domain builders moved to `src/render_bridge/builders.rs`. The `alpha::`/`beta::` paths and feature flags remain as compatible aliases.
325
326
 
326
327
  ### Validation Snapshot
327
328
 
@@ -517,7 +518,7 @@ Then creates a `vX.Y.Z` git tag, which triggers the [release workflow](.github/w
517
518
 
518
519
  The workflow refuses to publish a tag that does not match the manifest
519
520
  versions, so a mismatch fails fast instead of shipping mislabelled artefacts.
520
- Before tagging, walk through the [release checklist](docs/release-checklist-1.0.md).
521
+ Before tagging, walk through the [release checklist](docs/release-checklist-2.0.md).
521
522
 
522
523
  **Required repository secrets:**
523
524
 
@@ -70,6 +70,11 @@ export class LiveSimulation {
70
70
  temperature(): number;
71
71
  }
72
72
 
73
+ /**
74
+ * List every NMR-active isotope registered for an element.
75
+ */
76
+ export function active_nmr_isotopes(element: number): string;
77
+
73
78
  /**
74
79
  * List all 230 space groups as `[number, symbol]` pairs.
75
80
  */
@@ -680,6 +685,11 @@ export function compare_methods(smiles: string, elements: string, coords_flat: s
680
685
  */
681
686
  export function compute_aevs_tm(elements_json: string, coords_flat_json: string): string;
682
687
 
688
+ /**
689
+ * Run the all-nuclide NMR driver from a JSON GiaoNmrConfig.
690
+ */
691
+ export function compute_all_nmr(elements: string, coords_flat: string, config_json: string): string;
692
+
683
693
  /**
684
694
  * Compute ANI neural-network potential energy.
685
695
  */
@@ -846,6 +856,11 @@ export function compute_empirical_pka(smiles: string): string;
846
856
  */
847
857
  export function compute_ensemble_j_couplings(smiles: string, conformer_coords_json: string, energies_kcal_json: string, temperature_k: number): string;
848
858
 
859
+ /**
860
+ * Isotropic EPR hyperfine coupling. `nucleus = 0` evaluates all known nuclei.
861
+ */
862
+ export function compute_epr_hyperfine(elements: string, coords_flat: string, nucleus: number, charge: number, multiplicity: number): string;
863
+
849
864
  /**
850
865
  * Compute the full electrostatic potential grid as JSON.
851
866
  */
@@ -903,6 +918,11 @@ export function compute_fukui_descriptors(elements: string, coords_flat: string)
903
918
  */
904
919
  export function compute_gb_solvation(elements: string, coords_flat: string, charges: string, solvent_dielectric: number, solute_dielectric: number, probe_radius: number): string;
905
920
 
921
+ /**
922
+ * GCMC adsorption isotherm from JSON framework, guest and config payloads.
923
+ */
924
+ export function compute_gcmc_isotherm(framework_json: string, guest_json: string, config_json: string): string;
925
+
906
926
  /**
907
927
  * Compute Gouy-Chapman-Stern profile (compact + diffuse).
908
928
  *
@@ -1097,6 +1117,11 @@ export function compute_mmff94_energy_breakdown(smiles: string, coords: string):
1097
1117
  */
1098
1118
  export function compute_molecular_descriptors(smiles: string): string;
1099
1119
 
1120
+ /**
1121
+ * Conventional closed-shell MP2 correlation energy.
1122
+ */
1123
+ export function compute_mp2_energy(elements: string, coords_flat: string): string;
1124
+
1100
1125
  /**
1101
1126
  * Build a simplified NEB path with a configurable energy backend.
1102
1127
  *
@@ -1137,6 +1162,14 @@ export function compute_nonpolar_solvation(elements: string, coords_flat: string
1137
1162
  */
1138
1163
  export function compute_orbital_mesh(elements_json: string, coords_flat_json: string, method: string, mo_index: number, spacing: number, padding: number, isovalue: number): string;
1139
1164
 
1165
+ /**
1166
+ * Restricted closed-shell PBE0 single point. Returns JSON `DftResult`.
1167
+ *
1168
+ * Same as `alpha_compute_dft(elements, coords, "pbe0")` with an explicit
1169
+ * iteration cap; open-shell systems return an error.
1170
+ */
1171
+ export function compute_pbe0_energy(elements: string, coords_flat: string, max_iterations: number): string;
1172
+
1140
1173
  /**
1141
1174
  * Alias of [`compute_periodic_dos`], the name of the Rust root function.
1142
1175
  *
@@ -1161,6 +1194,16 @@ export function compute_periodic_dos_wasm(blocks_json: string, grid_json: string
1161
1194
  */
1162
1195
  export function compute_phase_portrait_chart(network_json: string, n_steps: number): string;
1163
1196
 
1197
+ /**
1198
+ * Absolute pKa from an explicit acid/conjugate-base pair.
1199
+ */
1200
+ export function compute_pka(acid_smiles: string, base_smiles: string, method_name: string): string;
1201
+
1202
+ /**
1203
+ * Relative pKa against a reference acid with a known experimental value.
1204
+ */
1205
+ export function compute_pka_relative(acid_smiles: string, base_smiles: string, reference_acid: string, reference_base: string, reference_pka: number, method_name: string): string;
1206
+
1164
1207
  /**
1165
1208
  * Run a PM3 semi-empirical calculation.
1166
1209
  */
@@ -1176,6 +1219,16 @@ export function compute_pm3_gradient(elements_json: string, coords_flat_json: st
1176
1219
  */
1177
1220
  export function compute_population(elements: string, coords_flat: string): string;
1178
1221
 
1222
+ /**
1223
+ * Mechanical-embedding QM/MM energy from serialized system/config payloads.
1224
+ */
1225
+ export function compute_qmmm_energy(system_json: string, config_json: string): string;
1226
+
1227
+ /**
1228
+ * Raman activities from the response polarizability and UFF modes.
1229
+ */
1230
+ export function compute_raman_spectrum(smiles: string, elements: string, coords_flat: string, step_angstrom: number): string;
1231
+
1179
1232
  /**
1180
1233
  * Compute radial distribution function (RDF) descriptors.
1181
1234
  *
@@ -1211,6 +1264,16 @@ export function compute_reaction_dynamics(reactant_smiles_json: string, product_
1211
1264
  */
1212
1265
  export function compute_reactivity_ranking(elements: string, coords_flat: string): string;
1213
1266
 
1267
+ /**
1268
+ * Absolute redox potential from an explicit oxidised/reduced pair.
1269
+ */
1270
+ export function compute_redox_potential(oxidized_smiles: string, reduced_smiles: string, n_electrons: number, method_name: string): string;
1271
+
1272
+ /**
1273
+ * Relative redox potential against a reference couple with a known value.
1274
+ */
1275
+ export function compute_redox_potential_relative(oxidized_smiles: string, reduced_smiles: string, n_electrons: number, reference_oxidized: string, reference_reduced: string, reference_potential_v: number, method_name: string): string;
1276
+
1214
1277
  /**
1215
1278
  * Compute RMSD between two coordinate sets after Kabsch alignment.
1216
1279
  *
@@ -1228,6 +1291,11 @@ export function compute_rmsd(coords: string, reference: string): string;
1228
1291
  */
1229
1292
  export function compute_rmsd_matrix(conformers_json: string): string;
1230
1293
 
1294
+ /**
1295
+ * ROA screening intensities from Raman activities and the VCD magnetic term.
1296
+ */
1297
+ export function compute_roa_spectrum(smiles: string, elements: string, coords_flat: string, min_frequency_cm1: number): string;
1298
+
1231
1299
  /**
1232
1300
  * Run a Restricted Open-shell Hartree-Fock (ROHF) calculation.
1233
1301
  *
@@ -1337,6 +1405,11 @@ export function compute_uhf(elements_json: string, coords_flat_json: string, cha
1337
1405
  */
1338
1406
  export function compute_uv_vis_spectrum(elements: string, coords_flat: string, sigma: number, e_min: number, e_max: number, n_points: number): string;
1339
1407
 
1408
+ /**
1409
+ * VCD rotational strengths with the nuclear charge-current screening model.
1410
+ */
1411
+ export function compute_vcd_spectrum(smiles: string, elements: string, coords_flat: string, min_frequency_cm1: number): string;
1412
+
1340
1413
  /**
1341
1414
  * Perform vibrational analysis via numerical Hessian.
1342
1415
  */
@@ -1354,6 +1427,11 @@ export function compute_vibrational_analysis_uff(smiles: string, elements_json:
1354
1427
  */
1355
1428
  export function compute_whim(elements_json: string, coords_flat_json: string, weighting: string): string;
1356
1429
 
1430
+ /**
1431
+ * Koopmans core-level XPS binding energies.
1432
+ */
1433
+ export function compute_xps_binding_energies(elements: string, coords_flat: string, elements_filter_json: string, charge: number, multiplicity: number): string;
1434
+
1357
1435
  /**
1358
1436
  * Run an xTB tight-binding calculation.
1359
1437
  */
@@ -1364,6 +1442,11 @@ export function compute_xtb(elements_json: string, coords_flat_json: string): st
1364
1442
  */
1365
1443
  export function compute_xtb_gradient(elements_json: string, coords_flat_json: string): string;
1366
1444
 
1445
+ /**
1446
+ * Fit a split-conformal calibration radius.
1447
+ */
1448
+ export function conformal_calibrate(predictions_json: string, targets_json: string, coverage: number): string;
1449
+
1367
1450
  /**
1368
1451
  * Create a unit cell and return parameters + volume as JSON.
1369
1452
  */
@@ -1377,6 +1460,11 @@ export function create_unit_cell(a: number, b: number, c: number, alpha: number,
1377
1460
  */
1378
1461
  export function detect_hapticity(elements_json: string, coords_flat_json: string, bonds_json: string): string;
1379
1462
 
1463
+ /**
1464
+ * Rule-based reaction-network discovery from a JSON TemplateNetworkConfig.
1465
+ */
1466
+ export function discover_reaction_network(config_json: string): string;
1467
+
1380
1468
  /**
1381
1469
  * Run an EHT calculation on a molecule.
1382
1470
  *
@@ -1502,6 +1590,11 @@ export function embed_diverse(smiles: string, n_conformers: number, rmsd_cutoff:
1502
1590
  */
1503
1591
  export function embed_seed64(smiles: string, seed: bigint): string;
1504
1592
 
1593
+ /**
1594
+ * Estimate an alchemical free-energy difference from JSON samples.
1595
+ */
1596
+ export function estimate_free_energy(samples_json: string, estimator: string, config_json: string): string;
1597
+
1505
1598
  /**
1506
1599
  * Estimate optimal number of Web Workers for a batch size.
1507
1600
  */
@@ -1695,6 +1788,41 @@ export function predict_nmr_shifts(smiles: string): string;
1695
1788
  */
1696
1789
  export function predict_nmr_shifts_for_nucleus(smiles: string, nucleus: string): string;
1697
1790
 
1791
+ /**
1792
+ * Refine a barrier with GSM from flat coordinate arrays.
1793
+ */
1794
+ export function refine_barrier_with_gsm(smiles: string, reactant_coords: string, product_coords: string, method: string, config_json: string): string;
1795
+
1796
+ /**
1797
+ * Reweight a biased 1D CV trace from JSON.
1798
+ */
1799
+ export function reweight_free_energy(trace_json: string, config_json: string): string;
1800
+
1801
+ /**
1802
+ * Reweight a 2D OPES trace from JSON.
1803
+ */
1804
+ export function reweight_free_energy_2d(trace_json: string, config_json: string): string;
1805
+
1806
+ /**
1807
+ * Block-averaged reweighting of a correlated 1D CV trace from JSON.
1808
+ */
1809
+ export function reweight_free_energy_correlated(trace_json: string, config_json: string): string;
1810
+
1811
+ /**
1812
+ * Gillespie kinetic Monte Carlo from a JSON KmcConfig.
1813
+ */
1814
+ export function run_kinetic_monte_carlo(config_json: string): string;
1815
+
1816
+ /**
1817
+ * Well-tempered metadynamics on a UFF molecule from a JSON config.
1818
+ */
1819
+ export function run_uff_metadynamics(smiles: string, coords_flat: string, config_json: string): string;
1820
+
1821
+ /**
1822
+ * OPES-style enhanced sampling on a UFF molecule from a JSON config.
1823
+ */
1824
+ export function run_uff_opes(smiles: string, coords_flat: string, config_json: string): string;
1825
+
1698
1826
  /**
1699
1827
  * Search conformers by sampling, torsion refinement, and UFF ranking.
1700
1828
  *
@@ -1712,6 +1840,11 @@ export function search_conformers_with_uff(smiles: string, n_samples: number, se
1712
1840
  */
1713
1841
  export function search_conformers_with_uff_seed64(smiles: string, n_samples: number, seed: bigint, rmsd_threshold: number): string;
1714
1842
 
1843
+ /**
1844
+ * Solve 3D-RISM from grid arrays and a JSON config.
1845
+ */
1846
+ export function solve_3d_rism(beta_u: string, susceptibility: string, config_json: string): string;
1847
+
1715
1848
  /**
1716
1849
  * Solve the extended Hückel problem for a geometry.
1717
1850
  *