@molcrafts/molrs 0.0.17 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -78,7 +78,7 @@ Frames without a simulation box are supported — a non-periodic bounding box is
78
78
  | `bonds` | `i`, `j` | `u32` | Atom indices |
79
79
  | `bonds` | `order` | `F` | Bond order (1.0, 1.5, 2.0, 3.0) |
80
80
 
81
- `F` is the workspace float type from `molrs-core` — always `f64`.
81
+ `F` is the molrs core float type — always `f64`.
82
82
 
83
83
  ## Build from source
84
84
 
package/molrs.d.ts CHANGED
@@ -2048,7 +2048,7 @@ export class MSD {
2048
2048
  */
2049
2049
  reset(): void;
2050
2050
  /**
2051
- * Run the stateless [`molrs_compute::MSD`] over every fed frame and
2051
+ * Run the stateless [`molrs::compute::MSD`] over every fed frame and
2052
2052
  * return the per-frame time series.
2053
2053
  *
2054
2054
  * The first frame is always the reference, so `results()[0].mean ≈ 0`.
@@ -2317,7 +2317,7 @@ export class RDF {
2317
2317
  *
2318
2318
  * Use this for non-periodic systems or to override the box volume.
2319
2319
  * Internally wraps the supplied volume as a cubic SimBox since the
2320
- * underlying [`molrs_compute::RDF`] pulls its normalization volume from
2320
+ * underlying [`molrs::compute::RDF`] pulls its normalization volume from
2321
2321
  * `frame.simbox`.
2322
2322
  *
2323
2323
  * # Arguments
@@ -2884,7 +2884,7 @@ export class WasmArray {
2884
2884
  }
2885
2885
 
2886
2886
  /**
2887
- * Wrapper for [`molrs_compute::kmeans::KMeans`].
2887
+ * Wrapper for [`molrs::compute::kmeans::KMeans`].
2888
2888
  *
2889
2889
  * # Example (JavaScript)
2890
2890
  *
@@ -3210,7 +3210,7 @@ export class WasmLammpsDumpStream {
3210
3210
  }
3211
3211
 
3212
3212
  /**
3213
- * Stateless wrapper for [`molrs_compute::pca::Pca2`].
3213
+ * Stateless wrapper for [`molrs::compute::pca::Pca2`].
3214
3214
  *
3215
3215
  * All configuration lives on [`fitTransform`](Self::fit_transform).
3216
3216
  *
@@ -3786,6 +3786,24 @@ export class XYZReader {
3786
3786
  read(step: number): Frame | undefined;
3787
3787
  }
3788
3788
 
3789
+ /**
3790
+ * Covalent radius (in angstrom) for an element symbol.
3791
+ *
3792
+ * Case-insensitive lookup against the built-in periodic table. Returns
3793
+ * `null` (`undefined` in JS) for an unrecognised symbol. This is the
3794
+ * single source of truth for covalent radii — downstream code (e.g. bond
3795
+ * perception) should call this rather than carrying its own table.
3796
+ *
3797
+ * # Example (JavaScript)
3798
+ *
3799
+ * ```js
3800
+ * covalentRadius("C"); // 0.76
3801
+ * covalentRadius("h"); // 0.31 (case-insensitive)
3802
+ * covalentRadius("Xx"); // undefined
3803
+ * ```
3804
+ */
3805
+ export function covalentRadius(symbol: string): number | undefined;
3806
+
3789
3807
  /**
3790
3808
  * Generate 3D coordinates for a molecular [`Frame`].
3791
3809
  *
package/molrs.js CHANGED
@@ -5,5 +5,5 @@ import { __wbg_set_wasm } from "./molrs_bg.js";
5
5
  __wbg_set_wasm(wasm);
6
6
  wasm.__wbindgen_start();
7
7
  export {
8
- Block, Box, CHGCARReader, CIFReader, CenterOfMass, CenterOfMassResult, Cluster, ClusterCenters, ClusterResult, CubeReader, DCDReader, Frame, FrameIndexEntry, GyrationTensor, InertiaTensor, LAMMPSReader, LAMMPSTrajReader, LinkedCell, MSD, MSDResult, MolRecReader, NeighborList, PDBReader, RDF, RDFResult, RadiusOfGyration, SDFReader, SmilesIR, Topology, TopologyRingInfo, WasmArray, WasmKMeans, WasmLammpsDataStream, WasmLammpsDumpStream, WasmPca2, WasmPcaResult, WasmPdbStream, WasmSdfStream, WasmXyzStream, XYZReader, generate3D, parseSMILES, start, wasmMemory, writeFrame
8
+ Block, Box, CHGCARReader, CIFReader, CenterOfMass, CenterOfMassResult, Cluster, ClusterCenters, ClusterResult, CubeReader, DCDReader, Frame, FrameIndexEntry, GyrationTensor, InertiaTensor, LAMMPSReader, LAMMPSTrajReader, LinkedCell, MSD, MSDResult, MolRecReader, NeighborList, PDBReader, RDF, RDFResult, RadiusOfGyration, SDFReader, SmilesIR, Topology, TopologyRingInfo, WasmArray, WasmKMeans, WasmLammpsDataStream, WasmLammpsDumpStream, WasmPca2, WasmPcaResult, WasmPdbStream, WasmSdfStream, WasmXyzStream, XYZReader, covalentRadius, generate3D, parseSMILES, start, wasmMemory, writeFrame
9
9
  } from "./molrs_bg.js";
package/molrs_bg.js CHANGED
@@ -3111,7 +3111,7 @@ export class MSD {
3111
3111
  wasm.msd_reset(this.__wbg_ptr);
3112
3112
  }
3113
3113
  /**
3114
- * Run the stateless [`molrs_compute::MSD`] over every fed frame and
3114
+ * Run the stateless [`molrs::compute::MSD`] over every fed frame and
3115
3115
  * return the per-frame time series.
3116
3116
  *
3117
3117
  * The first frame is always the reference, so `results()[0].mean ≈ 0`.
@@ -3561,7 +3561,7 @@ export class RDF {
3561
3561
  *
3562
3562
  * Use this for non-periodic systems or to override the box volume.
3563
3563
  * Internally wraps the supplied volume as a cubic SimBox since the
3564
- * underlying [`molrs_compute::RDF`] pulls its normalization volume from
3564
+ * underlying [`molrs::compute::RDF`] pulls its normalization volume from
3565
3565
  * `frame.simbox`.
3566
3566
  *
3567
3567
  * # Arguments
@@ -4531,7 +4531,7 @@ export class WasmArray {
4531
4531
  if (Symbol.dispose) WasmArray.prototype[Symbol.dispose] = WasmArray.prototype.free;
4532
4532
 
4533
4533
  /**
4534
- * Wrapper for [`molrs_compute::kmeans::KMeans`].
4534
+ * Wrapper for [`molrs::compute::kmeans::KMeans`].
4535
4535
  *
4536
4536
  * # Example (JavaScript)
4537
4537
  *
@@ -5211,7 +5211,7 @@ export class WasmLammpsDumpStream {
5211
5211
  if (Symbol.dispose) WasmLammpsDumpStream.prototype[Symbol.dispose] = WasmLammpsDumpStream.prototype.free;
5212
5212
 
5213
5213
  /**
5214
- * Stateless wrapper for [`molrs_compute::pca::Pca2`].
5214
+ * Stateless wrapper for [`molrs::compute::pca::Pca2`].
5215
5215
  *
5216
5216
  * All configuration lives on [`fitTransform`](Self::fit_transform).
5217
5217
  *
@@ -6357,6 +6357,31 @@ export class XYZReader {
6357
6357
  }
6358
6358
  if (Symbol.dispose) XYZReader.prototype[Symbol.dispose] = XYZReader.prototype.free;
6359
6359
 
6360
+ /**
6361
+ * Covalent radius (in angstrom) for an element symbol.
6362
+ *
6363
+ * Case-insensitive lookup against the built-in periodic table. Returns
6364
+ * `null` (`undefined` in JS) for an unrecognised symbol. This is the
6365
+ * single source of truth for covalent radii — downstream code (e.g. bond
6366
+ * perception) should call this rather than carrying its own table.
6367
+ *
6368
+ * # Example (JavaScript)
6369
+ *
6370
+ * ```js
6371
+ * covalentRadius("C"); // 0.76
6372
+ * covalentRadius("h"); // 0.31 (case-insensitive)
6373
+ * covalentRadius("Xx"); // undefined
6374
+ * ```
6375
+ * @param {string} symbol
6376
+ * @returns {number | undefined}
6377
+ */
6378
+ export function covalentRadius(symbol) {
6379
+ const ptr0 = passStringToWasm0(symbol, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
6380
+ const len0 = WASM_VECTOR_LEN;
6381
+ const ret = wasm.covalentRadius(ptr0, len0);
6382
+ return ret[0] === 0 ? undefined : ret[1];
6383
+ }
6384
+
6360
6385
  /**
6361
6386
  * Generate 3D coordinates for a molecular [`Frame`].
6362
6387
  *
@@ -6549,18 +6574,18 @@ export function writeFrame(frame, format) {
6549
6574
  wasm.__wbindgen_free_command_export(deferred3_0, deferred3_1, 1);
6550
6575
  }
6551
6576
  }
6552
- export function __wbg___wbindgen_debug_string_0accd80f45e5faa2(arg0, arg1) {
6577
+ export function __wbg___wbindgen_debug_string_8a447059637473e2(arg0, arg1) {
6553
6578
  const ret = debugString(arg1);
6554
6579
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
6555
6580
  const len1 = WASM_VECTOR_LEN;
6556
6581
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
6557
6582
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
6558
6583
  }
6559
- export function __wbg___wbindgen_memory_fbc4c3e30b409f08() {
6584
+ export function __wbg___wbindgen_memory_9751d9a3017e7c25() {
6560
6585
  const ret = wasm.memory;
6561
6586
  return ret;
6562
6587
  }
6563
- export function __wbg___wbindgen_string_get_72bdf95d3ae505b1(arg0, arg1) {
6588
+ export function __wbg___wbindgen_string_get_71bb4348194e31f0(arg0, arg1) {
6564
6589
  const obj = arg1;
6565
6590
  const ret = typeof(obj) === 'string' ? obj : undefined;
6566
6591
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
@@ -6568,10 +6593,10 @@ export function __wbg___wbindgen_string_get_72bdf95d3ae505b1(arg0, arg1) {
6568
6593
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
6569
6594
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
6570
6595
  }
6571
- export function __wbg___wbindgen_throw_1506f2235d1bdba0(arg0, arg1) {
6596
+ export function __wbg___wbindgen_throw_ea4887a5f8f9a9db(arg0, arg1) {
6572
6597
  throw new Error(getStringFromWasm0(arg0, arg1));
6573
6598
  }
6574
- export function __wbg_done_60cf307fcc680536(arg0) {
6599
+ export function __wbg_done_b62d4a7d2286852a(arg0) {
6575
6600
  const ret = arg0.done;
6576
6601
  return ret;
6577
6602
  }
@@ -6590,38 +6615,38 @@ export function __wbg_frameindexentry_new(arg0) {
6590
6615
  const ret = FrameIndexEntry.__wrap(arg0);
6591
6616
  return ret;
6592
6617
  }
6593
- export function __wbg_getRandomValues_3f44b700395062e5() { return handleError(function (arg0, arg1) {
6618
+ export function __wbg_getRandomValues_76dfc69825c9c552() { return handleError(function (arg0, arg1) {
6594
6619
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
6595
6620
  }, arguments); }
6596
- export function __wbg_get_0429a91975f37e2e(arg0, arg1) {
6621
+ export function __wbg_get_f6f94ffcaf26eed1(arg0, arg1) {
6597
6622
  const ret = arg0.get(arg1);
6598
6623
  return ret;
6599
6624
  }
6600
- export function __wbg_get_unchecked_33f6e5c9e2f2d6b2(arg0, arg1) {
6625
+ export function __wbg_get_unchecked_54a4374c38e08460(arg0, arg1) {
6601
6626
  const ret = arg0[arg1 >>> 0];
6602
6627
  return ret;
6603
6628
  }
6604
- export function __wbg_keys_75e37d4b5a2a8470(arg0) {
6629
+ export function __wbg_keys_8c9f7da46ee76e8d(arg0) {
6605
6630
  const ret = arg0.keys();
6606
6631
  return ret;
6607
6632
  }
6608
- export function __wbg_length_27cfc5149a8eb2e7(arg0) {
6633
+ export function __wbg_length_4875795b8939c6b6(arg0) {
6609
6634
  const ret = arg0.length;
6610
6635
  return ret;
6611
6636
  }
6612
- export function __wbg_length_280688879ee7deb5(arg0) {
6637
+ export function __wbg_length_589238bdcf171f0e(arg0) {
6613
6638
  const ret = arg0.length;
6614
6639
  return ret;
6615
6640
  }
6616
- export function __wbg_length_33096ac1966bb961(arg0) {
6641
+ export function __wbg_length_750ab89c52b42479(arg0) {
6617
6642
  const ret = arg0.length;
6618
6643
  return ret;
6619
6644
  }
6620
- export function __wbg_length_4a591ecaa01354d9(arg0) {
6645
+ export function __wbg_length_bf9e65fd7019a3f2(arg0) {
6621
6646
  const ret = arg0.length;
6622
6647
  return ret;
6623
6648
  }
6624
- export function __wbg_length_66f1a4b2e9026940(arg0) {
6649
+ export function __wbg_length_c6054974c0a6cdb9(arg0) {
6625
6650
  const ret = arg0.length;
6626
6651
  return ret;
6627
6652
  }
@@ -6633,74 +6658,74 @@ export function __wbg_new_227d7c05414eb861() {
6633
6658
  const ret = new Error();
6634
6659
  return ret;
6635
6660
  }
6636
- export function __wbg_new_578aeef4b6b94378(arg0) {
6661
+ export function __wbg_new_36e147a8ced3c6e0() {
6662
+ const ret = new Array();
6663
+ return ret;
6664
+ }
6665
+ export function __wbg_new_81880fb5002cb255(arg0) {
6637
6666
  const ret = new Uint8Array(arg0);
6638
6667
  return ret;
6639
6668
  }
6640
- export function __wbg_new_d90091b82fdf5b91() {
6641
- const ret = new Array();
6669
+ export function __wbg_new_from_slice_3f5658f83d8d0725(arg0, arg1) {
6670
+ const ret = new Uint32Array(getArrayU32FromWasm0(arg0, arg1));
6642
6671
  return ret;
6643
6672
  }
6644
- export function __wbg_new_from_slice_1b23616ada25abcb(arg0, arg1) {
6673
+ export function __wbg_new_from_slice_7b8c5f56d6f4bffc(arg0, arg1) {
6645
6674
  const ret = new Int32Array(getArrayI32FromWasm0(arg0, arg1));
6646
6675
  return ret;
6647
6676
  }
6648
- export function __wbg_new_from_slice_3c93d0bc613de8f0(arg0, arg1) {
6677
+ export function __wbg_new_from_slice_98e57cb2fe2e6a5d(arg0, arg1) {
6649
6678
  const ret = new Float64Array(getArrayF64FromWasm0(arg0, arg1));
6650
6679
  return ret;
6651
6680
  }
6652
- export function __wbg_new_from_slice_47be4219028de35d(arg0, arg1) {
6653
- const ret = new Uint32Array(getArrayU32FromWasm0(arg0, arg1));
6681
+ export function __wbg_new_with_length_3f188e379a8c6a4d(arg0) {
6682
+ const ret = new Float64Array(arg0 >>> 0);
6654
6683
  return ret;
6655
6684
  }
6656
- export function __wbg_new_with_length_1eb3643ef8ff666a(arg0) {
6685
+ export function __wbg_new_with_length_793583df958b3ae2(arg0) {
6657
6686
  const ret = new Int32Array(arg0 >>> 0);
6658
6687
  return ret;
6659
6688
  }
6660
- export function __wbg_new_with_length_21806dff02ad1c3e(arg0) {
6661
- const ret = new Uint32Array(arg0 >>> 0);
6662
- return ret;
6663
- }
6664
- export function __wbg_new_with_length_36a4998e27b014c5(arg0) {
6689
+ export function __wbg_new_with_length_9b650f44b5c44a4e(arg0) {
6665
6690
  const ret = new Uint8Array(arg0 >>> 0);
6666
6691
  return ret;
6667
6692
  }
6668
- export function __wbg_new_with_length_b4a87ccced374381(arg0) {
6669
- const ret = new Float64Array(arg0 >>> 0);
6693
+ export function __wbg_new_with_length_ecf42de9ee25651c(arg0) {
6694
+ const ret = new Uint32Array(arg0 >>> 0);
6670
6695
  return ret;
6671
6696
  }
6672
- export function __wbg_next_eb8ca7351fa27906() { return handleError(function (arg0) {
6697
+ export function __wbg_next_0c4066e251d2eff9() { return handleError(function (arg0) {
6673
6698
  const ret = arg0.next();
6674
6699
  return ret;
6675
6700
  }, arguments); }
6676
- export function __wbg_prototypesetcall_3249fc62a0fafa30(arg0, arg1, arg2) {
6677
- Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
6678
- }
6679
- export function __wbg_prototypesetcall_3560ffd2e7034ba8(arg0, arg1, arg2) {
6701
+ export function __wbg_prototypesetcall_1f31756936f35af0(arg0, arg1, arg2) {
6680
6702
  Int32Array.prototype.set.call(getArrayI32FromWasm0(arg0, arg1), arg2);
6681
6703
  }
6682
- export function __wbg_prototypesetcall_59640349d2c6d881(arg0, arg1, arg2) {
6704
+ export function __wbg_prototypesetcall_26a86dd8c73de125(arg0, arg1, arg2) {
6683
6705
  Uint32Array.prototype.set.call(getArrayU32FromWasm0(arg0, arg1), arg2);
6684
6706
  }
6685
- export function __wbg_prototypesetcall_d1ae8885a2e9d458(arg0, arg1, arg2) {
6707
+ export function __wbg_prototypesetcall_83f8c8d8e36faf9f(arg0, arg1, arg2) {
6686
6708
  Float64Array.prototype.set.call(getArrayF64FromWasm0(arg0, arg1), arg2);
6687
6709
  }
6688
- export function __wbg_push_a6822215aa43e71c(arg0, arg1) {
6710
+ export function __wbg_prototypesetcall_d721637c7ca66eb8(arg0, arg1, arg2) {
6711
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
6712
+ }
6713
+ export function __wbg_push_f724b5db8acf89d2(arg0, arg1) {
6689
6714
  const ret = arg0.push(arg1);
6690
6715
  return ret;
6691
6716
  }
6692
- export function __wbg_set_63b87f7c2d096ec3(arg0, arg1, arg2) {
6717
+ export function __wbg_set_404b02690d27a687(arg0, arg1, arg2) {
6693
6718
  arg0.set(getArrayF64FromWasm0(arg1, arg2));
6694
6719
  }
6695
- export function __wbg_set_ad3bde048c79fe2b(arg0, arg1, arg2) {
6720
+ export function __wbg_set_699bda357d38bc49(arg0, arg1, arg2) {
6696
6721
  arg0.set(getArrayI32FromWasm0(arg1, arg2));
6697
6722
  }
6698
- export function __wbg_set_index_73ced2e1b4a2a37e(arg0, arg1, arg2) {
6699
- arg0[arg1 >>> 0] = arg2;
6700
- }
6701
- export function __wbg_set_index_88b4ef962117fc1b(arg0, arg1, arg2) {
6723
+ export function __wbg_set_index_4cab6f2df9ae8120(arg0, arg1, arg2) {
6702
6724
  arg0[arg1 >>> 0] = arg2 >>> 0;
6703
6725
  }
6726
+ export function __wbg_set_index_dd52456a7aef02bf(arg0, arg1, arg2) {
6727
+ arg0[arg1 >>> 0] = arg2;
6728
+ }
6704
6729
  export function __wbg_stack_3b0d974bbf31e44f(arg0, arg1) {
6705
6730
  const ret = arg1.stack;
6706
6731
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
@@ -6708,7 +6733,7 @@ export function __wbg_stack_3b0d974bbf31e44f(arg0, arg1) {
6708
6733
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
6709
6734
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
6710
6735
  }
6711
- export function __wbg_value_f3625092ee4b37f4(arg0) {
6736
+ export function __wbg_value_49f783bb59765962(arg0) {
6712
6737
  const ret = arg0.value;
6713
6738
  return ret;
6714
6739
  }
package/molrs_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "MolCrafts"
6
6
  ],
7
7
  "description": "WASM bindings for molrs",
8
- "version": "0.0.17",
8
+ "version": "0.1.1",
9
9
  "license": "BSD-3-Clause",
10
10
  "repository": {
11
11
  "type": "git",