sci-form-wasm 0.15.2 → 2.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.
@@ -0,0 +1,103 @@
1
+ /**
2
+ * sci-form-wasm/beta — TypeScript declarations.
3
+ *
4
+ * GENERATED by `crates/wasm/js/generate-subpath-types.js` from the
5
+ * declarations of the build that produced this package. Do not edit by hand:
6
+ * the file is regenerated on every build, so it can never promise a function
7
+ * the binary does not contain.
8
+ *
9
+ * All functions accept/return JSON strings except where noted.
10
+ * Call `await init()` from the main `sci-form-wasm` package once before use.
11
+ */
12
+
13
+ /**
14
+ * Compute constant-potential charges using the CPM model.
15
+ *
16
+ * `potential` — target electrode potential in eV.
17
+ *
18
+ * Returns JSON: `{ "charges": [...], "total_charge": 0.5, "energy": -1.2 }`
19
+ */
20
+ export function beta_compute_cpm_charges(elements_json: string, coords_flat_json: string, potential: number): string;
21
+
22
+ /**
23
+ * Compute EHT Density of States using the Kernel Polynomial Method (O(N)).
24
+ *
25
+ * Builds the EHT Hamiltonian internally from geometry, then runs KPM.
26
+ *
27
+ * `config_json` fields (all optional):
28
+ * - `order` (int, default 100): Chebyshev expansion order
29
+ * - `n_points` (int, default 200): Energy grid points
30
+ * - `e_min` (float): Override spectral minimum
31
+ * - `e_max` (float): Override spectral maximum
32
+ * - `temperature` (float, default 0): Electronic temperature in K
33
+ *
34
+ * Returns JSON `KpmDosResult`:
35
+ * ```json
36
+ * { "energies": [...], "total_dos": [...], "e_min": -30.0, "e_max": 5.0,
37
+ * "order": 100 }
38
+ * ```
39
+ */
40
+ export function beta_compute_kpm_dos(elements_json: string, coords_flat_json: string, config_json: string): string;
41
+
42
+ /**
43
+ * Compute EHT Mulliken populations using KPM (O(N) stochastic trace).
44
+ *
45
+ * Returns JSON: `{ "mulliken_charges": [...], "orbital_populations": [...] }`
46
+ */
47
+ export function beta_compute_kpm_mulliken(elements_json: string, coords_flat_json: string): string;
48
+
49
+ /**
50
+ * Compute vibrational frequencies using Mobile Block Hessian (reduced DOF).
51
+ *
52
+ * Uses UFF as the energy evaluator internally.
53
+ *
54
+ * Returns JSON `MbhResult`:
55
+ * ```json
56
+ * { "frequencies": [...], "n_blocks": 3, "n_flexible": 2,
57
+ * "n_dof_reduced": 12, "n_dof_full": 24, "speedup": 2.0 }
58
+ * ```
59
+ */
60
+ export function beta_compute_mbh_frequencies(elements_json: string, coords_flat_json: string, smiles: string): string;
61
+
62
+ /**
63
+ * Return beta module metadata.
64
+ *
65
+ * Returns JSON: `{ "beta_modules": ["kpm", "mbh", "randnla", "riemannian", "cpm"] }`
66
+ */
67
+ export function beta_modules_info(): string;
68
+
69
+ /**
70
+ * Compute Riemannian distance between two PSD matrices.
71
+ *
72
+ * `matrix_a_json` / `matrix_b_json` — flat row-major arrays with `dim` dimension.
73
+ *
74
+ * Returns JSON: `{ "distance": 0.12 }`
75
+ */
76
+ export function beta_psd_distance(matrix_a_json: string, matrix_b_json: string, dim: number): string;
77
+
78
+ /**
79
+ * Project a symmetric matrix onto the PSD (positive semidefinite) cone.
80
+ *
81
+ * `matrix_json` — flat row-major array with `dim` dimension.
82
+ *
83
+ * Returns JSON: `{ "matrix": [...flat psd projection...], "was_psd": false }`
84
+ */
85
+ export function beta_psd_projection(matrix_json: string, dim: number): string;
86
+
87
+ /**
88
+ * Solve EHT with a randomized Nyström eigensolver instead of O(N³) exact diag.
89
+ *
90
+ * `config_json` fields (all optional):
91
+ * - `sketch_size` (int): Nyström rank k. Default: √N
92
+ * - `seed` (int, default 42)
93
+ * - `max_error` (float, default 0.001): Max relative residual before fallback
94
+ * - `fallback_enabled` (bool, default true)
95
+ *
96
+ * Returns JSON:
97
+ * ```json
98
+ * { "orbital_energies": [...], "homo_index": 4, "homo_energy": -0.5,
99
+ * "lumo_energy": 0.1, "gap": 0.6,
100
+ * "k": 12, "residual_error": 0.0003, "used_fallback": false }
101
+ * ```
102
+ */
103
+ export function beta_solve_eht_randnla(elements_json: string, coords_flat_json: string, config_json: string): string;
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+ module.exports = require('../sci_form_wasm.js');
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }