sci-form-wasm 0.9.0 → 0.10.1

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
@@ -26,6 +26,13 @@ Native bindings for **Rust**, **Python**, **TypeScript/JavaScript (WASM)**, and
26
26
  - **Volumetric orbital grids** — STO-3G basis, chunked evaluation for large molecules, marching cubes isosurfaces
27
27
  - **Density of States** — total DOS + per-atom PDOS with Gaussian smearing, JSON export, MSE metric
28
28
 
29
+ ### Experimental RHF Engine
30
+ - **Isolated `experimental_2` namespace** — next-generation Roothaan-Hall RHF engine without affecting stable APIs
31
+ - **Analytical Gaussian integrals** — overlap, kinetic, nuclear attraction, core Hamiltonian, and two-electron ERIs
32
+ - **SCF with DIIS + parallel ERI** — deterministic RHF/STO-3G workflow with rayon acceleration for the expensive $O(N^4)$ step
33
+ - **Experimental spectroscopy stack** — prototype sTDA UV-Vis, GIAO-like NMR shielding, and semi-numerical IR/Hessian workflows
34
+ - **GPU-oriented architecture** — WGSL shader stubs, orbital grid evaluation, and marching-cubes rendering pipeline prepared for future `wgpu` enablement
35
+
29
36
  ### Electrostatics & Surface
30
37
  - **Electrostatic Potential (ESP)** — Coulomb grid from Mulliken charges, color mapping (red/white/blue), `.cube` export
31
38
  - **Parallel ESP** — rayon-accelerated grid computation (`parallel` feature)
