@kent-tokyo/chematic 1.0.9 → 1.0.10

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
@@ -21,9 +21,14 @@ npm install @kent-tokyo/chematic
21
21
  - SA score: synthetic accessibility estimate [1, 10]
22
22
  - Functional group identification (Ertl 2017 IFG)
23
23
  - Canonical SMILES generation
24
- - ECFP4/6, AtomPair, Torsion, and path fingerprints with Tanimoto similarity
24
+ - ECFP4/6, AtomPair, Torsion, path, and RDKit-compatible RDK fingerprints
25
+ with Tanimoto similarity
25
26
  - BRICS fragment count
26
- - SDF/MOL block parsing
27
+ - SDF/MOL block parsing, including bounded resumable `sdf_records_batch_json`,
28
+ `xyz_frames_batch_json`, and `extxyz_frames_batch_json` manifests with
29
+ deterministic input indices and partial/complete status; bounded malformed
30
+ XYZ frames are grouped inline as rejected records when a later count-line
31
+ boundary is recoverable (core file-backed readers remain fail-stop)
27
32
  - PDBx/mmCIF, PQR, QCSchema JSON, ORCA input/output, Gaussian Cube, OpenDX,
28
33
  and LAMMPS data/dump I/O (JSON-based bindings; see `format_io.rs`)
29
34
  - Topological descriptors: Wiener index, Hall-Kier κ, χ connectivity indices, Bertz CT
@@ -974,6 +974,12 @@ export function estate_indices_json(mol: MolHandle): string;
974
974
  */
975
975
  export function extxyz_frame_json(text: string): string;
976
976
 
977
+ /**
978
+ * Return one deterministic, resumable Extended-XYZ batch as a JSON manifest.
979
+ * Stopping before requesting the next offset is the cancellation boundary.
980
+ */
981
+ export function extxyz_frames_batch_json(text: string, offset: number, batch_size: number): string;
982
+
977
983
  /**
978
984
  * FCFP4 (pharmacophore, radius-2) fingerprint as a bit-packed byte vector (256 bytes).
979
985
  */
@@ -1450,7 +1456,7 @@ export function minimize_mmff94_lbfgs_json(mol: MolHandle, max_iter: number): st
1450
1456
  * `coords_json` — JSON array of `[x,y,z]` arrays (Å), one per atom.
1451
1457
  * `max_iter` — maximum iterations (0 = default 500).
1452
1458
  *
1453
- * Returns JSON: `{"coords":[[x,y,z],...], "energy":float, "iterations":int, "converged":bool, "sound":bool}`
1459
+ * Returns JSON: `{"coords":[[x,y,z],...], "energy":float, "iterations":int, "converged":bool, "sound":bool, "worst_bond_length":float}`
1454
1460
  * or `{"error":"<msg>"}` on failure. `sound` is all-finite coordinates and
1455
1461
  * no bond stretched past a sane covalent-bond length — independent of
1456
1462
  * `converged`, since steepest descent often reports `converged:false` on
@@ -1923,6 +1929,12 @@ export function pdb_coords_json(pdb: string): string;
1923
1929
  */
1924
1930
  export function peoe_vsa_json(mol: MolHandle): string;
1925
1931
 
1932
+ /**
1933
+ * Fingerprint a serialized `PeriodicStructure`; invalid or oversized input
1934
+ * returns a stable JSON error rather than being treated as a retrieval hit.
1935
+ */
1936
+ export function periodic_structure_fingerprint_json(json: string, source: string): string;
1937
+
1926
1938
  /**
1927
1939
  * Detect pharmacophore features for virtual screening and lead optimization.
1928
1940
  * Returns JSON array of features: [{type, atom_idx, neighbor_count}, ...]
@@ -1994,6 +2006,16 @@ export function pqr_to_json(text: string): string;
1994
2006
  */
1995
2007
  export function predict_pka_json(smiles: string): string;
1996
2008
 
