sci-form-wasm 0.15.2 → 1.0.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 +69 -15
- package/alpha/index.d.ts +349 -142
- package/alpha/index.js +26 -0
- package/beta/index.d.ts +69 -85
- package/cjs/alpha/index.d.ts +411 -0
- package/cjs/alpha/index.js +2 -0
- package/cjs/beta/index.d.ts +103 -0
- package/cjs/beta/index.js +2 -0
- package/cjs/package.json +3 -0
- package/cjs/sci_form_wasm.d.ts +1872 -0
- package/cjs/sci_form_wasm.js +7576 -0
- package/cjs/sci_form_wasm_bg.wasm +0 -0
- package/cjs/sci_form_wasm_bg.wasm.d.ts +256 -0
- package/package.json +27 -2
- package/sci_form_wasm.d.ts +1242 -150
- package/sci_form_wasm.js +5030 -1492
- package/sci_form_wasm_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -11,7 +11,15 @@ 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) · [
|
|
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)
|
|
15
|
+
|
|
16
|
+
> **Status: 1.0.0 — the first stable release.**
|
|
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 [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.
|
|
15
23
|
|
|
16
24
|
## Features
|
|
17
25
|
|
|
@@ -40,9 +48,10 @@ See also: [CHANGELOG.md](CHANGELOG.md) · [TESTING.md](TESTING.md) · [ROADMAP_R
|
|
|
40
48
|
- **AO→MO Integral Transform** — 4-index integral transform with 4-fold symmetry for post-HF methods
|
|
41
49
|
|
|
42
50
|
### Spectroscopy
|
|
43
|
-
- **UV-Vis** — sTDA
|
|
44
|
-
- **
|
|
45
|
-
- **
|
|
51
|
+
- **UV-Vis** — sTDA vertical excitations on EHT orbitals, Gaussian/Lorentzian broadening
|
|
52
|
+
- **Fluorescence** — Kasha emission from those singlets, spontaneous-emission lineshape, Einstein A lifetime
|
|
53
|
+
- **IR** — Numerical Hessian vibrational analysis, dipole intensities, thermochemistry (RRHO), peak assignment; atomic masses through Z = 103
|
|
54
|
+
- **NMR** — Chemical shifts via HOSE codes for NMR-active nuclei including metals (Ce omitted, I = 0), J-coupling (Karplus 2J–5J including long-range), ensemble averaging
|
|
46
55
|
|
|
47
56
|
### Machine Learning
|
|
48
57
|
- **ANI-2x / ANI-TM** — Neural network potentials with analytical gradients (24 elements including transition metals)
|
|
@@ -99,9 +108,9 @@ See also: [CHANGELOG.md](CHANGELOG.md) · [TESTING.md](TESTING.md) · [ROADMAP_R
|
|
|
99
108
|
|
|
100
109
|
```toml
|
|
101
110
|
[dependencies]
|
|
102
|
-
sci-form = "0.
|
|
111
|
+
sci-form = "0.15"
|
|
103
112
|
# For parallel batch + ESP:
|
|
104
|
-
sci-form = { version = "0.
|
|
113
|
+
sci-form = { version = "0.15", features = ["parallel"] }
|
|
105
114
|
```
|
|
106
115
|
|
|
107
116
|
```rust
|
|
@@ -165,6 +174,24 @@ dos = sci_form.compute_dos(elements, positions, sigma=0.2, e_min=-20.0, e_max=5.
|
|
|
165
174
|
print(f"Gap: {dos['homo_lumo_gap']:.3f} eV")
|
|
166
175
|
```
|
|
167
176
|
|
|
177
|
+
#### Zero-copy arrays
|
|
178
|
+
|
|
179
|
+
`embed_coords_into` and `compute_esp_grid_into` write their result straight
|
|
180
|
+
into a caller-owned `float64` buffer, so a full volumetric grid or a long MD
|
|
181
|
+
trajectory never crosses the Python boundary twice:
|
|
182
|
+
|
|
183
|
+
```python
|
|
184
|
+
import array
|
|
185
|
+
import sci_form
|
|
186
|
+
|
|
187
|
+
n_atoms = sci_form.parse("CCO").num_atoms
|
|
188
|
+
buf = array.array("d", [0.0] * (3 * n_atoms))
|
|
189
|
+
sci_form.embed_coords_into("CCO", buf, seed=42) # buf now holds the coords
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Both functions raise `ValueError` when the buffer has the wrong length, and
|
|
193
|
+
they refuse a read-only or non-`float64` buffer.
|
|
194
|
+
|
|
168
195
|
→ [Full Python API reference](https://jigonzalez930209.github.io/sci-form/api/python) · [Guide](https://jigonzalez930209.github.io/sci-form/guide/python)
|
|
169
196
|
|
|
170
197
|
---
|
|
@@ -213,10 +240,30 @@ const dos = JSON.parse(compute_dos('[6,8,6,1,1,1,1,1,1]', coords.toString(), 0.2
|
|
|
213
240
|
|
|
214
241
|
---
|
|
215
242
|
|
|
243
|
+
### Live examples
|
|
244
|
+
|
|
245
|
+
One runnable example for every function of the JavaScript API, computed in your browser with the compiled WebAssembly package: **[sci-form docs → live examples](https://jigonzalez930209.github.io/sci-form/guide/live-examples)**.
|
|
246
|
+
|
|
216
247
|
### CLI
|
|
217
248
|
|
|
249
|
+
Download the package for your system from the [latest release](https://github.com/jigonzalez930209/sci-form/releases/latest):
|
|
250
|
+
|
|
251
|
+
| System | Package | Install |
|
|
252
|
+
|---|---|---|
|
|
253
|
+
| Debian / Ubuntu | `sci-form_<version>_amd64.deb` / `arm64` | `sudo apt install ./sci-form_*.deb` |
|
|
254
|
+
| Fedora / RHEL | `sci-form-<version>.x86_64.rpm` / `aarch64` | `sudo dnf install ./sci-form-*.rpm` |
|
|
255
|
+
| Linux (any) | `sci-form-<version>-x86_64-unknown-linux-gnu.tar.gz` / `aarch64` | unpack, put `sci-form` on your `PATH` |
|
|
256
|
+
| macOS | `…-aarch64-apple-darwin.tar.gz` (Apple Silicon) / `…-x86_64-apple-darwin.tar.gz` | unpack, put `sci-form` on your `PATH` |
|
|
257
|
+
| Windows | `…-x86_64-pc-windows-msvc.zip` | unpack, add the folder to `PATH` |
|
|
258
|
+
|
|
259
|
+
or from source: `cargo install sci-form-cli`. Each release carries a `SHA256SUMS` file.
|
|
260
|
+
|
|
218
261
|
```bash
|
|
219
|
-
|
|
262
|
+
sci-form # a short guide with examples
|
|
263
|
+
sci-form commands # every command, grouped by topic
|
|
264
|
+
sci-form examples pm3 --run # a ready-to-run example, with its output
|
|
265
|
+
sci-form help pm3 # every option of one command
|
|
266
|
+
sci-form completions bash # shell completion (bash, zsh, fish, powershell)
|
|
220
267
|
```
|
|
221
268
|
|
|
222
269
|
```bash
|
|
@@ -269,10 +316,12 @@ The repository now includes an isolated experimental quantum-chemistry stack und
|
|
|
269
316
|
|
|
270
317
|
### Current Practical Status
|
|
271
318
|
|
|
272
|
-
- Stable production APIs remain unchanged; the experimental work is isolated
|
|
319
|
+
- Stable production APIs remain unchanged; the experimental work is isolated behind `experimental_*` feature flags
|
|
273
320
|
- Real acceleration today is CPU parallelism via rayon in the ERI build path
|
|
274
|
-
- GPU execution is
|
|
275
|
-
- The
|
|
321
|
+
- 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 (`lib` 739/739, `regression` 429/429 in release). 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
|
|
323
|
+
- 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
|
|
276
325
|
|
|
277
326
|
### Validation Snapshot
|
|
278
327
|
|
|
@@ -300,7 +349,7 @@ Current verified results on this repository state:
|
|
|
300
349
|
| `cargo test --test regression test_experimental_comparison` | **54 passed, 0 failed** |
|
|
301
350
|
| `cargo test --test regression test_extended_molecules` | **14 passed, 0 failed, 7 ignored** |
|
|
302
351
|
|
|
303
|
-
More detailed coverage notes live in [TESTING.md](TESTING.md), and the broader project plan
|
|
352
|
+
More detailed coverage notes live in [TESTING.md](TESTING.md), and the broader project plan lives in the [documentation site](docs/index.md).
|
|
304
353
|
|
|
305
354
|
---
|
|
306
355
|
|
|
@@ -348,7 +397,8 @@ More detailed coverage notes live in [TESTING.md](TESTING.md), and the broader p
|
|
|
348
397
|
| `sci_form::compute_dos` | Density of states + PDOS (EHT orbital energies) |
|
|
349
398
|
| `sci_form::compute_rmsd` | RMSD after Kabsch alignment |
|
|
350
399
|
| `sci_form::compute_pm3` | PM3/PM3(tm) semi-empirical SCF |
|
|
351
|
-
| `sci_form::compute_xtb` |
|
|
400
|
+
| `sci_form::compute_xtb` | xTB tight binding — runs GFN2-xTB (same numbers as `compute_gfn2`) |
|
|
401
|
+
| `sci_form::compute_pm3_gradient` / `compute_xtb_gradient` | Energy gradients (eV/Å), central differences of the energy the matching `compute_*` returns |
|
|
352
402
|
| `sci_form::compute_uhf` | Unrestricted Hartree-Fock SCF |
|
|
353
403
|
| `sci_form::compute_rohf` | Restricted open-shell Hartree-Fock SCF |
|
|
354
404
|
| `sci_form::compute_uff_energy` | UFF force field energy evaluation |
|
|
@@ -364,7 +414,7 @@ More detailed coverage notes live in [TESTING.md](TESTING.md), and the broader p
|
|
|
364
414
|
|-------------|---------|
|
|
365
415
|
| `sci_form::eht` | `solve_eht()`, `EhtResult`, `evaluate_orbital_on_grid_chunked()`, `marching_cubes()` |
|
|
366
416
|
| `sci_form::pm3` | `compute_pm3()`, PM3/PM3(tm) SCF, Gaussian core-core corrections |
|
|
367
|
-
| `sci_form::xtb` | `compute_xtb()
|
|
417
|
+
| `sci_form::xtb` | `compute_xtb()` (GFN2), `xtb::gfn0` (faithful GFN0), `xtb::gfn1`, `xtb::gfn2`, `compute_xtb_gradient()` |
|
|
368
418
|
| `sci_form::scf::uhf` | `run_uhf()`, `run_rohf()`, open-shell SCF with spin contamination analysis |
|
|
369
419
|
| `sci_form::hf` | `solve_hf3c()`, CISD, `mo_transform::ao_to_mo_transform()` |
|
|
370
420
|
| `sci_form::esp` | `compute_esp_grid_parallel()`, `esp_color_map()`, `esp_grid_to_colors()`, `export_cube()`, `read_cube()` |
|
|
@@ -447,11 +497,11 @@ cargo clippy --all-targets -- -D warnings
|
|
|
447
497
|
Use the provided bump script. It updates all version strings, commits, tags, and pushes:
|
|
448
498
|
|
|
449
499
|
```bash
|
|
450
|
-
# Auto-increment patch (0.
|
|
500
|
+
# Auto-increment patch (1.0.0 → 1.0.1)
|
|
451
501
|
./scripts/bump_version.sh
|
|
452
502
|
|
|
453
503
|
# Set a specific version
|
|
454
|
-
./scripts/bump_version.sh
|
|
504
|
+
./scripts/bump_version.sh 1.1.0
|
|
455
505
|
```
|
|
456
506
|
|
|
457
507
|
This updates versions in:
|
|
@@ -465,6 +515,10 @@ This updates versions in:
|
|
|
465
515
|
|
|
466
516
|
Then creates a `vX.Y.Z` git tag, which triggers the [release workflow](.github/workflows/release.yml) to publish to **crates.io**, **PyPI**, and **npm** automatically.
|
|
467
517
|
|
|
518
|
+
The workflow refuses to publish a tag that does not match the manifest
|
|
519
|
+
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
|
+
|
|
468
522
|
**Required repository secrets:**
|
|
469
523
|
|
|
470
524
|
| Secret | Used for |
|