sci-form-wasm 0.11.2 → 0.12.4
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/alpha/index.d.ts +204 -0
- package/alpha/index.js +70 -0
- package/beta/index.d.ts +119 -0
- package/beta/index.js +46 -0
- package/package.json +19 -3
- package/sci_form_wasm.d.ts +412 -48
- package/sci_form_wasm.js +1005 -17
- package/sci_form_wasm_bg.wasm +0 -0
package/sci_form_wasm.js
CHANGED
|
@@ -1,6 +1,687 @@
|
|
|
1
1
|
/* @ts-self-types="./sci_form_wasm.d.ts" */
|
|
2
2
|
import { startWorkers } from './snippets/wasm-bindgen-rayon-38edf6e439f6d70d/src/workerHelpers.js';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Persistent live simulation state accessible from JavaScript.
|
|
6
|
+
*
|
|
7
|
+
* The browser creates one instance via `live_simulation_create`, then calls
|
|
8
|
+
* `live_simulation_step` and reads the flat coordinate buffer each
|
|
9
|
+
* animation frame.
|
|
10
|
+
*/
|
|
11
|
+
export class LiveSimulation {
|
|
12
|
+
__destroy_into_raw() {
|
|
13
|
+
const ptr = this.__wbg_ptr;
|
|
14
|
+
this.__wbg_ptr = 0;
|
|
15
|
+
LiveSimulationFinalization.unregister(this);
|
|
16
|
+
return ptr;
|
|
17
|
+
}
|
|
18
|
+
free() {
|
|
19
|
+
const ptr = this.__destroy_into_raw();
|
|
20
|
+
wasm.__wbg_livesimulation_free(ptr, 0);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Apply a harmonic steering force pulling atom `atom_index` toward `(tx, ty, tz)`.
|
|
24
|
+
* @param {number} atom_index
|
|
25
|
+
* @param {number} tx
|
|
26
|
+
* @param {number} ty
|
|
27
|
+
* @param {number} tz
|
|
28
|
+
* @param {number} spring_k
|
|
29
|
+
*/
|
|
30
|
+
apply_steering_force(atom_index, tx, ty, tz, spring_k) {
|
|
31
|
+
wasm.livesimulation_apply_steering_force(this.__wbg_ptr, atom_index, tx, ty, tz, spring_k);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Apply a Berendsen thermostat coupling towards `target_temp` K.
|
|
35
|
+
* @param {number} target_temp
|
|
36
|
+
* @param {number} tau_fs
|
|
37
|
+
* @param {number} dt_fs
|
|
38
|
+
*/
|
|
39
|
+
apply_thermostat(target_temp, tau_fs, dt_fs) {
|
|
40
|
+
wasm.livesimulation_apply_thermostat(this.__wbg_ptr, target_temp, tau_fs, dt_fs);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Clear all accumulated steering forces (call before next IMD frame).
|
|
44
|
+
*/
|
|
45
|
+
clear_steering() {
|
|
46
|
+
wasm.livesimulation_clear_steering(this.__wbg_ptr);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Return current kinetic energy.
|
|
50
|
+
* @returns {number}
|
|
51
|
+
*/
|
|
52
|
+
kinetic_energy() {
|
|
53
|
+
const ret = wasm.livesimulation_kinetic_energy(this.__wbg_ptr);
|
|
54
|
+
return ret;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Create a new live simulation from SMILES, flat coordinates, and backend name.
|
|
58
|
+
*
|
|
59
|
+
* `backend`: `"uff"` | `"pm3"` | `"xtb"`.
|
|
60
|
+
* @param {string} smiles
|
|
61
|
+
* @param {string} coords_flat
|
|
62
|
+
* @param {string} backend
|
|
63
|
+
*/
|
|
64
|
+
constructor(smiles, coords_flat, backend) {
|
|
65
|
+
try {
|
|
66
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
67
|
+
const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
68
|
+
const len0 = WASM_VECTOR_LEN;
|
|
69
|
+
const ptr1 = passStringToWasm0(coords_flat, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
70
|
+
const len1 = WASM_VECTOR_LEN;
|
|
71
|
+
const ptr2 = passStringToWasm0(backend, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
72
|
+
const len2 = WASM_VECTOR_LEN;
|
|
73
|
+
wasm.livesimulation_new(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
74
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
75
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
76
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
77
|
+
if (r2) {
|
|
78
|
+
throw takeObject(r1);
|
|
79
|
+
}
|
|
80
|
+
this.__wbg_ptr = r0 >>> 0;
|
|
81
|
+
LiveSimulationFinalization.register(this, this.__wbg_ptr, this);
|
|
82
|
+
return this;
|
|
83
|
+
} finally {
|
|
84
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Get the number of atoms.
|
|
89
|
+
* @returns {number}
|
|
90
|
+
*/
|
|
91
|
+
num_atoms() {
|
|
92
|
+
const ret = wasm.livesimulation_num_atoms(this.__wbg_ptr);
|
|
93
|
+
return ret >>> 0;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Return current flat positions as a JSON array.
|
|
97
|
+
* @returns {string}
|
|
98
|
+
*/
|
|
99
|
+
positions_json() {
|
|
100
|
+
let deferred1_0;
|
|
101
|
+
let deferred1_1;
|
|
102
|
+
try {
|
|
103
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
104
|
+
wasm.livesimulation_positions_json(retptr, this.__wbg_ptr);
|
|
105
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
106
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
107
|
+
deferred1_0 = r0;
|
|
108
|
+
deferred1_1 = r1;
|
|
109
|
+
return getStringFromWasm0(r0, r1);
|
|
110
|
+
} finally {
|
|
111
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
112
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Sync internal buffers and return a pointer to the flat positions array.
|
|
117
|
+
*
|
|
118
|
+
* The caller (JS side) can construct a `Float64Array` view over WASM memory
|
|
119
|
+
* at this pointer, with length = `num_atoms * 3`.
|
|
120
|
+
* @returns {number}
|
|
121
|
+
*/
|
|
122
|
+
positions_ptr() {
|
|
123
|
+
const ret = wasm.livesimulation_positions_ptr(this.__wbg_ptr);
|
|
124
|
+
return ret >>> 0;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Return current potential energy (from last force computation).
|
|
128
|
+
* @returns {number}
|
|
129
|
+
*/
|
|
130
|
+
potential_energy() {
|
|
131
|
+
const ret = wasm.livesimulation_potential_energy(this.__wbg_ptr);
|
|
132
|
+
return ret;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Set velocities from a Maxwell-Boltzmann distribution at `temperature` K.
|
|
136
|
+
* @param {number} temperature
|
|
137
|
+
* @param {bigint} seed
|
|
138
|
+
*/
|
|
139
|
+
set_temperature(temperature, seed) {
|
|
140
|
+
wasm.livesimulation_set_temperature(this.__wbg_ptr, temperature, seed);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Advance the simulation by `n_steps` with time step `dt_fs` (femtoseconds).
|
|
144
|
+
* @param {number} n_steps
|
|
145
|
+
* @param {number} dt_fs
|
|
146
|
+
*/
|
|
147
|
+
step(n_steps, dt_fs) {
|
|
148
|
+
wasm.livesimulation_step(this.__wbg_ptr, n_steps, dt_fs);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Return simulation step count.
|
|
152
|
+
* @returns {number}
|
|
153
|
+
*/
|
|
154
|
+
step_count() {
|
|
155
|
+
const ret = wasm.livesimulation_step_count(this.__wbg_ptr);
|
|
156
|
+
return ret >>> 0;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Return current kinetic temperature in Kelvin.
|
|
160
|
+
* @returns {number}
|
|
161
|
+
*/
|
|
162
|
+
temperature() {
|
|
163
|
+
const ret = wasm.livesimulation_temperature(this.__wbg_ptr);
|
|
164
|
+
return ret;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
if (Symbol.dispose) LiveSimulation.prototype[Symbol.dispose] = LiveSimulation.prototype.free;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Compute the Boys function F_n(x).
|
|
171
|
+
*
|
|
172
|
+
* Returns JSON: `{ "value": 0.9846 }`
|
|
173
|
+
* @param {number} n
|
|
174
|
+
* @param {number} x
|
|
175
|
+
* @returns {string}
|
|
176
|
+
*/
|
|
177
|
+
export function alpha_boys_function(n, x) {
|
|
178
|
+
let deferred1_0;
|
|
179
|
+
let deferred1_1;
|
|
180
|
+
try {
|
|
181
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
182
|
+
wasm.alpha_boys_function(retptr, n, x);
|
|
183
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
184
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
185
|
+
deferred1_0 = r0;
|
|
186
|
+
deferred1_1 = r1;
|
|
187
|
+
return getStringFromWasm0(r0, r1);
|
|
188
|
+
} finally {
|
|
189
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
190
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Compute Atomic Environment Vectors (AEVs) for each atom.
|
|
196
|
+
*
|
|
197
|
+
* Uses default symmetry function parameters unless `params_json` is provided.
|
|
198
|
+
*
|
|
199
|
+
* Returns JSON: `{ "n_atoms": 5, "aev_length": 384, "aevs": [[...], [...]] }`
|
|
200
|
+
* @param {string} elements_json
|
|
201
|
+
* @param {string} coords_flat_json
|
|
202
|
+
* @param {string} params_json
|
|
203
|
+
* @returns {string}
|
|
204
|
+
*/
|
|
205
|
+
export function alpha_compute_aevs(elements_json, coords_flat_json, params_json) {
|
|
206
|
+
let deferred4_0;
|
|
207
|
+
let deferred4_1;
|
|
208
|
+
try {
|
|
209
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
210
|
+
const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
211
|
+
const len0 = WASM_VECTOR_LEN;
|
|
212
|
+
const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
213
|
+
const len1 = WASM_VECTOR_LEN;
|
|
214
|
+
const ptr2 = passStringToWasm0(params_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
215
|
+
const len2 = WASM_VECTOR_LEN;
|
|
216
|
+
wasm.alpha_compute_aevs(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
217
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
218
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
219
|
+
deferred4_0 = r0;
|
|
220
|
+
deferred4_1 = r1;
|
|
221
|
+
return getStringFromWasm0(r0, r1);
|
|
222
|
+
} finally {
|
|
223
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
224
|
+
wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Run a Kohn-Sham DFT single-point calculation.
|
|
230
|
+
*
|
|
231
|
+
* `method`: `"svwn"` (LDA) | `"pbe"` (GGA, default).
|
|
232
|
+
*
|
|
233
|
+
* Returns JSON `DftResult`:
|
|
234
|
+
* ```json
|
|
235
|
+
* { "energy": -1.12, "homo_energy": -0.5, "lumo_energy": 0.1, "gap": 0.6,
|
|
236
|
+
* "converged": true, "n_basis": 5, "scf_iterations": 12,
|
|
237
|
+
* "mulliken_charges": [...], "orbital_energies": [...],
|
|
238
|
+
* "nuclear_repulsion": 0.72, "xc_energy": -0.3 }
|
|
239
|
+
* ```
|
|
240
|
+
* @param {string} elements_json
|
|
241
|
+
* @param {string} coords_flat_json
|
|
242
|
+
* @param {string} method
|
|
243
|
+
* @returns {string}
|
|
244
|
+
*/
|
|
245
|
+
export function alpha_compute_dft(elements_json, coords_flat_json, method) {
|
|
246
|
+
let deferred4_0;
|
|
247
|
+
let deferred4_1;
|
|
248
|
+
try {
|
|
249
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
250
|
+
const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
251
|
+
const len0 = WASM_VECTOR_LEN;
|
|
252
|
+
const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
253
|
+
const len1 = WASM_VECTOR_LEN;
|
|
254
|
+
const ptr2 = passStringToWasm0(method, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
255
|
+
const len2 = WASM_VECTOR_LEN;
|
|
256
|
+
wasm.alpha_compute_dft(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
257
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
258
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
259
|
+
deferred4_0 = r0;
|
|
260
|
+
deferred4_1 = r1;
|
|
261
|
+
return getStringFromWasm0(r0, r1);
|
|
262
|
+
} finally {
|
|
263
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
264
|
+
wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Solve EEM charges for a molecule using the ReaxFF charge model.
|
|
270
|
+
*
|
|
271
|
+
* Returns JSON: `{ "charges": [...], "total_charge": 0.0 }`
|
|
272
|
+
* @param {string} elements_json
|
|
273
|
+
* @param {string} coords_flat_json
|
|
274
|
+
* @returns {string}
|
|
275
|
+
*/
|
|
276
|
+
export function alpha_compute_eem_charges(elements_json, coords_flat_json) {
|
|
277
|
+
let deferred3_0;
|
|
278
|
+
let deferred3_1;
|
|
279
|
+
try {
|
|
280
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
281
|
+
const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
282
|
+
const len0 = WASM_VECTOR_LEN;
|
|
283
|
+
const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
284
|
+
const len1 = WASM_VECTOR_LEN;
|
|
285
|
+
wasm.alpha_compute_eem_charges(retptr, ptr0, len0, ptr1, len1);
|
|
286
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
287
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
288
|
+
deferred3_0 = r0;
|
|
289
|
+
deferred3_1 = r1;
|
|
290
|
+
return getStringFromWasm0(r0, r1);
|
|
291
|
+
} finally {
|
|
292
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
293
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Compute MLFF energy and forces using pre-configured element networks.
|
|
299
|
+
*
|
|
300
|
+
* `config_json` is a JSON object matching `MlffConfig`:
|
|
301
|
+
* ```json
|
|
302
|
+
* {
|
|
303
|
+
* "aev_params": { "radial_cutoff": 6.0, "angular_cutoff": 3.5, ... },
|
|
304
|
+
* "element_nets": {
|
|
305
|
+
* "1": { "layers": [[...weights...]], "biases": [[...]] },
|
|
306
|
+
* "6": { ... }
|
|
307
|
+
* }
|
|
308
|
+
* }
|
|
309
|
+
* ```
|
|
310
|
+
*
|
|
311
|
+
* Returns JSON: `{ "energy": -1.23, "atomic_energies": [...], "forces": [...] }`
|
|
312
|
+
* @param {string} elements_json
|
|
313
|
+
* @param {string} coords_flat_json
|
|
314
|
+
* @param {string} config_json
|
|
315
|
+
* @returns {string}
|
|
316
|
+
*/
|
|
317
|
+
export function alpha_compute_mlff(elements_json, coords_flat_json, config_json) {
|
|
318
|
+
let deferred4_0;
|
|
319
|
+
let deferred4_1;
|
|
320
|
+
try {
|
|
321
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
322
|
+
const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
323
|
+
const len0 = WASM_VECTOR_LEN;
|
|
324
|
+
const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
325
|
+
const len1 = WASM_VECTOR_LEN;
|
|
326
|
+
const ptr2 = passStringToWasm0(config_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
327
|
+
const len2 = WASM_VECTOR_LEN;
|
|
328
|
+
wasm.alpha_compute_mlff(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
329
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
330
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
331
|
+
deferred4_0 = r0;
|
|
332
|
+
deferred4_1 = r1;
|
|
333
|
+
return getStringFromWasm0(r0, r1);
|
|
334
|
+
} finally {
|
|
335
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
336
|
+
wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Compute ReaxFF energy components for a molecule (no gradient).
|
|
342
|
+
*
|
|
343
|
+
* Returns JSON with keys `bonded`, `coulomb`, `van_der_waals`, `total`.
|
|
344
|
+
* @param {string} elements_json
|
|
345
|
+
* @param {string} coords_flat_json
|
|
346
|
+
* @returns {string}
|
|
347
|
+
*/
|
|
348
|
+
export function alpha_compute_reaxff_energy(elements_json, coords_flat_json) {
|
|
349
|
+
let deferred3_0;
|
|
350
|
+
let deferred3_1;
|
|
351
|
+
try {
|
|
352
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
353
|
+
const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
354
|
+
const len0 = WASM_VECTOR_LEN;
|
|
355
|
+
const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
356
|
+
const len1 = WASM_VECTOR_LEN;
|
|
357
|
+
wasm.alpha_compute_reaxff_energy(retptr, ptr0, len0, ptr1, len1);
|
|
358
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
359
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
360
|
+
deferred3_0 = r0;
|
|
361
|
+
deferred3_1 = r1;
|
|
362
|
+
return getStringFromWasm0(r0, r1);
|
|
363
|
+
} finally {
|
|
364
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
365
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Compute ReaxFF energy and gradient for a molecule.
|
|
371
|
+
*
|
|
372
|
+
* Returns JSON:
|
|
373
|
+
* ```json
|
|
374
|
+
* { "energy_kcal_mol": 12.3,
|
|
375
|
+
* "gradient": [gx0, gy0, gz0, gx1, gy1, gz1, ...] }
|
|
376
|
+
* ```
|
|
377
|
+
* @param {string} elements_json
|
|
378
|
+
* @param {string} coords_flat_json
|
|
379
|
+
* @returns {string}
|
|
380
|
+
*/
|
|
381
|
+
export function alpha_compute_reaxff_gradient(elements_json, coords_flat_json) {
|
|
382
|
+
let deferred3_0;
|
|
383
|
+
let deferred3_1;
|
|
384
|
+
try {
|
|
385
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
386
|
+
const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
387
|
+
const len0 = WASM_VECTOR_LEN;
|
|
388
|
+
const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
389
|
+
const len1 = WASM_VECTOR_LEN;
|
|
390
|
+
wasm.alpha_compute_reaxff_gradient(retptr, ptr0, len0, ptr1, len1);
|
|
391
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
392
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
393
|
+
deferred3_0 = r0;
|
|
394
|
+
deferred3_1 = r1;
|
|
395
|
+
return getStringFromWasm0(r0, r1);
|
|
396
|
+
} finally {
|
|
397
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
398
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Compute a single (ss|ss) two-electron repulsion integral using Obara-Saika.
|
|
404
|
+
*
|
|
405
|
+
* `shell_a_json` / `shell_b_json` / `shell_c_json` / `shell_d_json` are JSON
|
|
406
|
+
* objects `{ "alpha": 1.0, "center": [x, y, z] }`.
|
|
407
|
+
*
|
|
408
|
+
* Returns JSON: `{ "eri": 4.37 }`
|
|
409
|
+
* @param {string} shell_a_json
|
|
410
|
+
* @param {string} shell_b_json
|
|
411
|
+
* @param {string} shell_c_json
|
|
412
|
+
* @param {string} shell_d_json
|
|
413
|
+
* @returns {string}
|
|
414
|
+
*/
|
|
415
|
+
export function alpha_eri_ssss(shell_a_json, shell_b_json, shell_c_json, shell_d_json) {
|
|
416
|
+
let deferred5_0;
|
|
417
|
+
let deferred5_1;
|
|
418
|
+
try {
|
|
419
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
420
|
+
const ptr0 = passStringToWasm0(shell_a_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
421
|
+
const len0 = WASM_VECTOR_LEN;
|
|
422
|
+
const ptr1 = passStringToWasm0(shell_b_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
423
|
+
const len1 = WASM_VECTOR_LEN;
|
|
424
|
+
const ptr2 = passStringToWasm0(shell_c_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
425
|
+
const len2 = WASM_VECTOR_LEN;
|
|
426
|
+
const ptr3 = passStringToWasm0(shell_d_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
427
|
+
const len3 = WASM_VECTOR_LEN;
|
|
428
|
+
wasm.alpha_eri_ssss(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
429
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
430
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
431
|
+
deferred5_0 = r0;
|
|
432
|
+
deferred5_1 = r1;
|
|
433
|
+
return getStringFromWasm0(r0, r1);
|
|
434
|
+
} finally {
|
|
435
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
436
|
+
wasm.__wbindgen_export4(deferred5_0, deferred5_1, 1);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Grow the reaction string and find the transition state node between
|
|
442
|
+
* reactant and product geometries using UFF energy.
|
|
443
|
+
*
|
|
444
|
+
* Returns JSON `GsmResult`:
|
|
445
|
+
* ```json
|
|
446
|
+
* { "ts_coords": [...], "ts_energy": 12.3,
|
|
447
|
+
* "path_energies": [...], "n_nodes": 5, "converged": true }
|
|
448
|
+
* ```
|
|
449
|
+
* @param {string} smiles
|
|
450
|
+
* @param {string} reactant_coords_json
|
|
451
|
+
* @param {string} product_coords_json
|
|
452
|
+
* @param {string} config_json
|
|
453
|
+
* @returns {string}
|
|
454
|
+
*/
|
|
455
|
+
export function alpha_gsm_find_ts(smiles, reactant_coords_json, product_coords_json, config_json) {
|
|
456
|
+
let deferred5_0;
|
|
457
|
+
let deferred5_1;
|
|
458
|
+
try {
|
|
459
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
460
|
+
const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
461
|
+
const len0 = WASM_VECTOR_LEN;
|
|
462
|
+
const ptr1 = passStringToWasm0(reactant_coords_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
463
|
+
const len1 = WASM_VECTOR_LEN;
|
|
464
|
+
const ptr2 = passStringToWasm0(product_coords_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
465
|
+
const len2 = WASM_VECTOR_LEN;
|
|
466
|
+
const ptr3 = passStringToWasm0(config_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
467
|
+
const len3 = WASM_VECTOR_LEN;
|
|
468
|
+
wasm.alpha_gsm_find_ts(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
469
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
470
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
471
|
+
deferred5_0 = r0;
|
|
472
|
+
deferred5_1 = r1;
|
|
473
|
+
return getStringFromWasm0(r0, r1);
|
|
474
|
+
} finally {
|
|
475
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
476
|
+
wasm.__wbindgen_export4(deferred5_0, deferred5_1, 1);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* Interpolate a node along the reaction path at parameter t ∈ [0, 1].
|
|
482
|
+
*
|
|
483
|
+
* `reactant_json` / `product_json` — flat coordinate arrays.
|
|
484
|
+
*
|
|
485
|
+
* Returns JSON: `{ "coords": [...] }`
|
|
486
|
+
* @param {string} reactant_json
|
|
487
|
+
* @param {string} product_json
|
|
488
|
+
* @param {number} t
|
|
489
|
+
* @returns {string}
|
|
490
|
+
*/
|
|
491
|
+
export function alpha_gsm_interpolate(reactant_json, product_json, t) {
|
|
492
|
+
let deferred3_0;
|
|
493
|
+
let deferred3_1;
|
|
494
|
+
try {
|
|
495
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
496
|
+
const ptr0 = passStringToWasm0(reactant_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
497
|
+
const len0 = WASM_VECTOR_LEN;
|
|
498
|
+
const ptr1 = passStringToWasm0(product_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
499
|
+
const len1 = WASM_VECTOR_LEN;
|
|
500
|
+
wasm.alpha_gsm_interpolate(retptr, ptr0, len0, ptr1, len1, t);
|
|
501
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
502
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
503
|
+
deferred3_0 = r0;
|
|
504
|
+
deferred3_1 = r1;
|
|
505
|
+
return getStringFromWasm0(r0, r1);
|
|
506
|
+
} finally {
|
|
507
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
508
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Return alpha module metadata.
|
|
514
|
+
*
|
|
515
|
+
* Returns JSON: `{ "alpha_modules": ["dft", "reaxff", "mlff", "obara-saika",
|
|
516
|
+
* "cga", "gsm", "sdr", "dynamics-live"] }`
|
|
517
|
+
* @returns {string}
|
|
518
|
+
*/
|
|
519
|
+
export function alpha_modules_info() {
|
|
520
|
+
let deferred1_0;
|
|
521
|
+
let deferred1_1;
|
|
522
|
+
try {
|
|
523
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
524
|
+
wasm.alpha_modules_info(retptr);
|
|
525
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
526
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
527
|
+
deferred1_0 = r0;
|
|
528
|
+
deferred1_1 = r1;
|
|
529
|
+
return getStringFromWasm0(r0, r1);
|
|
530
|
+
} finally {
|
|
531
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
532
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* Refine a single dihedral torsion to a target angle using CGA.
|
|
538
|
+
*
|
|
539
|
+
* `smiles` — SMILES string for bond connectivity.
|
|
540
|
+
* `torsion_indices_json` — 4 atom indices [i, j, k, l].
|
|
541
|
+
* `target_angle_rad` — target dihedral angle in radians.
|
|
542
|
+
*
|
|
543
|
+
* Returns JSON: `{ "coords": [...] }`
|
|
544
|
+
* @param {string} elements_json
|
|
545
|
+
* @param {string} coords_flat_json
|
|
546
|
+
* @param {string} smiles
|
|
547
|
+
* @param {string} torsion_indices_json
|
|
548
|
+
* @param {number} target_angle_rad
|
|
549
|
+
* @returns {string}
|
|
550
|
+
*/
|
|
551
|
+
export function alpha_refine_torsion_cga(elements_json, coords_flat_json, smiles, torsion_indices_json, target_angle_rad) {
|
|
552
|
+
let deferred5_0;
|
|
553
|
+
let deferred5_1;
|
|
554
|
+
try {
|
|
555
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
556
|
+
const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
557
|
+
const len0 = WASM_VECTOR_LEN;
|
|
558
|
+
const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
559
|
+
const len1 = WASM_VECTOR_LEN;
|
|
560
|
+
const ptr2 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
561
|
+
const len2 = WASM_VECTOR_LEN;
|
|
562
|
+
const ptr3 = passStringToWasm0(torsion_indices_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
563
|
+
const len3 = WASM_VECTOR_LEN;
|
|
564
|
+
wasm.alpha_refine_torsion_cga(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, target_angle_rad);
|
|
565
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
566
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
567
|
+
deferred5_0 = r0;
|
|
568
|
+
deferred5_1 = r1;
|
|
569
|
+
return getStringFromWasm0(r0, r1);
|
|
570
|
+
} finally {
|
|
571
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
572
|
+
wasm.__wbindgen_export4(deferred5_0, deferred5_1, 1);
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Apply a CGA dihedral rotation to a sub-tree of atoms.
|
|
578
|
+
*
|
|
579
|
+
* `coords_flat_json` — flat [x0,y0,z0,...] for all atoms.
|
|
580
|
+
* `subtree_indices_json` — atom indices to rotate.
|
|
581
|
+
* `axis_a_json` / `axis_b_json` — the two atoms defining the rotation axis ([x,y,z]).
|
|
582
|
+
* `angle_rad` — rotation angle in radians.
|
|
583
|
+
*
|
|
584
|
+
* Returns JSON: `{ "coords": [x0,y0,z0,...] }`
|
|
585
|
+
* @param {string} coords_flat_json
|
|
586
|
+
* @param {string} subtree_indices_json
|
|
587
|
+
* @param {string} axis_a_json
|
|
588
|
+
* @param {string} axis_b_json
|
|
589
|
+
* @param {number} angle_rad
|
|
590
|
+
* @returns {string}
|
|
591
|
+
*/
|
|
592
|
+
export function alpha_rotate_dihedral_cga(coords_flat_json, subtree_indices_json, axis_a_json, axis_b_json, angle_rad) {
|
|
593
|
+
let deferred5_0;
|
|
594
|
+
let deferred5_1;
|
|
595
|
+
try {
|
|
596
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
597
|
+
const ptr0 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
598
|
+
const len0 = WASM_VECTOR_LEN;
|
|
599
|
+
const ptr1 = passStringToWasm0(subtree_indices_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
600
|
+
const len1 = WASM_VECTOR_LEN;
|
|
601
|
+
const ptr2 = passStringToWasm0(axis_a_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
602
|
+
const len2 = WASM_VECTOR_LEN;
|
|
603
|
+
const ptr3 = passStringToWasm0(axis_b_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
604
|
+
const len3 = WASM_VECTOR_LEN;
|
|
605
|
+
wasm.alpha_rotate_dihedral_cga(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, angle_rad);
|
|
606
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
607
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
608
|
+
deferred5_0 = r0;
|
|
609
|
+
deferred5_1 = r1;
|
|
610
|
+
return getStringFromWasm0(r0, r1);
|
|
611
|
+
} finally {
|
|
612
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
613
|
+
wasm.__wbindgen_export4(deferred5_0, deferred5_1, 1);
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* Compute Schwarz pre-screening bound Q_ab = √〈ab|ab〉.
|
|
619
|
+
*
|
|
620
|
+
* Returns JSON: `{ "schwarz_bound": 0.8432 }`.
|
|
621
|
+
* @param {number} alpha
|
|
622
|
+
* @param {string} center_a_json
|
|
623
|
+
* @param {number} beta
|
|
624
|
+
* @param {string} center_b_json
|
|
625
|
+
* @returns {string}
|
|
626
|
+
*/
|
|
627
|
+
export function alpha_schwarz_bound(alpha, center_a_json, beta, center_b_json) {
|
|
628
|
+
let deferred3_0;
|
|
629
|
+
let deferred3_1;
|
|
630
|
+
try {
|
|
631
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
632
|
+
const ptr0 = passStringToWasm0(center_a_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
633
|
+
const len0 = WASM_VECTOR_LEN;
|
|
634
|
+
const ptr1 = passStringToWasm0(center_b_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
635
|
+
const len1 = WASM_VECTOR_LEN;
|
|
636
|
+
wasm.alpha_schwarz_bound(retptr, alpha, ptr0, len0, beta, ptr1, len1);
|
|
637
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
638
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
639
|
+
deferred3_0 = r0;
|
|
640
|
+
deferred3_1 = r1;
|
|
641
|
+
return getStringFromWasm0(r0, r1);
|
|
642
|
+
} finally {
|
|
643
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
644
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* Embed a molecule from pairwise distance constraints using Semidefinite Relaxation.
|
|
650
|
+
*
|
|
651
|
+
* `distance_pairs_json` — array of `[[i, j, d_ij], ...]` where d_ij is in Å.
|
|
652
|
+
* `n_atoms` — total number of atoms.
|
|
653
|
+
* `config_json` — optional SdrConfig JSON or `{}` for defaults.
|
|
654
|
+
*
|
|
655
|
+
* Returns JSON `SdrResult`:
|
|
656
|
+
* ```json
|
|
657
|
+
* { "coords": [...], "residual": 0.001, "converged": true, "iterations": 45 }
|
|
658
|
+
* ```
|
|
659
|
+
* @param {string} distance_pairs_json
|
|
660
|
+
* @param {number} n_atoms
|
|
661
|
+
* @param {string} config_json
|
|
662
|
+
* @returns {string}
|
|
663
|
+
*/
|
|
664
|
+
export function alpha_sdr_embed(distance_pairs_json, n_atoms, config_json) {
|
|
665
|
+
let deferred3_0;
|
|
666
|
+
let deferred3_1;
|
|
667
|
+
try {
|
|
668
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
669
|
+
const ptr0 = passStringToWasm0(distance_pairs_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
670
|
+
const len0 = WASM_VECTOR_LEN;
|
|
671
|
+
const ptr1 = passStringToWasm0(config_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
672
|
+
const len1 = WASM_VECTOR_LEN;
|
|
673
|
+
wasm.alpha_sdr_embed(retptr, ptr0, len0, n_atoms, ptr1, len1);
|
|
674
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
675
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
676
|
+
deferred3_0 = r0;
|
|
677
|
+
deferred3_1 = r1;
|
|
678
|
+
return getStringFromWasm0(r0, r1);
|
|
679
|
+
} finally {
|
|
680
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
681
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
|
|
4
685
|
/**
|
|
5
686
|
* Analyze aromaticity and graph-level stereocenters from SMILES.
|
|
6
687
|
* @param {string} smiles
|
|
@@ -91,6 +772,277 @@ export function assemble_framework(topology, metal, geometry, lattice_a, superce
|
|
|
91
772
|
}
|
|
92
773
|
}
|
|
93
774
|
|
|
775
|
+
/**
|
|
776
|
+
* Compute constant-potential charges using the CPM model.
|
|
777
|
+
*
|
|
778
|
+
* `potential` — target electrode potential in eV.
|
|
779
|
+
*
|
|
780
|
+
* Returns JSON: `{ "charges": [...], "total_charge": 0.5, "energy": -1.2 }`
|
|
781
|
+
* @param {string} elements_json
|
|
782
|
+
* @param {string} coords_flat_json
|
|
783
|
+
* @param {number} potential
|
|
784
|
+
* @returns {string}
|
|
785
|
+
*/
|
|
786
|
+
export function beta_compute_cpm_charges(elements_json, coords_flat_json, potential) {
|
|
787
|
+
let deferred3_0;
|
|
788
|
+
let deferred3_1;
|
|
789
|
+
try {
|
|
790
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
791
|
+
const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
792
|
+
const len0 = WASM_VECTOR_LEN;
|
|
793
|
+
const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
794
|
+
const len1 = WASM_VECTOR_LEN;
|
|
795
|
+
wasm.beta_compute_cpm_charges(retptr, ptr0, len0, ptr1, len1, potential);
|
|
796
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
797
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
798
|
+
deferred3_0 = r0;
|
|
799
|
+
deferred3_1 = r1;
|
|
800
|
+
return getStringFromWasm0(r0, r1);
|
|
801
|
+
} finally {
|
|
802
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
803
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* Compute EHT Density of States using the Kernel Polynomial Method (O(N)).
|
|
809
|
+
*
|
|
810
|
+
* Builds the EHT Hamiltonian internally from geometry, then runs KPM.
|
|
811
|
+
*
|
|
812
|
+
* `config_json` fields (all optional):
|
|
813
|
+
* - `order` (int, default 100): Chebyshev expansion order
|
|
814
|
+
* - `n_points` (int, default 200): Energy grid points
|
|
815
|
+
* - `e_min` (float): Override spectral minimum
|
|
816
|
+
* - `e_max` (float): Override spectral maximum
|
|
817
|
+
* - `temperature` (float, default 0): Electronic temperature in K
|
|
818
|
+
*
|
|
819
|
+
* Returns JSON `KpmDosResult`:
|
|
820
|
+
* ```json
|
|
821
|
+
* { "energies": [...], "total_dos": [...], "e_min": -30.0, "e_max": 5.0,
|
|
822
|
+
* "order": 100 }
|
|
823
|
+
* ```
|
|
824
|
+
* @param {string} elements_json
|
|
825
|
+
* @param {string} coords_flat_json
|
|
826
|
+
* @param {string} config_json
|
|
827
|
+
* @returns {string}
|
|
828
|
+
*/
|
|
829
|
+
export function beta_compute_kpm_dos(elements_json, coords_flat_json, config_json) {
|
|
830
|
+
let deferred4_0;
|
|
831
|
+
let deferred4_1;
|
|
832
|
+
try {
|
|
833
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
834
|
+
const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
835
|
+
const len0 = WASM_VECTOR_LEN;
|
|
836
|
+
const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
837
|
+
const len1 = WASM_VECTOR_LEN;
|
|
838
|
+
const ptr2 = passStringToWasm0(config_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
839
|
+
const len2 = WASM_VECTOR_LEN;
|
|
840
|
+
wasm.beta_compute_kpm_dos(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
841
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
842
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
843
|
+
deferred4_0 = r0;
|
|
844
|
+
deferred4_1 = r1;
|
|
845
|
+
return getStringFromWasm0(r0, r1);
|
|
846
|
+
} finally {
|
|
847
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
848
|
+
wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* Compute EHT Mulliken populations using KPM (O(N) stochastic trace).
|
|
854
|
+
*
|
|
855
|
+
* Returns JSON: `{ "mulliken_charges": [...], "orbital_populations": [...] }`
|
|
856
|
+
* @param {string} elements_json
|
|
857
|
+
* @param {string} coords_flat_json
|
|
858
|
+
* @returns {string}
|
|
859
|
+
*/
|
|
860
|
+
export function beta_compute_kpm_mulliken(elements_json, coords_flat_json) {
|
|
861
|
+
let deferred3_0;
|
|
862
|
+
let deferred3_1;
|
|
863
|
+
try {
|
|
864
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
865
|
+
const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
866
|
+
const len0 = WASM_VECTOR_LEN;
|
|
867
|
+
const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
868
|
+
const len1 = WASM_VECTOR_LEN;
|
|
869
|
+
wasm.beta_compute_kpm_mulliken(retptr, ptr0, len0, ptr1, len1);
|
|
870
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
871
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
872
|
+
deferred3_0 = r0;
|
|
873
|
+
deferred3_1 = r1;
|
|
874
|
+
return getStringFromWasm0(r0, r1);
|
|
875
|
+
} finally {
|
|
876
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
877
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
/**
|
|
882
|
+
* Compute vibrational frequencies using Mobile Block Hessian (reduced DOF).
|
|
883
|
+
*
|
|
884
|
+
* Uses UFF as the energy evaluator internally.
|
|
885
|
+
*
|
|
886
|
+
* Returns JSON `MbhResult`:
|
|
887
|
+
* ```json
|
|
888
|
+
* { "frequencies": [...], "n_blocks": 3, "n_flexible": 2,
|
|
889
|
+
* "n_dof_reduced": 12, "n_dof_full": 24, "speedup": 2.0 }
|
|
890
|
+
* ```
|
|
891
|
+
* @param {string} elements_json
|
|
892
|
+
* @param {string} coords_flat_json
|
|
893
|
+
* @param {string} smiles
|
|
894
|
+
* @returns {string}
|
|
895
|
+
*/
|
|
896
|
+
export function beta_compute_mbh_frequencies(elements_json, coords_flat_json, smiles) {
|
|
897
|
+
let deferred4_0;
|
|
898
|
+
let deferred4_1;
|
|
899
|
+
try {
|
|
900
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
901
|
+
const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
902
|
+
const len0 = WASM_VECTOR_LEN;
|
|
903
|
+
const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
904
|
+
const len1 = WASM_VECTOR_LEN;
|
|
905
|
+
const ptr2 = passStringToWasm0(smiles, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
906
|
+
const len2 = WASM_VECTOR_LEN;
|
|
907
|
+
wasm.beta_compute_mbh_frequencies(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
908
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
909
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
910
|
+
deferred4_0 = r0;
|
|
911
|
+
deferred4_1 = r1;
|
|
912
|
+
return getStringFromWasm0(r0, r1);
|
|
913
|
+
} finally {
|
|
914
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
915
|
+
wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* Return beta module metadata.
|
|
921
|
+
*
|
|
922
|
+
* Returns JSON: `{ "beta_modules": ["kpm", "mbh", "randnla", "riemannian", "cpm"] }`
|
|
923
|
+
* @returns {string}
|
|
924
|
+
*/
|
|
925
|
+
export function beta_modules_info() {
|
|
926
|
+
let deferred1_0;
|
|
927
|
+
let deferred1_1;
|
|
928
|
+
try {
|
|
929
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
930
|
+
wasm.beta_modules_info(retptr);
|
|
931
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
932
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
933
|
+
deferred1_0 = r0;
|
|
934
|
+
deferred1_1 = r1;
|
|
935
|
+
return getStringFromWasm0(r0, r1);
|
|
936
|
+
} finally {
|
|
937
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
938
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* Compute Riemannian distance between two PSD matrices.
|
|
944
|
+
*
|
|
945
|
+
* `matrix_a_json` / `matrix_b_json` — flat row-major arrays with `dim` dimension.
|
|
946
|
+
*
|
|
947
|
+
* Returns JSON: `{ "distance": 0.12 }`
|
|
948
|
+
* @param {string} matrix_a_json
|
|
949
|
+
* @param {string} matrix_b_json
|
|
950
|
+
* @param {number} dim
|
|
951
|
+
* @returns {string}
|
|
952
|
+
*/
|
|
953
|
+
export function beta_psd_distance(matrix_a_json, matrix_b_json, dim) {
|
|
954
|
+
let deferred3_0;
|
|
955
|
+
let deferred3_1;
|
|
956
|
+
try {
|
|
957
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
958
|
+
const ptr0 = passStringToWasm0(matrix_a_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
959
|
+
const len0 = WASM_VECTOR_LEN;
|
|
960
|
+
const ptr1 = passStringToWasm0(matrix_b_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
961
|
+
const len1 = WASM_VECTOR_LEN;
|
|
962
|
+
wasm.beta_psd_distance(retptr, ptr0, len0, ptr1, len1, dim);
|
|
963
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
964
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
965
|
+
deferred3_0 = r0;
|
|
966
|
+
deferred3_1 = r1;
|
|
967
|
+
return getStringFromWasm0(r0, r1);
|
|
968
|
+
} finally {
|
|
969
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
970
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* Project a symmetric matrix onto the PSD (positive semidefinite) cone.
|
|
976
|
+
*
|
|
977
|
+
* `matrix_json` — flat row-major array with `dim` dimension.
|
|
978
|
+
*
|
|
979
|
+
* Returns JSON: `{ "matrix": [...flat psd projection...], "was_psd": false }`
|
|
980
|
+
* @param {string} matrix_json
|
|
981
|
+
* @param {number} dim
|
|
982
|
+
* @returns {string}
|
|
983
|
+
*/
|
|
984
|
+
export function beta_psd_projection(matrix_json, dim) {
|
|
985
|
+
let deferred2_0;
|
|
986
|
+
let deferred2_1;
|
|
987
|
+
try {
|
|
988
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
989
|
+
const ptr0 = passStringToWasm0(matrix_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
990
|
+
const len0 = WASM_VECTOR_LEN;
|
|
991
|
+
wasm.beta_psd_projection(retptr, ptr0, len0, dim);
|
|
992
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
993
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
994
|
+
deferred2_0 = r0;
|
|
995
|
+
deferred2_1 = r1;
|
|
996
|
+
return getStringFromWasm0(r0, r1);
|
|
997
|
+
} finally {
|
|
998
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
999
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
/**
|
|
1004
|
+
* Solve EHT with a randomized Nyström eigensolver instead of O(N³) exact diag.
|
|
1005
|
+
*
|
|
1006
|
+
* `config_json` fields (all optional):
|
|
1007
|
+
* - `sketch_size` (int): Nyström rank k. Default: √N
|
|
1008
|
+
* - `seed` (int, default 42)
|
|
1009
|
+
* - `max_error` (float, default 0.001): Max relative residual before fallback
|
|
1010
|
+
* - `fallback_enabled` (bool, default true)
|
|
1011
|
+
*
|
|
1012
|
+
* Returns JSON:
|
|
1013
|
+
* ```json
|
|
1014
|
+
* { "orbital_energies": [...], "homo_index": 4, "homo_energy": -0.5,
|
|
1015
|
+
* "lumo_energy": 0.1, "gap": 0.6,
|
|
1016
|
+
* "k": 12, "residual_error": 0.0003, "used_fallback": false }
|
|
1017
|
+
* ```
|
|
1018
|
+
* @param {string} elements_json
|
|
1019
|
+
* @param {string} coords_flat_json
|
|
1020
|
+
* @param {string} config_json
|
|
1021
|
+
* @returns {string}
|
|
1022
|
+
*/
|
|
1023
|
+
export function beta_solve_eht_randnla(elements_json, coords_flat_json, config_json) {
|
|
1024
|
+
let deferred4_0;
|
|
1025
|
+
let deferred4_1;
|
|
1026
|
+
try {
|
|
1027
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1028
|
+
const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1029
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1030
|
+
const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1031
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1032
|
+
const ptr2 = passStringToWasm0(config_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1033
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1034
|
+
wasm.beta_solve_eht_randnla(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1035
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1036
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1037
|
+
deferred4_0 = r0;
|
|
1038
|
+
deferred4_1 = r1;
|
|
1039
|
+
return getStringFromWasm0(r0, r1);
|
|
1040
|
+
} finally {
|
|
1041
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1042
|
+
wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
|
|
94
1046
|
/**
|
|
95
1047
|
* Butina clustering on conformers (flat coordinate arrays in JSON).
|
|
96
1048
|
*
|
|
@@ -228,6 +1180,39 @@ export function compute_charges(smiles) {
|
|
|
228
1180
|
}
|
|
229
1181
|
}
|
|
230
1182
|
|
|
1183
|
+
/**
|
|
1184
|
+
* **ALPHA** — Run Kohn-Sham DFT calculation.
|
|
1185
|
+
*
|
|
1186
|
+
* `method`: `"svwn"` (LDA) or `"pbe"` (GGA).
|
|
1187
|
+
* Returns JSON DftResult with energy, orbital energies, gap, Mulliken charges.
|
|
1188
|
+
* @param {string} elements_json
|
|
1189
|
+
* @param {string} coords_flat_json
|
|
1190
|
+
* @param {string} method
|
|
1191
|
+
* @returns {string}
|
|
1192
|
+
*/
|
|
1193
|
+
export function compute_dft(elements_json, coords_flat_json, method) {
|
|
1194
|
+
let deferred4_0;
|
|
1195
|
+
let deferred4_1;
|
|
1196
|
+
try {
|
|
1197
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1198
|
+
const ptr0 = passStringToWasm0(elements_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1199
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1200
|
+
const ptr1 = passStringToWasm0(coords_flat_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1201
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1202
|
+
const ptr2 = passStringToWasm0(method, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1203
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1204
|
+
wasm.compute_dft(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1205
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1206
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1207
|
+
deferred4_0 = r0;
|
|
1208
|
+
deferred4_1 = r1;
|
|
1209
|
+
return getStringFromWasm0(r0, r1);
|
|
1210
|
+
} finally {
|
|
1211
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1212
|
+
wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
|
|
231
1216
|
/**
|
|
232
1217
|
* Compute molecular dipole moment.
|
|
233
1218
|
* @param {string} elements
|
|
@@ -2594,7 +3579,7 @@ function __wbg_get_imports(memory) {
|
|
|
2594
3579
|
const a = state0.a;
|
|
2595
3580
|
state0.a = 0;
|
|
2596
3581
|
try {
|
|
2597
|
-
return
|
|
3582
|
+
return __wasm_bindgen_func_elem_737(a, state0.b, arg0, arg1);
|
|
2598
3583
|
} finally {
|
|
2599
3584
|
state0.a = a;
|
|
2600
3585
|
}
|
|
@@ -2612,7 +3597,7 @@ function __wbg_get_imports(memory) {
|
|
|
2612
3597
|
const a = state0.a;
|
|
2613
3598
|
state0.a = 0;
|
|
2614
3599
|
try {
|
|
2615
|
-
return
|
|
3600
|
+
return __wasm_bindgen_func_elem_737(a, state0.b, arg0, arg1);
|
|
2616
3601
|
} finally {
|
|
2617
3602
|
state0.a = a;
|
|
2618
3603
|
}
|
|
@@ -2898,18 +3883,18 @@ function __wbg_get_imports(memory) {
|
|
|
2898
3883
|
return addHeapObject(ret);
|
|
2899
3884
|
},
|
|
2900
3885
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
2901
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
2902
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3886
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 125, function: Function { arguments: [Externref], shim_idx: 126, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3887
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_2813, __wasm_bindgen_func_elem_2819);
|
|
2903
3888
|
return addHeapObject(ret);
|
|
2904
3889
|
},
|
|
2905
3890
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
2906
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
2907
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3891
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 125, function: Function { arguments: [Externref], shim_idx: 36, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3892
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_2813, __wasm_bindgen_func_elem_823);
|
|
2908
3893
|
return addHeapObject(ret);
|
|
2909
3894
|
},
|
|
2910
3895
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
2911
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
2912
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3896
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 125, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 126, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3897
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_2813, __wasm_bindgen_func_elem_2819_2);
|
|
2913
3898
|
return addHeapObject(ret);
|
|
2914
3899
|
},
|
|
2915
3900
|
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
@@ -2948,7 +3933,7 @@ function __wbg_get_imports(memory) {
|
|
|
2948
3933
|
__wbindgen_object_drop_ref: function(arg0) {
|
|
2949
3934
|
takeObject(arg0);
|
|
2950
3935
|
},
|
|
2951
|
-
memory: memory || new WebAssembly.Memory({initial:
|
|
3936
|
+
memory: memory || new WebAssembly.Memory({initial:22,maximum:16384,shared:true}),
|
|
2952
3937
|
};
|
|
2953
3938
|
return {
|
|
2954
3939
|
__proto__: null,
|
|
@@ -2956,18 +3941,18 @@ function __wbg_get_imports(memory) {
|
|
|
2956
3941
|
};
|
|
2957
3942
|
}
|
|
2958
3943
|
|
|
2959
|
-
function
|
|
2960
|
-
wasm.
|
|
3944
|
+
function __wasm_bindgen_func_elem_2819(arg0, arg1, arg2) {
|
|
3945
|
+
wasm.__wasm_bindgen_func_elem_2819(arg0, arg1, addHeapObject(arg2));
|
|
2961
3946
|
}
|
|
2962
3947
|
|
|
2963
|
-
function
|
|
2964
|
-
wasm.
|
|
3948
|
+
function __wasm_bindgen_func_elem_2819_2(arg0, arg1, arg2) {
|
|
3949
|
+
wasm.__wasm_bindgen_func_elem_2819_2(arg0, arg1, addHeapObject(arg2));
|
|
2965
3950
|
}
|
|
2966
3951
|
|
|
2967
|
-
function
|
|
3952
|
+
function __wasm_bindgen_func_elem_823(arg0, arg1, arg2) {
|
|
2968
3953
|
try {
|
|
2969
3954
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2970
|
-
wasm.
|
|
3955
|
+
wasm.__wasm_bindgen_func_elem_823(retptr, arg0, arg1, addHeapObject(arg2));
|
|
2971
3956
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2972
3957
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2973
3958
|
if (r1) {
|
|
@@ -2978,8 +3963,8 @@ function __wasm_bindgen_func_elem_718(arg0, arg1, arg2) {
|
|
|
2978
3963
|
}
|
|
2979
3964
|
}
|
|
2980
3965
|
|
|
2981
|
-
function
|
|
2982
|
-
wasm.
|
|
3966
|
+
function __wasm_bindgen_func_elem_737(arg0, arg1, arg2, arg3) {
|
|
3967
|
+
wasm.__wasm_bindgen_func_elem_737(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
2983
3968
|
}
|
|
2984
3969
|
|
|
2985
3970
|
|
|
@@ -3002,6 +3987,9 @@ const __wbindgen_enum_GpuTextureSampleType = ["float", "unfilterable-float", "de
|
|
|
3002
3987
|
|
|
3003
3988
|
|
|
3004
3989
|
const __wbindgen_enum_GpuTextureViewDimension = ["1d", "2d", "2d-array", "cube", "cube-array", "3d"];
|
|
3990
|
+
const LiveSimulationFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3991
|
+
? { register: () => {}, unregister: () => {} }
|
|
3992
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_livesimulation_free(ptr >>> 0, 1));
|
|
3005
3993
|
const wbg_rayon_PoolBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3006
3994
|
? { register: () => {}, unregister: () => {} }
|
|
3007
3995
|
: new FinalizationRegistry(ptr => wasm.__wbg_wbg_rayon_poolbuilder_free(ptr >>> 0, 1));
|