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.
package/beta/index.d.ts CHANGED
@@ -1,119 +1,103 @@
1
1
  /**
2
2
  * sci-form-wasm/beta — TypeScript declarations.
3
3
  *
4
- * All functions accept/return JSON strings.
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.
5
10
  * Call `await init()` from the main `sci-form-wasm` package once before use.
6
11
  */
7
12
 
8
- // ── B1: KPM ──────────────────────────────────────────────────────────────
9
-
10
13
  /**
11
- * Compute EHT Density of States using Kernel Polynomial Method (O(N)).
14
+ * Compute constant-potential charges using the CPM model.
12
15
  *
13
- * KPM scales linearly with system size vs. O(N³) exact diagonalization.
16
+ * `potential` — target electrode potential in eV.
14
17
  *
15
- * @param elements_json JSON array of atomic numbers
16
- * @param coords_flat_json JSON flat coords [x0,y0,z0,...]
17
- * @param config_json Optional JSON config:
18
- * `{ order?: number, n_points?: number, e_min?: number, e_max?: number, temperature?: number }`
19
- * @returns JSON:
20
- * `{ energies: number[], total_dos: number[], e_min, e_max, order }`
18
+ * Returns JSON: `{ "charges": [...], "total_charge": 0.5, "energy": -1.2 }`
21
19
  */
22
- export declare function beta_compute_kpm_dos(
23
- elements_json: string,
24
- coords_flat_json: string,
25
- config_json?: string
26
- ): string;
20
+ export function beta_compute_cpm_charges(elements_json: string, coords_flat_json: string, potential: number): string;
27
21
 
28
22
  /**
29
- * Compute Mulliken populations using KPM stochastic trace (O(N)).
30
- * @returns JSON `{ mulliken_charges: number[], orbital_populations: number[] }`
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
+ * ```
31
39
  */
32
- export declare function beta_compute_kpm_mulliken(
33
- elements_json: string,
34
- coords_flat_json: string
35
- ): string;
36
-
37
- // ── B2: MBH ──────────────────────────────────────────────────────────────
40
+ export function beta_compute_kpm_dos(elements_json: string, coords_flat_json: string, config_json: string): string;
38
41
 
39
42
  /**
40
- * Compute vibrational frequencies using Mobile Block Hessian.
41
- *
42
- * Reduces degrees of freedom by treating rigid groups as blocks,
43
- * giving speedup = n_dof_full / n_dof_reduced.
43
+ * Compute EHT Mulliken populations using KPM (O(N) stochastic trace).
44
44
  *
45
- * @param smiles SMILES string for ring detection and UFF topology
46
- * @returns JSON:
47
- * `{ frequencies: number[], n_blocks, n_flexible,
48
- * n_dof_reduced, n_dof_full, speedup }`
45
+ * Returns JSON: `{ "mulliken_charges": [...], "orbital_populations": [...] }`
49
46
  */
50
- export declare function beta_compute_mbh_frequencies(
51
- elements_json: string,
52
- coords_flat_json: string,
53
- smiles: string
54
- ): string;
55
-
56
- // ── B3: RandNLA ───────────────────────────────────────────────────────────
47
+ export function beta_compute_kpm_mulliken(elements_json: string, coords_flat_json: string): string;
57
48
 
58
49
  /**
59
- * Solve the EHT generalized eigenvalue problem using randomized Nyström.
50
+ * Compute vibrational frequencies using Mobile Block Hessian (reduced DOF).
60
51
  *
61
- * Scales as O(N k²) instead of O(N³), where k ≈ √N by default.
52
+ * Uses UFF as the energy evaluator internally.
62
53
  *
63
- * @param config_json Optional JSON:
64
- * `{ sketch_size?: number, seed?: number, max_error?: number, fallback_enabled?: boolean }`
65
- * @returns JSON:
66
- * `{ orbital_energies, homo_index, homo_energy, lumo_energy, gap,
67
- * k, residual_error, used_fallback }`
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
+ * ```
68
59
  */