2009
+ /**
2010
+ * Run deterministic SVG publication preflight for a SMILES string.
2011
+ *
2012
+ * Returns a JSON `PreflightReport` with stable diagnostic paths and a
2013
+ * deterministic input fingerprint. Font metrics are conservative estimates;
2014
+ * the final browser/renderer remains authoritative for pixel-level validation.
2015
+ * The input is capped at the same 1 MiB/10,000-atom limits as other WASM APIs.
2016
+ */
2017
+ export function preflight_smiles_json(smiles: string, width: number, height: number): string;
2018
+
1997
2019
  /**
1998
2020
  * Coordinates (Å) plus molecular charge/multiplicity from a QCSchema
1999
2021
  * `qcschema_molecule` document, in the SAME atom order
@@ -2099,6 +2121,28 @@ export function rdkit_ecfp_config_chiral_detail_json(mol: MolHandle, radius: num
2099
2121
  */
2100
2122
  export function rdkit_ecfp_config_detail_json(mol: MolHandle, radius: number, nbits: number): string;
2101
2123
 
2124
+ /**
2125
+ * Compute the RDKit-compatible Daylight-like path fingerprint as a bit-packed
2126
+ * byte vector (256 bytes = 2048 bits). This is the WASM counterpart of the
2127
+ * Python `path_fp` operation and is intentionally separate from native
2128
+ * `topo_path_bitvec`.
2129
+ */
2130
+ export function rdkit_path_bitvec(mol: MolHandle): Uint8Array;
2131
+
2132
+ /**
2133
+ * Compute the RDKit-compatible RDKFingerprint as a bit-packed byte vector
2134
+ * (256 bytes = 2048 bits). This is separate from both the native
2135
+ * `topo_path_bitvec` operation and the RDKit-compatible path operation.
2136
+ */
2137
+ export function rdkit_rdk_bitvec(mol: MolHandle): Uint8Array;
2138
+
2139
+ /**
2140
+ * Compute the opt-in RDKit-compatible hashed topological-torsion fingerprint
2141
+ * as a bit-packed byte vector (256 bytes = 2048 bits). This remains separate
2142
+ * from the native `torsion_bitvec` operation and its similarity semantics.
2143
+ */
2144
+ export function rdkit_torsion_bitvec(mol: MolHandle): Uint8Array;
2145
+
2102
2146
  /**
2103
2147
  * Return a copy of the molecule with all explicit hydrogen atoms removed.
2104
2148
  */
@@ -2222,6 +2266,16 @@ export function screen_smiles_json(smiles_batch: string, delimiter: string): str
2222
2266
  */
2223
2267
  export function sdf_from_records_json(smiles_json: string, names_json: string, props_json: string): string;
2224
2268
 
2269
+ /**
2270
+ * Return one deterministic, resumable SDF batch as a JSON manifest.
2271
+ *
2272
+ * `offset` is the zero-based input record to start at and `batch_size` is
2273
+ * bounded by [`crate::WASM_MAX_BATCH_ITEMS`]. Invalid records stay inline as
2274
+ * `status: "rejected"`; callers can stop requesting later batches to cancel
2275
+ * work without a background queue or hidden buffering.
2276
+ */
2277
+ export function sdf_records_batch_json(sdf: string, offset: number, batch_size: number): string;
2278
+
2225
2279
  /**
2226
2280
  * Parse an SDF string and return a JSON array of record objects.
2227
2281
  *
@@ -2530,11 +2584,25 @@ export function to_qcschema_molecule_json(mol: MolHandle, coords_json: string, c
2530
2584
  */
2531
2585
  export function to_xyz(mol: MolHandle): string;
2532
2586
 
2587
+ /**
2588
+ * Compute the native topological path fingerprint as a bit-packed byte vector
2589
+ * (256 bytes = 2048 bits), using the default [`chematic_fp::TopoPathConfig`].
2590
+ * This is the native `topo_path` operation, not the RDKit-compatible path
2591
+ * fingerprint exposed by the separate `path_fp` Python method.
2592
+ */
2593
+ export function topo_path_bitvec(mol: MolHandle): Uint8Array;
2594
+
2533
2595
  /**
2534
2596
  * Torsion fingerprint as a bit-packed byte vector (256 bytes = 2048 bits).
2535
2597
  */