@@ -220,6 +227,57 @@ Prebuilt binaries available at [GitHub Releases](https://github.com/jigonzalez93
220
227
 
221
228
  ---
222
229
 
230
+ ## Experimental Engine
231
+
232
+ The repository now includes an isolated experimental quantum-chemistry stack under `sci_form::experimental_2`.
233
+
234
+ ### Phase Status
235
+
236
+ | Phase | Status | Scope |
237
+ |------|--------|-------|
238
+ | Phase 1 | Complete | GPU infrastructure scaffolding, aligned types, CPU fallback, WGSL interface stubs |
239
+ | Phase 2 | Complete | Gaussian basis, overlap/kinetic/nuclear/core matrices, ERIs, validation helpers |
240
+ | Phase 3 | Complete | RHF SCF loop, Löwdin orthogonalization, DIIS, Mulliken analysis, gradients, optimizer, parallel ERI |
241
+ | Phase 4 | Prototype complete | Experimental sTDA UV-Vis, GIAO-style NMR shielding, Hessian/IR workflows |
242
+ | Phase 5 | Prototype complete | Orbital grid evaluation, marching cubes, isosurface generation, GPU-ready rendering path |
243
+
244
+ ### Current Practical Status
245
+
246
+ - Stable production APIs remain unchanged; the experimental work is isolated in `experimental_2`
247
+ - Real acceleration today is CPU parallelism via rayon in the ERI build path
248
+ - GPU execution is not enabled yet; `phase1_gpu_infrastructure` currently exposes a CPU fallback plus WGSL-ready interfaces
249
+ - The main known scientific limitation is absolute RHF/STO-3G total energy scaling in the experimental engine; comparative gaps and regression behavior are the primary validation target today
250
+
251
+ ### Validation Snapshot
252
+
253
+ The experimental stack is covered by dedicated regression suites:
254
+
255
+ ```bash
256
+ # Build all library + test targets
257
+ cargo check --tests
258
+
259
+ # Base experimental regression suite
260
+ cargo test --test regression test_experimental_comparison -- --nocapture
261
+
262
+ # Extended complex-molecule battery (fast active tests)
263
+ cargo test --test regression test_extended_molecules -- --nocapture
264
+
265
+ # Heavy experimental benchmarks and long-running tests
266
+ cargo test --release --test regression test_extended_molecules -- --include-ignored
267
+ ```
268
+
269
+ Current verified results on this repository state:
270
+
271
+ | Command | Result |
272
+ |--------|--------|
273
+ | `cargo check --tests` | passes |
274
+ | `cargo test --test regression test_experimental_comparison` | **54 passed, 0 failed** |
275
+ | `cargo test --test regression test_extended_molecules` | **14 passed, 0 failed, 7 ignored** |
276
+
277
+ More detailed coverage notes live in [TESTING.md](TESTING.md), and the broader project plan remains in [ROADMAP.md](ROADMAP.md).
278
+
279
+ ---
280
+
223
281
  ## Benchmark Results
224
282
 
225
283
  ### Conformer Generation — Diverse Molecules (131 molecules, all functional groups)
@@ -311,7 +369,7 @@ cargo build --release
311
369
  cd crates/python && pip install maturin && maturin develop --release
312
370
 
313
371
  # WASM bindings
314
- cd crates/wasm && wasm-pack build --target web --release
372
+ cd crates/wasm && ./build.sh --web-only --web-features "parallel experimental-gpu"
315
373
 
316
374
  # With parallel feature
317
375
  cargo build --release --features parallel
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "sci-form-wasm",
3
3
  "type": "module",
4
4
  "description": "WASM/TypeScript bindings for high-performance 3D molecular conformer generation",
5
- "version": "0.9.0",
5
+ "version": "0.10.1",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
@@ -321,6 +321,8 @@ export function eht_orbital_mesh(elements: string, coords_flat: string, mo_index
321
321
  */
322
322
  export function eht_support(elements: string): string;
323
323
 
324
+ export function eht_volumetric_grid_info(elements: string, coords_flat: string, spacing: number, padding: number): string;
325
+
324
326
  /**
325
327
  * Generate a 3D conformer from a SMILES string.
326
328
  *
@@ -418,56 +420,36 @@ export function wbg_rayon_start_worker(receiver: number): void;
418
420
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
419
421
 
420
422
  export interface InitOutput {
421
- readonly embed: (a: number, b: number, c: number, d: number) => void;
422
- readonly embed_coords: (a: number, b: number, c: number, d: number) => void;
423
- readonly embed_coords_typed: (a: number, b: number, c: number) => number;
424
- readonly embed_batch: (a: number, b: number, c: number, d: number) => void;
425
- readonly parse_smiles: (a: number, b: number, c: number) => void;
423
+ readonly compute_charges: (a: number, b: number, c: number) => void;
424
+ readonly compute_sasa: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
425
+ readonly compute_population: (a: number, b: number, c: number, d: number, e: number) => void;
426
+ readonly compute_bond_orders: (a: number, b: number, c: number, d: number, e: number) => void;
427
+ readonly compute_dipole: (a: number, b: number, c: number, d: number, e: number) => void;
428
+ readonly compute_dos: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
429
+ readonly compute_rmsd: (a: number, b: number, c: number, d: number, e: number) => void;
426
430
  readonly compute_pm3: (a: number, b: number, c: number, d: number, e: number) => void;
427
431
  readonly compute_xtb: (a: number, b: number, c: number, d: number, e: number) => void;
428
432
  readonly compute_hf3c: (a: number, b: number, c: number, d: number, e: number) => void;
429
433
  readonly compute_hf3c_custom: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
430
434
  readonly compute_ani: (a: number, b: number, c: number, d: number, e: number) => void;
431
- readonly compute_esp: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
432
- readonly compute_esp_grid_typed: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
433
- readonly compute_esp_grid_info: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
434
- readonly compute_stda_uvvis: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
435
- readonly compute_vibrational_analysis: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
436
- readonly compute_ir_spectrum: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
437
- readonly predict_nmr_shifts: (a: number, b: number, c: number) => void;
438
- readonly predict_nmr_couplings: (a: number, b: number, c: number, d: number, e: number) => void;
439
- readonly compute_nmr_spectrum: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
440
- readonly compute_hose_codes: (a: number, b: number, c: number, d: number) => void;
441
- readonly version: (a: number) => void;
442
- readonly system_capabilities: (a: number, b: number, c: number) => void;
443
- readonly system_method_plan: (a: number, b: number, c: number) => void;
444
- readonly compare_methods: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
445
- readonly pack_batch_arrow: (a: number, b: number, c: number) => void;
446
- readonly split_worker_tasks: (a: number, b: number, c: number, d: number, e: number) => void;
447
- readonly estimate_workers: (a: number, b: number) => number;
435
+ readonly create_unit_cell: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
436
+ readonly assemble_framework: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
437
+ readonly compute_nonpolar_solvation: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
438
+ readonly compute_gb_solvation: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
448
439
  readonly compute_md_trajectory: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
449
440
  readonly compute_md_trajectory_nvt: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
450
441
  readonly compute_simplified_neb_path: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
451
442
  readonly search_conformers_with_uff: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
452
- readonly compute_orbital_mesh: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
453
443
  readonly compute_frontier_descriptors: (a: number, b: number, c: number, d: number, e: number) => void;
454
444
  readonly compute_fukui_descriptors: (a: number, b: number, c: number, d: number, e: number) => void;
455
445
  readonly compute_reactivity_ranking: (a: number, b: number, c: number, d: number, e: number) => void;
456
446
  readonly compute_uv_vis_spectrum: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
457
447
  readonly analyze_graph_features: (a: number, b: number, c: number) => void;
458
448
  readonly compute_topology: (a: number, b: number, c: number, d: number, e: number) => void;
459
- readonly compute_ml_properties: (a: number, b: number, c: number) => void;
460
- readonly compute_molecular_descriptors: (a: number, b: number, c: number) => void;
461
- readonly compute_sssr: (a: number, b: number, c: number) => void;
462
- readonly compute_ecfp: (a: number, b: number, c: number, d: number, e: number) => void;
463
- readonly compute_tanimoto: (a: number, b: number, c: number, d: number, e: number) => void;
464
- readonly butina_cluster: (a: number, b: number, c: number, d: number) => void;
465
- readonly compute_rmsd_matrix: (a: number, b: number, c: number) => void;
466
- readonly compute_nonpolar_solvation: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
467
- readonly compute_gb_solvation: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
468
- readonly analyze_stereo: (a: number, b: number, c: number, d: number, e: number) => void;
469
- readonly create_unit_cell: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
470
- readonly assemble_framework: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
449
+ readonly version: (a: number) => void;
450
+ readonly system_capabilities: (a: number, b: number, c: number) => void;
451
+ readonly system_method_plan: (a: number, b: number, c: number) => void;
452
+ readonly compare_methods: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
471
453
  readonly compute_uff_energy: (a: number, b: number, c: number, d: number, e: number) => void;
472
454
  readonly compute_uff_energy_with_aromatic_heuristics: (a: number, b: number, c: number, d: number, e: number) => void;
473
455
  readonly compute_mmff94_energy: (a: number, b: number, c: number, d: number, e: number) => void;
@@ -478,13 +460,34 @@ export interface InitOutput {
478
460
  readonly eht_support: (a: number, b: number, c: number) => void;
479
461
  readonly eht_orbital_grid_typed: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
480
462
  readonly eht_orbital_grid_from_coefficients_typed: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
481
- readonly compute_charges: (a: number, b: number, c: number) => void;
482
- readonly compute_sasa: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
483
- readonly compute_population: (a: number, b: number, c: number, d: number, e: number) => void;
484
- readonly compute_bond_orders: (a: number, b: number, c: number, d: number, e: number) => void;
485
- readonly compute_dipole: (a: number, b: number, c: number, d: number, e: number) => void;
486
- readonly compute_dos: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
487
- readonly compute_rmsd: (a: number, b: number, c: number, d: number, e: number) => void;
463
+ readonly eht_volumetric_grid_info: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
464
+ readonly compute_orbital_mesh: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
465
+ readonly compute_sssr: (a: number, b: number, c: number) => void;
466
+ readonly compute_ecfp: (a: number, b: number, c: number, d: number, e: number) => void;
467
+ readonly compute_tanimoto: (a: number, b: number, c: number, d: number, e: number) => void;
468
+ readonly butina_cluster: (a: number, b: number, c: number, d: number) => void;
469
+ readonly compute_rmsd_matrix: (a: number, b: number, c: number) => void;
470
+ readonly compute_esp: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
471
+ readonly compute_esp_grid_typed: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
472
+ readonly compute_esp_grid_info: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
473
+ readonly analyze_stereo: (a: number, b: number, c: number, d: number, e: number) => void;
474
+ readonly embed: (a: number, b: number, c: number, d: number) => void;
475
+ readonly embed_coords: (a: number, b: number, c: number, d: number) => void;
476
+ readonly embed_coords_typed: (a: number, b: number, c: number) => number;
477
+ readonly embed_batch: (a: number, b: number, c: number, d: number) => void;
478
+ readonly parse_smiles: (a: number, b: number, c: number) => void;
479
+ readonly compute_ml_properties: (a: number, b: number, c: number) => void;
480
+ readonly compute_molecular_descriptors: (a: number, b: number, c: number) => void;
481
+ readonly compute_stda_uvvis: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
482
+ readonly compute_vibrational_analysis: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
483
+ readonly compute_ir_spectrum: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
484
+ readonly predict_nmr_shifts: (a: number, b: number, c: number) => void;
485
+ readonly predict_nmr_couplings: (a: number, b: number, c: number, d: number, e: number) => void;
486
+ readonly compute_nmr_spectrum: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
487
+ readonly compute_hose_codes: (a: number, b: number, c: number, d: number) => void;
488
+ readonly pack_batch_arrow: (a: number, b: number, c: number) => void;
489
+ readonly split_worker_tasks: (a: number, b: number, c: number, d: number, e: number) => void;
490
+ readonly estimate_workers: (a: number, b: number) => number;
488
491
  readonly __wbg_wbg_rayon_poolbuilder_free: (a: number, b: number) => void;
489
492
  readonly wbg_rayon_poolbuilder_numThreads: (a: number) => number;
490
493
  readonly wbg_rayon_poolbuilder_receiver: (a: number) => number;
package/sci_form_wasm.js CHANGED
@@ -1507,6 +1507,34 @@ export function eht_support(elements) {
1507
1507
  }
1508
1508
  }
1509
1509
 
1510
+ /**
1511
+ * @param {string} elements
1512
+ * @param {string} coords_flat
1513
+ * @param {number} spacing
1514
+ * @param {number} padding
1515
+ * @returns {string}
1516
+ */
1517
+ export function eht_volumetric_grid_info(elements, coords_flat, spacing, padding) {
1518
+ let deferred3_0;
1519
+ let deferred3_1;
1520
+ try {
1521
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1522
+ const ptr0 = passStringToWasm0(elements, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1523
+ const len0 = WASM_VECTOR_LEN;
1524
+ const ptr1 = passStringToWasm0(coords_flat, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1525
+ const len1 = WASM_VECTOR_LEN;
1526
+ wasm.eht_volumetric_grid_info(retptr, ptr0, len0, ptr1, len1, spacing, padding);
1527
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1528
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1529
+ deferred3_0 = r0;
1530
+ deferred3_1 = r1;
1531
+ return getStringFromWasm0(r0, r1);
1532
+ } finally {
1533
+ wasm.__wbindgen_add_to_stack_pointer(16);
1534
+ wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
1535
+ }
1536
+ }
1537
+
1510
1538
  /**
1511
1539
  * Generate a 3D conformer from a SMILES string.
1512
1540
  *
Binary file