sci-form-wasm 2.0.0 → 2.2.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 +9 -8
- package/cjs/sci_form_wasm.d.ts +138 -0
- package/cjs/sci_form_wasm.js +1492 -670
- package/cjs/sci_form_wasm_bg.wasm +0 -0
- package/cjs/sci_form_wasm_bg.wasm.d.ts +151 -124
- package/package.json +1 -1
- package/sci_form_wasm.d.ts +321 -156
- package/sci_form_wasm.js +812 -17
- package/sci_form_wasm_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -11,15 +11,16 @@ 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
|
|
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
|
|
20
|
-
> before upgrading from
|
|
21
|
-
>
|
|
22
|
-
>
|
|
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):
|
|
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
|
|
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-
|
|
521
|
+
Before tagging, walk through the [release checklist](docs/release-checklist-2.0.md).
|
|
521
522
|
|
|
522
523
|
**Required repository secrets:**
|
|
523
524
|
|
package/cjs/sci_form_wasm.d.ts
CHANGED
|
@@ -70,6 +70,16 @@ 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
|
+
|
|
78
|
+
/**
|
|
79
|
+
* List every NMR-active isotope registered for an element.
|
|
80
|
+
*/
|
|
81
|
+
export function active_nmr_isotopes(element: number): string;
|
|
82
|
+
|
|
73
83
|
/**
|
|
74
84
|
* List all 230 space groups as `[number, symbol]` pairs.
|
|
75
85
|
*/
|
|
@@ -680,6 +690,11 @@ export function compare_methods(smiles: string, elements: string, coords_flat: s
|
|
|
680
690
|
*/
|
|
681
691
|
export function compute_aevs_tm(elements_json: string, coords_flat_json: string): string;
|
|
682
692
|
|
|
693
|
+
/**
|
|
694
|
+
* Run the all-nuclide NMR driver from a JSON GiaoNmrConfig.
|
|
695
|
+
*/
|
|
696
|
+
export function compute_all_nmr(elements: string, coords_flat: string, config_json: string): string;
|
|
697
|
+
|
|
683
698
|
/**
|
|
684
699
|
* Compute ANI neural-network potential energy.
|
|
685
700
|
*/
|
|
@@ -846,6 +861,11 @@ export function compute_empirical_pka(smiles: string): string;
|
|
|
846
861
|
*/
|
|
847
862
|
export function compute_ensemble_j_couplings(smiles: string, conformer_coords_json: string, energies_kcal_json: string, temperature_k: number): string;
|
|
848
863
|
|
|
864
|
+
/**
|
|
865
|
+
* Isotropic EPR hyperfine coupling. `nucleus = 0` evaluates all known nuclei.
|
|
866
|
+
*/
|
|
867
|
+
export function compute_epr_hyperfine(elements: string, coords_flat: string, nucleus: number, charge: number, multiplicity: number): string;
|
|
868
|
+
|
|
849
869
|
/**
|
|
850
870
|
* Compute the full electrostatic potential grid as JSON.
|
|
851
871
|
*/
|
|
@@ -903,6 +923,11 @@ export function compute_fukui_descriptors(elements: string, coords_flat: string)
|
|
|
903
923
|
*/
|
|
904
924
|
export function compute_gb_solvation(elements: string, coords_flat: string, charges: string, solvent_dielectric: number, solute_dielectric: number, probe_radius: number): string;
|
|
905
925
|
|
|
926
|
+
/**
|
|
927
|
+
* GCMC adsorption isotherm from JSON framework, guest and config payloads.
|
|
928
|
+
*/
|
|
929
|
+
export function compute_gcmc_isotherm(framework_json: string, guest_json: string, config_json: string): string;
|
|
930
|
+
|
|
906
931
|
/**
|
|
907
932
|
* Compute Gouy-Chapman-Stern profile (compact + diffuse).
|
|
908
933
|
*
|
|
@@ -1097,6 +1122,11 @@ export function compute_mmff94_energy_breakdown(smiles: string, coords: string):
|
|
|
1097
1122
|
*/
|
|
1098
1123
|
export function compute_molecular_descriptors(smiles: string): string;
|
|
1099
1124
|
|
|
1125
|
+
/**
|
|
1126
|
+
* Conventional closed-shell MP2 correlation energy.
|
|
1127
|
+
*/
|
|
1128
|
+
export function compute_mp2_energy(elements: string, coords_flat: string): string;
|
|
1129
|
+
|
|
1100
1130
|
/**
|
|
1101
1131
|
* Build a simplified NEB path with a configurable energy backend.
|
|
1102
1132
|
*
|
|
@@ -1137,6 +1167,14 @@ export function compute_nonpolar_solvation(elements: string, coords_flat: string
|
|
|
1137
1167
|
*/
|
|
1138
1168
|
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
1169
|
|
|
1170
|
+
/**
|
|
1171
|
+
* Restricted closed-shell PBE0 single point. Returns JSON `DftResult`.
|
|
1172
|
+
*
|
|
1173
|
+
* Same as `alpha_compute_dft(elements, coords, "pbe0")` with an explicit
|
|
1174
|
+
* iteration cap; open-shell systems return an error.
|
|
1175
|
+
*/
|
|
1176
|
+
export function compute_pbe0_energy(elements: string, coords_flat: string, max_iterations: number): string;
|
|
1177
|
+
|
|
1140
1178
|
/**
|
|
1141
1179
|
* Alias of [`compute_periodic_dos`], the name of the Rust root function.
|
|
1142
1180
|
*
|
|
@@ -1161,6 +1199,16 @@ export function compute_periodic_dos_wasm(blocks_json: string, grid_json: string
|
|
|
1161
1199
|
*/
|
|
1162
1200
|
export function compute_phase_portrait_chart(network_json: string, n_steps: number): string;
|
|
1163
1201
|
|
|
1202
|
+
/**
|
|
1203
|
+
* Absolute pKa from an explicit acid/conjugate-base pair.
|
|
1204
|
+
*/
|
|
1205
|
+
export function compute_pka(acid_smiles: string, base_smiles: string, method_name: string): string;
|
|
1206
|
+
|
|
1207
|
+
/**
|
|
1208
|
+
* Relative pKa against a reference acid with a known experimental value.
|
|
1209
|
+
*/
|
|
1210
|
+
export function compute_pka_relative(acid_smiles: string, base_smiles: string, reference_acid: string, reference_base: string, reference_pka: number, method_name: string): string;
|
|
1211
|
+
|
|
1164
1212
|
/**
|
|
1165
1213
|
* Run a PM3 semi-empirical calculation.
|
|
1166
1214
|
*/
|
|
@@ -1176,6 +1224,16 @@ export function compute_pm3_gradient(elements_json: string, coords_flat_json: st
|
|
|
1176
1224
|
*/
|
|
1177
1225
|
export function compute_population(elements: string, coords_flat: string): string;
|
|
1178
1226
|
|
|
1227
|
+
/**
|
|
1228
|
+
* Mechanical-embedding QM/MM energy from serialized system/config payloads.
|
|
1229
|
+
*/
|
|
1230
|
+
export function compute_qmmm_energy(system_json: string, config_json: string): string;
|
|
1231
|
+
|
|
1232
|
+
/**
|
|
1233
|
+
* Raman activities from the response polarizability and UFF modes.
|
|
1234
|
+
*/
|
|
1235
|
+
export function compute_raman_spectrum(smiles: string, elements: string, coords_flat: string, step_angstrom: number): string;
|
|
1236
|
+
|
|
1179
1237
|
/**
|
|
1180
1238
|
* Compute radial distribution function (RDF) descriptors.
|
|
1181
1239
|
*
|
|
@@ -1211,6 +1269,16 @@ export function compute_reaction_dynamics(reactant_smiles_json: string, product_
|
|
|
1211
1269
|
*/
|
|
1212
1270
|
export function compute_reactivity_ranking(elements: string, coords_flat: string): string;
|
|
1213
1271
|
|
|
1272
|
+
/**
|
|
1273
|
+
* Absolute redox potential from an explicit oxidised/reduced pair.
|
|
1274
|
+
*/
|
|
1275
|
+
export function compute_redox_potential(oxidized_smiles: string, reduced_smiles: string, n_electrons: number, method_name: string): string;
|
|
1276
|
+
|
|
1277
|
+
/**
|
|
1278
|
+
* Relative redox potential against a reference couple with a known value.
|
|
1279
|
+
*/
|
|
1280
|
+
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;
|
|
1281
|
+
|
|
1214
1282
|
/**
|
|
1215
1283
|
* Compute RMSD between two coordinate sets after Kabsch alignment.
|
|
1216
1284
|
*
|
|
@@ -1228,6 +1296,11 @@ export function compute_rmsd(coords: string, reference: string): string;
|
|
|
1228
1296
|
*/
|
|
1229
1297
|
export function compute_rmsd_matrix(conformers_json: string): string;
|
|
1230
1298
|
|
|
1299
|
+
/**
|
|
1300
|
+
* ROA screening intensities from Raman activities and the VCD magnetic term.
|
|
1301
|
+
*/
|
|
1302
|
+
export function compute_roa_spectrum(smiles: string, elements: string, coords_flat: string, min_frequency_cm1: number): string;
|
|
1303
|
+
|
|
1231
1304
|
/**
|
|
1232
1305
|
* Run a Restricted Open-shell Hartree-Fock (ROHF) calculation.
|
|
1233
1306
|
*
|
|
@@ -1337,6 +1410,11 @@ export function compute_uhf(elements_json: string, coords_flat_json: string, cha
|
|
|
1337
1410
|
*/
|
|
1338
1411
|
export function compute_uv_vis_spectrum(elements: string, coords_flat: string, sigma: number, e_min: number, e_max: number, n_points: number): string;
|
|
1339
1412
|
|
|
1413
|
+
/**
|
|
1414
|
+
* VCD rotational strengths with the nuclear charge-current screening model.
|
|
1415
|
+
*/
|
|
1416
|
+
export function compute_vcd_spectrum(smiles: string, elements: string, coords_flat: string, min_frequency_cm1: number): string;
|
|
1417
|
+
|
|
1340
1418
|
/**
|
|
1341
1419
|
* Perform vibrational analysis via numerical Hessian.
|
|
1342
1420
|
*/
|
|
@@ -1354,6 +1432,11 @@ export function compute_vibrational_analysis_uff(smiles: string, elements_json:
|
|
|
1354
1432
|
*/
|
|
1355
1433
|
export function compute_whim(elements_json: string, coords_flat_json: string, weighting: string): string;
|
|
1356
1434
|
|
|
1435
|
+
/**
|
|
1436
|
+
* Koopmans core-level XPS binding energies.
|
|
1437
|
+
*/
|
|
1438
|
+
export function compute_xps_binding_energies(elements: string, coords_flat: string, elements_filter_json: string, charge: number, multiplicity: number): string;
|
|
1439
|
+
|
|
1357
1440
|
/**
|
|
1358
1441
|
* Run an xTB tight-binding calculation.
|
|
1359
1442
|
*/
|
|
@@ -1364,6 +1447,11 @@ export function compute_xtb(elements_json: string, coords_flat_json: string): st
|
|
|
1364
1447
|
*/
|
|
1365
1448
|
export function compute_xtb_gradient(elements_json: string, coords_flat_json: string): string;
|
|
1366
1449
|
|
|
1450
|
+
/**
|
|
1451
|
+
* Fit a split-conformal calibration radius.
|
|
1452
|
+
*/
|
|
1453
|
+
export function conformal_calibrate(predictions_json: string, targets_json: string, coverage: number): string;
|
|
1454
|
+
|
|
1367
1455
|
/**
|
|
1368
1456
|
* Create a unit cell and return parameters + volume as JSON.
|
|
1369
1457
|
*/
|
|
@@ -1377,6 +1465,11 @@ export function create_unit_cell(a: number, b: number, c: number, alpha: number,
|
|
|
1377
1465
|
*/
|
|
1378
1466
|
export function detect_hapticity(elements_json: string, coords_flat_json: string, bonds_json: string): string;
|
|
1379
1467
|
|
|
1468
|
+
/**
|
|
1469
|
+
* Rule-based reaction-network discovery from a JSON TemplateNetworkConfig.
|
|
1470
|
+
*/
|
|
1471
|
+
export function discover_reaction_network(config_json: string): string;
|
|
1472
|
+
|
|
1380
1473
|
/**
|
|
1381
1474
|
* Run an EHT calculation on a molecule.
|
|
1382
1475
|
*
|
|
@@ -1502,6 +1595,11 @@ export function embed_diverse(smiles: string, n_conformers: number, rmsd_cutoff:
|
|
|
1502
1595
|
*/
|
|
1503
1596
|
export function embed_seed64(smiles: string, seed: bigint): string;
|
|
1504
1597
|
|
|
1598
|
+
/**
|
|
1599
|
+
* Estimate an alchemical free-energy difference from JSON samples.
|
|
1600
|
+
*/
|
|
1601
|
+
export function estimate_free_energy(samples_json: string, estimator: string, config_json: string): string;
|
|
1602
|
+
|
|
1505
1603
|
/**
|
|
1506
1604
|
* Estimate optimal number of Web Workers for a batch size.
|
|
1507
1605
|
*/
|
|
@@ -1695,6 +1793,41 @@ export function predict_nmr_shifts(smiles: string): string;
|
|
|
1695
1793
|
*/
|
|
1696
1794
|
export function predict_nmr_shifts_for_nucleus(smiles: string, nucleus: string): string;
|
|
1697
1795
|
|
|
1796
|
+
/**
|
|
1797
|
+
* Refine a barrier with GSM from flat coordinate arrays.
|
|
1798
|
+
*/
|
|
1799
|
+
export function refine_barrier_with_gsm(smiles: string, reactant_coords: string, product_coords: string, method: string, config_json: string): string;
|
|
1800
|
+
|
|
1801
|
+
/**
|
|
1802
|
+
* Reweight a biased 1D CV trace from JSON.
|
|
1803
|
+
*/
|
|
1804
|
+
export function reweight_free_energy(trace_json: string, config_json: string): string;
|
|
1805
|
+
|
|
1806
|
+
/**
|
|
1807
|
+
* Reweight a 2D OPES trace from JSON.
|
|
1808
|
+
*/
|
|
1809
|
+
export function reweight_free_energy_2d(trace_json: string, config_json: string): string;
|
|
1810
|
+
|
|
1811
|
+
/**
|
|
1812
|
+
* Block-averaged reweighting of a correlated 1D CV trace from JSON.
|
|
1813
|
+
*/
|
|
1814
|
+
export function reweight_free_energy_correlated(trace_json: string, config_json: string): string;
|
|
1815
|
+
|
|
1816
|
+
/**
|
|
1817
|
+
* Gillespie kinetic Monte Carlo from a JSON KmcConfig.
|
|
1818
|
+
*/
|
|
1819
|
+
export function run_kinetic_monte_carlo(config_json: string): string;
|
|
1820
|
+
|
|
1821
|
+
/**
|
|
1822
|
+
* Well-tempered metadynamics on a UFF molecule from a JSON config.
|
|
1823
|
+
*/
|
|
1824
|
+
export function run_uff_metadynamics(smiles: string, coords_flat: string, config_json: string): string;
|
|
1825
|
+
|
|
1826
|
+
/**
|
|
1827
|
+
* OPES-style enhanced sampling on a UFF molecule from a JSON config.
|
|
1828
|
+
*/
|
|
1829
|
+
export function run_uff_opes(smiles: string, coords_flat: string, config_json: string): string;
|
|
1830
|
+
|
|
1698
1831
|
/**
|
|
1699
1832
|
* Search conformers by sampling, torsion refinement, and UFF ranking.
|
|
1700
1833
|
*
|
|
@@ -1712,6 +1845,11 @@ export function search_conformers_with_uff(smiles: string, n_samples: number, se
|
|
|
1712
1845
|
*/
|
|
1713
1846
|
export function search_conformers_with_uff_seed64(smiles: string, n_samples: number, seed: bigint, rmsd_threshold: number): string;
|
|
1714
1847
|
|
|
1848
|
+
/**
|
|
1849
|
+
* Solve 3D-RISM from grid arrays and a JSON config.
|
|
1850
|
+
*/
|
|
1851
|
+
export function solve_3d_rism(beta_u: string, susceptibility: string, config_json: string): string;
|
|
1852
|
+
|
|
1715
1853
|
/**
|
|
1716
1854
|
* Solve the extended Hückel problem for a geometry.
|
|
1717
1855
|
*
|