@kent-tokyo/chematic 1.2.0 → 1.2.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
@@ -4,7 +4,7 @@ WebAssembly bindings for [chematic](https://github.com/kent-tokyo/chematic), a p
4
4
 
5
5
  Published to npm as [`@kent-tokyo/chematic`](https://www.npmjs.com/package/@kent-tokyo/chematic).
6
6
 
7
- The current workspace line is 1.2.0. The binding keeps bounded parsing,
7
+ The current workspace line is 1.2.1. The binding keeps bounded parsing,
8
8
  typed failures, and opt-in `embed_pipeline_v2_json`; 3D/MMFF94 behavior remains
9
9
  Experimental and is not a claim of full RDKit parity.
10
10
 
@@ -281,10 +281,11 @@ interpretation, or cross-engine semantic compatibility.
281
281
 
282
282
  ## Bundle size
283
283
 
284
- The published v1.0.15 npm WASM asset is **4,005,280 bytes raw / 1,460,499
285
- bytes gzip**. Bundle size depends on features and toolchain; see the
286
- [published-package scorecard](../../benchmarks/2026-09-16-official-rdkit-js-isolated-browser-v1.0.15.md)
287
- for package versions, digests, tools, and reproduction steps.
284
+ Bundle size depends on the release, enabled features, and toolchain. Measure
285
+ the installed npm artifact for the version you deploy. The retained
286
+ [three-browser packet](../../benchmarks/2026-10-03-v1030-published-linux-three-browser-paired20.md)
287
+ documents the bounded browser performance comparison; it is not a current
288
+ bundle-size claim.
288
289
 
289
290
  PNG rasterization (`tiny_skia`) is excluded from the WASM build — use SVG output instead. All SVG depiction APIs remain fully available.
290
291
 
@@ -1037,13 +1037,29 @@ export function conformer_ensemble_json(mol: MolHandle, n: number, rmsd_threshol
1037
1037
  *
1038
1038
  * This is the WASM counterpart of Python's `convert_format`. It supports
1039
1039
  * SMILES, MOL/SDF, MOL V3000, MOL2, CML, ChemicalJSON, MolJSON, and CDXML.
1040
- * MOL2-to-MOL2 validates and retains the exact source. Other conversions use
1040
+ * MOL2-to-MOL2, CJSON-to-CJSON, and V3000-to-V3000 validate and retain exact source.
1041
+ * GJF/COM supports only
1042
+ * same-format retention of a bounded single Cartesian job, including opaque
1043
+ * job sections (not a Gaussian job validator).
1044
+ * V3000-to-CJSON also
1045
+ * carries source-order x/y/z values; it does not retain opaque metadata or
1046
+ * verify cross-format stereo.
1047
+ * MOL2-to-CJSON checks
1048
+ * graph/xyz/name/complete declared partial charges on reparse and refuses
1049
+ * incomplete or undeclared charge columns. Other MOL2 metadata and stereo
1050
+ * are not retained or verified; use convert_with_report_json for losses.
1051
+ * NO_CHARGES zero placeholders are omitted as explicitly unassigned values.
1052
+ * Other conversions use
1041
1053
  * the topology-only bridge and do not carry format-specific metadata.
1054
+ * SDF-to-SDF retains every validated source record. Other MOL/SDF input routes
1055
+ * require exactly one CTAB and omit SD fields; SDF output is one framed record.
1056
+ * CML-to-CJSON carries complete source Cartesian coordinates, leaving absent
1057
+ * 3D geometry absent and refusing partial/nonfinite data and multiple molecules.
1042
1058
  */
1043
1059
  export function convert_common_format(text: string, input_format: string, output_format: string): string;
1044
1060
 
1045
1061
  /**
1046
- * Checked MOL2/CJSON conversion using the shared report schema.
1062
+ * Checked MOL2/CJSON/CML conversion using the shared report schema.
1047
1063
  */
1048
1064
  export function convert_with_report_json(text: string, input_format: string, output_format: string, policy: string): string;
1049
1065
 
@@ -1815,14 +1831,16 @@ export function mcs_smiles_json(smiles_json: string): string;
1815
1831
  * (camelCase keys, all optional, defaulting to `McsConfig::default()`):
1816
1832
  * `matchBonds`, `minAtoms`, `timeoutMs`, `ringMatchesRingOnly`,
1817
1833
  * `completeRingsOnly`, `atomCompare` (`"elements"` | `"any_heavy_atom"` |
1834
+ * `"rdkit_any_heavy_atom"` |
1818
1835
  * `"any"`), `bondCompare` (`"order_or_aromatic"` | `"any"`),
1819
- * `matchChiralTag`, `matchCharge`, `matchIsotope`, `maximizeBonds`.
1836
+ * `matchChiralTag`, `matchCharge`, `matchIsotope`, `maximizeBonds`, and
1837
+ * `maxSearchNodes`.
1820
1838
  *
1821
- * Returns a JSON object `{"smiles": string|null, "wasTimedOut": bool}` --
1822
- * `smiles` is `null` when there is no common substructure; `wasTimedOut` is
1823
- * `true` if `timeoutMs` was reached before the search finished exhaustively
1824
- * (the returned `smiles`, if any, is then the best result found so far, not
1825
- * proven optimal).
1839
+ * Returns a JSON object with `smiles`, `wasTimedOut`, and
1840
+ * `wasResourceLimited`. `smiles` is `null` when there is no common
1841
+ * substructure; the two status fields distinguish deadline expiry from a
1842
+ * configured input/search limit. A returned partial result is not proven
1843
+ * optimal when either status is true.
1826
1844
  */
1827
1845
  export function mcs_smiles_json_with_config(smiles_json: string, config_json: string): string;
1828
1846
 
@@ -2160,9 +2178,9 @@ export function mol_from_pdb_strict(pdb: string): MolHandle;
2160
2178
  /**
2161
2179
  * Parse an AutoDock PDBQT block into a topology handle.
2162
2180
  *
2163
- * Coordinates and partial charges are intentionally discarded, matching the
2164
- * Python `from_pdbqt` binding; use the Rust parser when those arrays are
2165
- * needed. Invalid records return a JS error instead of a partial molecule.
2181
+ * Coordinates and partial charges are discarded; use `pdbqt_atom_data_json`
2182
+ * when those arrays are needed. No bonds are inferred. Invalid records
2183
+ * return a JS error instead of a partial molecule.
2166
2184
  */
2167
2185
  export function mol_from_pdbqt(pdbqt: string): MolHandle;
2168
2186
 
@@ -2374,12 +2392,21 @@ export function opendx_shape_u32(text: string): Uint32Array;
2374
2392
  */
2375
2393
  export function opendx_values_f64(text: string): Float64Array;
2376
2394
 
2395
+ /**
2396
+ * Read ordered Cartesian values and explicit Angstrom/Bohr units; no rescaling.
2397
+ * Refuses ambiguous/unsupported unit or coordinate declarations and %coords.
2398
+ * Atom extras remain opaque; no external geometry resources are opened.
2399
+ */
2400
+ export function orca_cartesian_geometry_json(text: string): string;
2401
+
2377
2402
  /**
2378
2403
  * Coordinates + charge + multiplicity from an ORCA input file's embedded
2379
2404
  * `* xyz ... *` block, in the SAME atom order [`mol_from_orca_input`]
2380
2405
  * returns topology for. Returns JSON
2381
2406
  * `{"coords":[[x,y,z],...],"charge":0,"multiplicity":1}`, or a JS error
2382
2407
  * under the same conditions as [`mol_from_orca_input`].
2408
+ * This legacy view returns only Angstrom input. Bohr, conflicting units and
2409
+ * %coords overrides are refused; use [`orca_cartesian_geometry_json`] instead.
2383
2410
  */
2384
2411
  export function orca_input_coords_json(text: string): string;
2385
2412
 
@@ -2440,6 +2467,12 @@ export function parse_cxsmarts_json(s: string): string;
2440
2467
  */
2441
2468
  export function parse_cxsmiles_json(s: string): string;
2442
2469
 
2470
+ /**
2471
+ * Inspect every ordered Cartesian job with UTF-8 byte ranges in the original source.
2472
+ * Coordinate units are unchanged; no inferred bonds or external resource reads.
2473
+ */
2474
+ export function parse_gjf_document_json(text: string): string;
2475
+
2443
2476
  /**
2444
2477
  * Inspect the bounded HIN record, including literal aromatic bonds and charges.
2445
2478
  */
@@ -2476,6 +2509,16 @@ export function pdb_conect_frame_json(input: string, allow_extended_targets: boo
2476
2509
  */
2477
2510
  export function pdb_coords_json(pdb: string): string;
2478
2511
 
2512
+ /**
2513
+ * Read PDBQT atom data as JSON {atomic_numbers, coords, partial_charges}.
2514
+ * Arrays share source ATOM/HETATM order. Coordinates are in Å and partial
2515
+ * charges in e; parsed finite binary64 values are not rounded/recalculated.
2516
+ * No bonds or formal charges are inferred. Source atom identities, AutoDock
2517
+ * types, remarks and torsion trees are not retained. Throws on invalid atoms
2518
+ * or WASM size limits. Use mol_from_pdbqt separately for an element-only handle.
2519
+ */
2520
+ export function pdbqt_atom_data_json(pdbqt: string): string;
2521
+
2479
2522
  /**
2480
2523
  * PEOE_VSA descriptors (14 bins) as a JSON array.
2481
2524
  */
@@ -2873,6 +2916,18 @@ export function ring_families_json(mol: MolHandle): string;
2873
2916
  */
2874
2917
  export function roundtrip_cjson_record(text: string): string;
2875
2918
 
2919
+ /**
2920
+ * Retain all explicit Cartesian Link1 jobs as exact source; no job selection.
2921
+ * Budgets are cumulative. Opaque sections and external resources are not interpreted.
2922
+ */
2923
+ export function roundtrip_gjf_document(text: string): string;
2924
+
2925
+ /**
2926
+ * Retain exact single Cartesian GJF source without regenerating job sections.
2927
+ * Opaque sections are not interpreted; no external files are opened.
2928
+ */
2929
+ export function roundtrip_gjf_record(text: string): string;
2930
+
2876
2931
  /**
2877
2932
  * Validate a single HIN record and retain exact source text and line endings.
2878
2933
  */
@@ -2884,16 +2939,23 @@ export function roundtrip_hin_record(text: string): string;
2884
2939
  export function roundtrip_mol2_record(text: string): string;
2885
2940
 
2886
2941
  /**
2887
- * Parse and serialize a V3000 block while preserving V3000 metadata.
2942
+ * Validate one V3000 MOL block and return its exact source.
2888
2943
  *
2889
2944
  * Unlike the topology-only [`mol_from_v3000_block`] + [`to_mol_v3000_block`]
2890
- * pair, this explicit round-trip API retains `SGROUP` logical lines and
2891
- * `COLLECTION` stereo groups. SGROUP polymer/query expansion is still out of
2892
- * scope, but the typed syntax view is available through
2945
+ * pair, this retains 3D coordinate tokens, IDs, source ordering and opaque
2946
+ * fields including SGROUP and COLLECTION. No normalization or opaque chemistry
2947
+ * verification is promised. The typed SGroup view remains available through
2893
2948
  * [`v3000_sgroups_json`].
2894
2949
  */
2895
2950
  export function roundtrip_mol_v3000_block(block: string): string;
2896
2951
 
2952
+ /**
2953
+ * Validate every local-profile SDF record and retain exact UTF-8 source.
2954
+ * No partial output on record/limit failure. Opaque metadata/stereo is not
2955
+ * interpreted or edited. Bounds: 1 MB input/record, 10000 records/total atoms.
2956
+ */
2957
+ export function roundtrip_sdf_source(text: string): string;
2958
+
2897
2959
  /**
2898
2960
  * Apply a SMIRKS reaction template and return product SMILES as a JSON string.
2899
2961
  *
@@ -3493,6 +3555,13 @@ export function write_orca_input_json(json: string): string;
3493
3555
  */
3494
3556
  export function write_pqr_json(records_json: string): string;
3495
3557
 
3558
+ /**
3559
+ * Write explicit PQR atom records without numeric rounding or bond inference.
3560
+ * Strict JSON array: no duplicate/unknown fields, missing required values or
3561
+ * incompatible elements. Non-atom source metadata is not represented.
3562
+ */
3563
+ export function write_pqr_json_checked(records_json: string): string;
3564
+
3496
3565
  /**
3497
3566
  * Non-canonical SMILES for `mol`.
3498
3567
  *
@@ -3841,6 +3910,7 @@ export interface InitOutput {
3841
3910
  readonly opendx_grid_json: (a: number, b: number) => [number, number, number, number];
3842
3911
  readonly opendx_shape_u32: (a: number, b: number) => [number, number, number];
3843
3912
  readonly opendx_values_f64: (a: number, b: number) => [number, number, number];
3913
+ readonly orca_cartesian_geometry_json: (a: number, b: number) => [number, number, number, number];
3844
3914
  readonly orca_input_coords_json: (a: number, b: number) => [number, number, number, number];
3845
3915
  readonly orca_input_to_json: (a: number, b: number) => [number, number, number, number];
3846
3916
  readonly orca_output_to_json: (a: number, b: number) => [number, number, number, number];
@@ -3849,11 +3919,13 @@ export interface InitOutput {
3849
3919
  readonly parse_cjson_record_json: (a: number, b: number) => [number, number, number, number];
3850
3920
  readonly parse_cxsmarts_json: (a: number, b: number) => [number, number, number, number];
3851
3921
  readonly parse_cxsmiles_json: (a: number, b: number) => [number, number, number, number];
3922
+ readonly parse_gjf_document_json: (a: number, b: number) => [number, number, number, number];
3852
3923
  readonly parse_hin_record_json: (a: number, b: number) => [number, number, number, number];
3853
3924
  readonly parse_mol2_record_json: (a: number, b: number) => [number, number, number, number];
3854
3925
  readonly parse_smiles: (a: number, b: number) => [number, number, number];
3855
3926
  readonly pdb_conect_frame_json: (a: number, b: number, c: number) => [number, number, number, number];
3856
3927
  readonly pdb_coords_json: (a: number, b: number) => [number, number];
3928
+ readonly pdbqt_atom_data_json: (a: number, b: number) => [number, number, number, number];
3857
3929
  readonly peoe_vsa_json: (a: number) => [number, number];
3858
3930
  readonly periodic_structure_fingerprint_json: (a: number, b: number, c: number, d: number) => [number, number];
3859
3931
  readonly pharmacophore_features_json: (a: number) => [number, number];
@@ -3908,9 +3980,12 @@ export interface InitOutput {
3908
3980
  readonly rgroup_decompose_json: (a: number, b: number, c: number, d: number) => [number, number, number, number];
3909
3981
  readonly ring_families_json: (a: number) => [number, number, number, number];
3910
3982
  readonly roundtrip_cjson_record: (a: number, b: number) => [number, number, number, number];
3983
+ readonly roundtrip_gjf_document: (a: number, b: number) => [number, number, number, number];
3984
+ readonly roundtrip_gjf_record: (a: number, b: number) => [number, number, number, number];
3911
3985
  readonly roundtrip_hin_record: (a: number, b: number) => [number, number, number, number];
3912
3986
  readonly roundtrip_mol2_record: (a: number, b: number) => [number, number, number, number];
3913
3987
  readonly roundtrip_mol_v3000_block: (a: number, b: number) => [number, number, number, number];
3988
+ readonly roundtrip_sdf_source: (a: number, b: number) => [number, number, number, number];
3914
3989
  readonly run_reactants: (a: number, b: number, c: number, d: number) => [number, number, number, number];
3915
3990
  readonly run_reactants_checked: (a: number, b: number, c: number, d: number, e: number) => [number, number];
3916
3991
  readonly rxn_document_from_rxn: (a: number, b: number) => [number, number, number, number];
@@ -3995,6 +4070,7 @@ export interface InitOutput {
3995
4070
  readonly write_opendx_lossy_json: (a: number, b: number) => [number, number, number, number];
3996
4071
  readonly write_orca_input_json: (a: number, b: number) => [number, number, number, number];
3997
4072
  readonly write_pqr_json: (a: number, b: number) => [number, number, number, number];
4073
+ readonly write_pqr_json_checked: (a: number, b: number) => [number, number, number, number];
3998
4074
  readonly write_smiles: (a: number) => [number, number];
3999
4075
  readonly xlogp3_json: (a: number) => [number, number];
4000
4076
  readonly xlogp3_per_atom_json: (a: number) => [number, number];
package/chematic_wasm.js CHANGED
@@ -3019,8 +3019,24 @@ export function conformer_ensemble_json(mol, n, rmsd_threshold) {
3019
3019
  *
3020
3020
  * This is the WASM counterpart of Python's `convert_format`. It supports
3021
3021
  * SMILES, MOL/SDF, MOL V3000, MOL2, CML, ChemicalJSON, MolJSON, and CDXML.
3022
- * MOL2-to-MOL2 validates and retains the exact source. Other conversions use
3022
+ * MOL2-to-MOL2, CJSON-to-CJSON, and V3000-to-V3000 validate and retain exact source.
3023
+ * GJF/COM supports only
3024
+ * same-format retention of a bounded single Cartesian job, including opaque
3025
+ * job sections (not a Gaussian job validator).
3026
+ * V3000-to-CJSON also
3027
+ * carries source-order x/y/z values; it does not retain opaque metadata or
3028
+ * verify cross-format stereo.
3029
+ * MOL2-to-CJSON checks
3030
+ * graph/xyz/name/complete declared partial charges on reparse and refuses
3031
+ * incomplete or undeclared charge columns. Other MOL2 metadata and stereo
3032
+ * are not retained or verified; use convert_with_report_json for losses.
3033
+ * NO_CHARGES zero placeholders are omitted as explicitly unassigned values.
3034
+ * Other conversions use
3023
3035
  * the topology-only bridge and do not carry format-specific metadata.
3036
+ * SDF-to-SDF retains every validated source record. Other MOL/SDF input routes
3037
+ * require exactly one CTAB and omit SD fields; SDF output is one framed record.
3038
+ * CML-to-CJSON carries complete source Cartesian coordinates, leaving absent
3039
+ * 3D geometry absent and refusing partial/nonfinite data and multiple molecules.
3024
3040
  * @param {string} text
3025
3041
  * @param {string} input_format
3026
3042
  * @param {string} output_format
@@ -3052,7 +3068,7 @@ export function convert_common_format(text, input_format, output_format) {
3052
3068
  }
3053
3069
 
3054
3070
  /**
3055
- * Checked MOL2/CJSON conversion using the shared report schema.
3071
+ * Checked MOL2/CJSON/CML conversion using the shared report schema.
3056
3072
  * @param {string} text
3057
3073
  * @param {string} input_format
3058
3074
  * @param {string} output_format
@@ -5044,14 +5060,16 @@ export function mcs_smiles_json(smiles_json) {
5044
5060
  * (camelCase keys, all optional, defaulting to `McsConfig::default()`):
5045
5061
  * `matchBonds`, `minAtoms`, `timeoutMs`, `ringMatchesRingOnly`,
5046
5062
  * `completeRingsOnly`, `atomCompare` (`"elements"` | `"any_heavy_atom"` |
5063
+ * `"rdkit_any_heavy_atom"` |
5047
5064
  * `"any"`), `bondCompare` (`"order_or_aromatic"` | `"any"`),
5048
- * `matchChiralTag`, `matchCharge`, `matchIsotope`, `maximizeBonds`.
5049
- *
5050
- * Returns a JSON object `{"smiles": string|null, "wasTimedOut": bool}` --
5051
- * `smiles` is `null` when there is no common substructure; `wasTimedOut` is
5052
- * `true` if `timeoutMs` was reached before the search finished exhaustively
5053
- * (the returned `smiles`, if any, is then the best result found so far, not
5054
- * proven optimal).
5065
+ * `matchChiralTag`, `matchCharge`, `matchIsotope`, `maximizeBonds`, and
5066
+ * `maxSearchNodes`.
5067
+ *
5068
+ * Returns a JSON object with `smiles`, `wasTimedOut`, and
5069
+ * `wasResourceLimited`. `smiles` is `null` when there is no common
5070
+ * substructure; the two status fields distinguish deadline expiry from a
5071
+ * configured input/search limit. A returned partial result is not proven
5072
+ * optimal when either status is true.
5055
5073
  * @param {string} smiles_json
5056
5074
  * @param {string} config_json
5057
5075
  * @returns {string}
@@ -5913,9 +5931,9 @@ export function mol_from_pdb_strict(pdb) {
5913
5931
  /**
5914
5932
  * Parse an AutoDock PDBQT block into a topology handle.
5915
5933
  *
5916
- * Coordinates and partial charges are intentionally discarded, matching the
5917
- * Python `from_pdbqt` binding; use the Rust parser when those arrays are
5918
- * needed. Invalid records return a JS error instead of a partial molecule.
5934
+ * Coordinates and partial charges are discarded; use `pdbqt_atom_data_json`
5935
+ * when those arrays are needed. No bonds are inferred. Invalid records
5936
+ * return a JS error instead of a partial molecule.
5919
5937
  * @param {string} pdbqt
5920
5938
  * @returns {MolHandle}
5921
5939
  */
@@ -6513,12 +6531,42 @@ export function opendx_values_f64(text) {
6513
6531
  return takeFromExternrefTable0(ret[0]);
6514
6532
  }
6515
6533
 
6534
+ /**
6535
+ * Read ordered Cartesian values and explicit Angstrom/Bohr units; no rescaling.
6536
+ * Refuses ambiguous/unsupported unit or coordinate declarations and %coords.
6537
+ * Atom extras remain opaque; no external geometry resources are opened.
6538
+ * @param {string} text
6539
+ * @returns {string}
6540
+ */
6541
+ export function orca_cartesian_geometry_json(text) {
6542
+ let deferred3_0;
6543
+ let deferred3_1;
6544
+ try {
6545
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6546
+ const len0 = WASM_VECTOR_LEN;
6547
+ const ret = wasm.orca_cartesian_geometry_json(ptr0, len0);
6548
+ var ptr2 = ret[0];
6549
+ var len2 = ret[1];
6550
+ if (ret[3]) {
6551
+ ptr2 = 0; len2 = 0;
6552
+ throw takeFromExternrefTable0(ret[2]);
6553
+ }
6554
+ deferred3_0 = ptr2;
6555
+ deferred3_1 = len2;
6556
+ return getStringFromWasm0(ptr2, len2);
6557
+ } finally {
6558
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
6559
+ }
6560
+ }
6561
+
6516
6562
  /**
6517
6563
  * Coordinates + charge + multiplicity from an ORCA input file's embedded
6518
6564
  * `* xyz ... *` block, in the SAME atom order [`mol_from_orca_input`]
6519
6565
  * returns topology for. Returns JSON
6520
6566
  * `{"coords":[[x,y,z],...],"charge":0,"multiplicity":1}`, or a JS error
6521
6567
  * under the same conditions as [`mol_from_orca_input`].
6568
+ * This legacy view returns only Angstrom input. Bohr, conflicting units and
6569
+ * %coords overrides are refused; use [`orca_cartesian_geometry_json`] instead.
6522
6570
  * @param {string} text
6523
6571
  * @returns {string}
6524
6572
  */
@@ -6740,6 +6788,33 @@ export function parse_cxsmiles_json(s) {
6740
6788
  }
6741
6789
  }
6742
6790
 
6791
+ /**
6792
+ * Inspect every ordered Cartesian job with UTF-8 byte ranges in the original source.
6793
+ * Coordinate units are unchanged; no inferred bonds or external resource reads.
6794
+ * @param {string} text
6795
+ * @returns {string}
6796
+ */
6797
+ export function parse_gjf_document_json(text) {
6798
+ let deferred3_0;
6799
+ let deferred3_1;
6800
+ try {
6801
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6802
+ const len0 = WASM_VECTOR_LEN;
6803
+ const ret = wasm.parse_gjf_document_json(ptr0, len0);
6804
+ var ptr2 = ret[0];
6805
+ var len2 = ret[1];
6806
+ if (ret[3]) {
6807
+ ptr2 = 0; len2 = 0;
6808
+ throw takeFromExternrefTable0(ret[2]);
6809
+ }
6810
+ deferred3_0 = ptr2;
6811
+ deferred3_1 = len2;
6812
+ return getStringFromWasm0(ptr2, len2);
6813
+ } finally {
6814
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
6815
+ }
6816
+ }
6817
+
6743
6818
  /**
6744
6819
  * Inspect the bounded HIN record, including literal aromatic bonds and charges.
6745
6820
  * @param {string} text
@@ -6865,6 +6940,37 @@ export function pdb_coords_json(pdb) {
6865
6940
  }
6866
6941
  }
6867
6942
 
6943
+ /**
6944
+ * Read PDBQT atom data as JSON {atomic_numbers, coords, partial_charges}.
6945
+ * Arrays share source ATOM/HETATM order. Coordinates are in Å and partial
6946
+ * charges in e; parsed finite binary64 values are not rounded/recalculated.
6947
+ * No bonds or formal charges are inferred. Source atom identities, AutoDock
6948
+ * types, remarks and torsion trees are not retained. Throws on invalid atoms
6949
+ * or WASM size limits. Use mol_from_pdbqt separately for an element-only handle.
6950
+ * @param {string} pdbqt
6951
+ * @returns {string}
6952
+ */
6953
+ export function pdbqt_atom_data_json(pdbqt) {
6954
+ let deferred3_0;
6955
+ let deferred3_1;
6956
+ try {
6957
+ const ptr0 = passStringToWasm0(pdbqt, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6958
+ const len0 = WASM_VECTOR_LEN;
6959
+ const ret = wasm.pdbqt_atom_data_json(ptr0, len0);
6960
+ var ptr2 = ret[0];
6961
+ var len2 = ret[1];
6962
+ if (ret[3]) {
6963
+ ptr2 = 0; len2 = 0;
6964
+ throw takeFromExternrefTable0(ret[2]);
6965
+ }
6966
+ deferred3_0 = ptr2;
6967
+ deferred3_1 = len2;
6968
+ return getStringFromWasm0(ptr2, len2);
6969
+ } finally {
6970
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
6971
+ }
6972
+ }
6973
+
6868
6974
  /**
6869
6975
  * PEOE_VSA descriptors (14 bins) as a JSON array.
6870
6976
  * @param {MolHandle} mol
@@ -7997,6 +8103,60 @@ export function roundtrip_cjson_record(text) {
7997
8103
  }
7998
8104
  }
7999
8105
 
8106
+ /**
8107
+ * Retain all explicit Cartesian Link1 jobs as exact source; no job selection.
8108
+ * Budgets are cumulative. Opaque sections and external resources are not interpreted.
8109
+ * @param {string} text
8110
+ * @returns {string}
8111
+ */
8112
+ export function roundtrip_gjf_document(text) {
8113
+ let deferred3_0;
8114
+ let deferred3_1;
8115
+ try {
8116
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
8117
+ const len0 = WASM_VECTOR_LEN;
8118
+ const ret = wasm.roundtrip_gjf_document(ptr0, len0);
8119
+ var ptr2 = ret[0];
8120
+ var len2 = ret[1];
8121
+ if (ret[3]) {
8122
+ ptr2 = 0; len2 = 0;
8123
+ throw takeFromExternrefTable0(ret[2]);
8124
+ }
8125
+ deferred3_0 = ptr2;
8126
+ deferred3_1 = len2;
8127
+ return getStringFromWasm0(ptr2, len2);
8128
+ } finally {
8129
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
8130
+ }
8131
+ }
8132
+
8133
+ /**
8134
+ * Retain exact single Cartesian GJF source without regenerating job sections.
8135
+ * Opaque sections are not interpreted; no external files are opened.
8136
+ * @param {string} text
8137
+ * @returns {string}
8138
+ */
8139
+ export function roundtrip_gjf_record(text) {
8140
+ let deferred3_0;
8141
+ let deferred3_1;
8142
+ try {
8143
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
8144
+ const len0 = WASM_VECTOR_LEN;
8145
+ const ret = wasm.roundtrip_gjf_record(ptr0, len0);
8146
+ var ptr2 = ret[0];
8147
+ var len2 = ret[1];
8148
+ if (ret[3]) {
8149
+ ptr2 = 0; len2 = 0;
8150
+ throw takeFromExternrefTable0(ret[2]);
8151
+ }
8152
+ deferred3_0 = ptr2;
8153
+ deferred3_1 = len2;
8154
+ return getStringFromWasm0(ptr2, len2);
8155
+ } finally {
8156
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
8157
+ }
8158
+ }
8159
+
8000
8160
  /**
8001
8161
  * Validate a single HIN record and retain exact source text and line endings.
8002
8162
  * @param {string} text
@@ -8050,12 +8210,12 @@ export function roundtrip_mol2_record(text) {
8050
8210
  }
8051
8211
 
8052
8212
  /**
8053
- * Parse and serialize a V3000 block while preserving V3000 metadata.
8213
+ * Validate one V3000 MOL block and return its exact source.
8054
8214
  *
8055
8215
  * Unlike the topology-only [`mol_from_v3000_block`] + [`to_mol_v3000_block`]
8056
- * pair, this explicit round-trip API retains `SGROUP` logical lines and
8057
- * `COLLECTION` stereo groups. SGROUP polymer/query expansion is still out of
8058
- * scope, but the typed syntax view is available through
8216
+ * pair, this retains 3D coordinate tokens, IDs, source ordering and opaque
8217
+ * fields including SGROUP and COLLECTION. No normalization or opaque chemistry
8218
+ * verification is promised. The typed SGroup view remains available through
8059
8219
  * [`v3000_sgroups_json`].
8060
8220
  * @param {string} block
8061
8221
  * @returns {string}
@@ -8081,6 +8241,34 @@ export function roundtrip_mol_v3000_block(block) {
8081
8241
  }
8082
8242
  }
8083
8243
 
8244
+ /**
8245
+ * Validate every local-profile SDF record and retain exact UTF-8 source.
8246
+ * No partial output on record/limit failure. Opaque metadata/stereo is not
8247
+ * interpreted or edited. Bounds: 1 MB input/record, 10000 records/total atoms.
8248
+ * @param {string} text
8249
+ * @returns {string}
8250
+ */
8251
+ export function roundtrip_sdf_source(text) {
8252
+ let deferred3_0;
8253
+ let deferred3_1;
8254
+ try {
8255
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
8256
+ const len0 = WASM_VECTOR_LEN;
8257
+ const ret = wasm.roundtrip_sdf_source(ptr0, len0);
8258
+ var ptr2 = ret[0];
8259
+ var len2 = ret[1];
8260
+ if (ret[3]) {
8261
+ ptr2 = 0; len2 = 0;
8262
+ throw takeFromExternrefTable0(ret[2]);
8263
+ }
8264
+ deferred3_0 = ptr2;
8265
+ deferred3_1 = len2;
8266
+ return getStringFromWasm0(ptr2, len2);
8267
+ } finally {
8268
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
8269
+ }
8270
+ }
8271
+
8084
8272
  /**
8085
8273
  * Apply a SMIRKS reaction template and return product SMILES as a JSON string.
8086
8274
  *
@@ -9982,6 +10170,34 @@ export function write_pqr_json(records_json) {
9982
10170
  }
9983
10171
  }
9984
10172
 
10173
+ /**
10174
+ * Write explicit PQR atom records without numeric rounding or bond inference.
10175
+ * Strict JSON array: no duplicate/unknown fields, missing required values or
10176
+ * incompatible elements. Non-atom source metadata is not represented.
10177
+ * @param {string} records_json
10178
+ * @returns {string}
10179
+ */
10180
+ export function write_pqr_json_checked(records_json) {
10181
+ let deferred3_0;
10182
+ let deferred3_1;
10183
+ try {
10184
+ const ptr0 = passStringToWasm0(records_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
10185
+ const len0 = WASM_VECTOR_LEN;
10186
+ const ret = wasm.write_pqr_json_checked(ptr0, len0);
10187
+ var ptr2 = ret[0];
10188
+ var len2 = ret[1];
10189
+ if (ret[3]) {
10190
+ ptr2 = 0; len2 = 0;
10191
+ throw takeFromExternrefTable0(ret[2]);
10192
+ }
10193
+ deferred3_0 = ptr2;
10194
+ deferred3_1 = len2;
10195
+ return getStringFromWasm0(ptr2, len2);
10196
+ } finally {
10197
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
10198
+ }
10199
+ }
10200
+
9985
10201
  /**
9986
10202
  * Non-canonical SMILES for `mol`.
9987
10203
  *
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.2.0",
8
+ "version": "1.2.1",
9
9
  "license": "MIT OR Apache-2.0",
10
10
  "repository": {
11
11
  "type": "git",