69
- export declare function beta_solve_eht_randnla(
70
- elements_json: string,
71
- coords_flat_json: string,
72
- config_json?: string
73
- ): string;
74
-
75
- // ── B4: Riemannian ────────────────────────────────────────────────────────
60
+ export function beta_compute_mbh_frequencies(elements_json: string, coords_flat_json: string, smiles: string): string;
76
61
 
77
62
  /**
78
- * Compute Riemannian distance between two PSD matrices on the manifold.
79
- * @param matrix_a_json / matrix_b_json JSON flat row-major arrays
80
- * @param dim Matrix dimension (matrices are dim×dim)
81
- * @returns JSON `{ distance: number }`
63
+ * Return beta module metadata.
64
+ *
65
+ * Returns JSON: `{ "beta_modules": ["kpm", "mbh", "randnla", "riemannian", "cpm"] }`
82
66
  */
83
- export declare function beta_psd_distance(
84
- matrix_a_json: string,
85
- matrix_b_json: string,
86
- dim: number
87
- ): string;
67
+ export function beta_modules_info(): string;
88
68
 
89
69
  /**
90
- * Project a symmetric matrix onto the PSD cone (zero negative eigenvalues).
91
- * @param matrix_json JSON flat row-major array
92
- * @param dim Matrix dimension
93
- * @returns JSON `{ matrix: number[], was_psd: boolean }`
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 }`
94
75
  */
95
- export declare function beta_psd_projection(
96
- matrix_json: string,
97
- dim: number
98
- ): string;
99
-
100
- // ── B5: CPM ───────────────────────────────────────────────────────────────
76
+ export function beta_psd_distance(matrix_a_json: string, matrix_b_json: string, dim: number): string;
101
77
 
102
78
  /**
103
- * Compute constant-potential electrochemical charges.
104
- * @param potential Target electrode potential in eV
105
- * @returns JSON `{ charges: number[], total_charge: number, energy: number }`
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 }`
106
84
  */
107
- export declare function beta_compute_cpm_charges(
108
- elements_json: string,
109
- coords_flat_json: string,
110
- potential: number
111
- ): string;
112
-
113
- // ── Metadata ─────────────────────────────────────────────────────────────
85
+ export function beta_psd_projection(matrix_json: string, dim: number): string;
114
86
 
115
87
  /**
116
- * Return available beta module list and stability info.
117
- * @returns JSON `{ beta_modules: string[], stability: string, version: string }`
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
+ * ```
118
102
  */