2536
2598
  export function torsion_bitvec(mol: MolHandle): Uint8Array;
2537
2599
 
2600
+ /**
2601
+ * Validate a vendor-neutral NMR spectrum JSON document without parsing a
2602
+ * vendor-specific raw file or predicting peaks.
2603
+ */
2604
+ export function validate_nmr_spectrum_json(json: string): string;
2605
+
2538
2606
  /**
2539
2607
  * Virtual screen a query SMILES against a database of SMILES using ECFP4 Tanimoto.
2540
2608
  *
@@ -2652,6 +2720,12 @@ export function xlogp3_json(mol: MolHandle): string;
2652
2720
  */
2653
2721
  export function xlogp3_per_atom_json(mol: MolHandle): string;
2654
2722
 
2723
+ /**
2724
+ * Return one deterministic, resumable plain-XYZ batch as a JSON manifest.
2725
+ * Stopping before requesting the next offset is the cancellation boundary.
2726
+ */
2727
+ export function xyz_frames_batch_json(text: string, offset: number, batch_size: number): string;
2728
+
2655
2729
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
2656
2730
 
2657
2731
  export interface InitOutput {
@@ -2735,6 +2809,7 @@ export interface InitOutput {
2735
2809
  readonly erg_vec_json: (a: number) => [number, number];
2736
2810
  readonly estate_indices_json: (a: number) => [number, number];
2737
2811
  readonly extxyz_frame_json: (a: number, b: number) => [number, number, number, number];
2812
+ readonly extxyz_frames_batch_json: (a: number, b: number, c: number, d: number) => [number, number, number, number];
2738
2813
  readonly fcfp4_bitvec: (a: number) => [number, number];
2739
2814
  readonly fcfp6_bitvec: (a: number) => [number, number];
2740
2815
  readonly find_reaction_center_json: (a: number, b: number) => [number, number];
@@ -2914,6 +2989,7 @@ export interface InitOutput {
2914
2989
  readonly parse_smiles: (a: number, b: number) => [number, number, number];
2915
2990
  readonly pdb_coords_json: (a: number, b: number) => [number, number];
2916
2991
  readonly peoe_vsa_json: (a: number) => [number, number];
2992
+ readonly periodic_structure_fingerprint_json: (a: number, b: number, c: number, d: number) => [number, number];
2917
2993
  readonly pharmacophore_features_json: (a: number) => [number, number];
2918
2994
  readonly pharmacophore_fp_2d_summary: (a: number) => [number, number];
2919
2995
  readonly pharmacophore_fp_3d_summary: (a: number) => [number, number];
@@ -2922,6 +2998,7 @@ export interface InitOutput {
2922
2998
  readonly pqr_infer_element: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
2923
2999
  readonly pqr_to_json: (a: number, b: number) => [number, number, number, number];
2924
3000
  readonly predict_pka_json: (a: number, b: number) => [number, number];
3001
+ readonly preflight_smiles_json: (a: number, b: number, c: number, d: number) => [number, number];
2925
3002
  readonly qcschema_molecule_coords_json: (a: number, b: number) => [number, number, number, number];
2926
3003
  readonly qcschema_validate_atomic_input: (a: number, b: number) => [number, number, number, number];
2927
3004
  readonly qcschema_validate_atomic_result: (a: number, b: number) => [number, number, number, number];
@@ -2932,6 +3009,9 @@ export interface InitOutput {
2932
3009
  readonly rdkit_ecfp_config_chiral_bitvec: (a: number, b: number, c: number) => [number, number, number, number];
2933
3010
  readonly rdkit_ecfp_config_chiral_detail_json: (a: number, b: number, c: number) => [number, number, number, number];
2934
3011
  readonly rdkit_ecfp_config_detail_json: (a: number, b: number, c: number) => [number, number, number, number];
3012
+ readonly rdkit_path_bitvec: (a: number) => [number, number];
3013
+ readonly rdkit_rdk_bitvec: (a: number) => [number, number];
3014
+ readonly rdkit_torsion_bitvec: (a: number) => [number, number];
2935
3015
  readonly remove_hydrogens: (a: number) => number;
2936
3016
  readonly retro_disconnect_json: (a: number, b: number, c: number, d: number) => [number, number, number, number];
2937
3017
  readonly rgroup_decompose_json: (a: number, b: number, c: number, d: number) => [number, number, number, number];
@@ -2942,6 +3022,7 @@ export interface InitOutput {
2942
3022
  readonly sa_score: (a: number) => number;
2943
3023
  readonly screen_smiles_json: (a: number, b: number, c: number, d: number) => [number, number];
2944
3024
  readonly sdf_from_records_json: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
3025
+ readonly sdf_records_batch_json: (a: number, b: number, c: number, d: number) => [number, number, number, number];
2945
3026
  readonly sdf_to_records_json: (a: number, b: number) => [number, number];
2946
3027
  readonly sdf_to_smiles_json: (a: number, b: number) => [number, number];
2947
3028
  readonly semantic_apply_json_command: (a: number, b: number, c: number, d: number) => [number, number, number, number];
@@ -2983,7 +3064,9 @@ export interface InitOutput {
2983
3064
  readonly to_moljson: (a: number) => [number, number];
2984
3065
  readonly to_qcschema_molecule_json: (a: number, b: number, c: number, d: number, e: bigint) => [number, number, number, number];
2985
3066
  readonly to_xyz: (a: number) => [number, number];
3067
+ readonly topo_path_bitvec: (a: number) => [number, number];
2986
3068
  readonly torsion_bitvec: (a: number) => [number, number];
3069
+ readonly validate_nmr_spectrum_json: (a: number, b: number) => [number, number];
2987
3070
  readonly virtual_screen_ecfp4_json: (a: number, b: number, c: number, d: number, e: number) => [number, number];
2988
3071
  readonly whim_descriptors_json: (a: number) => [number, number];
2989
3072
  readonly whim_getaway_combined_json: (a: number) => [number, number];
@@ -2999,6 +3082,7 @@ export interface InitOutput {
2999
3082
  readonly write_smiles: (a: number) => [number, number];
3000
3083
  readonly xlogp3_json: (a: number) => [number, number];
3001
3084
  readonly xlogp3_per_atom_json: (a: number) => [number, number];
3085
+ readonly xyz_frames_batch_json: (a: number, b: number, c: number, d: number) => [number, number, number, number];
3002
3086
  readonly __wbindgen_malloc: (a: number, b: number) => number;
3003
3087
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
3004
3088
  readonly __externref_table_alloc: () => number;
package/chematic_wasm.js CHANGED
@@ -2377,6 +2377,35 @@ export function extxyz_frame_json(text) {
2377
2377
  }
2378
2378
  }
2379
2379
 
2380
+ /**
2381
+ * Return one deterministic, resumable Extended-XYZ batch as a JSON manifest.
2382
+ * Stopping before requesting the next offset is the cancellation boundary.
2383
+ * @param {string} text
2384
+ * @param {number} offset
2385
+ * @param {number} batch_size
2386
+ * @returns {string}
2387
+ */
2388
+ export function extxyz_frames_batch_json(text, offset, batch_size) {
2389
+ let deferred3_0;
2390
+ let deferred3_1;
2391
+ try {
2392
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2393
+ const len0 = WASM_VECTOR_LEN;
2394
+ const ret = wasm.extxyz_frames_batch_json(ptr0, len0, offset, batch_size);
2395
+ var ptr2 = ret[0];
2396
+ var len2 = ret[1];
2397
+ if (ret[3]) {
2398
+ ptr2 = 0; len2 = 0;
2399
+ throw takeFromExternrefTable0(ret[2]);
2400
+ }
2401
+ deferred3_0 = ptr2;
2402
+ deferred3_1 = len2;
2403
+ return getStringFromWasm0(ptr2, len2);
2404
+ } finally {
2405
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
2406
+ }
2407
+ }
2408
+
2380
2409
  /**
2381
2410
  * FCFP4 (pharmacophore, radius-2) fingerprint as a bit-packed byte vector (256 bytes).
2382
2411
  * @param {MolHandle} mol
@@ -3551,7 +3580,7 @@ export function minimize_mmff94_lbfgs_json(mol, max_iter) {
3551
3580
  * `coords_json` — JSON array of `[x,y,z]` arrays (Å), one per atom.
3552
3581
  * `max_iter` — maximum iterations (0 = default 500).
3553
3582
  *
3554
- * Returns JSON: `{"coords":[[x,y,z],...], "energy":float, "iterations":int, "converged":bool, "sound":bool}`
3583
+ * Returns JSON: `{"coords":[[x,y,z],...], "energy":float, "iterations":int, "converged":bool, "sound":bool, "worst_bond_length":float}`
3555
3584
  * or `{"error":"<msg>"}` on failure. `sound` is all-finite coordinates and
3556
3585
  * no bond stretched past a sane covalent-bond length — independent of
3557
3586
  * `converged`, since steepest descent often reports `converged:false` on
@@ -4800,6 +4829,30 @@ export function peoe_vsa_json(mol) {
4800
4829
  }
4801
4830
  }
4802
4831
 
4832
+ /**
4833
+ * Fingerprint a serialized `PeriodicStructure`; invalid or oversized input
4834
+ * returns a stable JSON error rather than being treated as a retrieval hit.
4835
+ * @param {string} json
4836
+ * @param {string} source
4837
+ * @returns {string}
4838
+ */
4839
+ export function periodic_structure_fingerprint_json(json, source) {
4840
+ let deferred3_0;
4841
+ let deferred3_1;
4842
+ try {
4843
+ const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4844
+ const len0 = WASM_VECTOR_LEN;
4845
+ const ptr1 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4846
+ const len1 = WASM_VECTOR_LEN;
4847
+ const ret = wasm.periodic_structure_fingerprint_json(ptr0, len0, ptr1, len1);
4848
+ deferred3_0 = ret[0];
4849
+ deferred3_1 = ret[1];
4850
+ return getStringFromWasm0(ret[0], ret[1]);
4851
+ } finally {
4852
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
4853
+ }
4854
+ }
4855
+
4803
4856
  /**
4804
4857
  * Detect pharmacophore features for virtual screening and lead optimization.
4805
4858
  * Returns JSON array of features: [{type, atom_idx, neighbor_count}, ...]
@@ -5006,6 +5059,33 @@ export function predict_pka_json(smiles) {
5006
5059
  }
5007
5060
  }
5008
5061
 
5062
+ /**
5063
+ * Run deterministic SVG publication preflight for a SMILES string.
5064
+ *
5065
+ * Returns a JSON `PreflightReport` with stable diagnostic paths and a
5066
+ * deterministic input fingerprint. Font metrics are conservative estimates;
5067
+ * the final browser/renderer remains authoritative for pixel-level validation.
5068
+ * The input is capped at the same 1 MiB/10,000-atom limits as other WASM APIs.
5069
+ * @param {string} smiles
5070
+ * @param {number} width
5071
+ * @param {number} height
5072
+ * @returns {string}
5073
+ */
5074
+ export function preflight_smiles_json(smiles, width, height) {
5075
+ let deferred2_0;
5076
+ let deferred2_1;
5077
+ try {
5078
+ const ptr0 = passStringToWasm0(smiles, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5079
+ const len0 = WASM_VECTOR_LEN;
5080
+ const ret = wasm.preflight_smiles_json(ptr0, len0, width, height);
5081
+ deferred2_0 = ret[0];
5082
+ deferred2_1 = ret[1];
5083
+ return getStringFromWasm0(ret[0], ret[1]);
5084
+ } finally {
5085
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
5086
+ }
5087
+ }
5088
+
5009
5089
  /**
5010
5090
  * Coordinates (Å) plus molecular charge/multiplicity from a QCSchema
5011
5091
  * `qcschema_molecule` document, in the SAME atom order
@@ -5298,6 +5378,52 @@ export function rdkit_ecfp_config_detail_json(mol, radius, nbits) {
5298
5378
  }
5299
5379
  }
5300
5380
 
5381
+ /**
5382
+ * Compute the RDKit-compatible Daylight-like path fingerprint as a bit-packed
5383
+ * byte vector (256 bytes = 2048 bits). This is the WASM counterpart of the
5384
+ * Python `path_fp` operation and is intentionally separate from native
5385
+ * `topo_path_bitvec`.
5386
+ * @param {MolHandle} mol
5387
+ * @returns {Uint8Array}
5388
+ */
5389
+ export function rdkit_path_bitvec(mol) {
5390
+ _assertClass(mol, MolHandle);
5391
+ const ret = wasm.rdkit_path_bitvec(mol.__wbg_ptr);
5392
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
5393
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
5394
+ return v1;
5395
+ }
5396
+
5397
+ /**
5398
+ * Compute the RDKit-compatible RDKFingerprint as a bit-packed byte vector
5399
+ * (256 bytes = 2048 bits). This is separate from both the native
5400
+ * `topo_path_bitvec` operation and the RDKit-compatible path operation.
5401
+ * @param {MolHandle} mol
5402
+ * @returns {Uint8Array}
5403
+ */
5404
+ export function rdkit_rdk_bitvec(mol) {
5405
+ _assertClass(mol, MolHandle);
5406
+ const ret = wasm.rdkit_rdk_bitvec(mol.__wbg_ptr);
5407
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
5408
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
5409
+ return v1;
5410
+ }
5411
+
5412
+ /**
5413
+ * Compute the opt-in RDKit-compatible hashed topological-torsion fingerprint
5414
+ * as a bit-packed byte vector (256 bytes = 2048 bits). This remains separate
5415
+ * from the native `torsion_bitvec` operation and its similarity semantics.
5416
+ * @param {MolHandle} mol
5417
+ * @returns {Uint8Array}
5418
+ */
5419
+ export function rdkit_torsion_bitvec(mol) {
5420
+ _assertClass(mol, MolHandle);
5421
+ const ret = wasm.rdkit_torsion_bitvec(mol.__wbg_ptr);
5422
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
5423
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
5424
+ return v1;
5425
+ }
5426
+
5301
5427
  /**
5302
5428
  * Return a copy of the molecule with all explicit hydrogen atoms removed.
5303
5429
  * @param {MolHandle} mol
@@ -5612,6 +5738,39 @@ export function sdf_from_records_json(smiles_json, names_json, props_json) {
5612
5738
  }
5613
5739
  }
5614
5740
 
5741
+ /**
5742
+ * Return one deterministic, resumable SDF batch as a JSON manifest.
5743
+ *
5744
+ * `offset` is the zero-based input record to start at and `batch_size` is
5745
+ * bounded by [`crate::WASM_MAX_BATCH_ITEMS`]. Invalid records stay inline as
5746
+ * `status: "rejected"`; callers can stop requesting later batches to cancel
5747
+ * work without a background queue or hidden buffering.
5748
+ * @param {string} sdf
5749
+ * @param {number} offset
5750
+ * @param {number} batch_size
5751
+ * @returns {string}
5752
+ */
5753
+ export function sdf_records_batch_json(sdf, offset, batch_size) {
5754
+ let deferred3_0;
5755
+ let deferred3_1;
5756
+ try {
5757
+ const ptr0 = passStringToWasm0(sdf, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5758
+ const len0 = WASM_VECTOR_LEN;
5759
+ const ret = wasm.sdf_records_batch_json(ptr0, len0, offset, batch_size);
5760
+ var ptr2 = ret[0];
5761
+ var len2 = ret[1];
5762
+ if (ret[3]) {
5763
+ ptr2 = 0; len2 = 0;
5764
+ throw takeFromExternrefTable0(ret[2]);
5765
+ }
5766
+ deferred3_0 = ptr2;
5767
+ deferred3_1 = len2;
5768
+ return getStringFromWasm0(ptr2, len2);
5769
+ } finally {
5770
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
5771
+ }
5772
+ }
5773
+
5615
5774
  /**
5616
5775
  * Parse an SDF string and return a JSON array of record objects.
5617
5776
  *
@@ -6568,6 +6727,22 @@ export function to_xyz(mol) {
6568
6727
  }
6569
6728
  }
6570
6729
 
6730
+ /**
6731
+ * Compute the native topological path fingerprint as a bit-packed byte vector
6732
+ * (256 bytes = 2048 bits), using the default [`chematic_fp::TopoPathConfig`].
6733
+ * This is the native `topo_path` operation, not the RDKit-compatible path
6734
+ * fingerprint exposed by the separate `path_fp` Python method.
6735
+ * @param {MolHandle} mol
6736
+ * @returns {Uint8Array}
6737
+ */
6738
+ export function topo_path_bitvec(mol) {
6739
+ _assertClass(mol, MolHandle);
6740
+ const ret = wasm.topo_path_bitvec(mol.__wbg_ptr);
6741
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
6742
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
6743
+ return v1;
6744
+ }
6745
+
6571
6746
  /**
6572
6747
  * Torsion fingerprint as a bit-packed byte vector (256 bytes = 2048 bits).
6573
6748
  * @param {MolHandle} mol
@@ -6581,6 +6756,27 @@ export function torsion_bitvec(mol) {
6581
6756
  return v1;
6582
6757
  }
6583
6758
 
6759
+ /**
6760
+ * Validate a vendor-neutral NMR spectrum JSON document without parsing a
6761
+ * vendor-specific raw file or predicting peaks.
6762
+ * @param {string} json
6763
+ * @returns {string}
6764
+ */
6765
+ export function validate_nmr_spectrum_json(json) {
6766
+ let deferred2_0;
6767
+ let deferred2_1;
6768
+ try {
6769
+ const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6770
+ const len0 = WASM_VECTOR_LEN;
6771
+ const ret = wasm.validate_nmr_spectrum_json(ptr0, len0);
6772
+ deferred2_0 = ret[0];
6773
+ deferred2_1 = ret[1];
6774
+ return getStringFromWasm0(ret[0], ret[1]);
6775
+ } finally {
6776
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
6777
+ }
6778
+ }
6779
+
6584
6780
  /**
6585
6781
  * Virtual screen a query SMILES against a database of SMILES using ECFP4 Tanimoto.
6586
6782
  *
@@ -6984,6 +7180,35 @@ export function xlogp3_per_atom_json(mol) {
6984
7180
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
6985
7181
  }
6986
7182
  }
7183
+
7184
+ /**
7185
+ * Return one deterministic, resumable plain-XYZ batch as a JSON manifest.
7186
+ * Stopping before requesting the next offset is the cancellation boundary.
7187
+ * @param {string} text
7188
+ * @param {number} offset
7189
+ * @param {number} batch_size
7190
+ * @returns {string}
7191
+ */
7192
+ export function xyz_frames_batch_json(text, offset, batch_size) {
7193
+ let deferred3_0;
7194
+ let deferred3_1;
7195
+ try {
7196
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
7197
+ const len0 = WASM_VECTOR_LEN;
7198
+ const ret = wasm.xyz_frames_batch_json(ptr0, len0, offset, batch_size);
7199
+ var ptr2 = ret[0];
7200
+ var len2 = ret[1];
7201
+ if (ret[3]) {
7202
+ ptr2 = 0; len2 = 0;
7203
+ throw takeFromExternrefTable0(ret[2]);
7204
+ }
7205
+ deferred3_0 = ptr2;
7206
+ deferred3_1 = len2;
7207
+ return getStringFromWasm0(ptr2, len2);
7208
+ } finally {
7209
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
7210
+ }
7211
+ }
6987
7212
  function __wbg_get_imports() {
6988
7213
  const import0 = {
6989
7214
  __proto__: null,
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "Kentaro Tanabe (kent-tokyo) <kent-tokyo@users.noreply.github.com>"
6
6
  ],
7
7
  "description": "WebAssembly bindings for chematic — use chematic from JavaScript/TypeScript",
8
- "version": "1.0.9",
8
+ "version": "1.0.10",
9
9
  "license": "MIT OR Apache-2.0",
10
10
  "repository": {
11
11
  "type": "git",