sci-form-wasm 0.4.3 → 0.6.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/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.4.3",
5
+ "version": "0.6.1",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
@@ -1,6 +1,11 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
 
4
+ /**
5
+ * Analyze aromaticity and graph-level stereocenters from a SMILES string.
6
+ */
7
+ export function analyze_graph_features(smiles: string): string;
8
+
4
9
  /**
5
10
  * Assemble a framework crystal structure.
6
11
  *
@@ -12,6 +17,16 @@
12
17
  */
13
18
  export function assemble_framework(topology: string, metal: number, geometry: string, lattice_a: number, supercell: number): string;
14
19
 
20
+ /**
21
+ * Compare available methods on the same system/geometry.
22
+ */
23
+ export function compare_methods(smiles: string, elements: string, coords_flat: string, allow_experimental_eht: boolean): string;
24
+
25
+ /**
26
+ * Compute Wiberg-like and Mayer-like bond orders.
27
+ */
28
+ export function compute_bond_orders(elements: string, coords_flat: string): string;
29
+
15
30
  /**
16
31
  * Compute Gasteiger-Marsili partial charges from a SMILES string.
17
32
  *
@@ -29,6 +44,11 @@ export function compute_dipole(elements: string, coords_flat: string): string;
29
44
  */
30
45
  export function compute_dos(elements: string, coords_flat: string, sigma: number, e_min: number, e_max: number, n_points: number): string;
31
46
 
47
+ /**
48
+ * Estimate acidic/basic pKa sites from graph and charge heuristics.
49
+ */
50
+ export function compute_empirical_pka(smiles: string): string;
51
+
32
52
  /**
33
53
  * Get ESP grid metadata (origin, spacing, dimensions) as JSON.
34
54
  */