119
- export declare function beta_modules_info(): string;
103
+ export function beta_solve_eht_randnla(elements_json: string, coords_flat_json: string, config_json: string): string;
@@ -0,0 +1,411 @@
1
+ /**
2
+ * sci-form-wasm/alpha — 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
+ * Persistent live simulation state accessible from JavaScript.
15
+ *
16
+ * The browser creates one instance via `live_simulation_create`, then calls
17
+ * `live_simulation_step` and reads the flat coordinate buffer each
18
+ * animation frame.
19
+ */
20
+ export class LiveSimulation {
21
+ free(): void;
22
+ [Symbol.dispose](): void;
23
+ /**
24
+ * Apply a harmonic steering force pulling atom `atom_index` toward `(tx, ty, tz)`.
25
+ */
26
+ apply_steering_force(atom_index: number, tx: number, ty: number, tz: number, spring_k: number): void;
27
+ /**
28
+ * Apply a Berendsen thermostat coupling towards `target_temp` K.
29
+ */
30
+ apply_thermostat(target_temp: number, tau_fs: number, dt_fs: number): void;
31
+ /**
32
+ * Clear all accumulated steering forces (call before next IMD frame).
33
+ */
34
+ clear_steering(): void;
35
+ /**
36
+ * Return current kinetic energy.
37
+ */
38
+ kinetic_energy(): number;
39
+ /**
40
+ * Create a new live simulation from SMILES, flat coordinates, and backend name.
41
+ *
42
+ * `backend`: `"uff"` | `"pm3"` | `"xtb"`.
43
+ */
44
+ constructor(smiles: string, coords_flat: string, backend: string);
45
+ /**
46
+ * Get the number of atoms.
47
+ */
48
+ num_atoms(): number;
49
+ /**
50
+ * Return current flat positions as a JSON array.
51
+ */
52
+ positions_json(): string;
53
+ /**
54
+ * Sync internal buffers and return a pointer to the flat positions array.
55
+ *
56
+ * The caller (JS side) can construct a `Float64Array` view over WASM memory
57
+ * at this pointer, with length = `num_atoms * 3`.
58
+ */
59
+ positions_ptr(): number;
60
+ /**
61
+ * Return current potential energy (from last force computation).
62
+ */
63
+ potential_energy(): number;
64
+ /**
65
+ * Set velocities from a Maxwell-Boltzmann distribution at `temperature` K.
66
+ */
67
+ set_temperature(temperature: number, seed: bigint): void;
68
+ /**
69
+ * Advance the simulation by `n_steps` with time step `dt_fs` (femtoseconds).
70
+ */
71
+ step(n_steps: number, dt_fs: number): void;
72
+ /**
73
+ * Return simulation step count.
74
+ */
75
+ step_count(): number;
76
+ /**
77
+ * Return current kinetic temperature in Kelvin.
78
+ */
79
+ temperature(): number;
80
+ }
81
+
82
+ /**
83
+ * Compute the Boys function F_n(x).
84
+ *
85
+ * Returns JSON: `{ "value": 0.9846 }`
86
+ */
87
+ export function alpha_boys_function(n: number, x: number): string;
88
+
89
+ /**
90
+ * Compute Atomic Environment Vectors (AEVs) for each atom.
91
+ *
92
+ * Uses default symmetry function parameters unless `params_json` is provided.
93
+ *
94
+ * Returns JSON: `{ "n_atoms": 5, "aev_length": 384, "aevs": [[...], [...]] }`
95
+ */
96
+ export function alpha_compute_aevs(elements_json: string, coords_flat_json: string, params_json: string): string;
97
+
98
+ /**
99
+ * Run a Kohn-Sham DFT single-point calculation.
100
+ *
101
+ * `method`: `"svwn"` (LDA) | `"pbe"` (GGA, default).
102
+ *
103
+ * Returns JSON `DftResult`:
104
+ * ```json
105
+ * { "energy": -1.12, "homo_energy": -0.5, "lumo_energy": 0.1, "gap": 0.6,
106
+ * "converged": true, "n_basis": 5, "scf_iterations": 12,
107
+ * "mulliken_charges": [...], "orbital_energies": [...],
108
+ * "nuclear_repulsion": 0.72, "xc_energy": -0.3 }
109
+ * ```
110
+ */
111
+ export function alpha_compute_dft(elements_json: string, coords_flat_json: string, method: string): string;
112
+
113
+ /**
114
+ * Solve EEM charges for a molecule using the ReaxFF charge model.
115
+ *
116
+ * Returns JSON: `{ "charges": [...], "total_charge": 0.0 }`
117
+ */
118
+ export function alpha_compute_eem_charges(elements_json: string, coords_flat_json: string): string;
119
+
120
+ /**
121
+ * Compute MLFF energy and forces using pre-configured element networks.
122
+ *
123
+ * `config_json` is a JSON object matching `MlffConfig`:
124
+ * ```json
125
+ * {
126
+ * "aev_params": { "radial_cutoff": 6.0, "angular_cutoff": 3.5, ... },
127
+ * "element_nets": {
128
+ * "1": { "layers": [[...weights...]], "biases": [[...]] },
129
+ * "6": { ... }
130
+ * }
131
+ * }
132
+ * ```
133
+ *
134
+ * Returns JSON: `{ "energy": -1.23, "atomic_energies": [...], "forces": [...] }`
135
+ */
136
+ export function alpha_compute_mlff(elements_json: string, coords_flat_json: string, config_json: string): string;
137
+
138
+ /**
139
+ * Compute ReaxFF energy components for a molecule (no gradient).
140
+ *
141
+ * Returns JSON with keys `bonded`, `coulomb`, `van_der_waals`, `total`.
142
+ */
143
+ export function alpha_compute_reaxff_energy(elements_json: string, coords_flat_json: string): string;
144
+
145
+ /**
146
+ * Compute ReaxFF energy and gradient for a molecule.
147
+ *
148
+ * Returns JSON:
149
+ * ```json
150
+ * { "energy_kcal_mol": 12.3,
151
+ * "gradient": [gx0, gy0, gz0, gx1, gy1, gz1, ...] }
152
+ * ```
153
+ */
154
+ export function alpha_compute_reaxff_gradient(elements_json: string, coords_flat_json: string): string;
155
+
156
+ /**
157
+ * Compute a single (ss|ss) two-electron repulsion integral using Obara-Saika.
158
+ *
159
+ * `shell_a_json` / `shell_b_json` / `shell_c_json` / `shell_d_json` are JSON
160
+ * objects `{ "alpha": 1.0, "center": [x, y, z] }`.
161
+ *
162
+ * Returns JSON: `{ "eri": 4.37 }`
163
+ */
164
+ export function alpha_eri_ssss(shell_a_json: string, shell_b_json: string, shell_c_json: string, shell_d_json: string): string;
165
+
166
+ /**
167
+ * Plan which GSM backends are available for a molecule.
168
+ */
169
+ export function alpha_gsm_backend_plan(smiles: string): string;
170
+
171
+ /**
172
+ * Compare one or more GSM backends on the same geometry.
173
+ *
174
+ * `methods_json` can be `[]` to evaluate the full backend list.
175
+ */
176
+ export function alpha_gsm_compare_backends(smiles: string, coords_flat_json: string, methods_json: string): string;
177
+
178
+ /**
179
+ * Grow the reaction string and find the transition state node between
180
+ * reactant and product geometries using UFF energy.
181
+ *
182
+ * Returns JSON `GsmResult`:
183
+ * ```json
184
+ * { "ts_coords": [...], "ts_energy": 12.3,
185
+ * "path_energies": [...], "n_nodes": 5, "converged": true }
186
+ * ```
187
+ */
188
+ export function alpha_gsm_find_ts(smiles: string, reactant_coords_json: string, product_coords_json: string, config_json: string): string;
189
+
190
+ /**
191
+ * Grow the reaction string and find the transition state node between
192
+ * reactant and product geometries using the selected backend.
193
+ */
194
+ export function alpha_gsm_find_ts_with_method(smiles: string, reactant_coords_json: string, product_coords_json: string, config_json: string, method: string): string;
195
+
196
+ /**
197
+ * Interpolate a node along the reaction path at parameter t ∈ [0, 1].
198
+ *
199
+ * `reactant_json` / `product_json` — flat coordinate arrays.
200
+ *
201
+ * Returns JSON: `{ "coords": [...] }`
202
+ */
203
+ export function alpha_gsm_interpolate(reactant_json: string, product_json: string, t: number): string;
204
+
205
+ /**
206
+ * Return alpha module metadata.
207
+ *
208
+ * The module list is derived from the features the binary was compiled
209
+ * with, so it always describes what the package actually contains.
210
+ *
211
+ * Returns JSON: `{ "alpha_modules": ["dft", "reaxff", …],
212
+ * "stability": "alpha — experimental, …",
213
+ * "version": "2.0.0" }`
214
+ */
215
+ export function alpha_modules_info(): string;
216
+
217
+ /**
218
+ * EHT band structure along a k-path (`eht::band_structure::compute_band_structure`).
219
+ */
220
+ export function alpha_periodic_band_structure_eht(elements_json: string, coords_flat_json: string, lattice_json: string, config_json: string, n_electrons: number): string;
221
+
222
+ /**
223
+ * Bloch phase for a fractional k-point and a lattice translation.
224
+ *
225
+ * @param k_fractional_json JSON `[kx, ky, kz]`
226
+ * @param translation_json JSON `[tx, ty, tz]`
227
+ * @returns JSON Bloch phase
228
+ */
229
+ export function alpha_periodic_bloch_phase(k_fractional_json: string, translation_json: string): string;
230
+
231
+ /**
232
+ * Brillouin-zone weighted integral of a scalar field.
233
+ *
234
+ * @param values_json JSON array of scalars
235
+ * @param weights_json JSON array of k-point weights
236
+ * @returns the weighted integral
237
+ */
238
+ export function alpha_periodic_bz_integrate_scalar(values_json: string, weights_json: string): number;
239
+
240
+ /**
241
+ * Brillouin-zone weighted integral of a vector field.
242
+ *
243
+ * @param vectors_json JSON array of `[x, y, z]`
244
+ * @param weights_json JSON array of k-point weights
245
+ * @returns JSON `[x, y, z]` integral
246
+ */
247
+ export function alpha_periodic_bz_integrate_vector(vectors_json: string, weights_json: string): string;
248
+
249
+ /**
250
+ * Trace the Fermi-surface contour of real-space operator blocks in `kz = 0`.
251
+ *
252
+ * @param blocks_json JSON array of `{ "matrix": [[…]], "translation": [i, j, k] }`
253
+ * @param fermi_energy_ev Fermi energy in eV (`null`/`undefined` = median estimate)
254
+ * @param n_kx Number of kx samples (≥ 2)
255
+ * @param n_ky Number of ky samples (≥ 2)
256
+ * @returns JSON `FermiSurfaceContour`
257
+ */
258
+ export function alpha_periodic_fermi_surface_from_bands(blocks_json: string, fermi_energy_ev: number | null | undefined, n_kx: number, n_ky: number): string;
259
+
260
+ /**
261
+ * Interpolate the default high-symmetry k-path (`Γ → X → M → Γ`).
262
+ *
263
+ * @param n_points_per_segment Intervals per high-symmetry segment (≥ 1)
264
+ * @returns JSON `KPathStandard`
265
+ */
266
+ export function alpha_periodic_kpath_standard(n_points_per_segment: number): string;
267
+
268
+ /**
269
+ * Build a Monkhorst-Pack (or gamma-centred) k-mesh.
270
+ *
271
+ * @param config_json JSON `KMeshConfig` or `"{}"`
272
+ * @returns JSON k-mesh
273
+ */
274
+ export function alpha_periodic_monkhorst_pack(config_json: string): string;
275
+
276
+ /**
277
+ * Validate the electron count implied by a periodic DOS result.
278
+ *
279
+ * @param dos_json JSON `PeriodicKpmDosResult`
280
+ * @param fermi_energy_ev Fermi energy in eV
281
+ * @param expected_electrons Expected number of electrons
282
+ * @returns the number of electrons found
283
+ */
284
+ export function alpha_periodic_validate_electron_count(dos_json: string, fermi_energy_ev: number, expected_electrons: number): number;
285
+
286
+ /**
287
+ * Validate that the k-mesh weights sum to one.
288
+ *
289
+ * @param kmesh_json JSON `KMesh`
290
+ * @param tol Tolerance
291
+ * @returns `true` when the weights are normalised within `tol`
292
+ */
293
+ export function alpha_periodic_validate_kmesh_weights(kmesh_json: string, tol: number): boolean;
294
+
295
+ /**
296
+ * Refine a single dihedral torsion to a target angle using CGA.
297
+ *
298
+ * `smiles` — SMILES string for bond connectivity.
299
+ * `torsion_indices_json` — 4 atom indices [i, j, k, l].
300
+ * `target_angle_rad` — target dihedral angle in radians.
301
+ *
302
+ * Returns JSON: `{ "coords": [...] }`
303
+ */
304
+ export function alpha_refine_torsion_cga(elements_json: string, coords_flat_json: string, smiles: string, torsion_indices_json: string, target_angle_rad: number): string;
305
+
306
+ /**
307
+ * Build an Arrhenius chart from a JSON array of `ElementaryRateResult`.
308
+ *
309
+ * @param results_json JSON array of `ElementaryRateResult`
310
+ * @returns JSON chart payload
311
+ */
312
+ export function alpha_render_arrhenius_chart(results_json: string): string;
313
+
314
+ /**
315
+ * Build a band-structure chart from a `BandStructureAdapterResult` JSON payload.
316
+ *
317
+ * @param bs_json JSON `BandStructureAdapterResult`
318
+ * @returns JSON chart payload
319
+ */
320
+ export function alpha_render_band_structure_chart(bs_json: string): string;
321
+
322
+ /**
323
+ * Build a capacitance-scan chart from a `CpmEdlScanResult` JSON payload.
324
+ *
325
+ * @param scan_json JSON `CpmEdlScanResult`
326
+ * @returns JSON chart payload
327
+ */
328
+ export function alpha_render_capacitance_scan_chart(scan_json: string): string;
329
+
330
+ /**
331
+ * Build an EDL profile chart from an `EdlProfileResult` JSON payload.
332
+ *
333
+ * @param profile_json JSON `EdlProfileResult`
334
+ * @returns JSON chart payload
335
+ */
336
+ export function alpha_render_edl_profile_chart(profile_json: string): string;
337
+
338
+ /**
339
+ * Build GSM path trajectory frames from coords + energies JSON payloads.
340
+ *
341
+ * @param coords_json JSON array of flat coordinate frames
342
+ * @param energies_json JSON array of frame energies
343
+ * @returns JSON array of trajectory frames
344
+ */
345
+ export function alpha_render_gsm_path_trajectory(coords_json: string, energies_json: string): string;
346
+
347
+ /**
348
+ * Build a microkinetic population chart from a `MicrokineticTrace` JSON payload.
349
+ *
350
+ * @param trace_json JSON `MicrokineticTrace`
351
+ * @returns JSON chart payload
352
+ */
353
+ export function alpha_render_microkinetic_population_chart(trace_json: string): string;
354
+
355
+ /**
356
+ * Pack a chart payload into the columnar transport format.
357
+ *
358
+ * @param chart_json JSON `ChartPayload`
359
+ * @returns JSON packed batch
360
+ */
361
+ export function alpha_render_pack_chart_payload(chart_json: string): string;
362
+
363
+ /**
364
+ * Build a periodic-DOS chart from a `PeriodicKpmDosResult` JSON payload.
365
+ *
366
+ * @param dos_json JSON `PeriodicKpmDosResult`
367
+ * @returns JSON chart payload
368
+ */
369
+ export function alpha_render_periodic_dos_chart(dos_json: string): string;
370
+
371
+ /**
372
+ * Verify a chart payload survives a pack/unpack round trip.
373
+ *
374
+ * @param chart_json JSON `ChartPayload`
375
+ * @param tol Comparison tolerance
376
+ * @returns `true` when the round trip is lossless within `tol`
377
+ */
378
+ export function alpha_render_verify_chart_round_trip(chart_json: string, tol: number): boolean;
379
+
380
+ /**
381
+ * Apply a CGA dihedral rotation to a sub-tree of atoms.
382
+ *
383
+ * `coords_flat_json` — flat [x0,y0,z0,...] for all atoms.
384
+ * `subtree_indices_json` — atom indices to rotate.
385
+ * `axis_a_json` / `axis_b_json` — the two atoms defining the rotation axis ([x,y,z]).
386
+ * `angle_rad` — rotation angle in radians.
387
+ *
388
+ * Returns JSON: `{ "coords": [x0,y0,z0,...] }`
389
+ */
390
+ export function alpha_rotate_dihedral_cga(coords_flat_json: string, subtree_indices_json: string, axis_a_json: string, axis_b_json: string, angle_rad: number): string;
391
+
392
+ /**
393
+ * Compute Schwarz pre-screening bound Q_ab = √〈ab|ab〉.
394
+ *
395
+ * Returns JSON: `{ "schwarz_bound": 0.8432 }`.
396
+ */
397
+ export function alpha_schwarz_bound(alpha: number, center_a_json: string, beta: number, center_b_json: string): string;
398
+
399
+ /**
400
+ * Embed a molecule from pairwise distance constraints using Semidefinite Relaxation.
401
+ *
402
+ * `distance_pairs_json` — array of `[[i, j, d_ij], ...]` where d_ij is in Å.
403
+ * `n_atoms` — total number of atoms.
404
+ * `config_json` — optional SdrConfig JSON or `{}` for defaults.
405
+ *
406
+ * Returns JSON `SdrResult`:
407
+ * ```json
408
+ * { "coords": [...], "residual": 0.001, "converged": true, "iterations": 45 }
409
+ * ```
410
+ */
411
+ export function alpha_sdr_embed(distance_pairs_json: string, n_atoms: number, config_json: string): string;
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+ module.exports = require('../sci_form_wasm.js');