xtalforge-wasm 1.1.0 → 1.2.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/package.json +1 -1
- package/xtalforge_wasm.d.ts +280 -0
- package/xtalforge_wasm.js +1 -1
- package/xtalforge_wasm_bg.js +1404 -45
- package/xtalforge_wasm_bg.wasm +0 -0
package/xtalforge_wasm_bg.js
CHANGED
|
@@ -286,6 +286,48 @@ export class WasmDocument {
|
|
|
286
286
|
}
|
|
287
287
|
if (Symbol.dispose) WasmDocument.prototype[Symbol.dispose] = WasmDocument.prototype.free;
|
|
288
288
|
|
|
289
|
+
/**
|
|
290
|
+
* Adsorption sites as JSON.
|
|
291
|
+
*
|
|
292
|
+
* # Errors
|
|
293
|
+
*
|
|
294
|
+
* Returns a JavaScript `Error` for invalid text or tolerance.
|
|
295
|
+
* @param {string} text
|
|
296
|
+
* @param {string} format_hint
|
|
297
|
+
* @param {number} tolerance
|
|
298
|
+
* @returns {string}
|
|
299
|
+
*/
|
|
300
|
+
export function adsorption_sites(text, format_hint, tolerance) {
|
|
301
|
+
let deferred5_0;
|
|
302
|
+
let deferred5_1;
|
|
303
|
+
try {
|
|
304
|
+
const val3 = +tolerance;
|
|
305
|
+
let ptr0, len0, ptr1, len1;
|
|
306
|
+
try {
|
|
307
|
+
ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
308
|
+
len0 = WASM_VECTOR_LEN;
|
|
309
|
+
ptr1 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
310
|
+
len1 = WASM_VECTOR_LEN;
|
|
311
|
+
} catch (e) {
|
|
312
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
313
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
314
|
+
throw e;
|
|
315
|
+
}
|
|
316
|
+
const ret = wasm.adsorption_sites(ptr0, len0, ptr1, len1, val3);
|
|
317
|
+
var ptr4 = ret[0];
|
|
318
|
+
var len4 = ret[1];
|
|
319
|
+
if (ret[3]) {
|
|
320
|
+
ptr4 = 0; len4 = 0;
|
|
321
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
322
|
+
}
|
|
323
|
+
deferred5_0 = ptr4;
|
|
324
|
+
deferred5_1 = len4;
|
|
325
|
+
return getStringFromWasm0(ptr4, len4);
|
|
326
|
+
} finally {
|
|
327
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
289
331
|
/**
|
|
290
332
|
* Runtime capability report as JSON.
|
|
291
333
|
* @returns {string}
|
|
@@ -429,6 +471,48 @@ export function asymmetrize_text(text, symprec) {
|
|
|
429
471
|
}
|
|
430
472
|
}
|
|
431
473
|
|
|
474
|
+
/**
|
|
475
|
+
* Bond-valence sums as JSON.
|
|
476
|
+
*
|
|
477
|
+
* # Errors
|
|
478
|
+
*
|
|
479
|
+
* Returns a JavaScript `Error` for invalid text or cutoff.
|
|
480
|
+
* @param {string} text
|
|
481
|
+
* @param {string} format_hint
|
|
482
|
+
* @param {number} cutoff
|
|
483
|
+
* @returns {string}
|
|
484
|
+
*/
|
|
485
|
+
export function bond_valence_sums(text, format_hint, cutoff) {
|
|
486
|
+
let deferred5_0;
|
|
487
|
+
let deferred5_1;
|
|
488
|
+
try {
|
|
489
|
+
const val3 = +cutoff;
|
|
490
|
+
let ptr0, len0, ptr1, len1;
|
|
491
|
+
try {
|
|
492
|
+
ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
493
|
+
len0 = WASM_VECTOR_LEN;
|
|
494
|
+
ptr1 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
495
|
+
len1 = WASM_VECTOR_LEN;
|
|
496
|
+
} catch (e) {
|
|
497
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
498
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
499
|
+
throw e;
|
|
500
|
+
}
|
|
501
|
+
const ret = wasm.bond_valence_sums(ptr0, len0, ptr1, len1, val3);
|
|
502
|
+
var ptr4 = ret[0];
|
|
503
|
+
var len4 = ret[1];
|
|
504
|
+
if (ret[3]) {
|
|
505
|
+
ptr4 = 0; len4 = 0;
|
|
506
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
507
|
+
}
|
|
508
|
+
deferred5_0 = ptr4;
|
|
509
|
+
deferred5_1 = len4;
|
|
510
|
+
return getStringFromWasm0(ptr4, len4);
|
|
511
|
+
} finally {
|
|
512
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
|
|
432
516
|
/**
|
|
433
517
|
* Perceives the bonds of a structure.
|
|
434
518
|
*
|
|
@@ -1094,6 +1178,130 @@ export function convert_structure(text, format_hint, format) {
|
|
|
1094
1178
|
}
|
|
1095
1179
|
}
|
|
1096
1180
|
|
|
1181
|
+
/**
|
|
1182
|
+
* Convex hull as JSON from a JSON list of phases.
|
|
1183
|
+
*
|
|
1184
|
+
* # Errors
|
|
1185
|
+
*
|
|
1186
|
+
* Returns a JavaScript `Error` for an invalid phase list.
|
|
1187
|
+
* @param {string} entries_json
|
|
1188
|
+
* @returns {string}
|
|
1189
|
+
*/
|
|
1190
|
+
export function convex_hull(entries_json) {
|
|
1191
|
+
let deferred3_0;
|
|
1192
|
+
let deferred3_1;
|
|
1193
|
+
try {
|
|
1194
|
+
const ptr0 = passStringToWasm0(entries_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1195
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1196
|
+
const ret = wasm.convex_hull(ptr0, len0);
|
|
1197
|
+
var ptr2 = ret[0];
|
|
1198
|
+
var len2 = ret[1];
|
|
1199
|
+
if (ret[3]) {
|
|
1200
|
+
ptr2 = 0; len2 = 0;
|
|
1201
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1202
|
+
}
|
|
1203
|
+
deferred3_0 = ptr2;
|
|
1204
|
+
deferred3_1 = len2;
|
|
1205
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1206
|
+
} finally {
|
|
1207
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
/**
|
|
1212
|
+
* Coordination shell and shape measures as JSON.
|
|
1213
|
+
*
|
|
1214
|
+
* # Errors
|
|
1215
|
+
*
|
|
1216
|
+
* Returns a JavaScript `Error` for invalid text or an out-of-range index.
|
|
1217
|
+
* @param {string} text
|
|
1218
|
+
* @param {string} format_hint
|
|
1219
|
+
* @param {number} index
|
|
1220
|
+
* @param {string} strategy
|
|
1221
|
+
* @param {number} cutoff
|
|
1222
|
+
* @param {number} solid_angle
|
|
1223
|
+
* @returns {string}
|
|
1224
|
+
*/
|
|
1225
|
+
export function coordination(text, format_hint, index, strategy, cutoff, solid_angle) {
|
|
1226
|
+
let deferred8_0;
|
|
1227
|
+
let deferred8_1;
|
|
1228
|
+
try {
|
|
1229
|
+
const val4 = +index;
|
|
1230
|
+
const val5 = +cutoff;
|
|
1231
|
+
const val6 = +solid_angle;
|
|
1232
|
+
let ptr0, len0, ptr1, len1, ptr2, len2;
|
|
1233
|
+
try {
|
|
1234
|
+
ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1235
|
+
len0 = WASM_VECTOR_LEN;
|
|
1236
|
+
ptr1 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1237
|
+
len1 = WASM_VECTOR_LEN;
|
|
1238
|
+
ptr2 = passStringToWasm0(strategy, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1239
|
+
len2 = WASM_VECTOR_LEN;
|
|
1240
|
+
} catch (e) {
|
|
1241
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
|
|
1242
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
1243
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
1244
|
+
throw e;
|
|
1245
|
+
}
|
|
1246
|
+
const ret = wasm.coordination(ptr0, len0, ptr1, len1, val4, ptr2, len2, val5, val6);
|
|
1247
|
+
var ptr7 = ret[0];
|
|
1248
|
+
var len7 = ret[1];
|
|
1249
|
+
if (ret[3]) {
|
|
1250
|
+
ptr7 = 0; len7 = 0;
|
|
1251
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1252
|
+
}
|
|
1253
|
+
deferred8_0 = ptr7;
|
|
1254
|
+
deferred8_1 = len7;
|
|
1255
|
+
return getStringFromWasm0(ptr7, len7);
|
|
1256
|
+
} finally {
|
|
1257
|
+
wasm.__wbindgen_free(deferred8_0, deferred8_1, 1);
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* Applies a strain, gradient, volume or density and returns structure JSON.
|
|
1263
|
+
*
|
|
1264
|
+
* # Errors
|
|
1265
|
+
*
|
|
1266
|
+
* Returns a JavaScript `Error` for invalid text or deformation options.
|
|
1267
|
+
* @param {string} text
|
|
1268
|
+
* @param {string} format_hint
|
|
1269
|
+
* @param {string} options_json
|
|
1270
|
+
* @returns {string}
|
|
1271
|
+
*/
|
|
1272
|
+
export function deform(text, format_hint, options_json) {
|
|
1273
|
+
let deferred5_0;
|
|
1274
|
+
let deferred5_1;
|
|
1275
|
+
try {
|
|
1276
|
+
let ptr0, len0, ptr1, len1, ptr2, len2;
|
|
1277
|
+
try {
|
|
1278
|
+
ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1279
|
+
len0 = WASM_VECTOR_LEN;
|
|
1280
|
+
ptr1 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1281
|
+
len1 = WASM_VECTOR_LEN;
|
|
1282
|
+
ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1283
|
+
len2 = WASM_VECTOR_LEN;
|
|
1284
|
+
} catch (e) {
|
|
1285
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
|
|
1286
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
1287
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
1288
|
+
throw e;
|
|
1289
|
+
}
|
|
1290
|
+
const ret = wasm.deform(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1291
|
+
var ptr4 = ret[0];
|
|
1292
|
+
var len4 = ret[1];
|
|
1293
|
+
if (ret[3]) {
|
|
1294
|
+
ptr4 = 0; len4 = 0;
|
|
1295
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1296
|
+
}
|
|
1297
|
+
deferred5_0 = ptr4;
|
|
1298
|
+
deferred5_1 = len4;
|
|
1299
|
+
return getStringFromWasm0(ptr4, len4);
|
|
1300
|
+
} finally {
|
|
1301
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1097
1305
|
/**
|
|
1098
1306
|
* Detects the space group and returns the dataset as a JS object.
|
|
1099
1307
|
*
|
|
@@ -1173,6 +1381,92 @@ export function distance(text, i, j) {
|
|
|
1173
1381
|
return ret[0];
|
|
1174
1382
|
}
|
|
1175
1383
|
|
|
1384
|
+
/**
|
|
1385
|
+
* Site edits; returns structure JSON.
|
|
1386
|
+
*
|
|
1387
|
+
* # Errors
|
|
1388
|
+
*
|
|
1389
|
+
* Returns a JavaScript `Error` for invalid text or edit options.
|
|
1390
|
+
* @param {string} text
|
|
1391
|
+
* @param {string} format_hint
|
|
1392
|
+
* @param {string} options_json
|
|
1393
|
+
* @returns {string}
|
|
1394
|
+
*/
|
|
1395
|
+
export function edit_structure(text, format_hint, options_json) {
|
|
1396
|
+
let deferred5_0;
|
|
1397
|
+
let deferred5_1;
|
|
1398
|
+
try {
|
|
1399
|
+
let ptr0, len0, ptr1, len1, ptr2, len2;
|
|
1400
|
+
try {
|
|
1401
|
+
ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1402
|
+
len0 = WASM_VECTOR_LEN;
|
|
1403
|
+
ptr1 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1404
|
+
len1 = WASM_VECTOR_LEN;
|
|
1405
|
+
ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1406
|
+
len2 = WASM_VECTOR_LEN;
|
|
1407
|
+
} catch (e) {
|
|
1408
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
|
|
1409
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
1410
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
1411
|
+
throw e;
|
|
1412
|
+
}
|
|
1413
|
+
const ret = wasm.edit_structure(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1414
|
+
var ptr4 = ret[0];
|
|
1415
|
+
var len4 = ret[1];
|
|
1416
|
+
if (ret[3]) {
|
|
1417
|
+
ptr4 = 0; len4 = 0;
|
|
1418
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1419
|
+
}
|
|
1420
|
+
deferred5_0 = ptr4;
|
|
1421
|
+
deferred5_1 = len4;
|
|
1422
|
+
return getStringFromWasm0(ptr4, len4);
|
|
1423
|
+
} finally {
|
|
1424
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
1425
|
+
}
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
/**
|
|
1429
|
+
* Elastic tensor from UFF stress finite differences as JSON.
|
|
1430
|
+
*
|
|
1431
|
+
* # Errors
|
|
1432
|
+
*
|
|
1433
|
+
* Returns a JavaScript `Error` for invalid text or strain.
|
|
1434
|
+
* @param {string} text
|
|
1435
|
+
* @param {string} format_hint
|
|
1436
|
+
* @param {number} strain
|
|
1437
|
+
* @returns {string}
|
|
1438
|
+
*/
|
|
1439
|
+
export function elastic_tensor(text, format_hint, strain) {
|
|
1440
|
+
let deferred5_0;
|
|
1441
|
+
let deferred5_1;
|
|
1442
|
+
try {
|
|
1443
|
+
const val3 = +strain;
|
|
1444
|
+
let ptr0, len0, ptr1, len1;
|
|
1445
|
+
try {
|
|
1446
|
+
ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1447
|
+
len0 = WASM_VECTOR_LEN;
|
|
1448
|
+
ptr1 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1449
|
+
len1 = WASM_VECTOR_LEN;
|
|
1450
|
+
} catch (e) {
|
|
1451
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
1452
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
1453
|
+
throw e;
|
|
1454
|
+
}
|
|
1455
|
+
const ret = wasm.elastic_tensor(ptr0, len0, ptr1, len1, val3);
|
|
1456
|
+
var ptr4 = ret[0];
|
|
1457
|
+
var len4 = ret[1];
|
|
1458
|
+
if (ret[3]) {
|
|
1459
|
+
ptr4 = 0; len4 = 0;
|
|
1460
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1461
|
+
}
|
|
1462
|
+
deferred5_0 = ptr4;
|
|
1463
|
+
deferred5_1 = len4;
|
|
1464
|
+
return getStringFromWasm0(ptr4, len4);
|
|
1465
|
+
} finally {
|
|
1466
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1176
1470
|
/**
|
|
1177
1471
|
* Reference data for an element by symbol or atomic number.
|
|
1178
1472
|
*
|
|
@@ -1194,14 +1488,44 @@ export function element_info(input) {
|
|
|
1194
1488
|
}
|
|
1195
1489
|
|
|
1196
1490
|
/**
|
|
1197
|
-
*
|
|
1491
|
+
* Equation-of-state fit as JSON.
|
|
1198
1492
|
*
|
|
1199
1493
|
* # Errors
|
|
1200
1494
|
*
|
|
1201
|
-
* Returns a JavaScript `Error` for
|
|
1202
|
-
* @param {string}
|
|
1203
|
-
* @
|
|
1204
|
-
|
|
1495
|
+
* Returns a JavaScript `Error` for an unknown model or too few points.
|
|
1496
|
+
* @param {string} options_json
|
|
1497
|
+
* @returns {string}
|
|
1498
|
+
*/
|
|
1499
|
+
export function eos_fit(options_json) {
|
|
1500
|
+
let deferred3_0;
|
|
1501
|
+
let deferred3_1;
|
|
1502
|
+
try {
|
|
1503
|
+
const ptr0 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1504
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1505
|
+
const ret = wasm.eos_fit(ptr0, len0);
|
|
1506
|
+
var ptr2 = ret[0];
|
|
1507
|
+
var len2 = ret[1];
|
|
1508
|
+
if (ret[3]) {
|
|
1509
|
+
ptr2 = 0; len2 = 0;
|
|
1510
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1511
|
+
}
|
|
1512
|
+
deferred3_0 = ptr2;
|
|
1513
|
+
deferred3_1 = len2;
|
|
1514
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1515
|
+
} finally {
|
|
1516
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
/**
|
|
1521
|
+
* Returns QEq, EQeq or EEQ2019 charges (`qeq`, `eqeq`, `eeq`).
|
|
1522
|
+
*
|
|
1523
|
+
* # Errors
|
|
1524
|
+
*
|
|
1525
|
+
* Returns a JavaScript `Error` for invalid text or an unknown method.
|
|
1526
|
+
* @param {string} text
|
|
1527
|
+
* @param {string} method
|
|
1528
|
+
* @param {number} total_charge
|
|
1205
1529
|
* @returns {any}
|
|
1206
1530
|
*/
|
|
1207
1531
|
export function ff_charges_info(text, method, total_charge) {
|
|
@@ -1441,6 +1765,87 @@ export function ff_vibrations_info(text, step) {
|
|
|
1441
1765
|
return takeFromExternrefTable0(ret[0]);
|
|
1442
1766
|
}
|
|
1443
1767
|
|
|
1768
|
+
/**
|
|
1769
|
+
* Similarity of two fingerprints.
|
|
1770
|
+
*
|
|
1771
|
+
* # Errors
|
|
1772
|
+
*
|
|
1773
|
+
* Returns a JavaScript `Error` for invalid text.
|
|
1774
|
+
* @param {string} first
|
|
1775
|
+
* @param {string} second
|
|
1776
|
+
* @param {string} format_hint
|
|
1777
|
+
* @param {number} r_max
|
|
1778
|
+
* @param {number} bin_width
|
|
1779
|
+
* @returns {number}
|
|
1780
|
+
*/
|
|
1781
|
+
export function fingerprint_similarity(first, second, format_hint, r_max, bin_width) {
|
|
1782
|
+
const val4 = +r_max;
|
|
1783
|
+
const val5 = +bin_width;
|
|
1784
|
+
let ptr0, len0, ptr1, len1, ptr2, len2;
|
|
1785
|
+
try {
|
|
1786
|
+
ptr0 = passStringToWasm0(first, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1787
|
+
len0 = WASM_VECTOR_LEN;
|
|
1788
|
+
ptr1 = passStringToWasm0(second, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1789
|
+
len1 = WASM_VECTOR_LEN;
|
|
1790
|
+
ptr2 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1791
|
+
len2 = WASM_VECTOR_LEN;
|
|
1792
|
+
} catch (e) {
|
|
1793
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
|
|
1794
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
1795
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
1796
|
+
throw e;
|
|
1797
|
+
}
|
|
1798
|
+
const ret = wasm.fingerprint_similarity(ptr0, len0, ptr1, len1, ptr2, len2, val4, val5);
|
|
1799
|
+
if (ret[2]) {
|
|
1800
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1801
|
+
}
|
|
1802
|
+
return ret[0];
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
/**
|
|
1806
|
+
* Equality classes of a list of structure texts.
|
|
1807
|
+
*
|
|
1808
|
+
* # Errors
|
|
1809
|
+
*
|
|
1810
|
+
* Returns a JavaScript `Error` for invalid text.
|
|
1811
|
+
* @param {string[]} structures
|
|
1812
|
+
* @param {string} format_hint
|
|
1813
|
+
* @param {string} options_json
|
|
1814
|
+
* @returns {string}
|
|
1815
|
+
*/
|
|
1816
|
+
export function group_structures(structures, format_hint, options_json) {
|
|
1817
|
+
let deferred5_0;
|
|
1818
|
+
let deferred5_1;
|
|
1819
|
+
try {
|
|
1820
|
+
let ptr0, len0, ptr1, len1, ptr2, len2;
|
|
1821
|
+
try {
|
|
1822
|
+
ptr0 = passArrayJsValueToWasm0(structures, wasm.__wbindgen_malloc);
|
|
1823
|
+
len0 = WASM_VECTOR_LEN;
|
|
1824
|
+
ptr1 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1825
|
+
len1 = WASM_VECTOR_LEN;
|
|
1826
|
+
ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1827
|
+
len2 = WASM_VECTOR_LEN;
|
|
1828
|
+
} catch (e) {
|
|
1829
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
|
|
1830
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
1831
|
+
if (ptr0) { wasm.__externref_drop_slice(ptr0, len0); wasm.__wbindgen_free(ptr0, len0 * 4, 4); }
|
|
1832
|
+
throw e;
|
|
1833
|
+
}
|
|
1834
|
+
const ret = wasm.group_structures(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1835
|
+
var ptr4 = ret[0];
|
|
1836
|
+
var len4 = ret[1];
|
|
1837
|
+
if (ret[3]) {
|
|
1838
|
+
ptr4 = 0; len4 = 0;
|
|
1839
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1840
|
+
}
|
|
1841
|
+
deferred5_0 = ptr4;
|
|
1842
|
+
deferred5_1 = len4;
|
|
1843
|
+
return getStringFromWasm0(ptr4, len4);
|
|
1844
|
+
} finally {
|
|
1845
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1444
1849
|
/**
|
|
1445
1850
|
* Finds the functional groups of a structure.
|
|
1446
1851
|
*
|
|
@@ -1516,6 +1921,145 @@ export function hydrogens_text(text, distance) {
|
|
|
1516
1921
|
}
|
|
1517
1922
|
}
|
|
1518
1923
|
|
|
1924
|
+
/**
|
|
1925
|
+
* Linear interpolation between matched structures; returns a JSON array of
|
|
1926
|
+
* structure documents.
|
|
1927
|
+
*
|
|
1928
|
+
* # Errors
|
|
1929
|
+
*
|
|
1930
|
+
* Returns a JavaScript `Error` when the structures do not match.
|
|
1931
|
+
* @param {string} first
|
|
1932
|
+
* @param {string} second
|
|
1933
|
+
* @param {number} images
|
|
1934
|
+
* @param {string} format_hint
|
|
1935
|
+
* @param {string} options_json
|
|
1936
|
+
* @returns {string}
|
|
1937
|
+
*/
|
|
1938
|
+
export function interpolate(first, second, images, format_hint, options_json) {
|
|
1939
|
+
let deferred7_0;
|
|
1940
|
+
let deferred7_1;
|
|
1941
|
+
try {
|
|
1942
|
+
const val5 = +images;
|
|
1943
|
+
let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3;
|
|
1944
|
+
try {
|
|
1945
|
+
ptr0 = passStringToWasm0(first, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1946
|
+
len0 = WASM_VECTOR_LEN;
|
|
1947
|
+
ptr1 = passStringToWasm0(second, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1948
|
+
len1 = WASM_VECTOR_LEN;
|
|
1949
|
+
ptr2 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1950
|
+
len2 = WASM_VECTOR_LEN;
|
|
1951
|
+
ptr3 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1952
|
+
len3 = WASM_VECTOR_LEN;
|
|
1953
|
+
} catch (e) {
|
|
1954
|
+
if (ptr3) { wasm.__wbindgen_free(ptr3, len3 * 1, 1); }
|
|
1955
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
|
|
1956
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
1957
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
1958
|
+
throw e;
|
|
1959
|
+
}
|
|
1960
|
+
const ret = wasm.interpolate(ptr0, len0, ptr1, len1, val5, ptr2, len2, ptr3, len3);
|
|
1961
|
+
var ptr6 = ret[0];
|
|
1962
|
+
var len6 = ret[1];
|
|
1963
|
+
if (ret[3]) {
|
|
1964
|
+
ptr6 = 0; len6 = 0;
|
|
1965
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1966
|
+
}
|
|
1967
|
+
deferred7_0 = ptr6;
|
|
1968
|
+
deferred7_1 = len6;
|
|
1969
|
+
return getStringFromWasm0(ptr6, len6);
|
|
1970
|
+
} finally {
|
|
1971
|
+
wasm.__wbindgen_free(deferred7_0, deferred7_1, 1);
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
/**
|
|
1976
|
+
* Interstitial candidates as JSON.
|
|
1977
|
+
*
|
|
1978
|
+
* # Errors
|
|
1979
|
+
*
|
|
1980
|
+
* Returns a JavaScript `Error` for invalid text or options.
|
|
1981
|
+
* @param {string} text
|
|
1982
|
+
* @param {string} format_hint
|
|
1983
|
+
* @param {string} species
|
|
1984
|
+
* @param {string} options_json
|
|
1985
|
+
* @returns {string}
|
|
1986
|
+
*/
|
|
1987
|
+
export function interstitials(text, format_hint, species, options_json) {
|
|
1988
|
+
let deferred6_0;
|
|
1989
|
+
let deferred6_1;
|
|
1990
|
+
try {
|
|
1991
|
+
let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3;
|
|
1992
|
+
try {
|
|
1993
|
+
ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1994
|
+
len0 = WASM_VECTOR_LEN;
|
|
1995
|
+
ptr1 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1996
|
+
len1 = WASM_VECTOR_LEN;
|
|
1997
|
+
ptr2 = passStringToWasm0(species, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1998
|
+
len2 = WASM_VECTOR_LEN;
|
|
1999
|
+
ptr3 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2000
|
+
len3 = WASM_VECTOR_LEN;
|
|
2001
|
+
} catch (e) {
|
|
2002
|
+
if (ptr3) { wasm.__wbindgen_free(ptr3, len3 * 1, 1); }
|
|
2003
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
|
|
2004
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
2005
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
2006
|
+
throw e;
|
|
2007
|
+
}
|
|
2008
|
+
const ret = wasm.interstitials(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
2009
|
+
var ptr5 = ret[0];
|
|
2010
|
+
var len5 = ret[1];
|
|
2011
|
+
if (ret[3]) {
|
|
2012
|
+
ptr5 = 0; len5 = 0;
|
|
2013
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2014
|
+
}
|
|
2015
|
+
deferred6_0 = ptr5;
|
|
2016
|
+
deferred6_1 = len5;
|
|
2017
|
+
return getStringFromWasm0(ptr5, len5);
|
|
2018
|
+
} finally {
|
|
2019
|
+
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
|
2020
|
+
}
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
/**
|
|
2024
|
+
* Kabsch alignment; points are a flat `xyzxyz...` array.
|
|
2025
|
+
*
|
|
2026
|
+
* # Errors
|
|
2027
|
+
*
|
|
2028
|
+
* Returns a JavaScript `Error` for mismatched or non-finite point sets.
|
|
2029
|
+
* @param {Float64Array | number[]} points
|
|
2030
|
+
* @param {Float64Array | number[]} reference
|
|
2031
|
+
* @returns {string}
|
|
2032
|
+
*/
|
|
2033
|
+
export function kabsch_alignment(points, reference) {
|
|
2034
|
+
let deferred4_0;
|
|
2035
|
+
let deferred4_1;
|
|
2036
|
+
try {
|
|
2037
|
+
let ptr0, len0, ptr1, len1;
|
|
2038
|
+
try {
|
|
2039
|
+
ptr0 = passArrayF64ToWasm0(points, wasm.__wbindgen_malloc);
|
|
2040
|
+
len0 = WASM_VECTOR_LEN;
|
|
2041
|
+
ptr1 = passArrayF64ToWasm0(reference, wasm.__wbindgen_malloc);
|
|
2042
|
+
len1 = WASM_VECTOR_LEN;
|
|
2043
|
+
} catch (e) {
|
|
2044
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 8, 8); }
|
|
2045
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 8, 8); }
|
|
2046
|
+
throw e;
|
|
2047
|
+
}
|
|
2048
|
+
const ret = wasm.kabsch_alignment(ptr0, len0, ptr1, len1);
|
|
2049
|
+
var ptr3 = ret[0];
|
|
2050
|
+
var len3 = ret[1];
|
|
2051
|
+
if (ret[3]) {
|
|
2052
|
+
ptr3 = 0; len3 = 0;
|
|
2053
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2054
|
+
}
|
|
2055
|
+
deferred4_0 = ptr3;
|
|
2056
|
+
deferred4_1 = len3;
|
|
2057
|
+
return getStringFromWasm0(ptr3, len3);
|
|
2058
|
+
} finally {
|
|
2059
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
2060
|
+
}
|
|
2061
|
+
}
|
|
2062
|
+
|
|
1519
2063
|
/**
|
|
1520
2064
|
* Returns the Bravais type and band path of a structure.
|
|
1521
2065
|
*
|
|
@@ -1558,6 +2102,54 @@ export function lattice_info(a, b, c, alpha, beta, gamma) {
|
|
|
1558
2102
|
return takeFromExternrefTable0(ret[0]);
|
|
1559
2103
|
}
|
|
1560
2104
|
|
|
2105
|
+
/**
|
|
2106
|
+
* Commensurate 2D lattice matches as JSON.
|
|
2107
|
+
*
|
|
2108
|
+
* # Errors
|
|
2109
|
+
*
|
|
2110
|
+
* Returns a JavaScript `Error` for invalid text or options.
|
|
2111
|
+
* @param {string} film
|
|
2112
|
+
* @param {string} substrate
|
|
2113
|
+
* @param {string} format_hint
|
|
2114
|
+
* @param {string} options_json
|
|
2115
|
+
* @returns {string}
|
|
2116
|
+
*/
|
|
2117
|
+
export function lattice_matches(film, substrate, format_hint, options_json) {
|
|
2118
|
+
let deferred6_0;
|
|
2119
|
+
let deferred6_1;
|
|
2120
|
+
try {
|
|
2121
|
+
let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3;
|
|
2122
|
+
try {
|
|
2123
|
+
ptr0 = passStringToWasm0(film, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2124
|
+
len0 = WASM_VECTOR_LEN;
|
|
2125
|
+
ptr1 = passStringToWasm0(substrate, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2126
|
+
len1 = WASM_VECTOR_LEN;
|
|
2127
|
+
ptr2 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2128
|
+
len2 = WASM_VECTOR_LEN;
|
|
2129
|
+
ptr3 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2130
|
+
len3 = WASM_VECTOR_LEN;
|
|
2131
|
+
} catch (e) {
|
|
2132
|
+
if (ptr3) { wasm.__wbindgen_free(ptr3, len3 * 1, 1); }
|
|
2133
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
|
|
2134
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
2135
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
2136
|
+
throw e;
|
|
2137
|
+
}
|
|
2138
|
+
const ret = wasm.lattice_matches(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
2139
|
+
var ptr5 = ret[0];
|
|
2140
|
+
var len5 = ret[1];
|
|
2141
|
+
if (ret[3]) {
|
|
2142
|
+
ptr5 = 0; len5 = 0;
|
|
2143
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2144
|
+
}
|
|
2145
|
+
deferred6_0 = ptr5;
|
|
2146
|
+
deferred6_1 = len5;
|
|
2147
|
+
return getStringFromWasm0(ptr5, len5);
|
|
2148
|
+
} finally {
|
|
2149
|
+
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
|
2150
|
+
}
|
|
2151
|
+
}
|
|
2152
|
+
|
|
1561
2153
|
/**
|
|
1562
2154
|
* Minimum-image fractional vector and distance.
|
|
1563
2155
|
*
|
|
@@ -1750,6 +2342,54 @@ export function magnetic_group_info(text, symprec) {
|
|
|
1750
2342
|
return takeFromExternrefTable0(ret[0]);
|
|
1751
2343
|
}
|
|
1752
2344
|
|
|
2345
|
+
/**
|
|
2346
|
+
* Matches two structures and returns the match record as JSON.
|
|
2347
|
+
*
|
|
2348
|
+
* # Errors
|
|
2349
|
+
*
|
|
2350
|
+
* Returns a JavaScript `Error` for invalid text or tolerances.
|
|
2351
|
+
* @param {string} first
|
|
2352
|
+
* @param {string} second
|
|
2353
|
+
* @param {string} format_hint
|
|
2354
|
+
* @param {string} options_json
|
|
2355
|
+
* @returns {string}
|
|
2356
|
+
*/
|
|
2357
|
+
export function match_structures(first, second, format_hint, options_json) {
|
|
2358
|
+
let deferred6_0;
|
|
2359
|
+
let deferred6_1;
|
|
2360
|
+
try {
|
|
2361
|
+
let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3;
|
|
2362
|
+
try {
|
|
2363
|
+
ptr0 = passStringToWasm0(first, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2364
|
+
len0 = WASM_VECTOR_LEN;
|
|
2365
|
+
ptr1 = passStringToWasm0(second, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2366
|
+
len1 = WASM_VECTOR_LEN;
|
|
2367
|
+
ptr2 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2368
|
+
len2 = WASM_VECTOR_LEN;
|
|
2369
|
+
ptr3 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2370
|
+
len3 = WASM_VECTOR_LEN;
|
|
2371
|
+
} catch (e) {
|
|
2372
|
+
if (ptr3) { wasm.__wbindgen_free(ptr3, len3 * 1, 1); }
|
|
2373
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
|
|
2374
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
2375
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
2376
|
+
throw e;
|
|
2377
|
+
}
|
|
2378
|
+
const ret = wasm.match_structures(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
2379
|
+
var ptr5 = ret[0];
|
|
2380
|
+
var len5 = ret[1];
|
|
2381
|
+
if (ret[3]) {
|
|
2382
|
+
ptr5 = 0; len5 = 0;
|
|
2383
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2384
|
+
}
|
|
2385
|
+
deferred6_0 = ptr5;
|
|
2386
|
+
deferred6_1 = len5;
|
|
2387
|
+
return getStringFromWasm0(ptr5, len5);
|
|
2388
|
+
} finally {
|
|
2389
|
+
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
|
|
1753
2393
|
/**
|
|
1754
2394
|
* Builds an ASCII STL string.
|
|
1755
2395
|
*
|
|
@@ -1821,27 +2461,195 @@ export function mof_topologies_info() {
|
|
|
1821
2461
|
if (ret[2]) {
|
|
1822
2462
|
throw takeFromExternrefTable0(ret[1]);
|
|
1823
2463
|
}
|
|
1824
|
-
return takeFromExternrefTable0(ret[0]);
|
|
2464
|
+
return takeFromExternrefTable0(ret[0]);
|
|
2465
|
+
}
|
|
2466
|
+
|
|
2467
|
+
/**
|
|
2468
|
+
* Finds the periodic neighbors within `cutoff` Angstrom.
|
|
2469
|
+
*
|
|
2470
|
+
* Each element has `i`, `j`, `image` (the lattice translation of `j`) and
|
|
2471
|
+
* `distance`.
|
|
2472
|
+
*
|
|
2473
|
+
* # Errors
|
|
2474
|
+
*
|
|
2475
|
+
* Returns a JavaScript `Error` for invalid text or a non-positive cutoff.
|
|
2476
|
+
* @param {string} text
|
|
2477
|
+
* @param {number} cutoff
|
|
2478
|
+
* @returns {Array<any>}
|
|
2479
|
+
*/
|
|
2480
|
+
export function neighbors(text, cutoff) {
|
|
2481
|
+
const val2 = +cutoff;
|
|
2482
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2483
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2484
|
+
const ret = wasm.neighbors(ptr0, len0, val2);
|
|
2485
|
+
if (ret[2]) {
|
|
2486
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2487
|
+
}
|
|
2488
|
+
return takeFromExternrefTable0(ret[0]);
|
|
2489
|
+
}
|
|
2490
|
+
|
|
2491
|
+
/**
|
|
2492
|
+
* Returns the invariants of every CGD entry.
|
|
2493
|
+
*
|
|
2494
|
+
* # Errors
|
|
2495
|
+
*
|
|
2496
|
+
* Returns a JavaScript `Error` for an invalid net.
|
|
2497
|
+
* @param {string} text
|
|
2498
|
+
* @param {number} tolerance
|
|
2499
|
+
* @returns {Array<any>}
|
|
2500
|
+
*/
|
|
2501
|
+
export function net_invariants_info(text, tolerance) {
|
|
2502
|
+
const val2 = +tolerance;
|
|
2503
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2504
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2505
|
+
const ret = wasm.net_invariants_info(ptr0, len0, val2);
|
|
2506
|
+
if (ret[2]) {
|
|
2507
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2508
|
+
}
|
|
2509
|
+
return takeFromExternrefTable0(ret[0]);
|
|
2510
|
+
}
|
|
2511
|
+
|
|
2512
|
+
/**
|
|
2513
|
+
* Supercell closest to a cube; returns structure JSON.
|
|
2514
|
+
*
|
|
2515
|
+
* # Errors
|
|
2516
|
+
*
|
|
2517
|
+
* Returns a JavaScript `Error` for an invalid cell count.
|
|
2518
|
+
* @param {string} text
|
|
2519
|
+
* @param {number} cells
|
|
2520
|
+
* @param {string} format_hint
|
|
2521
|
+
* @returns {string}
|
|
2522
|
+
*/
|
|
2523
|
+
export function optimal_supercell(text, cells, format_hint) {
|
|
2524
|
+
let deferred5_0;
|
|
2525
|
+
let deferred5_1;
|
|
2526
|
+
try {
|
|
2527
|
+
const val3 = +cells;
|
|
2528
|
+
let ptr0, len0, ptr1, len1;
|
|
2529
|
+
try {
|
|
2530
|
+
ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2531
|
+
len0 = WASM_VECTOR_LEN;
|
|
2532
|
+
ptr1 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2533
|
+
len1 = WASM_VECTOR_LEN;
|
|
2534
|
+
} catch (e) {
|
|
2535
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
2536
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
2537
|
+
throw e;
|
|
2538
|
+
}
|
|
2539
|
+
const ret = wasm.optimal_supercell(ptr0, len0, val3, ptr1, len1);
|
|
2540
|
+
var ptr4 = ret[0];
|
|
2541
|
+
var len4 = ret[1];
|
|
2542
|
+
if (ret[3]) {
|
|
2543
|
+
ptr4 = 0; len4 = 0;
|
|
2544
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2545
|
+
}
|
|
2546
|
+
deferred5_0 = ptr4;
|
|
2547
|
+
deferred5_1 = len4;
|
|
2548
|
+
return getStringFromWasm0(ptr4, len4);
|
|
2549
|
+
} finally {
|
|
2550
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
2551
|
+
}
|
|
2552
|
+
}
|
|
2553
|
+
|
|
2554
|
+
/**
|
|
2555
|
+
* Orderings of partial occupancies as JSON.
|
|
2556
|
+
*
|
|
2557
|
+
* # Errors
|
|
2558
|
+
*
|
|
2559
|
+
* Returns a JavaScript `Error` for a structure without partial occupancy.
|
|
2560
|
+
* @param {string} text
|
|
2561
|
+
* @param {string} format_hint
|
|
2562
|
+
* @param {string} options_json
|
|
2563
|
+
* @returns {string}
|
|
2564
|
+
*/
|
|
2565
|
+
export function orderings(text, format_hint, options_json) {
|
|
2566
|
+
let deferred5_0;
|
|
2567
|
+
let deferred5_1;
|
|
2568
|
+
try {
|
|
2569
|
+
let ptr0, len0, ptr1, len1, ptr2, len2;
|
|
2570
|
+
try {
|
|
2571
|
+
ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2572
|
+
len0 = WASM_VECTOR_LEN;
|
|
2573
|
+
ptr1 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2574
|
+
len1 = WASM_VECTOR_LEN;
|
|
2575
|
+
ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2576
|
+
len2 = WASM_VECTOR_LEN;
|
|
2577
|
+
} catch (e) {
|
|
2578
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
|
|
2579
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
2580
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
2581
|
+
throw e;
|
|
2582
|
+
}
|
|
2583
|
+
const ret = wasm.orderings(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
2584
|
+
var ptr4 = ret[0];
|
|
2585
|
+
var len4 = ret[1];
|
|
2586
|
+
if (ret[3]) {
|
|
2587
|
+
ptr4 = 0; len4 = 0;
|
|
2588
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2589
|
+
}
|
|
2590
|
+
deferred5_0 = ptr4;
|
|
2591
|
+
deferred5_1 = len4;
|
|
2592
|
+
return getStringFromWasm0(ptr4, len4);
|
|
2593
|
+
} finally {
|
|
2594
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
2595
|
+
}
|
|
2596
|
+
}
|
|
2597
|
+
|
|
2598
|
+
/**
|
|
2599
|
+
* Oxidation states as JSON.
|
|
2600
|
+
*
|
|
2601
|
+
* # Errors
|
|
2602
|
+
*
|
|
2603
|
+
* Returns a JavaScript `Error` for invalid text or cutoff.
|
|
2604
|
+
* @param {string} text
|
|
2605
|
+
* @param {string} format_hint
|
|
2606
|
+
* @param {number} cutoff
|
|
2607
|
+
* @returns {string}
|
|
2608
|
+
*/
|
|
2609
|
+
export function oxidation_states(text, format_hint, cutoff) {
|
|
2610
|
+
let deferred5_0;
|
|
2611
|
+
let deferred5_1;
|
|
2612
|
+
try {
|
|
2613
|
+
const val3 = +cutoff;
|
|
2614
|
+
let ptr0, len0, ptr1, len1;
|
|
2615
|
+
try {
|
|
2616
|
+
ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2617
|
+
len0 = WASM_VECTOR_LEN;
|
|
2618
|
+
ptr1 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2619
|
+
len1 = WASM_VECTOR_LEN;
|
|
2620
|
+
} catch (e) {
|
|
2621
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
2622
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
2623
|
+
throw e;
|
|
2624
|
+
}
|
|
2625
|
+
const ret = wasm.oxidation_states(ptr0, len0, ptr1, len1, val3);
|
|
2626
|
+
var ptr4 = ret[0];
|
|
2627
|
+
var len4 = ret[1];
|
|
2628
|
+
if (ret[3]) {
|
|
2629
|
+
ptr4 = 0; len4 = 0;
|
|
2630
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2631
|
+
}
|
|
2632
|
+
deferred5_0 = ptr4;
|
|
2633
|
+
deferred5_1 = len4;
|
|
2634
|
+
return getStringFromWasm0(ptr4, len4);
|
|
2635
|
+
} finally {
|
|
2636
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
2637
|
+
}
|
|
1825
2638
|
}
|
|
1826
2639
|
|
|
1827
2640
|
/**
|
|
1828
|
-
*
|
|
1829
|
-
*
|
|
1830
|
-
* Each element has `i`, `j`, `image` (the lattice translation of `j`) and
|
|
1831
|
-
* `distance`.
|
|
2641
|
+
* Returns the JSON schema of a built-in parameter preset.
|
|
1832
2642
|
*
|
|
1833
2643
|
* # Errors
|
|
1834
2644
|
*
|
|
1835
|
-
* Returns a JavaScript `Error` for
|
|
1836
|
-
* @param {string}
|
|
1837
|
-
* @
|
|
1838
|
-
* @returns {Array<any>}
|
|
2645
|
+
* Returns a JavaScript `Error` for an unknown preset.
|
|
2646
|
+
* @param {string} name
|
|
2647
|
+
* @returns {any}
|
|
1839
2648
|
*/
|
|
1840
|
-
export function
|
|
1841
|
-
const
|
|
1842
|
-
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2649
|
+
export function param_schema(name) {
|
|
2650
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1843
2651
|
const len0 = WASM_VECTOR_LEN;
|
|
1844
|
-
const ret = wasm.
|
|
2652
|
+
const ret = wasm.param_schema(ptr0, len0);
|
|
1845
2653
|
if (ret[2]) {
|
|
1846
2654
|
throw takeFromExternrefTable0(ret[1]);
|
|
1847
2655
|
}
|
|
@@ -1849,43 +2657,88 @@ export function neighbors(text, cutoff) {
|
|
|
1849
2657
|
}
|
|
1850
2658
|
|
|
1851
2659
|
/**
|
|
1852
|
-
*
|
|
2660
|
+
* Periodic RMSD for an explicit atom mapping.
|
|
1853
2661
|
*
|
|
1854
2662
|
* # Errors
|
|
1855
2663
|
*
|
|
1856
|
-
* Returns a JavaScript `Error` for an
|
|
1857
|
-
* @param {string}
|
|
1858
|
-
* @param {
|
|
1859
|
-
* @
|
|
2664
|
+
* Returns a JavaScript `Error` for invalid text or an incomplete mapping.
|
|
2665
|
+
* @param {string} first
|
|
2666
|
+
* @param {string} second
|
|
2667
|
+
* @param {Uint32Array | number[]} mapping
|
|
2668
|
+
* @param {string} format_hint
|
|
2669
|
+
* @returns {number}
|
|
1860
2670
|
*/
|
|
1861
|
-
export function
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
2671
|
+
export function periodic_rmsd(first, second, mapping, format_hint) {
|
|
2672
|
+
let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3;
|
|
2673
|
+
try {
|
|
2674
|
+
ptr0 = passStringToWasm0(first, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2675
|
+
len0 = WASM_VECTOR_LEN;
|
|
2676
|
+
ptr1 = passStringToWasm0(second, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2677
|
+
len1 = WASM_VECTOR_LEN;
|
|
2678
|
+
ptr2 = passArray32ToWasm0(mapping, wasm.__wbindgen_malloc);
|
|
2679
|
+
len2 = WASM_VECTOR_LEN;
|
|
2680
|
+
ptr3 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2681
|
+
len3 = WASM_VECTOR_LEN;
|
|
2682
|
+
} catch (e) {
|
|
2683
|
+
if (ptr3) { wasm.__wbindgen_free(ptr3, len3 * 1, 1); }
|
|
2684
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 4, 4); }
|
|
2685
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
2686
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
2687
|
+
throw e;
|
|
2688
|
+
}
|
|
2689
|
+
const ret = wasm.periodic_rmsd(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
1866
2690
|
if (ret[2]) {
|
|
1867
2691
|
throw takeFromExternrefTable0(ret[1]);
|
|
1868
2692
|
}
|
|
1869
|
-
return
|
|
2693
|
+
return ret[0];
|
|
1870
2694
|
}
|
|
1871
2695
|
|
|
1872
2696
|
/**
|
|
1873
|
-
*
|
|
2697
|
+
* Places a molecule on an adsorption site and returns structure JSON.
|
|
1874
2698
|
*
|
|
1875
2699
|
* # Errors
|
|
1876
2700
|
*
|
|
1877
|
-
* Returns a JavaScript `Error` for an
|
|
1878
|
-
* @param {string}
|
|
1879
|
-
* @
|
|
2701
|
+
* Returns a JavaScript `Error` for invalid text or an out-of-range site.
|
|
2702
|
+
* @param {string} slab
|
|
2703
|
+
* @param {string} molecule
|
|
2704
|
+
* @param {string} format_hint
|
|
2705
|
+
* @param {string} options_json
|
|
2706
|
+
* @returns {string}
|
|
1880
2707
|
*/
|
|
1881
|
-
export function
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
2708
|
+
export function place_molecule(slab, molecule, format_hint, options_json) {
|
|
2709
|
+
let deferred6_0;
|
|
2710
|
+
let deferred6_1;
|
|
2711
|
+
try {
|
|
2712
|
+
let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3;
|
|
2713
|
+
try {
|
|
2714
|
+
ptr0 = passStringToWasm0(slab, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2715
|
+
len0 = WASM_VECTOR_LEN;
|
|
2716
|
+
ptr1 = passStringToWasm0(molecule, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2717
|
+
len1 = WASM_VECTOR_LEN;
|
|
2718
|
+
ptr2 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2719
|
+
len2 = WASM_VECTOR_LEN;
|
|
2720
|
+
ptr3 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2721
|
+
len3 = WASM_VECTOR_LEN;
|
|
2722
|
+
} catch (e) {
|
|
2723
|
+
if (ptr3) { wasm.__wbindgen_free(ptr3, len3 * 1, 1); }
|
|
2724
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
|
|
2725
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
2726
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
2727
|
+
throw e;
|
|
2728
|
+
}
|
|
2729
|
+
const ret = wasm.place_molecule(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
2730
|
+
var ptr5 = ret[0];
|
|
2731
|
+
var len5 = ret[1];
|
|
2732
|
+
if (ret[3]) {
|
|
2733
|
+
ptr5 = 0; len5 = 0;
|
|
2734
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2735
|
+
}
|
|
2736
|
+
deferred6_0 = ptr5;
|
|
2737
|
+
deferred6_1 = len5;
|
|
2738
|
+
return getStringFromWasm0(ptr5, len5);
|
|
2739
|
+
} finally {
|
|
2740
|
+
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
|
1887
2741
|
}
|
|
1888
|
-
return takeFromExternrefTable0(ret[0]);
|
|
1889
2742
|
}
|
|
1890
2743
|
|
|
1891
2744
|
/**
|
|
@@ -2307,6 +3160,96 @@ export function pxrd_info(text, radiation, max_two_theta, step) {
|
|
|
2307
3160
|
return takeFromExternrefTable0(ret[0]);
|
|
2308
3161
|
}
|
|
2309
3162
|
|
|
3163
|
+
/**
|
|
3164
|
+
* Total and partial RDF as JSON.
|
|
3165
|
+
*
|
|
3166
|
+
* # Errors
|
|
3167
|
+
*
|
|
3168
|
+
* Returns a JavaScript `Error` for invalid text or range.
|
|
3169
|
+
* @param {string} text
|
|
3170
|
+
* @param {string} format_hint
|
|
3171
|
+
* @param {number} r_max
|
|
3172
|
+
* @param {number} bin_width
|
|
3173
|
+
* @param {number} smoothing
|
|
3174
|
+
* @returns {string}
|
|
3175
|
+
*/
|
|
3176
|
+
export function radial_distribution(text, format_hint, r_max, bin_width, smoothing) {
|
|
3177
|
+
let deferred7_0;
|
|
3178
|
+
let deferred7_1;
|
|
3179
|
+
try {
|
|
3180
|
+
const val3 = +r_max;
|
|
3181
|
+
const val4 = +bin_width;
|
|
3182
|
+
const val5 = +smoothing;
|
|
3183
|
+
let ptr0, len0, ptr1, len1;
|
|
3184
|
+
try {
|
|
3185
|
+
ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3186
|
+
len0 = WASM_VECTOR_LEN;
|
|
3187
|
+
ptr1 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3188
|
+
len1 = WASM_VECTOR_LEN;
|
|
3189
|
+
} catch (e) {
|
|
3190
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
3191
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
3192
|
+
throw e;
|
|
3193
|
+
}
|
|
3194
|
+
const ret = wasm.radial_distribution(ptr0, len0, ptr1, len1, val3, val4, val5);
|
|
3195
|
+
var ptr6 = ret[0];
|
|
3196
|
+
var len6 = ret[1];
|
|
3197
|
+
if (ret[3]) {
|
|
3198
|
+
ptr6 = 0; len6 = 0;
|
|
3199
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
3200
|
+
}
|
|
3201
|
+
deferred7_0 = ptr6;
|
|
3202
|
+
deferred7_1 = len6;
|
|
3203
|
+
return getStringFromWasm0(ptr6, len6);
|
|
3204
|
+
} finally {
|
|
3205
|
+
wasm.__wbindgen_free(deferred7_0, deferred7_1, 1);
|
|
3206
|
+
}
|
|
3207
|
+
}
|
|
3208
|
+
|
|
3209
|
+
/**
|
|
3210
|
+
* Random displacements with a fixed seed; returns structure JSON.
|
|
3211
|
+
*
|
|
3212
|
+
* # Errors
|
|
3213
|
+
*
|
|
3214
|
+
* Returns a JavaScript `Error` for invalid text or options.
|
|
3215
|
+
* @param {string} text
|
|
3216
|
+
* @param {string} format_hint
|
|
3217
|
+
* @param {string} options_json
|
|
3218
|
+
* @returns {string}
|
|
3219
|
+
*/
|
|
3220
|
+
export function rattle(text, format_hint, options_json) {
|
|
3221
|
+
let deferred5_0;
|
|
3222
|
+
let deferred5_1;
|
|
3223
|
+
try {
|
|
3224
|
+
let ptr0, len0, ptr1, len1, ptr2, len2;
|
|
3225
|
+
try {
|
|
3226
|
+
ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3227
|
+
len0 = WASM_VECTOR_LEN;
|
|
3228
|
+
ptr1 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3229
|
+
len1 = WASM_VECTOR_LEN;
|
|
3230
|
+
ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3231
|
+
len2 = WASM_VECTOR_LEN;
|
|
3232
|
+
} catch (e) {
|
|
3233
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
|
|
3234
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
3235
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
3236
|
+
throw e;
|
|
3237
|
+
}
|
|
3238
|
+
const ret = wasm.rattle(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
3239
|
+
var ptr4 = ret[0];
|
|
3240
|
+
var len4 = ret[1];
|
|
3241
|
+
if (ret[3]) {
|
|
3242
|
+
ptr4 = 0; len4 = 0;
|
|
3243
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
3244
|
+
}
|
|
3245
|
+
deferred5_0 = ptr4;
|
|
3246
|
+
deferred5_1 = len4;
|
|
3247
|
+
return getStringFromWasm0(ptr4, len4);
|
|
3248
|
+
} finally {
|
|
3249
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
3250
|
+
}
|
|
3251
|
+
}
|
|
3252
|
+
|
|
2310
3253
|
/**
|
|
2311
3254
|
* Reads a CIF and returns its summary object.
|
|
2312
3255
|
*
|
|
@@ -2693,6 +3636,50 @@ export function slab_info(text, h, k, l, layers, vacuum) {
|
|
|
2693
3636
|
return takeFromExternrefTable0(ret[0]);
|
|
2694
3637
|
}
|
|
2695
3638
|
|
|
3639
|
+
/**
|
|
3640
|
+
* Every termination of a surface as JSON with structure documents.
|
|
3641
|
+
*
|
|
3642
|
+
* # Errors
|
|
3643
|
+
*
|
|
3644
|
+
* Returns a JavaScript `Error` for invalid text or a degenerate plane.
|
|
3645
|
+
* @param {string} text
|
|
3646
|
+
* @param {string} format_hint
|
|
3647
|
+
* @param {string} options_json
|
|
3648
|
+
* @returns {string}
|
|
3649
|
+
*/
|
|
3650
|
+
export function slab_terminations(text, format_hint, options_json) {
|
|
3651
|
+
let deferred5_0;
|
|
3652
|
+
let deferred5_1;
|
|
3653
|
+
try {
|
|
3654
|
+
let ptr0, len0, ptr1, len1, ptr2, len2;
|
|
3655
|
+
try {
|
|
3656
|
+
ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3657
|
+
len0 = WASM_VECTOR_LEN;
|
|
3658
|
+
ptr1 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3659
|
+
len1 = WASM_VECTOR_LEN;
|
|
3660
|
+
ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3661
|
+
len2 = WASM_VECTOR_LEN;
|
|
3662
|
+
} catch (e) {
|
|
3663
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
|
|
3664
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
3665
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
3666
|
+
throw e;
|
|
3667
|
+
}
|
|
3668
|
+
const ret = wasm.slab_terminations(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
3669
|
+
var ptr4 = ret[0];
|
|
3670
|
+
var len4 = ret[1];
|
|
3671
|
+
if (ret[3]) {
|
|
3672
|
+
ptr4 = 0; len4 = 0;
|
|
3673
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
3674
|
+
}
|
|
3675
|
+
deferred5_0 = ptr4;
|
|
3676
|
+
deferred5_1 = len4;
|
|
3677
|
+
return getStringFromWasm0(ptr4, len4);
|
|
3678
|
+
} finally {
|
|
3679
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
3680
|
+
}
|
|
3681
|
+
}
|
|
3682
|
+
|
|
2696
3683
|
/**
|
|
2697
3684
|
* Cuts a slab and returns it as CIF text.
|
|
2698
3685
|
*
|
|
@@ -2723,14 +3710,106 @@ export function slab_text(text, h, k, l, layers, vacuum) {
|
|
|
2723
3710
|
var ptr7 = ret[0];
|
|
2724
3711
|
var len7 = ret[1];
|
|
2725
3712
|
if (ret[3]) {
|
|
2726
|
-
ptr7 = 0; len7 = 0;
|
|
3713
|
+
ptr7 = 0; len7 = 0;
|
|
3714
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
3715
|
+
}
|
|
3716
|
+
deferred8_0 = ptr7;
|
|
3717
|
+
deferred8_1 = len7;
|
|
3718
|
+
return getStringFromWasm0(ptr7, len7);
|
|
3719
|
+
} finally {
|
|
3720
|
+
wasm.__wbindgen_free(deferred8_0, deferred8_1, 1);
|
|
3721
|
+
}
|
|
3722
|
+
}
|
|
3723
|
+
|
|
3724
|
+
/**
|
|
3725
|
+
* SQS generation as JSON.
|
|
3726
|
+
*
|
|
3727
|
+
* # Errors
|
|
3728
|
+
*
|
|
3729
|
+
* Returns a JavaScript `Error` for a structure without binary disorder.
|
|
3730
|
+
* @param {string} text
|
|
3731
|
+
* @param {string} format_hint
|
|
3732
|
+
* @param {string} options_json
|
|
3733
|
+
* @returns {string}
|
|
3734
|
+
*/
|
|
3735
|
+
export function special_quasirandom(text, format_hint, options_json) {
|
|
3736
|
+
let deferred5_0;
|
|
3737
|
+
let deferred5_1;
|
|
3738
|
+
try {
|
|
3739
|
+
let ptr0, len0, ptr1, len1, ptr2, len2;
|
|
3740
|
+
try {
|
|
3741
|
+
ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3742
|
+
len0 = WASM_VECTOR_LEN;
|
|
3743
|
+
ptr1 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3744
|
+
len1 = WASM_VECTOR_LEN;
|
|
3745
|
+
ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3746
|
+
len2 = WASM_VECTOR_LEN;
|
|
3747
|
+
} catch (e) {
|
|
3748
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
|
|
3749
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
3750
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
3751
|
+
throw e;
|
|
3752
|
+
}
|
|
3753
|
+
const ret = wasm.special_quasirandom(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
3754
|
+
var ptr4 = ret[0];
|
|
3755
|
+
var len4 = ret[1];
|
|
3756
|
+
if (ret[3]) {
|
|
3757
|
+
ptr4 = 0; len4 = 0;
|
|
3758
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
3759
|
+
}
|
|
3760
|
+
deferred5_0 = ptr4;
|
|
3761
|
+
deferred5_1 = len4;
|
|
3762
|
+
return getStringFromWasm0(ptr4, len4);
|
|
3763
|
+
} finally {
|
|
3764
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
3765
|
+
}
|
|
3766
|
+
}
|
|
3767
|
+
|
|
3768
|
+
/**
|
|
3769
|
+
* Stacks a film on a substrate; returns structure JSON.
|
|
3770
|
+
*
|
|
3771
|
+
* # Errors
|
|
3772
|
+
*
|
|
3773
|
+
* Returns a JavaScript `Error` for empty slabs or invalid options.
|
|
3774
|
+
* @param {string} film
|
|
3775
|
+
* @param {string} substrate
|
|
3776
|
+
* @param {string} format_hint
|
|
3777
|
+
* @param {string} options_json
|
|
3778
|
+
* @returns {string}
|
|
3779
|
+
*/
|
|
3780
|
+
export function stack_slabs(film, substrate, format_hint, options_json) {
|
|
3781
|
+
let deferred6_0;
|
|
3782
|
+
let deferred6_1;
|
|
3783
|
+
try {
|
|
3784
|
+
let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3;
|
|
3785
|
+
try {
|
|
3786
|
+
ptr0 = passStringToWasm0(film, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3787
|
+
len0 = WASM_VECTOR_LEN;
|
|
3788
|
+
ptr1 = passStringToWasm0(substrate, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3789
|
+
len1 = WASM_VECTOR_LEN;
|
|
3790
|
+
ptr2 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3791
|
+
len2 = WASM_VECTOR_LEN;
|
|
3792
|
+
ptr3 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3793
|
+
len3 = WASM_VECTOR_LEN;
|
|
3794
|
+
} catch (e) {
|
|
3795
|
+
if (ptr3) { wasm.__wbindgen_free(ptr3, len3 * 1, 1); }
|
|
3796
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
|
|
3797
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
3798
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
3799
|
+
throw e;
|
|
3800
|
+
}
|
|
3801
|
+
const ret = wasm.stack_slabs(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
3802
|
+
var ptr5 = ret[0];
|
|
3803
|
+
var len5 = ret[1];
|
|
3804
|
+
if (ret[3]) {
|
|
3805
|
+
ptr5 = 0; len5 = 0;
|
|
2727
3806
|
throw takeFromExternrefTable0(ret[2]);
|
|
2728
3807
|
}
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
return getStringFromWasm0(
|
|
3808
|
+
deferred6_0 = ptr5;
|
|
3809
|
+
deferred6_1 = len5;
|
|
3810
|
+
return getStringFromWasm0(ptr5, len5);
|
|
2732
3811
|
} finally {
|
|
2733
|
-
wasm.__wbindgen_free(
|
|
3812
|
+
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
|
2734
3813
|
}
|
|
2735
3814
|
}
|
|
2736
3815
|
|
|
@@ -2787,6 +3866,50 @@ export function standardize_text(text, symprec) {
|
|
|
2787
3866
|
}
|
|
2788
3867
|
}
|
|
2789
3868
|
|
|
3869
|
+
/**
|
|
3870
|
+
* Structure fingerprint as JSON.
|
|
3871
|
+
*
|
|
3872
|
+
* # Errors
|
|
3873
|
+
*
|
|
3874
|
+
* Returns a JavaScript `Error` for invalid text or range.
|
|
3875
|
+
* @param {string} text
|
|
3876
|
+
* @param {string} format_hint
|
|
3877
|
+
* @param {number} r_max
|
|
3878
|
+
* @param {number} bin_width
|
|
3879
|
+
* @returns {string}
|
|
3880
|
+
*/
|
|
3881
|
+
export function structure_fingerprint(text, format_hint, r_max, bin_width) {
|
|
3882
|
+
let deferred6_0;
|
|
3883
|
+
let deferred6_1;
|
|
3884
|
+
try {
|
|
3885
|
+
const val3 = +r_max;
|
|
3886
|
+
const val4 = +bin_width;
|
|
3887
|
+
let ptr0, len0, ptr1, len1;
|
|
3888
|
+
try {
|
|
3889
|
+
ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3890
|
+
len0 = WASM_VECTOR_LEN;
|
|
3891
|
+
ptr1 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3892
|
+
len1 = WASM_VECTOR_LEN;
|
|
3893
|
+
} catch (e) {
|
|
3894
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
3895
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
3896
|
+
throw e;
|
|
3897
|
+
}
|
|
3898
|
+
const ret = wasm.structure_fingerprint(ptr0, len0, ptr1, len1, val3, val4);
|
|
3899
|
+
var ptr5 = ret[0];
|
|
3900
|
+
var len5 = ret[1];
|
|
3901
|
+
if (ret[3]) {
|
|
3902
|
+
ptr5 = 0; len5 = 0;
|
|
3903
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
3904
|
+
}
|
|
3905
|
+
deferred6_0 = ptr5;
|
|
3906
|
+
deferred6_1 = len5;
|
|
3907
|
+
return getStringFromWasm0(ptr5, len5);
|
|
3908
|
+
} finally {
|
|
3909
|
+
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
|
3910
|
+
}
|
|
3911
|
+
}
|
|
3912
|
+
|
|
2790
3913
|
/**
|
|
2791
3914
|
* Summary of a structure JSON document.
|
|
2792
3915
|
*
|
|
@@ -2825,6 +3948,52 @@ export function subgroups_info(hall_number, epsilon) {
|
|
|
2825
3948
|
return takeFromExternrefTable0(ret[0]);
|
|
2826
3949
|
}
|
|
2827
3950
|
|
|
3951
|
+
/**
|
|
3952
|
+
* Symmetry-unique substitutions as JSON.
|
|
3953
|
+
*
|
|
3954
|
+
* # Errors
|
|
3955
|
+
*
|
|
3956
|
+
* Returns a JavaScript `Error` for invalid text or species.
|
|
3957
|
+
* @param {string} text
|
|
3958
|
+
* @param {string} format_hint
|
|
3959
|
+
* @param {string} species
|
|
3960
|
+
* @param {number} min_image
|
|
3961
|
+
* @returns {string}
|
|
3962
|
+
*/
|
|
3963
|
+
export function substitutions(text, format_hint, species, min_image) {
|
|
3964
|
+
let deferred6_0;
|
|
3965
|
+
let deferred6_1;
|
|
3966
|
+
try {
|
|
3967
|
+
const val4 = +min_image;
|
|
3968
|
+
let ptr0, len0, ptr1, len1, ptr2, len2;
|
|
3969
|
+
try {
|
|
3970
|
+
ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3971
|
+
len0 = WASM_VECTOR_LEN;
|
|
3972
|
+
ptr1 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3973
|
+
len1 = WASM_VECTOR_LEN;
|
|
3974
|
+
ptr2 = passStringToWasm0(species, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3975
|
+
len2 = WASM_VECTOR_LEN;
|
|
3976
|
+
} catch (e) {
|
|
3977
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
|
|
3978
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
3979
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
3980
|
+
throw e;
|
|
3981
|
+
}
|
|
3982
|
+
const ret = wasm.substitutions(ptr0, len0, ptr1, len1, ptr2, len2, val4);
|
|
3983
|
+
var ptr5 = ret[0];
|
|
3984
|
+
var len5 = ret[1];
|
|
3985
|
+
if (ret[3]) {
|
|
3986
|
+
ptr5 = 0; len5 = 0;
|
|
3987
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
3988
|
+
}
|
|
3989
|
+
deferred6_0 = ptr5;
|
|
3990
|
+
deferred6_1 = len5;
|
|
3991
|
+
return getStringFromWasm0(ptr5, len5);
|
|
3992
|
+
} finally {
|
|
3993
|
+
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
|
3994
|
+
}
|
|
3995
|
+
}
|
|
3996
|
+
|
|
2828
3997
|
/**
|
|
2829
3998
|
* Builds a supercell and returns its summary object.
|
|
2830
3999
|
*
|
|
@@ -3007,6 +4176,92 @@ export function twist_info(n, m, theta, layers) {
|
|
|
3007
4176
|
return takeFromExternrefTable0(ret[0]);
|
|
3008
4177
|
}
|
|
3009
4178
|
|
|
4179
|
+
/**
|
|
4180
|
+
* Symmetry-unique Miller indices as JSON.
|
|
4181
|
+
*
|
|
4182
|
+
* # Errors
|
|
4183
|
+
*
|
|
4184
|
+
* Returns a JavaScript `Error` for invalid text or a bad index bound.
|
|
4185
|
+
* @param {string} text
|
|
4186
|
+
* @param {string} format_hint
|
|
4187
|
+
* @param {string} options_json
|
|
4188
|
+
* @returns {string}
|
|
4189
|
+
*/
|
|
4190
|
+
export function unique_miller_indices(text, format_hint, options_json) {
|
|
4191
|
+
let deferred5_0;
|
|
4192
|
+
let deferred5_1;
|
|
4193
|
+
try {
|
|
4194
|
+
let ptr0, len0, ptr1, len1, ptr2, len2;
|
|
4195
|
+
try {
|
|
4196
|
+
ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4197
|
+
len0 = WASM_VECTOR_LEN;
|
|
4198
|
+
ptr1 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4199
|
+
len1 = WASM_VECTOR_LEN;
|
|
4200
|
+
ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4201
|
+
len2 = WASM_VECTOR_LEN;
|
|
4202
|
+
} catch (e) {
|
|
4203
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
|
|
4204
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
4205
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
4206
|
+
throw e;
|
|
4207
|
+
}
|
|
4208
|
+
const ret = wasm.unique_miller_indices(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
4209
|
+
var ptr4 = ret[0];
|
|
4210
|
+
var len4 = ret[1];
|
|
4211
|
+
if (ret[3]) {
|
|
4212
|
+
ptr4 = 0; len4 = 0;
|
|
4213
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
4214
|
+
}
|
|
4215
|
+
deferred5_0 = ptr4;
|
|
4216
|
+
deferred5_1 = len4;
|
|
4217
|
+
return getStringFromWasm0(ptr4, len4);
|
|
4218
|
+
} finally {
|
|
4219
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
4220
|
+
}
|
|
4221
|
+
}
|
|
4222
|
+
|
|
4223
|
+
/**
|
|
4224
|
+
* Symmetry-unique vacancies as JSON.
|
|
4225
|
+
*
|
|
4226
|
+
* # Errors
|
|
4227
|
+
*
|
|
4228
|
+
* Returns a JavaScript `Error` for invalid text or distance.
|
|
4229
|
+
* @param {string} text
|
|
4230
|
+
* @param {string} format_hint
|
|
4231
|
+
* @param {number} min_image
|
|
4232
|
+
* @returns {string}
|
|
4233
|
+
*/
|
|
4234
|
+
export function vacancies(text, format_hint, min_image) {
|
|
4235
|
+
let deferred5_0;
|
|
4236
|
+
let deferred5_1;
|
|
4237
|
+
try {
|
|
4238
|
+
const val3 = +min_image;
|
|
4239
|
+
let ptr0, len0, ptr1, len1;
|
|
4240
|
+
try {
|
|
4241
|
+
ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4242
|
+
len0 = WASM_VECTOR_LEN;
|
|
4243
|
+
ptr1 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4244
|
+
len1 = WASM_VECTOR_LEN;
|
|
4245
|
+
} catch (e) {
|
|
4246
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
4247
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
4248
|
+
throw e;
|
|
4249
|
+
}
|
|
4250
|
+
const ret = wasm.vacancies(ptr0, len0, ptr1, len1, val3);
|
|
4251
|
+
var ptr4 = ret[0];
|
|
4252
|
+
var len4 = ret[1];
|
|
4253
|
+
if (ret[3]) {
|
|
4254
|
+
ptr4 = 0; len4 = 0;
|
|
4255
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
4256
|
+
}
|
|
4257
|
+
deferred5_0 = ptr4;
|
|
4258
|
+
deferred5_1 = len4;
|
|
4259
|
+
return getStringFromWasm0(ptr4, len4);
|
|
4260
|
+
} finally {
|
|
4261
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
4262
|
+
}
|
|
4263
|
+
}
|
|
4264
|
+
|
|
3010
4265
|
/**
|
|
3011
4266
|
* Version of the workspace.
|
|
3012
4267
|
* @returns {string}
|
|
@@ -3024,6 +4279,48 @@ export function version() {
|
|
|
3024
4279
|
}
|
|
3025
4280
|
}
|
|
3026
4281
|
|
|
4282
|
+
/**
|
|
4283
|
+
* Periodic Voronoi cells as JSON.
|
|
4284
|
+
*
|
|
4285
|
+
* # Errors
|
|
4286
|
+
*
|
|
4287
|
+
* Returns a JavaScript `Error` for invalid text or cutoff.
|
|
4288
|
+
* @param {string} text
|
|
4289
|
+
* @param {string} format_hint
|
|
4290
|
+
* @param {number} cutoff
|
|
4291
|
+
* @returns {string}
|
|
4292
|
+
*/
|
|
4293
|
+
export function voronoi(text, format_hint, cutoff) {
|
|
4294
|
+
let deferred5_0;
|
|
4295
|
+
let deferred5_1;
|
|
4296
|
+
try {
|
|
4297
|
+
const val3 = +cutoff;
|
|
4298
|
+
let ptr0, len0, ptr1, len1;
|
|
4299
|
+
try {
|
|
4300
|
+
ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4301
|
+
len0 = WASM_VECTOR_LEN;
|
|
4302
|
+
ptr1 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4303
|
+
len1 = WASM_VECTOR_LEN;
|
|
4304
|
+
} catch (e) {
|
|
4305
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
4306
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
4307
|
+
throw e;
|
|
4308
|
+
}
|
|
4309
|
+
const ret = wasm.voronoi(ptr0, len0, ptr1, len1, val3);
|
|
4310
|
+
var ptr4 = ret[0];
|
|
4311
|
+
var len4 = ret[1];
|
|
4312
|
+
if (ret[3]) {
|
|
4313
|
+
ptr4 = 0; len4 = 0;
|
|
4314
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
4315
|
+
}
|
|
4316
|
+
deferred5_0 = ptr4;
|
|
4317
|
+
deferred5_1 = len4;
|
|
4318
|
+
return getStringFromWasm0(ptr4, len4);
|
|
4319
|
+
} finally {
|
|
4320
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
4321
|
+
}
|
|
4322
|
+
}
|
|
4323
|
+
|
|
3027
4324
|
/**
|
|
3028
4325
|
* Archives run records (a JSON array) into an in-memory ZIP.
|
|
3029
4326
|
*
|
|
@@ -3064,6 +4361,50 @@ export function workspace_read_archive(bytes) {
|
|
|
3064
4361
|
return takeFromExternrefTable0(ret[0]);
|
|
3065
4362
|
}
|
|
3066
4363
|
|
|
4364
|
+
/**
|
|
4365
|
+
* Wulff construction as JSON.
|
|
4366
|
+
*
|
|
4367
|
+
* # Errors
|
|
4368
|
+
*
|
|
4369
|
+
* Returns a JavaScript `Error` for invalid text or surface energies.
|
|
4370
|
+
* @param {string} text
|
|
4371
|
+
* @param {string} format_hint
|
|
4372
|
+
* @param {string} options_json
|
|
4373
|
+
* @returns {string}
|
|
4374
|
+
*/
|
|
4375
|
+
export function wulff(text, format_hint, options_json) {
|
|
4376
|
+
let deferred5_0;
|
|
4377
|
+
let deferred5_1;
|
|
4378
|
+
try {
|
|
4379
|
+
let ptr0, len0, ptr1, len1, ptr2, len2;
|
|
4380
|
+
try {
|
|
4381
|
+
ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4382
|
+
len0 = WASM_VECTOR_LEN;
|
|
4383
|
+
ptr1 = passStringToWasm0(format_hint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4384
|
+
len1 = WASM_VECTOR_LEN;
|
|
4385
|
+
ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4386
|
+
len2 = WASM_VECTOR_LEN;
|
|
4387
|
+
} catch (e) {
|
|
4388
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
|
|
4389
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
4390
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
4391
|
+
throw e;
|
|
4392
|
+
}
|
|
4393
|
+
const ret = wasm.wulff(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
4394
|
+
var ptr4 = ret[0];
|
|
4395
|
+
var len4 = ret[1];
|
|
4396
|
+
if (ret[3]) {
|
|
4397
|
+
ptr4 = 0; len4 = 0;
|
|
4398
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
4399
|
+
}
|
|
4400
|
+
deferred5_0 = ptr4;
|
|
4401
|
+
deferred5_1 = len4;
|
|
4402
|
+
return getStringFromWasm0(ptr4, len4);
|
|
4403
|
+
} finally {
|
|
4404
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
4405
|
+
}
|
|
4406
|
+
}
|
|
4407
|
+
|
|
3067
4408
|
/**
|
|
3068
4409
|
* Returns Wyckoff assignments.
|
|
3069
4410
|
*
|
|
@@ -3129,6 +4470,14 @@ export function __wbg___wbindgen_debug_string_f249a2a76caa9a55(arg0, arg1) {
|
|
|
3129
4470
|
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
|
|
3130
4471
|
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
|
|
3131
4472
|
}
|
|
4473
|
+
export function __wbg___wbindgen_string_get_7ce8eee7fd327545(arg0, arg1) {
|
|
4474
|
+
const obj = arg1;
|
|
4475
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
4476
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4477
|
+
var len1 = WASM_VECTOR_LEN;
|
|
4478
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
|
|
4479
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
|
|
4480
|
+
}
|
|
3132
4481
|
export function __wbg___wbindgen_throw_4c88d8bf264fd984(arg0, arg1) {
|
|
3133
4482
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
3134
4483
|
}
|
|
@@ -3328,6 +4677,16 @@ function passArrayF64ToWasm0(arg, malloc) {
|
|
|
3328
4677
|
return ptr;
|
|
3329
4678
|
}
|
|
3330
4679
|
|
|
4680
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
4681
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
4682
|
+
for (let i = 0; i < array.length; i++) {
|
|
4683
|
+
const add = addToExternrefTable0(array[i]);
|
|
4684
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
4685
|
+
}
|
|
4686
|
+
WASM_VECTOR_LEN = array.length;
|
|
4687
|
+
return ptr;
|
|
4688
|
+
}
|
|
4689
|
+
|
|
3331
4690
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
3332
4691
|
if (realloc === undefined) {
|
|
3333
4692
|
const buf = cachedTextEncoder.encode(arg);
|