@@ -41,12 +61,101 @@ export function compute_esp_grid_info(elements: string, coords_flat: string, spa
41
61
  */
42
62
  export function compute_esp_grid_typed(elements: string, coords_flat: string, spacing: number, padding: number): Float64Array;
43
63
 
64
+ /**
65
+ * Compute atom-resolved HOMO/LUMO frontier descriptors.
66
+ */
67
+ export function compute_frontier_descriptors(elements: string, coords_flat: string): string;
68
+
69
+ /**
70
+ * Compute Fukui-function workflows and condensed per-atom descriptors.
71
+ */
72
+ export function compute_fukui_descriptors(elements: string, coords_flat: string): string;
73
+
74
+ /**
75
+ * Generate HOSE codes for all atoms in a molecule.
76
+ *
77
+ * `smiles`: SMILES string.
78
+ * `max_radius`: maximum number of spheres (typically 2–4).
79
+ *
80
+ * Returns: JSON array of HoseCode objects.
81
+ */
82
+ export function compute_hose_codes(smiles: string, max_radius: number): string;
83
+
84
+ /**
85
+ * Generate a Lorentzian-broadened IR spectrum from vibrational analysis JSON.
86
+ *
87
+ * `analysis_json`: JSON VibrationalAnalysis (from compute_vibrational_analysis).
88
+ * `gamma`: line width in cm⁻¹.
89
+ * `wn_min`, `wn_max`: wavenumber range in cm⁻¹.
90
+ * `n_points`: grid resolution.
91
+ *
92
+ * Returns: JSON IrSpectrum with wavenumbers, intensities, peaks.
93
+ */
94
+ export function compute_ir_spectrum(analysis_json: string, gamma: number, wn_min: number, wn_max: number, n_points: number): string;
95
+
96
+ /**
97
+ * Predict molecular properties using ML proxy models.
98
+ *
99
+ * `smiles`: SMILES string.
100
+ *
101
+ * Returns: JSON with logp, molar_refractivity, log_solubility,
102
+ * lipinski_violations, lipinski_passes, druglikeness.
103
+ */
104
+ export function compute_ml_properties(smiles: string): string;
105
+
106
+ /**
107
+ * Compute MMFF94 force field energy.
108
+ *
109
+ * `smiles`: SMILES string for bond topology.
110
+ * `coords`: JSON array of flat xyz coords [x0,y0,z0, ...] in Å.
111
+ *
112
+ * Returns: JSON `{"energy": <kcal/mol>}`
113
+ */
114
+ export function compute_mmff94_energy(smiles: string, coords: string): string;
115
+
116
+ /**
117
+ * Compute molecular descriptors from a SMILES string.
118
+ *
119
+ * Returns: JSON with molecular_weight, n_heavy_atoms, n_hbd, n_hba, fsp3,
120
+ * n_rotatable_bonds, n_rings, n_aromatic, wiener_index, etc.
121
+ */
122
+ export function compute_molecular_descriptors(smiles: string): string;
123
+
124
+ /**
125
+ * Generate a complete NMR spectrum from SMILES.
126
+ *
127
+ * `smiles`: SMILES string.
128
+ * `nucleus`: "1H" or "13C".
129
+ * `gamma`: Lorentzian line width in ppm.
130
+ * `ppm_min`, `ppm_max`: spectral window.
131
+ * `n_points`: grid resolution.
132
+ *
133
+ * Returns: JSON NmrSpectrum with ppm_axis, intensities, peaks.
134
+ */
135
+ export function compute_nmr_spectrum(smiles: string, nucleus: string, gamma: number, ppm_min: number, ppm_max: number, n_points: number): string;
136
+
137
+ /**
138
+ * Run a PM3 semi-empirical calculation.
139
+ *
140
+ * `elements_json`: JSON array of atomic numbers, e.g. `"[6,1,1,1,1]"`.
141
+ * `coords_flat_json`: JSON array of flat xyz coords [x0,y0,z0, ...] in Å.
142
+ *
143
+ * Returns: JSON Pm3Result with orbital_energies, total_energy, heat_of_formation,
144
+ * homo_energy, lumo_energy, gap, mulliken_charges, converged.
145
+ */
146
+ export function compute_pm3(elements_json: string, coords_flat_json: string): string;
147
+
44
148
  /**
45
149
  * Compute Mulliken & Löwdin population analysis.
46
150
  * Elements: JSON array of atomic numbers. Coords: JSON array of flat xyz.
47
151
  */
48
152
  export function compute_population(elements: string, coords_flat: string): string;
49
153
 
154
+ /**
155
+ * Build empirical local-reactivity rankings from Fukui descriptors and Mulliken charges.
156
+ */
157
+ export function compute_reactivity_ranking(elements: string, coords_flat: string): string;
158
+
50
159
  /**
51
160
  * Compute RMSD between two coordinate sets after Kabsch alignment.
52
161
  */
@@ -63,11 +172,64 @@ export function compute_rmsd(coords: string, reference: string): string;
63
172
  */
64
173
  export function compute_sasa(elements: string, coords_flat: string, probe_radius: number): string;
65
174
 
175
+ /**
176
+ * Compute an sTDA UV-Vis spectrum with proper oscillator strengths.
177
+ *
178
+ * `elements_json`: JSON array of atomic numbers.
179
+ * `coords_flat_json`: JSON array of flat xyz coords in Å.
180
+ * `sigma`: broadening width in eV.
181
+ * `e_min`, `e_max`: energy range in eV.
182
+ * `n_points`: grid resolution.
183
+ * `broadening`: "gaussian" or "lorentzian".
184
+ *
185
+ * Returns: JSON StdaUvVisSpectrum with energies_ev, wavelengths_nm,
186
+ * absorptivity, excitations, sigma, broadening.
187
+ */
188
+ export function compute_stda_uvvis(elements_json: string, coords_flat_json: string, sigma: number, e_min: number, e_max: number, n_points: number, broadening: string): string;
189
+
190
+ /**
191
+ * Detect metal coordination geometry and return structured topology outputs.
192
+ */
193
+ export function compute_topology(elements: string, coords_flat: string): string;
194
+
66
195
  /**
67
196
  * Compute UFF force field energy.
68
197
  */
69
198
  export function compute_uff_energy(smiles: string, coords: string): string;
70
199
 
200
+ /**
201
+ * Compute UFF energy with aromaticity-informed heuristic correction metadata.
202
+ */
203
+ export function compute_uff_energy_with_aromatic_heuristics(smiles: string, coords: string): string;
204
+
205
+ /**
206
+ * Build an exploratory UV-Vis-like spectrum from low-cost EHT transitions.
207
+ */
208
+ export function compute_uv_vis_spectrum(elements: string, coords_flat: string, sigma: number, e_min: number, e_max: number, n_points: number): string;
209
+
210
+ /**
211
+ * Perform vibrational analysis via numerical Hessian.
212
+ *
213
+ * `elements_json`: JSON array of atomic numbers.
214
+ * `coords_flat_json`: JSON array of flat xyz coords in Å.
215
+ * `method`: "eht", "pm3", or "xtb".
216
+ * `step_size`: finite-difference step in Å (0 = default 0.005).
217
+ *
218
+ * Returns: JSON VibrationalAnalysis with modes, frequencies, IR intensities, ZPVE.
219
+ */
220
+ export function compute_vibrational_analysis(elements_json: string, coords_flat_json: string, method: string, step_size: number): string;
221
+
222
+ /**
223
+ * Run an xTB tight-binding calculation.
224
+ *
225
+ * `elements_json`: JSON array of atomic numbers, e.g. `"[26,6,6]"`.
226
+ * `coords_flat_json`: JSON array of flat xyz coords [x0,y0,z0, ...] in Å.
227
+ *
228
+ * Returns: JSON XtbResult with orbital_energies, total_energy, gap,
229
+ * homo_energy, lumo_energy, mulliken_charges, converged.
230
+ */
231
+ export function compute_xtb(elements_json: string, coords_flat_json: string): string;
232
+
71
233
  /**
72
234
  * Create a unit cell and return parameters + volume as JSON.
73
235
  */
@@ -84,6 +246,11 @@ export function create_unit_cell(a: number, b: number, c: number, alpha: number,
84
246
  */
85
247
  export function eht_calculate(elements: string, coords_flat: string, k: number): string;
86
248
 
249
+ /**
250
+ * Run EHT or route to UFF fallback based on support/confidence.
251
+ */
252
+ export function eht_or_uff_fallback(smiles: string, elements: string, coords_flat: string, allow_experimental_eht: boolean): string;
253
+
87
254
  /**
88
255
  * Compute orbital grid from precomputed EHT coefficients as Float32Array.
89
256
  */
@@ -108,6 +275,11 @@ export function eht_orbital_grid_typed(elements: string, coords_flat: string, mo
108
275
  */
109
276
  export function eht_orbital_mesh(elements: string, coords_flat: string, mo_index: number, spacing: number, isovalue: number): string;
110
277
 
278
+ /**
279
+ * Query EHT support metadata from a JSON element array.
280
+ */
281
+ export function eht_support(elements: string): string;
282
+
111
283
  /**
112
284
  * Generate a 3D conformer from a SMILES string.
113
285
  *
@@ -156,6 +328,23 @@ export function pack_batch_arrow(results_json: string): string;
156
328
  */
157
329
  export function parse_smiles(smiles: string): string;
158
330
 
331
+ /**
332
+ * Predict J-coupling constants.
333
+ *
334
+ * `smiles`: SMILES string.
335
+ * `coords_flat_json`: JSON flat xyz coords (or "[]" for topological estimate).
336
+ *
337
+ * Returns: JSON array of JCoupling objects.
338
+ */
339
+ export function predict_nmr_couplings(smiles: string, coords_flat_json: string): string;
340
+
341
+ /**
342
+ * Predict ¹H and ¹³C NMR chemical shifts from SMILES (topology only).
343
+ *
344
+ * Returns: JSON NmrShiftResult with h_shifts, c_shifts arrays.
345
+ */
346
+ export function predict_nmr_shifts(smiles: string): string;
347
+
159
348
  /**
160
349
  * Split a batch of SMILES into worker tasks for Web Worker dispatch.
161
350
  *
@@ -164,6 +353,16 @@ export function parse_smiles(smiles: string): string;
164
353
  */
165
354
  export function split_worker_tasks(smiles_json: string, n_workers: number, seed: number): string;
166
355
 
356
+ /**
357
+ * Query operation capabilities from a JSON element array.
358
+ */
359
+ export function system_capabilities(elements: string): string;
360
+
361
+ /**
362
+ * Build a structured method plan from a JSON element array.
363
+ */
364
+ export function system_method_plan(elements: string): string;
365
+
167
366
  /**
168
367
  * Library version.
169
368
  */
@@ -189,24 +388,50 @@ export interface InitOutput {
189
388
  readonly eht_orbital_grid_typed: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
190
389
  readonly eht_orbital_grid_from_coefficients_typed: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
191
390
  readonly version: (a: number) => void;
391
+ readonly system_capabilities: (a: number, b: number, c: number) => void;
392
+ readonly system_method_plan: (a: number, b: number, c: number) => void;
393
+ readonly compare_methods: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
394
+ readonly eht_support: (a: number, b: number, c: number) => void;
192
395
  readonly embed: (a: number, b: number, c: number, d: number) => void;
193
396
  readonly embed_coords: (a: number, b: number, c: number, d: number) => void;
194
397
  readonly embed_batch: (a: number, b: number, c: number, d: number) => void;
195
398
  readonly parse_smiles: (a: number, b: number, c: number) => void;
196
399
  readonly eht_calculate: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
400
+ readonly eht_or_uff_fallback: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
197
401
  readonly eht_orbital_mesh: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
198
402
  readonly compute_charges: (a: number, b: number, c: number) => void;
199
403
  readonly compute_sasa: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
200
404
  readonly compute_population: (a: number, b: number, c: number, d: number, e: number) => void;
405
+ readonly compute_bond_orders: (a: number, b: number, c: number, d: number, e: number) => void;
406
+ readonly compute_frontier_descriptors: (a: number, b: number, c: number, d: number, e: number) => void;
407
+ readonly compute_fukui_descriptors: (a: number, b: number, c: number, d: number, e: number) => void;
408
+ readonly compute_reactivity_ranking: (a: number, b: number, c: number, d: number, e: number) => void;
409
+ readonly compute_uv_vis_spectrum: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
410
+ readonly analyze_graph_features: (a: number, b: number, c: number) => void;
411
+ readonly compute_topology: (a: number, b: number, c: number, d: number, e: number) => void;
201
412
  readonly compute_dipole: (a: number, b: number, c: number, d: number, e: number) => void;
202
413
  readonly compute_dos: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
203
414
  readonly compute_rmsd: (a: number, b: number, c: number, d: number, e: number) => void;
204
415
  readonly compute_uff_energy: (a: number, b: number, c: number, d: number, e: number) => void;
416
+ readonly compute_uff_energy_with_aromatic_heuristics: (a: number, b: number, c: number, d: number, e: number) => void;
417
+ readonly compute_empirical_pka: (a: number, b: number, c: number) => void;
205
418
  readonly create_unit_cell: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
206
419
  readonly assemble_framework: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
207
420
  readonly pack_batch_arrow: (a: number, b: number, c: number) => void;
208
421
  readonly split_worker_tasks: (a: number, b: number, c: number, d: number, e: number) => void;
209
422
  readonly estimate_workers: (a: number, b: number) => number;
423
+ readonly compute_mmff94_energy: (a: number, b: number, c: number, d: number, e: number) => void;
424
+ readonly compute_pm3: (a: number, b: number, c: number, d: number, e: number) => void;
425
+ readonly compute_xtb: (a: number, b: number, c: number, d: number, e: number) => void;
426
+ readonly compute_ml_properties: (a: number, b: number, c: number) => void;
427
+ readonly compute_molecular_descriptors: (a: number, b: number, c: number) => void;
428
+ 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;
429
+ readonly compute_vibrational_analysis: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
430
+ readonly compute_ir_spectrum: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
431
+ readonly predict_nmr_shifts: (a: number, b: number, c: number) => void;
432
+ readonly predict_nmr_couplings: (a: number, b: number, c: number, d: number, e: number) => void;
433
+ readonly compute_nmr_spectrum: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
434
+ readonly compute_hose_codes: (a: number, b: number, c: number, d: number) => void;
210
435
  readonly __wbg_wbg_rayon_poolbuilder_free: (a: number, b: number) => void;
211
436
  readonly wbg_rayon_poolbuilder_numThreads: (a: number) => number;
212
437
  readonly wbg_rayon_poolbuilder_receiver: (a: number) => number;