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 CHANGED
@@ -5,7 +5,7 @@
5
5
  "Jose Ivan Gonzalez <jigonzalez930209@gmail.com>"
6
6
  ],
7
7
  "description": "WebAssembly bindings for xtalforge.",
8
- "version": "1.1.0",
8
+ "version": "1.2.0",
9
9
  "license": "MIT OR Apache-2.0",
10
10
  "repository": {
11
11
  "type": "git",
@@ -109,6 +109,15 @@ export class WasmDocument {
109
109
  readonly history: Array<any>;
110
110
  }
111
111
 
112
+ /**
113
+ * Adsorption sites as JSON.
114
+ *
115
+ * # Errors
116
+ *
117
+ * Returns a JavaScript `Error` for invalid text or tolerance.
118
+ */
119
+ export function adsorption_sites(text: string, format_hint: string, tolerance: number): string;
120
+
112
121
  /**
113
122
  * Runtime capability report as JSON.
114
123
  */
@@ -156,6 +165,15 @@ export function asymmetrize_info(text: string, symprec: number): any;
156
165
  */
157
166
  export function asymmetrize_text(text: string, symprec: number): string;
158
167
 
168
+ /**
169
+ * Bond-valence sums as JSON.
170
+ *
171
+ * # Errors
172
+ *
173
+ * Returns a JavaScript `Error` for invalid text or cutoff.
174
+ */
175
+ export function bond_valence_sums(text: string, format_hint: string, cutoff: number): string;
176
+
159
177
  /**
160
178
  * Perceives the bonds of a structure.
161
179
  *
@@ -374,6 +392,33 @@ export function change_setting_text(text: string, hall_number: number): string;
374
392
  */
375
393
  export function convert_structure(text: string, format_hint: string, format: string): string;
376
394
 
395
+ /**
396
+ * Convex hull as JSON from a JSON list of phases.
397
+ *
398
+ * # Errors
399
+ *
400
+ * Returns a JavaScript `Error` for an invalid phase list.
401
+ */
402
+ export function convex_hull(entries_json: string): string;
403
+
404
+ /**
405
+ * Coordination shell and shape measures as JSON.
406
+ *
407
+ * # Errors
408
+ *
409
+ * Returns a JavaScript `Error` for invalid text or an out-of-range index.
410
+ */
411
+ export function coordination(text: string, format_hint: string, index: number, strategy: string, cutoff: number, solid_angle: number): string;
412
+
413
+ /**
414
+ * Applies a strain, gradient, volume or density and returns structure JSON.
415
+ *
416
+ * # Errors
417
+ *
418
+ * Returns a JavaScript `Error` for invalid text or deformation options.
419
+ */
420
+ export function deform(text: string, format_hint: string, options_json: string): string;
421
+
377
422
  /**
378
423
  * Detects the space group and returns the dataset as a JS object.
379
424
  *
@@ -407,6 +452,24 @@ export function diagnose_info(text: string, symbol: string): any;
407
452
  */
408
453
  export function distance(text: string, i: number, j: number): number;
409
454
 
455
+ /**
456
+ * Site edits; returns structure JSON.
457
+ *
458
+ * # Errors
459
+ *
460
+ * Returns a JavaScript `Error` for invalid text or edit options.
461
+ */
462
+ export function edit_structure(text: string, format_hint: string, options_json: string): string;
463
+
464
+ /**
465
+ * Elastic tensor from UFF stress finite differences as JSON.
466
+ *
467
+ * # Errors
468
+ *
469
+ * Returns a JavaScript `Error` for invalid text or strain.
470
+ */
471
+ export function elastic_tensor(text: string, format_hint: string, strain: number): string;
472
+
410
473
  /**
411
474
  * Reference data for an element by symbol or atomic number.
412
475
  *
@@ -417,6 +480,15 @@ export function distance(text: string, i: number, j: number): number;
417
480
  */
418
481
  export function element_info(input: string): any;
419
482
 
483
+ /**
484
+ * Equation-of-state fit as JSON.
485
+ *
486
+ * # Errors
487
+ *
488
+ * Returns a JavaScript `Error` for an unknown model or too few points.
489
+ */
490
+ export function eos_fit(options_json: string): string;
491
+
420
492
  /**
421
493
  * Returns QEq, EQeq or EEQ2019 charges (`qeq`, `eqeq`, `eeq`).
422
494
  *
@@ -498,6 +570,24 @@ export function ff_types_info(text: string): Array<any>;
498
570
  */
499
571
  export function ff_vibrations_info(text: string, step: number): any;
500
572
 
573
+ /**
574
+ * Similarity of two fingerprints.
575
+ *
576
+ * # Errors
577
+ *
578
+ * Returns a JavaScript `Error` for invalid text.
579
+ */
580
+ export function fingerprint_similarity(first: string, second: string, format_hint: string, r_max: number, bin_width: number): number;
581
+
582
+ /**
583
+ * Equality classes of a list of structure texts.
584
+ *
585
+ * # Errors
586
+ *
587
+ * Returns a JavaScript `Error` for invalid text.
588
+ */
589
+ export function group_structures(structures: string[], format_hint: string, options_json: string): string;
590
+
501
591
  /**
502
592
  * Finds the functional groups of a structure.
503
593
  *
@@ -528,6 +618,34 @@ export function hydrogens_info(text: string, distance: number): any;
528
618
  */
529
619
  export function hydrogens_text(text: string, distance: number): string;
530
620
 
621
+ /**
622
+ * Linear interpolation between matched structures; returns a JSON array of
623
+ * structure documents.
624
+ *
625
+ * # Errors
626
+ *
627
+ * Returns a JavaScript `Error` when the structures do not match.
628
+ */
629
+ export function interpolate(first: string, second: string, images: number, format_hint: string, options_json: string): string;
630
+
631
+ /**
632
+ * Interstitial candidates as JSON.
633
+ *
634
+ * # Errors
635
+ *
636
+ * Returns a JavaScript `Error` for invalid text or options.
637
+ */
638
+ export function interstitials(text: string, format_hint: string, species: string, options_json: string): string;
639
+
640
+ /**
641
+ * Kabsch alignment; points are a flat `xyzxyz...` array.
642
+ *
643
+ * # Errors
644
+ *
645
+ * Returns a JavaScript `Error` for mismatched or non-finite point sets.
646
+ */
647
+ export function kabsch_alignment(points: Float64Array | number[], reference: Float64Array | number[]): string;
648
+
531
649
  /**
532
650
  * Returns the Bravais type and band path of a structure.
533
651
  *
@@ -547,6 +665,15 @@ export function kpath_info(text: string): any;
547
665
  */
548
666
  export function lattice_info(a: number, b: number, c: number, alpha: number, beta: number, gamma: number): any;
549
667
 
668
+ /**
669
+ * Commensurate 2D lattice matches as JSON.
670
+ *
671
+ * # Errors
672
+ *
673
+ * Returns a JavaScript `Error` for invalid text or options.
674
+ */
675
+ export function lattice_matches(film: string, substrate: string, format_hint: string, options_json: string): string;
676
+
550
677
  /**
551
678
  * Minimum-image fractional vector and distance.
552
679
  *
@@ -612,6 +739,15 @@ export function lower_to_subgroup_text(text: string, subgroup_number: number, to
612
739
  */
613
740
  export function magnetic_group_info(text: string, symprec: number): any;
614
741
 
742
+ /**
743
+ * Matches two structures and returns the match record as JSON.
744
+ *
745
+ * # Errors
746
+ *
747
+ * Returns a JavaScript `Error` for invalid text or tolerances.
748
+ */
749
+ export function match_structures(first: string, second: string, format_hint: string, options_json: string): string;
750
+
615
751
  /**
616
752
  * Builds an ASCII STL string.
617
753
  *
@@ -660,6 +796,33 @@ export function neighbors(text: string, cutoff: number): Array<any>;
660
796
  */
661
797
  export function net_invariants_info(text: string, tolerance: number): Array<any>;
662
798
 
799
+ /**
800
+ * Supercell closest to a cube; returns structure JSON.
801
+ *
802
+ * # Errors
803
+ *
804
+ * Returns a JavaScript `Error` for an invalid cell count.
805
+ */
806
+ export function optimal_supercell(text: string, cells: number, format_hint: string): string;
807
+
808
+ /**
809
+ * Orderings of partial occupancies as JSON.
810
+ *
811
+ * # Errors
812
+ *
813
+ * Returns a JavaScript `Error` for a structure without partial occupancy.
814
+ */
815
+ export function orderings(text: string, format_hint: string, options_json: string): string;
816
+
817
+ /**
818
+ * Oxidation states as JSON.
819
+ *
820
+ * # Errors
821
+ *
822
+ * Returns a JavaScript `Error` for invalid text or cutoff.
823
+ */
824
+ export function oxidation_states(text: string, format_hint: string, cutoff: number): string;
825
+
663
826
  /**
664
827
  * Returns the JSON schema of a built-in parameter preset.
665
828
  *
@@ -669,6 +832,24 @@ export function net_invariants_info(text: string, tolerance: number): Array<any>
669
832
  */
670
833
  export function param_schema(name: string): any;
671
834
 
835
+ /**
836
+ * Periodic RMSD for an explicit atom mapping.
837
+ *
838
+ * # Errors
839
+ *
840
+ * Returns a JavaScript `Error` for invalid text or an incomplete mapping.
841
+ */
842
+ export function periodic_rmsd(first: string, second: string, mapping: Uint32Array | number[], format_hint: string): number;
843
+
844
+ /**
845
+ * Places a molecule on an adsorption site and returns structure JSON.
846
+ *
847
+ * # Errors
848
+ *
849
+ * Returns a JavaScript `Error` for invalid text or an out-of-range site.
850
+ */
851
+ export function place_molecule(slab: string, molecule: string, format_hint: string, options_json: string): string;
852
+
672
853
  /**
673
854
  * Detects the molecular point group of a finite structure.
674
855
  *
@@ -815,6 +996,24 @@ export function project_pack(text: string): Uint8Array;
815
996
  */
816
997
  export function pxrd_info(text: string, radiation: string, max_two_theta: number, step: number): any;
817
998
 
999
+ /**
1000
+ * Total and partial RDF as JSON.
1001
+ *
1002
+ * # Errors
1003
+ *
1004
+ * Returns a JavaScript `Error` for invalid text or range.
1005
+ */
1006
+ export function radial_distribution(text: string, format_hint: string, r_max: number, bin_width: number, smoothing: number): string;
1007
+
1008
+ /**
1009
+ * Random displacements with a fixed seed; returns structure JSON.
1010
+ *
1011
+ * # Errors
1012
+ *
1013
+ * Returns a JavaScript `Error` for invalid text or options.
1014
+ */
1015
+ export function rattle(text: string, format_hint: string, options_json: string): string;
1016
+
818
1017
  /**
819
1018
  * Reads a CIF and returns its summary object.
820
1019
  *
@@ -958,6 +1157,15 @@ export function set_space_group_text(text: string, symbol: string, mode: string)
958
1157
  */
959
1158
  export function slab_info(text: string, h: number, k: number, l: number, layers: number, vacuum: number): any;
960
1159
 
1160
+ /**
1161
+ * Every termination of a surface as JSON with structure documents.
1162
+ *
1163
+ * # Errors
1164
+ *
1165
+ * Returns a JavaScript `Error` for invalid text or a degenerate plane.
1166
+ */
1167
+ export function slab_terminations(text: string, format_hint: string, options_json: string): string;
1168
+
961
1169
  /**
962
1170
  * Cuts a slab and returns it as CIF text.
963
1171
  *
@@ -968,6 +1176,24 @@ export function slab_info(text: string, h: number, k: number, l: number, layers:
968
1176
  */
969
1177
  export function slab_text(text: string, h: number, k: number, l: number, layers: number, vacuum: number): string;
970
1178
 
1179
+ /**
1180
+ * SQS generation as JSON.
1181
+ *
1182
+ * # Errors
1183
+ *
1184
+ * Returns a JavaScript `Error` for a structure without binary disorder.
1185
+ */
1186
+ export function special_quasirandom(text: string, format_hint: string, options_json: string): string;
1187
+
1188
+ /**
1189
+ * Stacks a film on a substrate; returns structure JSON.
1190
+ *
1191
+ * # Errors
1192
+ *
1193
+ * Returns a JavaScript `Error` for empty slabs or invalid options.
1194
+ */
1195
+ export function stack_slabs(film: string, substrate: string, format_hint: string, options_json: string): string;
1196
+
971
1197
  /**
972
1198
  * Standardizes a structure to the conventional cell.
973
1199
  *
@@ -986,6 +1212,15 @@ export function standardize_info(text: string, symprec: number): any;
986
1212
  */
987
1213
  export function standardize_text(text: string, symprec: number): string;
988
1214
 
1215
+ /**
1216
+ * Structure fingerprint as JSON.
1217
+ *
1218
+ * # Errors
1219
+ *
1220
+ * Returns a JavaScript `Error` for invalid text or range.
1221
+ */
1222
+ export function structure_fingerprint(text: string, format_hint: string, r_max: number, bin_width: number): string;
1223
+
989
1224
  /**
990
1225
  * Summary of a structure JSON document.
991
1226
  *
@@ -1005,6 +1240,15 @@ export function structure_info(text: string): any;
1005
1240
  */
1006
1241
  export function subgroups_info(hall_number: number, epsilon: number): Array<any>;
1007
1242
 
1243
+ /**
1244
+ * Symmetry-unique substitutions as JSON.
1245
+ *
1246
+ * # Errors
1247
+ *
1248
+ * Returns a JavaScript `Error` for invalid text or species.
1249
+ */
1250
+ export function substitutions(text: string, format_hint: string, species: string, min_image: number): string;
1251
+
1008
1252
  /**
1009
1253
  * Builds a supercell and returns its summary object.
1010
1254
  *
@@ -1074,11 +1318,38 @@ export function torsion(text: string, i: number, j: number, k: number, l: number
1074
1318
  */
1075
1319
  export function twist_info(n: number, m: number, theta: number, layers: number): any;
1076
1320
 
1321
+ /**
1322
+ * Symmetry-unique Miller indices as JSON.
1323
+ *
1324
+ * # Errors
1325
+ *
1326
+ * Returns a JavaScript `Error` for invalid text or a bad index bound.
1327
+ */
1328
+ export function unique_miller_indices(text: string, format_hint: string, options_json: string): string;
1329
+
1330
+ /**
1331
+ * Symmetry-unique vacancies as JSON.
1332
+ *
1333
+ * # Errors
1334
+ *
1335
+ * Returns a JavaScript `Error` for invalid text or distance.
1336
+ */
1337
+ export function vacancies(text: string, format_hint: string, min_image: number): string;
1338
+
1077
1339
  /**
1078
1340
  * Version of the workspace.
1079
1341
  */
1080
1342
  export function version(): string;
1081
1343
 
1344
+ /**
1345
+ * Periodic Voronoi cells as JSON.
1346
+ *
1347
+ * # Errors
1348
+ *
1349
+ * Returns a JavaScript `Error` for invalid text or cutoff.
1350
+ */
1351
+ export function voronoi(text: string, format_hint: string, cutoff: number): string;
1352
+
1082
1353
  /**
1083
1354
  * Archives run records (a JSON array) into an in-memory ZIP.
1084
1355
  *
@@ -1097,6 +1368,15 @@ export function workspace_archive(records_json: string): Uint8Array;
1097
1368
  */
1098
1369
  export function workspace_read_archive(bytes: Uint8Array | number[]): Array<any>;
1099
1370
 
1371
+ /**
1372
+ * Wulff construction as JSON.
1373
+ *
1374
+ * # Errors
1375
+ *
1376
+ * Returns a JavaScript `Error` for invalid text or surface energies.
1377
+ */
1378
+ export function wulff(text: string, format_hint: string, options_json: string): string;
1379
+
1100
1380
  /**
1101
1381
  * Returns Wyckoff assignments.
1102
1382
  *
package/xtalforge_wasm.js CHANGED
@@ -5,5 +5,5 @@ import { __wbg_set_wasm } from "./xtalforge_wasm_bg.js";
5
5
  __wbg_set_wasm(wasm);
6
6
  wasm.__wbindgen_start();
7
7
  export {
8
- AgentSession, WasmDocument, agent_capabilities, agent_run, agent_verbs, angle, asymmetrize_info, asymmetrize_text, bonds, brillouin_zone, build_c20_info, build_c20_text, build_c60_info, build_c60_text, build_carbon_recipe_info, build_carbon_text, build_graphene_info, build_graphene_text, build_mof_info, build_mof_text, build_nanotube_info, build_nanotube_text, build_polymer_text, build_ribbon_text, build_schwarzite_text, build_twist_text, build_ztc_text, cell_volume, change_setting_info, change_setting_text, convert_structure, detect_symmetry, diagnose_info, distance, element_info, ff_charges_info, ff_energy, ff_ir_info, ff_optimize_info, ff_optimize_text, ff_prepare_info, ff_thermo_info, ff_types_info, ff_vibrations_info, groups, hydrogens_info, hydrogens_text, kpath_info, lattice_info, lattice_minimum_image, layer_group_info, limits_bounds, limits_check, lower_to_subgroup_info, lower_to_subgroup_text, magnetic_group_info, mesh_stl, mof_blocks_info, mof_topologies_info, neighbors, net_invariants_info, param_schema, pointgroup_info, polymer_info, porosity_info, powder_automatic_info, powder_cells_info, powder_index_info, powder_lebail_info, powder_pawley_info, powder_pawley_width_info, powder_refine_info, primitive_info, primitive_text, project_info, project_pack, pxrd_info, read_cif, read_structure, reduce_info, reduce_text, ribbon_info, rietx_inventory_info, rings, scene_data, scene_summary, schwarzite_info, set_space_group_info, set_space_group_text, slab_info, slab_text, standardize_info, standardize_text, structure_info, subgroups_info, supercell_info, supercell_text, to_p1_info, to_p1_text, tolerance_ladder_info, torsion, twist_info, version, workspace_archive, workspace_read_archive, wyckoff_info, zeo_parse_info, ztc_info
8
+ AgentSession, WasmDocument, adsorption_sites, agent_capabilities, agent_run, agent_verbs, angle, asymmetrize_info, asymmetrize_text, bond_valence_sums, bonds, brillouin_zone, build_c20_info, build_c20_text, build_c60_info, build_c60_text, build_carbon_recipe_info, build_carbon_text, build_graphene_info, build_graphene_text, build_mof_info, build_mof_text, build_nanotube_info, build_nanotube_text, build_polymer_text, build_ribbon_text, build_schwarzite_text, build_twist_text, build_ztc_text, cell_volume, change_setting_info, change_setting_text, convert_structure, convex_hull, coordination, deform, detect_symmetry, diagnose_info, distance, edit_structure, elastic_tensor, element_info, eos_fit, ff_charges_info, ff_energy, ff_ir_info, ff_optimize_info, ff_optimize_text, ff_prepare_info, ff_thermo_info, ff_types_info, ff_vibrations_info, fingerprint_similarity, group_structures, groups, hydrogens_info, hydrogens_text, interpolate, interstitials, kabsch_alignment, kpath_info, lattice_info, lattice_matches, lattice_minimum_image, layer_group_info, limits_bounds, limits_check, lower_to_subgroup_info, lower_to_subgroup_text, magnetic_group_info, match_structures, mesh_stl, mof_blocks_info, mof_topologies_info, neighbors, net_invariants_info, optimal_supercell, orderings, oxidation_states, param_schema, periodic_rmsd, place_molecule, pointgroup_info, polymer_info, porosity_info, powder_automatic_info, powder_cells_info, powder_index_info, powder_lebail_info, powder_pawley_info, powder_pawley_width_info, powder_refine_info, primitive_info, primitive_text, project_info, project_pack, pxrd_info, radial_distribution, rattle, read_cif, read_structure, reduce_info, reduce_text, ribbon_info, rietx_inventory_info, rings, scene_data, scene_summary, schwarzite_info, set_space_group_info, set_space_group_text, slab_info, slab_terminations, slab_text, special_quasirandom, stack_slabs, standardize_info, standardize_text, structure_fingerprint, structure_info, subgroups_info, substitutions, supercell_info, supercell_text, to_p1_info, to_p1_text, tolerance_ladder_info, torsion, twist_info, unique_miller_indices, vacancies, version, voronoi, workspace_archive, workspace_read_archive, wulff, wyckoff_info, zeo_parse_info, ztc_info
9
9
  } from "./xtalforge_wasm_bg.js";