xtalforge-wasm 0.0.0-stage → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,801 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+
4
+ /**
5
+ * An undoable structure document in the browser.
6
+ */
7
+ export class WasmDocument {
8
+ free(): void;
9
+ [Symbol.dispose](): void;
10
+ /**
11
+ * Moves sites by a fractional delta.
12
+ *
13
+ * # Errors
14
+ *
15
+ * Returns a JavaScript `Error` for an out-of-range site.
16
+ */
17
+ move_sites(sites: Uint32Array | number[], dx: number, dy: number, dz: number): void;
18
+ /**
19
+ * Creates a document from structure text.
20
+ *
21
+ * # Errors
22
+ *
23
+ * Returns a JavaScript `Error` for invalid text.
24
+ */
25
+ constructor(text: string);
26
+ /**
27
+ * Redoes the last undone edit.
28
+ */
29
+ redo(): boolean;
30
+ /**
31
+ * Changes one site element.
32
+ *
33
+ * # Errors
34
+ *
35
+ * Returns a JavaScript `Error` for an unknown element or site.
36
+ */
37
+ set_element(site: number, element: string): void;
38
+ /**
39
+ * Returns the structure summary.
40
+ *
41
+ * # Errors
42
+ *
43
+ * Returns a JavaScript `Error` when the summary cannot be built.
44
+ */
45
+ summary(): any;
46
+ /**
47
+ * Writes the current structure as CIF.
48
+ *
49
+ * # Errors
50
+ *
51
+ * Returns a JavaScript `Error` for a writer failure.
52
+ */
53
+ to_cif(): string;
54
+ /**
55
+ * Undoes the last edit and returns whether it happened.
56
+ */
57
+ undo(): boolean;
58
+ /**
59
+ * Whether a redo is available.
60
+ */
61
+ readonly can_redo: boolean;
62
+ /**
63
+ * Whether an undo is available.
64
+ */
65
+ readonly can_undo: boolean;
66
+ /**
67
+ * Whether there are unsaved edits.
68
+ */
69
+ readonly dirty: boolean;
70
+ /**
71
+ * Command descriptions in the log.
72
+ */
73
+ readonly history: Array<any>;
74
+ }
75
+
76
+ /**
77
+ * Angle `i-j-k` in degrees, using minimum images.
78
+ *
79
+ * # Errors
80
+ *
81
+ * Returns a JavaScript `Error` for invalid text, an out-of-range index or a
82
+ * degenerate angle.
83
+ */
84
+ export function angle(text: string, i: number, j: number, k: number): number;
85
+
86
+ /**
87
+ * Reduces a structure to its detected asymmetric unit.
88
+ *
89
+ * # Errors
90
+ *
91
+ * Returns a JavaScript `Error` for invalid text or a failed search.
92
+ */
93
+ export function asymmetrize_info(text: string, symprec: number): any;
94
+
95
+ /**
96
+ * Perceives the bonds of a structure.
97
+ *
98
+ * Each element has `i`, `j`, `image` (a three-integer array), `distance`,
99
+ * `order` and `explicit`.
100
+ *
101
+ * # Errors
102
+ *
103
+ * Returns a JavaScript `Error` for invalid text or a failed bond perception.
104
+ */
105
+ export function bonds(text: string): Array<any>;
106
+
107
+ /**
108
+ * Returns the Wigner-Seitz Brillouin zone.
109
+ *
110
+ * # Errors
111
+ *
112
+ * Returns a JavaScript `Error` for invalid text or a degenerate lattice.
113
+ */
114
+ export function brillouin_zone(text: string): any;
115
+
116
+ /**
117
+ * Builds a C20 dodecahedron.
118
+ *
119
+ * # Errors
120
+ *
121
+ * Returns a JavaScript `Error` for a builder failure.
122
+ */
123
+ export function build_c20_info(): any;
124
+
125
+ /**
126
+ * Builds C60 and returns its summary.
127
+ *
128
+ * # Errors
129
+ *
130
+ * Returns a JavaScript `Error` when the embedded data is invalid.
131
+ */
132
+ export function build_c60_info(): any;
133
+
134
+ /**
135
+ * Builds a graphene sheet and returns its summary.
136
+ *
137
+ * # Errors
138
+ *
139
+ * Returns a JavaScript `Error` for invalid repeats or spacing.
140
+ */
141
+ export function build_graphene_info(nx: number, ny: number, layers: number, interlayer: number, vacuum: number): any;
142
+
143
+ /**
144
+ * Builds a framework and returns its summary and warnings.
145
+ *
146
+ * # Errors
147
+ *
148
+ * Returns a JavaScript `Error` for an unknown topology or block.
149
+ */
150
+ export function build_mof_info(topology: string, node: string, linker: string): any;
151
+
152
+ /**
153
+ * Builds a nanotube and returns its summary.
154
+ *
155
+ * # Errors
156
+ *
157
+ * Returns a JavaScript `Error` for a bad chiral vector or length.
158
+ */
159
+ export function build_nanotube_info(n: number, m: number, length: number, vacuum: number): any;
160
+
161
+ /**
162
+ * Volume of a cell in cubic Angstrom.
163
+ *
164
+ * # Errors
165
+ *
166
+ * Returns a JavaScript `Error` whose `code` property is the stable error
167
+ * code from the Rust core.
168
+ */
169
+ export function cell_volume(a: number, b: number, c: number, alpha: number, beta: number, gamma: number): number;
170
+
171
+ /**
172
+ * Changes the setting of a structure to a Hall number.
173
+ *
174
+ * # Errors
175
+ *
176
+ * Returns a JavaScript `Error` for invalid text or an unknown Hall number.
177
+ */
178
+ export function change_setting_info(text: string, hall_number: number): any;
179
+
180
+ /**
181
+ * Converts structure text to another format and returns the file contents.
182
+ *
183
+ * `format_hint` is the input format (`cif`, `poscar` or `xyz`, or empty to
184
+ * detect it) and `format` is the output format (`cif`, `poscar` or `xyz`).
185
+ *
186
+ * # Errors
187
+ *
188
+ * Returns a JavaScript `Error` for invalid text or an unknown format.
189
+ */
190
+ export function convert_structure(text: string, format_hint: string, format: string): string;
191
+
192
+ /**
193
+ * Detects the space group and returns the dataset as a JS object.
194
+ *
195
+ * The object carries `number`, `hall_number`, `hm_symbol`, `pearson_symbol`,
196
+ * `operations` (rotation, translation, triplet), `orbits`, `wyckoffs`,
197
+ * `site_symmetry_symbols`, `std_lattice`, `std_positions`,
198
+ * `std_origin_shift` and `std_rotation_matrix`.
199
+ *
200
+ * # Errors
201
+ *
202
+ * Returns a JavaScript `Error` for invalid text, a bad tolerance or a failed
203
+ * symmetry search.
204
+ */
205
+ export function detect_symmetry(text: string, symprec: number): any;
206
+
207
+ /**
208
+ * Reports per-atom deviations from a space group.
209
+ *
210
+ * # Errors
211
+ *
212
+ * Returns a JavaScript `Error` for invalid text or an unknown symbol.
213
+ */
214
+ export function diagnose_info(text: string, symbol: string): any;
215
+
216
+ /**
217
+ * Minimum-image distance between two P1 atoms, in Angstrom.
218
+ *
219
+ * # Errors
220
+ *
221
+ * Returns a JavaScript `Error` for invalid text or an out-of-range index.
222
+ */
223
+ export function distance(text: string, i: number, j: number): number;
224
+
225
+ /**
226
+ * Reference data for an element by symbol or atomic number.
227
+ *
228
+ * # Errors
229
+ *
230
+ * Returns a JavaScript `Error` with a stable `code` property when the input
231
+ * is not a known element.
232
+ */
233
+ export function element_info(input: string): any;
234
+
235
+ /**
236
+ * Returns QEq or EQeq charges.
237
+ *
238
+ * # Errors
239
+ *
240
+ * Returns a JavaScript `Error` for invalid text or an unknown method.
241
+ */
242
+ export function ff_charges_info(text: string, method: string, total_charge: number): any;
243
+
244
+ /**
245
+ * Returns the UFF energy in eV.
246
+ *
247
+ * # Errors
248
+ *
249
+ * Returns a JavaScript `Error` for invalid text or typing.
250
+ */
251
+ export function ff_energy(text: string): number;
252
+
253
+ /**
254
+ * Returns the broadened IR spectrum.
255
+ *
256
+ * # Errors
257
+ *
258
+ * Returns a JavaScript `Error` for invalid text or a failed Hessian.
259
+ */
260
+ export function ff_ir_info(text: string, fwhm: number): any;
261
+
262
+ /**
263
+ * Relaxes a structure and returns summary fields.
264
+ *
265
+ * # Errors
266
+ *
267
+ * Returns a JavaScript `Error` for invalid text or an unknown minimizer.
268
+ */
269
+ export function ff_optimize_info(text: string, minimizer: string, max_steps: number, force_tolerance: number, cell: boolean): any;
270
+
271
+ /**
272
+ * Runs the preparation pipeline and returns its report.
273
+ *
274
+ * # Errors
275
+ *
276
+ * Returns a JavaScript `Error` for invalid text or a failed step.
277
+ */
278
+ export function ff_prepare_info(text: string, minimize: boolean, charges: boolean, ewald: boolean, vibrations: boolean): any;
279
+
280
+ /**
281
+ * Returns harmonic thermochemistry.
282
+ *
283
+ * # Errors
284
+ *
285
+ * Returns a JavaScript `Error` for invalid text or a failed Hessian.
286
+ */
287
+ export function ff_thermo_info(text: string, temperature: number, pressure: number): any;
288
+
289
+ /**
290
+ * Returns the UFF atom types with reasons.
291
+ *
292
+ * # Errors
293
+ *
294
+ * Returns a JavaScript `Error` for invalid text or typing.
295
+ */
296
+ export function ff_types_info(text: string): Array<any>;
297
+
298
+ /**
299
+ * Returns the Gamma-point frequencies and flags.
300
+ *
301
+ * # Errors
302
+ *
303
+ * Returns a JavaScript `Error` for invalid text or a failed Hessian.
304
+ */
305
+ export function ff_vibrations_info(text: string, step: number): any;
306
+
307
+ /**
308
+ * Finds the functional groups of a structure.
309
+ *
310
+ * Each element has `kind` (the stable group name) and `atoms`, the sorted P1
311
+ * atom indices.
312
+ *
313
+ * # Errors
314
+ *
315
+ * Returns a JavaScript `Error` for invalid text or failed bond perception.
316
+ */
317
+ export function groups(text: string): Array<any>;
318
+
319
+ /**
320
+ * Adds hydrogens at the missing valences.
321
+ *
322
+ * # Errors
323
+ *
324
+ * Returns a JavaScript `Error` for invalid text or a bad distance.
325
+ */
326
+ export function hydrogens_info(text: string, distance: number): any;
327
+
328
+ /**
329
+ * Returns the Bravais type and band path of a structure.
330
+ *
331
+ * # Errors
332
+ *
333
+ * Returns a JavaScript `Error` for invalid text or a k-path failure.
334
+ */
335
+ export function kpath_info(text: string): any;
336
+
337
+ /**
338
+ * Unit-cell information from the six parameters.
339
+ *
340
+ * # Errors
341
+ *
342
+ * Returns a JavaScript `Error` with a stable `code` property for an invalid
343
+ * cell.
344
+ */
345
+ export function lattice_info(a: number, b: number, c: number, alpha: number, beta: number, gamma: number): any;
346
+
347
+ /**
348
+ * Minimum-image fractional vector and distance.
349
+ *
350
+ * # Errors
351
+ *
352
+ * Returns a JavaScript `Error` with a stable `code` property for an invalid
353
+ * cell or a delta that is not three numbers.
354
+ */
355
+ export function lattice_minimum_image(a: number, b: number, c: number, alpha: number, beta: number, gamma: number, delta: Float64Array | number[]): any;
356
+
357
+ /**
358
+ * Detects the layer group of a slab.
359
+ *
360
+ * # Errors
361
+ *
362
+ * Returns a JavaScript `Error` when the layer contract is violated or the
363
+ * search fails.
364
+ */
365
+ export function layer_group_info(text: string, symprec: number): any;
366
+
367
+ /**
368
+ * Soft and hard bounds for a profile and budget.
369
+ *
370
+ * # Errors
371
+ *
372
+ * Returns a JavaScript `Error` for an unknown budget.
373
+ */
374
+ export function limits_bounds(profile: string, budget: string): Array<any>;
375
+
376
+ /**
377
+ * Generic limit check for a profile, budget and estimate.
378
+ *
379
+ * # Errors
380
+ *
381
+ * Returns a JavaScript `Error` for an unknown budget.
382
+ */
383
+ export function limits_check(profile: string, budget: string, estimate: number): any;
384
+
385
+ /**
386
+ * Lowers a structure to a subgroup number.
387
+ *
388
+ * # Errors
389
+ *
390
+ * Returns a JavaScript `Error` for invalid text or a lowering failure.
391
+ */
392
+ export function lower_to_subgroup_info(text: string, subgroup: number, tolerance: number): any;
393
+
394
+ /**
395
+ * Detects the collinear magnetic space group (experimental).
396
+ *
397
+ * # Errors
398
+ *
399
+ * Returns a JavaScript `Error` for invalid text or a failed search.
400
+ */
401
+ export function magnetic_group_info(text: string, symprec: number): any;
402
+
403
+ /**
404
+ * Builds an ASCII STL string.
405
+ *
406
+ * # Errors
407
+ *
408
+ * Returns a JavaScript `Error` for invalid text or an unknown style.
409
+ */
410
+ export function mesh_stl(text: string, style: string, scale: number): string;
411
+
412
+ /**
413
+ * Lists the building blocks.
414
+ *
415
+ * # Errors
416
+ *
417
+ * Returns a JavaScript `Error` for invalid embedded data.
418
+ */
419
+ export function mof_blocks_info(): Array<any>;
420
+
421
+ /**
422
+ * Lists the topology catalogue.
423
+ *
424
+ * # Errors
425
+ *
426
+ * Returns a JavaScript `Error` for invalid embedded data.
427
+ */
428
+ export function mof_topologies_info(): Array<any>;
429
+
430
+ /**
431
+ * Finds the periodic neighbors within `cutoff` Angstrom.
432
+ *
433
+ * Each element has `i`, `j`, `image` (the lattice translation of `j`) and
434
+ * `distance`.
435
+ *
436
+ * # Errors
437
+ *
438
+ * Returns a JavaScript `Error` for invalid text or a non-positive cutoff.
439
+ */
440
+ export function neighbors(text: string, cutoff: number): Array<any>;
441
+
442
+ /**
443
+ * Returns the invariants of every CGD entry.
444
+ *
445
+ * # Errors
446
+ *
447
+ * Returns a JavaScript `Error` for an invalid net.
448
+ */
449
+ export function net_invariants_info(text: string, tolerance: number): Array<any>;
450
+
451
+ /**
452
+ * Returns the JSON schema of a built-in parameter preset.
453
+ *
454
+ * # Errors
455
+ *
456
+ * Returns a JavaScript `Error` for an unknown preset.
457
+ */
458
+ export function param_schema(name: string): any;
459
+
460
+ /**
461
+ * Detects the molecular point group of a finite structure.
462
+ *
463
+ * # Errors
464
+ *
465
+ * Returns a JavaScript `Error` for invalid text or an unsupported group.
466
+ */
467
+ export function pointgroup_info(text: string, tolerance: number): any;
468
+
469
+ /**
470
+ * Builds a polymer chain and returns its steps.
471
+ *
472
+ * # Errors
473
+ *
474
+ * Returns a JavaScript `Error` for an unsupported template.
475
+ */
476
+ export function polymer_info(smiles: string, monomers: number, density: number): any;
477
+
478
+ /**
479
+ * Returns the porosity numbers of a structure.
480
+ *
481
+ * # Errors
482
+ *
483
+ * Returns a JavaScript `Error` for invalid text or a bad spacing.
484
+ */
485
+ export function porosity_info(text: string, spacing: number, probe: number): any;
486
+
487
+ /**
488
+ * Runs the automatic peak/index/Le Bail/Rietveld pipeline.
489
+ *
490
+ * # Errors
491
+ *
492
+ * Returns a JavaScript `Error` for invalid text, pattern or options.
493
+ */
494
+ export function powder_automatic_info(text: string, pattern_text: string): any;
495
+
496
+ /**
497
+ * Returns the free cell parameters and extinction symbol.
498
+ *
499
+ * # Errors
500
+ *
501
+ * Returns a JavaScript `Error` for an invalid space-group number.
502
+ */
503
+ export function powder_cells_info(number: number): any;
504
+
505
+ /**
506
+ * Refines positions with a whole-pattern least-squares step.
507
+ *
508
+ * # Errors
509
+ *
510
+ * Returns a JavaScript `Error` for invalid text or a failed fit.
511
+ */
512
+ export function powder_refine_info(text: string, pattern_text: string, refine_positions: boolean): any;
513
+
514
+ /**
515
+ * Builds the standardized primitive cell.
516
+ *
517
+ * # Errors
518
+ *
519
+ * Returns a JavaScript `Error` for invalid text or a failed search.
520
+ */
521
+ export function primitive_info(text: string, symprec: number): any;
522
+
523
+ /**
524
+ * Reads `.xtalproj` bytes and returns the structure summary.
525
+ *
526
+ * # Errors
527
+ *
528
+ * Returns a JavaScript `Error` for a corrupt or unsupported archive.
529
+ */
530
+ export function project_info(bytes: Uint8Array | number[]): any;
531
+
532
+ /**
533
+ * Packs structure text into `.xtalproj` bytes.
534
+ *
535
+ * # Errors
536
+ *
537
+ * Returns a JavaScript `Error` for invalid text or a writer failure.
538
+ */
539
+ export function project_pack(text: string): Uint8Array;
540
+
541
+ /**
542
+ * Calculates a PXRD pattern.
543
+ *
544
+ * # Errors
545
+ *
546
+ * Returns a JavaScript `Error` for invalid text, radiation or options.
547
+ */
548
+ export function pxrd_info(text: string, radiation: string, max_two_theta: number, step: number): any;
549
+
550
+ /**
551
+ * Reads a CIF and returns its summary object.
552
+ *
553
+ * This is the forced-CIF variant of [`read_structure`].
554
+ *
555
+ * # Errors
556
+ *
557
+ * Returns a JavaScript `Error` with a stable `code` property for invalid
558
+ * CIF text.
559
+ */
560
+ export function read_cif(text: string): any;
561
+
562
+ /**
563
+ * Reads a structure from text and returns its summary object.
564
+ *
565
+ * `format_hint` accepts `cif`, `poscar`, `vasp` or `xyz`, with or without a
566
+ * leading dot. When the hint is empty the format is detected from the text.
567
+ *
568
+ * The object has the fields of `structure_info`: `name`, `formula`, `hall`,
569
+ * `n_sites`, `volume`, `density`, `total_charge` and `is_p1`.
570
+ *
571
+ * # Errors
572
+ *
573
+ * Returns a JavaScript `Error` with a stable `code` property for an unknown
574
+ * format or invalid structure text.
575
+ */
576
+ export function read_structure(text: string, format_hint: string): any;
577
+
578
+ /**
579
+ * Reduces a structure with Niggli, Delaunay or Minkowski reduction.
580
+ *
581
+ * # Errors
582
+ *
583
+ * Returns a JavaScript `Error` for invalid text or an unknown algorithm.
584
+ */
585
+ export function reduce_info(text: string, algorithm: string): any;
586
+
587
+ /**
588
+ * Builds a honeycomb nanoribbon with vacuum.
589
+ *
590
+ * # Errors
591
+ *
592
+ * Returns a JavaScript `Error` for invalid dimensions.
593
+ */
594
+ export function ribbon_info(width: number, length: number, vacuum: number): any;
595
+
596
+ /**
597
+ * Returns the rietx bridge inventory.
598
+ */
599
+ export function rietx_inventory_info(): any;
600
+
601
+ /**
602
+ * Finds chordless rings up to `max_size` atoms.
603
+ *
604
+ * Each element has `size` and `atoms`, the sorted P1 atom indices.
605
+ *
606
+ * # Errors
607
+ *
608
+ * Returns a JavaScript `Error` for invalid text or a size limit below three.
609
+ */
610
+ export function rings(text: string, max_size: number): Array<any>;
611
+
612
+ /**
613
+ * Summarizes a scene for the given draw style.
614
+ *
615
+ * # Errors
616
+ *
617
+ * Returns a JavaScript `Error` for invalid text or an unknown style.
618
+ */
619
+ export function scene_summary(text: string, style: string, scale: number): any;
620
+
621
+ /**
622
+ * Builds a Schwarz P carbon model.
623
+ *
624
+ * # Errors
625
+ *
626
+ * Returns a JavaScript `Error` for invalid options.
627
+ */
628
+ export function schwarzite_info(samples: number, cell: number, isovalue: number): any;
629
+
630
+ /**
631
+ * Applies a space group in `reinterpret` or `impose` mode.
632
+ *
633
+ * The object carries the structure summary plus `set_report` with the
634
+ * input/output site counts and the largest imposed displacement.
635
+ *
636
+ * # Errors
637
+ *
638
+ * Returns a JavaScript `Error` for invalid text, an unknown symbol or mode.
639
+ */
640
+ export function set_space_group_info(text: string, symbol: string, mode: string): any;
641
+
642
+ /**
643
+ * Cuts a slab and returns its summary object.
644
+ *
645
+ * The object carries the summary fields plus `hkl`, `layers`, `thickness`,
646
+ * `vacuum` and `cut`. The slab is always P1.
647
+ *
648
+ * # Errors
649
+ *
650
+ * Returns a JavaScript `Error` for invalid text, a zero layer count, a
651
+ * negative vacuum or a plane that is degenerate in the cell.
652
+ */
653
+ export function slab_info(text: string, h: number, k: number, l: number, layers: number, vacuum: number): any;
654
+
655
+ /**
656
+ * Cuts a slab and returns it as CIF text.
657
+ *
658
+ * # Errors
659
+ *
660
+ * Returns a JavaScript `Error` for invalid text, a bad plane or a writer
661
+ * failure.
662
+ */
663
+ export function slab_text(text: string, h: number, k: number, l: number, layers: number, vacuum: number): string;
664
+
665
+ /**
666
+ * Standardizes a structure to the conventional cell.
667
+ *
668
+ * # Errors
669
+ *
670
+ * Returns a JavaScript `Error` for invalid text or a failed search.
671
+ */
672
+ export function standardize_info(text: string, symprec: number): any;
673
+
674
+ /**
675
+ * Summary of a structure JSON document.
676
+ *
677
+ * # Errors
678
+ *
679
+ * Returns a JavaScript `Error` with a stable `code` property for invalid
680
+ * input.
681
+ */
682
+ export function structure_info(text: string): any;
683
+
684
+ /**
685
+ * Lists the translationengleiche subgroups of a Hall setting.
686
+ *
687
+ * # Errors
688
+ *
689
+ * Returns a JavaScript `Error` when enumeration fails.
690
+ */
691
+ export function subgroups_info(hall_number: number, epsilon: number): Array<any>;
692
+
693
+ /**
694
+ * Builds a supercell and returns its summary object.
695
+ *
696
+ * The object carries the summary fields plus `repeats`, the `[na, nb, nc]`
697
+ * three-number array. The supercell is always P1.
698
+ *
699
+ * # Errors
700
+ *
701
+ * Returns a JavaScript `Error` for invalid text, zero repeats or a cell over
702
+ * the hard size limit.
703
+ */
704
+ export function supercell_info(text: string, na: number, nb: number, nc: number): any;
705
+
706
+ /**
707
+ * Builds a supercell and returns it as CIF text.
708
+ *
709
+ * # Errors
710
+ *
711
+ * Returns a JavaScript `Error` for invalid text, zero repeats, a refused
712
+ * size or a writer failure.
713
+ */
714
+ export function supercell_text(text: string, na: number, nb: number, nc: number): string;
715
+
716
+ /**
717
+ * Expands a structure to P1.
718
+ *
719
+ * # Errors
720
+ *
721
+ * Returns a JavaScript `Error` for invalid text or an empty structure.
722
+ */
723
+ export function to_p1_info(text: string): any;
724
+
725
+ /**
726
+ * Detects across the default tolerance ladder.
727
+ *
728
+ * # Errors
729
+ *
730
+ * Returns a JavaScript `Error` for invalid text or a failed search.
731
+ */
732
+ export function tolerance_ladder_info(text: string): Array<any>;
733
+
734
+ /**
735
+ * Torsion `i-j-k-l` in degrees, using minimum images.
736
+ *
737
+ * # Errors
738
+ *
739
+ * Returns a JavaScript `Error` for invalid text, an out-of-range index or a
740
+ * collinear segment.
741
+ */
742
+ export function torsion(text: string, i: number, j: number, k: number, l: number): number;
743
+
744
+ /**
745
+ * Builds two twisted graphene layers.
746
+ *
747
+ * # Errors
748
+ *
749
+ * Returns a JavaScript `Error` for invalid repeats or angle.
750
+ */
751
+ export function twist_info(n: number, m: number, theta: number, layers: number): any;
752
+
753
+ /**
754
+ * Version of the workspace.
755
+ */
756
+ export function version(): string;
757
+
758
+ /**
759
+ * Archives run records (a JSON array) into an in-memory ZIP.
760
+ *
761
+ * # Errors
762
+ *
763
+ * Returns a JavaScript `Error` for invalid records.
764
+ */
765
+ export function workspace_archive(records_json: string): Uint8Array;
766
+
767
+ /**
768
+ * Lists the run ids inside an in-memory workspace ZIP.
769
+ *
770
+ * # Errors
771
+ *
772
+ * Returns a JavaScript `Error` for a corrupt archive.
773
+ */
774
+ export function workspace_read_archive(bytes: Uint8Array | number[]): Array<any>;
775
+
776
+ /**
777
+ * Returns Wyckoff assignments.
778
+ *
779
+ * # Errors
780
+ *
781
+ * Returns a JavaScript `Error` for invalid text or a failed search.
782
+ */
783
+ export function wyckoff_info(text: string, symprec: number): Array<any>;
784
+
785
+ /**
786
+ * Parses Zeo++ `Channels` output.
787
+ *
788
+ * # Errors
789
+ *
790
+ * Returns a JavaScript `Error` for missing lines.
791
+ */
792
+ export function zeo_parse_info(text: string): any;
793
+
794
+ /**
795
+ * Builds a gyroid ZTC carbon model.
796
+ *
797
+ * # Errors
798
+ *
799
+ * Returns a JavaScript `Error` for invalid options.
800
+ */
801
+ export function ztc_info(samples: number, cell: number, isovalue: number): any;