Skip to content

Library-only functionality audit ​

Functions in the Rust export inventory that have no CLI command. Each row was checked with a real geometry, its limit/error paths, its documentation and a regression test. Python/WASM parity is noted where the binding exists.

IDFunctionStatusEvidence
LIB-001compute_md_trajectory, compute_md_trajectory_nvtFIXEDValidation: dt_fs NaN/Inf/≤0, target_temp_k ≤0/NaN, thermostat_tau_fs ≤0/NaN and non-finite coordinates are now rejected before integration. Behaviour: CC NVE 100×0.25 fs → 101 frames, last time 25 fs, finite drift; CCO NVT 500×0.25 fs, 300 K, τ=10 fs → tail mean 323.8 K. Parity: Python MdTrajectory now exposes energy_drift_percent (was missing; WASM already had it). Docs: new molecular dynamics page with NVE/NVT equations, Mermaid pipeline and limits. Tests: test_md_trajectory_frame_times_and_nvt_thermostat, test_md_trajectory_rejects_invalid_controls, Python and Node integration cases.
LIB-002search_conformers_with_uffFIXEDValidation: rmsd_threshold now must be finite and >0 (NaN/Inf slipped through); n_samples=0, invalid SMILES and bad thresholds rejected. Behaviour: CCCC sampled/refined/ranked by UFF, clusters and representative seeds are consistent, energies sorted. Docs: UFF-search section in conformer ensembles with pipeline and limits. Tests: test_search_conformers_with_uff_rejects_invalid_controls, existing ranking/cluster tests, Python and Node integration cases.
LIB-003evaluate_mlipFIXEDContract: root wrapper delegates to MlipModel::evaluate; manifest, element coverage, stress flag, force count/finiteness and unit conversion already checked. Fix: non-finite or zero-volume cells are now rejected; eV→kcal/mol conversion is covered by a root-level test. Docs: MLIP contract now has a pipeline diagram, current status and cell/unit validation rows. Tests: ev_units_are_converted_at_the_boundary, invalid_cells_are_rejected, registry/manifest tests. Python/WASM callbacks are intentionally not exposed.
LIB-004compute_ani_with_modelsFIXEDBehaviour: root wrapper validates geometry and maps engine errors; custom per-element networks produce finite energy, one force per atom and atomic energies summing to the total. Limits: cutoff NaN/Inf/≤0, missing model, unsupported element and AEV/model dimension mismatch are rejected. Docs: machine-learning potentials now documents the root wrapper and its checks; the test-weight caveat remains explicit. Tests: test_compute_ani_with_models_validates_the_contract, existing finite-difference force tests. Python/WASM expose only the built-in test-weight compute_ani, not custom model maps.
LIB-005compute_bond_ordersFIXEDBehaviour: H₂ at 0.74 Å gives one pair, distance 0.74 Å, Wiberg and Mayer exactly 1.0; a single atom returns zero pairs/valences; all pairs are reported, including nonbonded ones. Limits: mismatched lengths, non-finite coordinates and Z=119 are rejected by EHT/geometry validation. Parity: Python now rejects a coordinate array that is not exactly 3N (extra values were silently dropped); WASM already validated the parse. Docs: Wiberg/Mayer equations, pipeline and surface/limit table added to population analysis. Tests: test_compute_bond_orders_contract_and_limits, Python and Node cases.
LIB-006compute_topology, compute_topology_checkedFIXEDBehaviour: cisplatin PtCl₂(NH₃)₂ → one Pt centre, CN=4, square_planar, score >0.8; octahedral/tetrahedral cases remain covered by the regression suite. Fix: added compute_topology_checked (validates length, emptiness and finite coordinates) and routed Python/WASM through it; the bare Rust function keeps its tolerant historical behavior. Docs: new metal coordination topology page with cutoff, ideal-geometry pipeline, Mermaid diagram, validation and limits. Tests: test_compute_topology_checked_contract, Python and Node cases including NaN and length mismatch.
LIB-007compute_ecfp_batchFIXEDBehaviour: ["CCO","c1ccccc1"] returns two fingerprints in input order, matching the single-molecule compute_ecfp on-bits and raw features; replay is deterministic; an empty list returns []. Fix: n_bits < 64 was silently clamped to 64; the batch API now rejects 0/63 explicitly (CLI ecfp-batch, Python and WASM inherit the error). Limits: any invalid SMILES rejects the whole batch. Docs: order/determinism/min-bit/empty-batch rules added to descriptors and the Python/TypeScript API pages. Parity: Python ECFPFingerprint now exposes raw_features (WASM already did), and the batch accepts the same parameters on all surfaces. Tests: test_compute_ecfp_batch_contract, CLI ecfp_batch_validates_bit_width_and_preserves_order, Python and Node cases.
LIB-008compute_orbital_meshFIXEDBehaviour: water HOMO (spacing=0.2 Å, padding=3 Å, isovalue=0.02) yields a finite grid [31,39,34] and 544 triangles, with finite vertices/normals and gap 6.358 eV; all four methods remain covered by the mesh tests. Fix: negative/NaN/Inf padding and NaN/±Inf isovalue were previously accepted (padding was only checked for finiteness); both are now rejected. spacing, geometry, method and MO-index validation already existed. Docs: mesh validation table and measured example added to extended Hückel theory; Python/TypeScript API notes updated. Tests: test_eht_mesh_water, test_orbital_mesh_rejects_invalid_padding_and_isovalue. Python/WASM inherit the core checks.
LIB-009compute_md_trajectory_with_method (WASM)FIXEDBehaviour: UFF CCO 5×0.25 fs returns 6 finite frames with a thermostat; the wrapper exposes uff, pm3 and xtb backends. Fix: the underlying multi-backend integrator only checked n_steps/coordinate length; it now rejects non-finite/non-positive dt_fs, invalid thermostat temperature/tau, non-finite coordinates, zero-mass elements, and an elements array that does not match the SMILES atom count/sequence. The WASM wrapper also rejects negative/NaN targets instead of silently disabling the thermostat. Docs: multi-backend section added to molecular dynamics and the TypeScript API. Tests: test_multi_backend_md_validates_elements_and_controls plus Node cases for UFF, invalid backend, element mismatch and zero dt.
LIB-010compute_reaction_dynamics (WASM)FIXEDBehaviour: single-molecule CC -> CC with a 4-image/2-iteration config returns 8 frames (approach/reaction/departure), finite energies, and TS/activation/reaction fields; the product SMILES order change CCO -> OCC now returns activation_energy_kcal_mol=1.1165093760850304 with finite frames instead of the previous spurious ~1179 kcal/mol; CCO -> CCO returns a near-zero barrier and CC -> CC returns 0.21685071115779975 kcal/mol. Invalid backend, far_distance/reactive_distance ≤0 or NaN, and missing SMILES are rejected. Reactions that change connectivity or bond order, such as the keto–enol pair CC=O -> C=C-O, are rejected with a not isomorphic error instead of being mapped into a non-physical path. Fixes: replaced the greedy element/distance mapping with map_atoms_isomorphic, which enumerates element/connectivity/bond-order labelled graph isomorphisms and selects the mapping with the lowest Kabsch RMSD (capped at 4096 complete mappings). The 1D path now requires the same bonding topology and propagates the mapping error; the Rust-only 3D path keeps the distance fallback for connectivity-changing reactions and records it in its notes. Multi-fragment input remains explicitly rejected; energy failures in approach/departure frames propagate; config distances are validated; NEB parses all fragments. Docs: molecular dynamics and the TypeScript/Rust APIs document the labelled-graph mapping, the measured CCO -> OCC value and the non-isomorphic rejection. Tests: new Rust test_reaction_atom_mapping_uses_labelled_graph_isomorphism, expanded test_reaction_dynamics_contract_and_limits and Node 1D reaction-dynamics matrix (CCO -> OCC barrier, CC=O -> C=C-O rejection).
LIB-011beta_compute_kpm_dos (Python/WASM)FIXEDBehaviour: water EHT DOS returns 500 finite points in Python (200 with WASM defaults), e_min < e_max, nonzero DOS, and order echoed; WASM partial config {"order":50,"n_points":20} works. Fix: order=0 previously panicked inside the Chebyshev recursion; added compute_kpm_dos_checked (non-empty square finite Hamiltonian, order>=1, n_points>=2, finite window with e_max>e_min, finite non-negative temperature) and routed Python/WASM through it. WASM no longer silently ignores malformed config JSON; Python now rejects coordinate arrays that are not exactly 3N. Docs: corrected the KPM API example and result schema (total_dos, e_min, e_max, order), documented validation and the fact that DOS temperature is shared-config metadata (KPM Mulliken smearing is in eV). Tests: test_kpm_dos_checked_validates_and_returns_a_finite_spectrum, Python test_beta_kpm_dos_validation_and_spectrum, Node beta-subpath case.
LIB-012beta_compute_kpm_mulliken (Python/WASM)FIXEDBehaviour: water at the default order 100 now gives O = −1.1709 e, H = +0.5856/+0.5855 e (sum 0.0001 e), 6 orbital populations summing to 7.9999 e, n_electrons_target=8; the exact EHT population differs by at most 0.0012 e. Fix: the binding used the atomic number (O = 8) instead of the EHT valence count (O = 6) and then summed one charge per basis function as if each were an atom, producing O = +24.83 e. Added compute_kpm_mulliken_atoms with explicit basis→atom mapping, valence charges and validation (Result; finite square matrices, positive valence charges, n_electrons>0, order>=1, non-negative temperature); Python/WASM now return per-atom charges and per-orbital populations. The legacy compute_kpm_mulliken is documented as one-basis-per-atom. Docs: corrected Rust/Python/WASM examples and schemas in KPM and beta, added a Mermaid density/charge flow and measured validation table. Tests: test_kpm_mulliken_atoms_aggregates_per_atom, updated b2_kpm_mulliken_vs_eht_population (now asserts <0.01 e vs EHT), Python test_beta_kpm_mulliken_aggregates_valence_charges, Node beta-subpath case.
LIB-013beta_compute_mbh_frequencies (Python/WASM)FIXEDBehaviour: UFF-optimized ethanol (9 atoms, fd_step=0.005 Å) returns 27 finite sorted modes, the first six near zero (−2.54, 3.83, 3.99, 4.83, 5.67, 6.64 cm⁻¹) and the highest 2945.84/2947.29/2955.21/3741.52 cm⁻¹; benzene gives 24/36 DOF (speedup 1.5) and naphthalene 30/54 (1.8) after fused-ring merging. Fixes: Python silently swallowed UFF and SSSR errors (unwrap_or(0.0)), so invalid SMILES returned 27 zero frequencies; fd_step=0 returned NaNs and a 26-value coordinate array panicked. WASM also ignored SSSR/UFF failures. Added compute_mbh_frequencies_checked (finite 3N geometry, supported elements, fd_step>0, valid rings, finite energies/frequencies) and routed both bindings through it; both now require elements to match the SMILES atom order. Scientific fixes: overlapping/fused rings are merged by union-find instead of dropping later rings (the docs claimed merging); block translation/rotation columns are geometric and mass enters only through M_red = LᵀML (previously block columns carried sqrt(m) and were mass-weighted again). Docs: corrected the dedicated Mobile Block Hessian page (real signatures/schemas, pipeline diagram, fused-ring/DOF limits, measured ethanol and DOF table) and replaced the stale duplicate in beta with a link. Tests: f92_checked_mbh_validates_inputs_and_energy, fused-ring/projection tests, Python and Node MBH cases.
LIB-014beta_solve_eht_randnla (Python/WASM)FIXEDBehaviour: water (6 EHT orbitals) with the default config returns k=6, HOMO −14.8 eV, LUMO −8.431381 eV, gap 6.368619 eV and used_fallback=false; sketch_size=4 gives residual 0.1038, used_fallback=true, and the same HOMO/LUMO/gap. Fixes: sketch_size=0 panicked inside the empty symmetric tridiagonal decomposition; Python accepted a short coordinate array (panic) and silently fell back to n_electrons = elements.len()*2 while building matrices for unsupported elements; negative/NaN max_error was accepted. Added solve_eht_randnla_checked (non-empty finite square matrices, matching overlap, sketch_size>=1, finite max_error>=0, finite complete output) and routed the high-level EHT backend and both bindings through it. Python now uses the validated eht::solve_eht_randnla result for odd/even HOMO/LUMO and rejects non-3N coordinates; WASM now accepts partial config JSON (#[serde(default)]). Docs: corrected the false O(N k²) claim for the full-spectrum path, the nonexistent rand_nla_error field, and added binding validation, fallback semantics and measured parity to RandNLA and beta. Tests: test_checked_randnla_rejects_bad_matrices_and_config, test_partial_config_deserializes_defaults, Python test_beta_solve_eht_randnla_validation_and_exact_parity, Node beta-RandNLA case.
LIB-015beta_compute_cpm_charges (Python/WASM)FIXEDBehaviour: water at −4.44 eV returns charges −1.987378/−1.714076/−1.714117 e, total −5.415570 e, grand potential −32.560254 eV, electrostatic energy −8.515122 eV, iterations=1, converged=true; at −3.44 eV the total is −4.964213 e (correct direction). Python default is now −4.44 eV and matches the canonical compute_cpm_charges exactly. Fixes: the beta wrappers called the unchecked core solver, so a short coordinate array and an empty geometry panicked, NaN/Inf potentials returned all-NaN charges, and unsupported elements silently used carbon parameters. Routed Python/WASM through compute_cpm_charges_checked, added 3N validation, and exposed grand_potential, electrostatic_energy, mu_ev, iterations and converged (keeping energy as a legacy alias). Docs: corrected beta (nonexistent CpmConfig::potential, ? on a non-Result, result.energy, and the false “constrains total charge” claim), and added the checked API, binding schema, Mermaid solve pipeline and validation to CPM. Tests: Python test_beta_cpm_charges_validation_and_canonical_parity, Node beta-CPM case with canonical parity, direction and error checks.
LIB-016alpha_compute_dft (Python/WASM)FIXEDBehaviour: water at the PySCF fixture geometry gives PBE −75.225392 Ha / gap 10.206 eV and SVWN −74.731385 Ha / gap 10.161 eV at the default Medium grid, both converged in 6 SCF iterations with 7 basis functions, 10 electrons, 5α/5β and neutral Mulliken charges; PBE0 (hybrid build) gives −75.245483 Ha / 14.523 eV. Fixes: the Python wrapper sliced chunks(3) directly, so 8- or 10-value coordinate arrays panicked; it also accepted Z=0 and Z=119, producing a meaningless energy. Added check_coords_len/as_chunks, explicit 1..=118 validation in the core and Python, and exposed the missing result fields (total_energy_hartree, electronic_energy, coulomb_energy, orbital_energies_ev, method, n_electrons, n_grid_points, n_alpha, n_beta, unrestricted). Invalid methods/geometries/elements now raise ValueError. Docs: corrected the Python canonical name (deprecated alias dft_calculate), documented the full DftResult schema, validation, neutral/closed-shell binding limits, PBE0 gating, measured PySCF comparison and added a Mermaid SCF pipeline to alpha. Tests: invalid_atomic_numbers_are_rejected_before_the_scf, Python test_alpha_dft_water_pyscf_and_validation, Node alpha-DFT case.
LIB-017alpha_compute_reaxff_gradient (Python/WASM)FIXEDBehaviour: H₂ (0.74 Å), water and methane return finite analytical gradients (6/9/15 components) with energies −145.703488, −317.737239 and −454.554071 kcal/mol; each gradient sums to <1e-9 (Newton's third law). Fixes: the Python wrapper sliced chunks(3) directly, so short/long coordinate arrays panicked, and unsupported elements silently reused the last element's parameters. Added 3N/finite/empty validation, H/C/N/O element coverage in the core (compute_reaxff_gradient_analytic, with a no ReaxFF parameters error), and mapped input failures to ValueError. Docs: corrected the WASM schema ({energy_kcal_mol, gradient}, not {energy, gradient, n_atoms}), the Python canonical name/return type (not a tuple), added validation, measured examples and the analytic-vs-numerical reference. Tests: reaxff_gradient_rejects_invalid_inputs, Python test_alpha_reaxff_gradient_validation_and_parity, Node ReaxFF case.
LIB-018alpha_compute_reaxff_energy (Python/WASM)FIXEDBehaviour: water ch4/H₂ now return finite components and total exactly equal to alpha_compute_reaxff_gradient().energy_kcal_mol (water −317.737239, H₂ −145.703488, methane −454.554071 kcal/mol). Water components: bonded −293.214501, Coulomb −161.453765, vdW +136.931027. Fixes: the panic came from passing 4 element-parameter rows to a 3- or 5-atom compute_bonded_energy. Added per-atom ReaxffParams::for_elements, 3N/finite/element validation, switched to compute_bond_orders_pairs (over-coordination correction) and compute_nonbonded_energy_excluding (bonded-pair LJ exclusion). Docs: updated the measured table and removed the BLOCKED limitation from alpha. Tests: Python/Node energy-vs-gradient equality and component-sum checks.
LIB-019alpha_compute_eem_charges (Python/WASM)FIXEDBehaviour: water gives +0.762800/−0.384185/−0.378615 e (sum −2.2e-16), H₂ gives two zeros, CO gives −0.414192/+0.414192 e, and FeH uses the documented generic parameters (+0.840952/−0.840952). Fixes: Python sliced chunks(3) and panicked on an 8-value array, silently ignored a 10th value, returned [] for an empty molecule, and used unwrap_or_default so singular/NaN cases became zeros or NaNs. Added core validation in solve_eem_with_inverse (non-empty geometry, exactly 3N finite coordinates, finite total charge/parameters) and Python/WASM checks for 3N, finite coordinates, Z=1..=118, empty geometry and error propagation. Docs: added the EEM section to alpha with the energy functional, augmented-system Mermaid diagram, Rust/Python/WASM APIs, generic-parameter caveat and measured charges. Tests: eem_rejects_invalid_geometry_and_charge, Python test_alpha_eem_charges_validation_and_parity, Node EEM case.
LIB-020alpha_compute_aevs (Python/WASM)FIXEDBehaviour: water returns 3 AEVs of 320 values each (default 5.2 Å/3.5 Å), all finite, first radial value 1.7425422017858958. Fixes: Python sliced chunks(3) and panicked on short/long arrays, returned an empty descriptor for an empty molecule, and passed cutoffs 0/negative/NaN into the kernel. Added SymmetryFunctionParams::validate and compute_aevs_checked (non-empty geometry, 3N finite positions, positive finite cutoffs, non-empty finite grids, complete finite AEVs), routed both bindings through it, aligned the Python default radial cutoff to the core 5.2 Å, and made SymmetryFunctionParams accept partial WASM JSON via serde(default). Docs: corrected the AEV length (320, not 384), payload schema and defaults in alpha. Tests: aev_checked_rejects_invalid_geometry_and_params, Python/Node AEV cases.
LIB-021alpha_compute_mlff (Python/WASM)FIXEDBehaviour: a zero network for water returns energy 0, three zero atomic energies and zero forces (flat 3N in Python, nested n×3 in WASM); the F79 fixture returns 0.5329488298066036 eV with forces matching the NumPy reference to 6.4e-6. Fixes: compute_mlff did not validate network architecture; a bad input dimension panicked inside the weight loop and an empty network silently used the first AEV component as energy. Added InferenceNet::validate(aev_len) (non-empty layers, matching dimensions, weight/bias lengths, finite parameters, scalar output), AEV validation, finite-position/energy/force checks and missing-network errors. Docs: full config schema, activation names, force layouts, validation and measured values in alpha. Tests: mlff_validates_network_shape_and_finiteness, Python and Node MLFF cases.
LIB-022alpha_boys_function (Python/WASM)FIXEDBehaviour: F₀(0)=1, F₀(2.5)=0.5462919717851479, F₁(2.5)=0.09284139463224986, F₂(0)=0.2; SciPy gate 5.6e-14. Fixes: negative/NaN/Inf x previously returned a value or NaN silently; added boys_function_checked (finite x >= 0, n <= 10000, finite output) and routed Python/WASM through it. Docs: units and validation added to alpha. Tests: checked_boys_rejects_invalid_arguments, Python/Node Boys cases.
LIB-023alpha_eri_ssss (Python/WASM)FIXEDBehaviour: example ERI = 0.8789112566814015 Ha; self ERI for the 0↔1 Bohr pair = 1.608867239636225 Ha; PySCF/libcint gate 3.1e-14. Fixes: zero/negative/non-finite exponents and non-finite centers previously propagated to NaN/Inf or null. Added ShellPairData::new_checked and eri_ssss_checked (positive finite exponents, finite centers, finite non-negative result) and routed Python/WASM through them. Docs: corrected the invalid four-shell Rust call, documented Bohr/Bohr⁻²/Hartree units. Tests: checked_shell_pair_and_eri_validation, Python/Node ERI cases.
LIB-024alpha_schwarz_bound (Python/WASM)FIXEDBehaviour: pair 0↔1 Bohr gives 1.2684113053880532 √Ha and its square equals the self ERI 1.608867239636225 Ha; libcint gate 1e-10. Fixes: no validation of exponents/centers; added schwarz_bound_checked with the same shell-pair checks and finite non-negative output, routed both bindings. Docs: unit note and validation in alpha. Tests: Python/Node Schwarz cases including `Q² = (ab
LIB-025alpha_rotate_dihedral_cga (Python/WASM)FIXEDBehaviour: butane (CCCC, 14 atoms), subtree 3–13 about axis 1→2, +0.5 rad changes the dihedral by exactly −0.5 rad (mirror convention). Fixes: empty coordinates returned [], out-of-range indices panicked, and NaN axis/angle propagated to NaN coordinates. Added dihedral_motor_checked (finite axis/angle, distinct points) and apply_motor_to_subtree_checked (non-empty multiple-of-3 finite coords, in-range indices, finite motor), routed both bindings, and exposed the corrected unit/convention docs. Tests: checked_motor_and_subtree_reject_invalid_inputs, Python/Node rotation cases.
LIB-026alpha_refine_torsion_cga (Python/WASM)FIXEDBehaviour: butane torsion 0-1-2-3 starts at 1.0474799129650227 rad and reaches targets 0.0, 1.0 and 3.0 rad to <1e-15. Fixes: the implementation rotated by target - current, opposite to the mirror dihedral convention, so target 1.0 produced 1.09496 rad; out-of-range torsion/bond indices panicked; NaN targets returned unchanged coordinates; WASM did not even compile with alpha-cga because helper functions were missing. Changed the rotation to current - target, added full index/finite/SMILES-count validation, and routed WASM through the core dihedral_angle/find_rotation_subtree helpers. Docs: distinguish the Rust 2π scan from the Python/WASM target refinement and document the mirror convention and measured example. Tests: checked_motor_and_subtree_reject_invalid_inputs, Python/Node refinement targets and error cases.
LIB-027alpha_gsm_interpolate (Python/WASM)FIXEDBehaviour: [0,0,0] → [2,2,2] at t=0.5 returns [1,1,1]; the {coords} payload has no phantom n_atoms. Fixes: the core used zip, so mismatched arrays were silently truncated; NaN t and t outside [0,1] were accepted. Added interpolate_node_checked (non-empty equal lengths, finite coordinates, t finite in [0,1]) and routed both bindings. Docs: corrected the WASM schema and documented the checked contract in alpha. Tests: checked_interpolation_and_config_validation, Python/Node interpolation cases.
LIB-028alpha_gsm_backend_plan / alpha_gsm_compare_backends (Python/WASM)FIXEDBehaviour: butane reports UFF available and the UFF comparison returns a finite 13.4003786 kcal/mol evaluation; unavailable backends return structured warnings/errors instead of throwing. Fixes: Python did not pre-validate comparison coordinates, but the core already validates against the SMILES atom count; the wrappers now inherit the checked endpoint/config path and the shared backend validation. Docs: documented the capability and evaluation schemas and backend units. Tests: Python/Node plan and comparison cases.
LIB-029alpha_gsm_find_ts / alpha_gsm_find_ts_with_method (Python/WASM)FIXEDBehaviour: butane endpoints with n_nodes=5 return 42 TS coordinates, 5 path nodes/energies, a valid TS index and activation = TS − first, reverse = TS − last; optimized endpoints (n_nodes=9) give TS 13.3373, Ea 10.4264, reverse 11.5724 kcal/mol. Fixes: GsmConfig accepted max_nodes<3, zero/NaN step_size/fd_step, negative grad_tol and zero iterations; Python's GsmResult omitted activation_energy; WASM partial configs failed without serde(default). Added GsmConfig::validate (called by the backend path), #[serde(default)], Python n_nodes >= 3 validation, and the missing activation field. Docs: corrected the schema (no converged), documented alpha_gsm_find_ts vs _with_method, backend units and the endpoint-preparation limitation. Tests: Python/Node TS contract and error cases.
LIB-030alpha_sdr_embed (Python/WASM)FIXEDBehaviour: an equilateral triangle (all target distances 1.5 Å) embeds to coordinates with measured distances 1.5000000000000007/1.5000000000000004/1.5 Å, converged=true after 1 iteration, residual 1.78e-16, max distance error 6.66e-16 Å and retries_avoided=0. Fixes: the wrappers passed unvalidated triples into sdr_embed; zero atoms divided by zero, out-of-range indices panicked in the Gram matrix, and zero/NaN distances or invalid configs propagated. Added SdrConfig::validate and sdr_embed_checked (non-empty atom/pair sets, distinct in-range indices, finite positive distances, valid iteration/tolerance/SVT settings, finite result), routed Python/WASM through it, and made SdrConfig accept partial WASM JSON via serde(default). Docs: corrected the duplicate heading and the false {converged, iterations, final_violation} schema; documented the nested convergence object, units, validation and measured example in alpha. Tests: checked_sdr_rejects_invalid_inputs, Python/Node SDR cases.
LIB-031alpha_modules_info (WASM)FIXEDBehaviour: returns {alpha_modules, stability, version}; the module list is derived from cfg!(feature = "alpha-*") and therefore reflects the compiled binary. Fix: none needed beyond documenting the feature-derived contract and adding a regression test; invalid input is impossible (no arguments). Docs: clarified in the TypeScript API that the list reflects active features. Tests: Node Module metadata reflects compiled feature sets.
LIB-032beta_modules_info (WASM)FIXEDBehaviour: returns {beta_modules, stability, version} with kpm, randnla and cpm always present (core re-exports), mbh only with beta-mbh and riemannian only with beta-riemannian. Fix: the old implementation returned all five names unconditionally, claiming MBH/Riemannian in builds that did not contain them. Replaced the hardcoded list with cfg! checks. Docs: feature-dependent behaviour documented. Tests: Node metadata case checks key presence, shared version and no duplicates.
LIB-033compute_uv_vis_spectrum (Python/WASM)FIXEDBehaviour: water at the defaults returns 600 finite points over 0.5–8 eV, σ=0.25, 6 dominant peaks and maximum intensity 1.973627074110215; peaks are sorted and capped at 24. Fixes: sigma=0/negative/NaN silently produced zero/NaN intensity, n_points=0/1 was clamped to 2, reversed windows were clamped to 1e-6, NaN bounds produced NaN grids, and Python truncated extra coordinates. Added root validation (sigma>0, finite e_min<e_max, n_points>=2), Python 3N/empty/parameter checks with ValueError, and documented the exploratory method separately from sTDA. Docs: corrected the nonexistent top-level wavelengths_nm field and added the two-entry-point comparison and measured example to UV-Vis. Tests: Python test_compute_uv_vis_spectrum_limits_and_values, Node UV-Vis case.
LIB-034beta_psd_distance / beta_psd_projection (WASM)FIXEDBehaviour: distance(I₂, diag(2,3)) = √5 = 2.23606797749979; projecting [[1,2],[2,-1]] gives the golden-ratio matrix [[1.6180339887,1],[1,0.6180339887]] with was_psd=false; projecting diag(2,3) leaves it unchanged with was_psd=true. Fixes: dim=0, NaN entries, non-square/asymmetric matrices and mismatched shapes were accepted or could panic. Added psd_distance_checked (non-empty square finite same-shape matrices) and psd_projection_checked (square finite symmetric), routed both WASM functions through them, and rejected dim=0/length mismatches. Docs: corrected the false affine-invariant geodesic claim and the invalid Rust/Python examples; documented the Frobenius proxy, validation and measured values in beta. Tests: checked_psd_distance_and_projection_validate, Node PSD cases.
LIB-035alpha_periodic_band_structure_eht (WASM)FIXEDBehaviour: graphene ([6,6], two atoms, lattice [[2.46,0,0],[-1.23,2.13,0],[0,0,10]], 8 electrons, 10 points/segment) returns 31 k-points, 8 bands, Fermi −11.476374077112979 eV, high-symmetry indices G/X/M/G = 0/10/20/30, direct gap ≈0 and indirect_gap=null; partial config {"n_kpoints_per_segment":5} uses the default Γ→X→M→Γ path and returns 16 points. Fixes: invalid element/coordinate parsing returned a raw string instead of {error} JSON; the core accepted n_electrons=0, more electrons than 2×n_basis, empty/one-point paths, zero points per segment, non-finite k-points and collinear/zero-volume lattices. Added BandStructureConfig::validate, lattice/k-point/electron-count validation, #[serde(default)] for partial configs, and fixed the WASM parser error path. Docs: added the WASM section, schema, units, graph example and validation to alpha. Tests: test_band_structure_validation_and_graphene_path, Node band-structure cases including JSON-error shape.
LIB-036compute_stda_uvvis (Python/WASM)FIXEDBehaviour: water at Python defaults (σ=0.3, 1–8 eV, 500 points, Gaussian) returns 500 finite grid points, 4 excitations, max absorptivity 3599.8535962678297 L mol⁻¹ cm⁻¹ and first excitation 7.4595 eV/166.21 nm with f=0.061435; Lorentzian broadening changes the curve. Fixes: sigma=0/negative/NaN produced empty/NaN spectra, n_points=0/1 was clamped to 2, reversed windows were clamped to 1e-6, NaN bounds produced NaN grids and Python reported errors as RuntimeError. Added validation in the core (finite sigma>0, finite e_min<e_max, n_points>=2) and Python ValueError pre-checks. Docs: corrected the real defaults (1–8 eV, 500 points), output fields (absorptivity, broadening, no intensities/gap/n_transitions), added transition_dipole, the e_max+2σ collection rule and measured values in UV-Vis, Rust and TypeScript APIs. Tests: test_stda_uvvis_validates_parameters_and_returns_spectrum, Python/Node sTDA cases.
LIB-037alpha_gsm_find_ts_with_method (WASM; Python method argument)FIXEDBehaviour: butane endpoints with n_nodes=5 and the MMFF94 backend return backend="mmff94", TS 7.988995584432492, activation 3.038182354910738 and reverse barrier 4.966338094976749 kcal/mol; UFF on the same endpoints remains available. The PM3 SCF backend smoke test on H₂ (n_nodes=3) returns backend="pm3", TS −718.5825715282076 eV, activation 1.2884430263351305 eV, 3 path nodes and 276 energy evaluations in ≈0.02 s. EHT is explicitly rejected as a barrier backend. Fixes: the wrapper inherited the GSM interpolation/config/endpoint checks; Python's alpha_gsm_find_ts(..., method=...) and WASM _with_method now have a real non-UFF parity case and echo the selected backend. Docs: added MMFF94 values, backend units and the EHT caveat to GSM. Tests: Python/Node MMFF94 cases and EHT rejection.
LIB-038compute_fluorescence (Python/WASM)FIXEDBehaviour: water at defaults returns 400 finite points, absorption=emission 6.871735108809826 eV, emission 180.42633546954906 nm, f=0.012851, Einstein A 26332282.151585586 s⁻¹, lifetime 37.97619948940831 ns, kasha=false and a normalized band; stokes_ev=0.5 shifts emission by exactly 0.5 eV. Fixes: sigma=0/negative/NaN, n_points=0/1, reversed/NaN windows, NaN/negative Stokes shifts, NaN refractive index/dark threshold were accepted or clamped. Added full config validation in the core (finite sigma>0, finite e_min<e_max, n_points>=2, finite stokes_ev>=0, finite refractive_index>=1, finite dark_threshold>=0) and Python ValueError pre-checks. Docs: corrected the Python alias/name, added validation and measured values to fluorescence. Tests: fluorescence_rejects_invalid_config_parameters, Python/Node fluorescence cases.
LIB-039compute_vibrational_analysis (Python/WASM)FIXEDBehaviour: water EHT returns 9 modes, 3 real modes, ZPVE 0.11968508346904352 eV and frequencies −567.331/~0×6/644.862/1285.789 cm⁻¹; the negative mode is reported. Fixes: Python mapped step_size=0/negative/NaN to RuntimeError, accepted NaN coordinates until the engine raised, and did not pre-check the two-atom minimum. Added explicit ValueError checks for step_size, finite coordinates and n_atoms >= 2; WASM already returns structured errors. Docs: added validation and the measured example to IR spectroscopy. Tests: Python/Node vibrational cases.
LIB-040compute_ir_spectrum (Python/WASM)FIXEDBehaviour: water EHT yields 1000 points over 400–4000 cm⁻¹, γ=15 cm⁻¹, 2 peaks (644.8618/368.5052 and 1285.7888/169.8706) and maximum intensity 7.820731249002292 km/mol. Fixes: Python/WASM called the unchecked low-level function, so gamma=0/negative/NaN returned a flat spectrum, n_points=0/1 was clamped to 2, reversed windows produced a descending grid and NaN windows produced NaN intensities. Added validate_ir_spectrum_params in both wrappers and explicit Python checks for method/step/coordinates/atom count; Rust compute_ir_spectrum retains its historical clamp. Docs: documented the external checks and measured example. Tests: Python/Node IR cases.
LIB-041assign_peaks (Python/WASM)FIXEDBehaviour: water peaks [1640,3000,3600] with elements [8,1,1] return ["H-O-H bend", "O-H (free)"]; 1640 cm⁻¹ confidence 0.6753246753246753, 3000 cm⁻¹ unassigned, 3600 cm⁻¹ confidence 0.12790697674418605. Fix: the WASM parser reported malformed mode displacements JSON using elements_json as the offending fragment; it now quotes mode_displacements_json. Core assign_peaks_checked already validated non-empty finite equal-length arrays, element count, mode count/atom count and finite displacements. Docs: added the WASM error contract and measured example to IR peak assignment. Tests: Python test_assign_peaks_validation_and_matches, Node assign-peaks case including malformed mode JSON.
LIB-042compute_esp_grid / compute_esp_grid_into (Python), compute_esp / compute_esp_grid / compute_esp_grid_info / compute_esp_grid_typed (WASM)FIXEDBehaviour: water (spacing=0.5 Å, padding=2.0 Å) gives dims [12,11,9] (1188 points), origin [-2.239987,-2,-2], first value −0.02307187804467846, minimum −1.9910324013699727 and maximum 2.696800266810882 Hartree/e; Python defaults (padding=3.0) give [16,15,13] and origin [-3.239987,-3,-3]; compute_esp_grid_into writes the same 1188 values and rejects short/long buffers. Fixes: the WASM compute_esp_grid_info duplicated the bounding-box formula without validation, so spacing=0 returned dims [0,0,0], negative/NaN spacing returned [1,1,1], and negative/NaN padding was accepted; on wasm32 a 1e-9 Å spacing wrapped the usize dimension to zero and returned a successful empty grid. Added shared esp::esp_grid_metadata (finite validated geometry, config and 2^30-point cap), a saturating grid_axis_dim, called it before the EHT population in the root, and routed compute_esp_grid_info through it. compute_esp_grid_typed still returns an empty Float64Array on error (the ABI cannot carry an object), now documented and tested. Docs: removed the nonexistent n_values field, corrected the WASM alias direction, documented the metadata/typed error contract and measured example in ESP, Rust/Python/TypeScript APIs. Tests: test_esp_grid_metadata_matches_the_evaluator, Python test_esp_grid_metadata_values_and_buffer_contract, Node ESP metadata/typed/JSON parity and error cases.
LIB-043compute_rmsd_matrix, butina_cluster, filter_diverse (Python/WASM), embed_diverse (Python/WASM), checked Rust variantsFIXEDBehaviour: three-atom conformers [0,0,0,1,0,0,0,1,0] vs [0,0,0,1.1,0,0,0,1,0] give RMSD 0.04424601044161834 Å; two identical-shape conformers cluster together at cutoff 1.0 (n_clusters=1, centroid [1], size [2]) and split at 0.5 (n_clusters=2, assignments [1,0], centroids [1,0]); embed_diverse("CCO",3,1.0,42) returns 1–3 successful conformer records. Fixes: the RMSD matrix had no conformer validation, so ragged or empty arrays silently returned the legacy -1.0 sentinel; butina_cluster/filter_diverse accepted 0, negative, NaN and infinite cutoffs (NaN produced all-singleton clusters); Python embed_diverse accepted the same invalid cutoffs. Added validate_conformers and validate_rmsd_cutoff, compute_rmsd_matrix_checked, butina_cluster_checked, filter_diverse_conformers_checked and embed_diverse_checked; Python now raises ValueError and WASM returns {error}. The bare Rust functions keep their historical tolerant signatures, documented. Docs: corrected the Python embed_diverse return type/schema (it returns list[ConformerResult], not ConformerSearchResult with generated/unique/energy_kcal_mol) and the WASM record fields; documented the checked contracts in conformer ensembles and the Python/TypeScript/Rust APIs. Tests: test_checked_rmsd_contract_rejects_ragged_and_bad_cutoffs, Python RMSD/Butina/embed-diverse cases, Node RMSD/cluster/filter/embed-diverse validation.
LIB-044compute_dipole (Python)FIXEDBehaviour: the water geometry [0,0,0,0.9572,0,0,-0.239987,0.927297,0] gives vector [2.0190582283436167,2.6101516953941104,0] D, magnitude 3.2999224236958686 D, nuclear [3.4449246537300007,4.45400222337,0] and electronic [-1.4258664253863833,-1.8438505279758899,0] D; the decomposition sums to the total. Fix: the Python wrapper chunked coordinates without checking their count, so a 10-value array silently dropped the extra value, while a short array surfaced as RuntimeError instead of the documented ValueError. Added check_coords_len and a finite-coordinate precheck; engine failures (unsupported element) remain RuntimeError. WASM already validated the parse/length. Docs: documented the exact-3N finite contract in dipole moments and the Python/TypeScript APIs. Tests: expanded test_dipole_returns_finite_3_vector, Node dipole decomposition/validation case.
LIB-045compute_frontier_descriptors (Python)FIXEDBehaviour: water gives HOMO −14.800000000000008 eV, LUMO −8.431381200943433 eV, gap 6.368618799056575 eV, 3 atoms and HOMO contribution 1.0 on oxygen. Fix: the Python wrapper chunked coordinates before checking their count, so a 10-value array silently dropped the extra value and a short/empty array surfaced as RuntimeError. Added check_coords_len plus a finite-coordinate check; malformed input is now ValueError. Docs: exact-3N contract added to the Python/TypeScript APIs. Tests: expanded test_frontier_and_fukui, Node descriptor case.
LIB-046compute_fukui_descriptors (Python)FIXEDBehaviour: water gives 3 atoms and f_plus = [0.1873418284999793, 0.3993860917127494, 0.4132720797872714]; invalid coordinate arrays now raise ValueError (extra values were silently dropped). Fix: same pre-check as LIB-045. Docs: Python/TypeScript contract updated. Tests: expanded test_frontier_and_fukui, Node descriptor case.
LIB-047compute_reactivity_ranking (Python)FIXEDBehaviour: water ranks the nucleophilic sites as atoms [2,1,0] and returns three sites in each category; malformed coordinates raise ValueError. Fix: same coordinate pre-check as LIB-045 (extra values were dropped, short arrays became RuntimeError). Docs: Python/TypeScript contract updated. Tests: expanded test_reactivity_ranking, Node descriptor case.
LIB-048compute_whim (Python)FIXEDBehaviour: water gives total_spread = 0.09829944658414025 and lambda = [0.06415439404180337,0.034145052542336886,0.0]; extra/short/empty coordinate arrays now raise ValueError. Fix: added the exact-3N finite pre-check before the checked core call, which previously never saw the extra values because chunks(3) had already discarded them. Docs: Python/TypeScript contract updated; the existing WHIM validation section already described the core checks. Tests: expanded test_whim, Node descriptor case.
LIB-049compute_rdf (Python)FIXEDBehaviour: water at the defaults returns 128 radii (0.046875, 0.140625, 0.234375, …), n_pairs=3 and rdf_unweighted[0]=7.005398952496741e-35. Fixes: the Python wrapper called the unchecked core function with coordinates already truncated by chunks(3), so 8- and 10-value arrays and even an empty geometry returned empty/partial descriptors; charges length was not checked, and beta=0/NaN, r_max=0/NaN, n_points=1 silently fell back to defaults. Routed through compute_rdf_checked with exact-3N finite coordinates, so all of these now raise ValueError. Docs: corrected the validation text and pointed the Python surface at the checked path in RDF descriptors. Tests: expanded test_rdf with measured values, geometry errors and every parameter error; Node RDF cases.
LIB-050detect_hapticity (Python)FIXEDBehaviour: water returns n_interactions=0 and is_metallocene=false; the 11-atom ferrocene-like fixture is accepted with a full 3N array. Fix: the Python wrapper chunked coordinates before validation, so an extra value was silently dropped and the core saw a shorter geometry. Added the exact-3N finite pre-check. Docs: Python/TypeScript contract updated; hapticity already documented the checked core. Tests: corrected the existing fixture (it supplied 13 values for 11 atoms) and added malformed-array cases, Node hapticity case.
LIB-051solve_eht / eht_calculate (Python/WASM), core EHT solverFIXEDBehaviour: water gives 8 electrons, HOMO −14.800000000000008 eV, LUMO −8.431381200943433 eV, gap 6.368618799056575 eV, indices 3/4 and 6 MOs; k=0 and explicit 1.75 both reproduce that gap. Fixes: Python accepted k=0, negative and NaN/Inf (NaN produced a result full of NaNs), while WASM silently replaced any k <= 0 with the default, so the same call disagreed across surfaces; NaN was serialized as JSON null. Core solve_eht and solve_eht_randnla now validate Some(k) as finite and > 0; Python pre-checks and raises ValueError, WASM maps only exactly 0.0 to the default and returns {error} for negative/non-finite constants. Python also rejects non-finite coordinates as ValueError and checks the exact 3N length. Docs: documented the k contract in EHT and the Python/TypeScript APIs. Tests: test_wolfsberg_helmholtz_constant_is_validated, expanded test_eht, Node EHT k/coordinate cases.
LIB-052compute_charges / compute_charges_configured (Python)FIXEDBehaviour: compute_charges("CCO") returns 9 charges, 30 iterations, total −2.7755575615628914e-17 e, converged=true and first charge −0.04183875391825285 e; the configured default (max_iter=6) returns 6 iterations, converged=false and first charge −0.04182525705714308 e; max_iter=12 reaches −0.04183848615477239 e. Fixes: malformed SMILES (Q, C(, C1CC) surfaced as RuntimeError because the wrappers only classified messages containing SMILES/parse; invalid max_iter/initial_damping/convergence_threshold also surfaced as RuntimeError. Routed both through smiles_or_engine_error, added Unclosed ring closure to the parser-error classifier, and validate the Gasteiger config in Python before the core call, so all malformed input is ValueError. Docs: corrected the false “6 iterations” claim for compute_charges (core default is 100; CCO converges in 30), documented the configured default of 6 and the value validation in the Python API. Tests: filled test_charges/test_charges_configured with measured values and every error case; Node charges cases.
LIB-053compute_nmr_spectrum / compute_nmr_spectrum_with_coords (Python/WASM), predict_nmr_couplings (Python/WASM)FIXEDBehaviour: water ("O", 1000 points, 0–12 ppm) returns 1000 axis points from 12→0 ppm, one peak at 2.5 ppm with intensity 2.0 and environment alcohol_O-H; graph-only spectra and one ¹H–¹H coupling agree. Fixes: both bindings built triplets with chunks(3) and indexed c[2], so an 8- or 10-value coordinate array panicked (Python PanicException/WASM abort); gamma < 0/NaN, n_points=1 and reversed ppm windows were accepted or clamped, and an unknown nucleus surfaced as RuntimeError. Added core validate_nmr_spectrum_params (finite gamma >= 0, finite ppm_max > ppm_min, n_points >= 2), a shared WASM parse_coords_triplets, exact-multiple/finite checks in Python, and classified unknown-nucleus/position errors as ValueError. Docs: documented the window/linewidth/triplet contract in NMR and the Python/TypeScript APIs. Tests: test_nmr_spectrum_parameters_are_validated, expanded test_nmr_spectrum/test_nmr_couplings, Node NMR/coupling cases including the former panic inputs.
LIB-054compute_cpm_surfaceFIXEDBehaviour: water at the default scan returns 10 potentials from −5.5 to −3.5 eV, first charge −5.894009398763684 e, first capacitance 0.45135760291246263 e/eV, first grand potential −38.55433141862916 eV and all_converged=true. Fixes: the Python wrapper indexed chunks(3) before any length check, so 8/10-value arrays panicked and an empty geometry panicked inside nalgebra; the infallible core also accepted reversed/equal μ windows, n_points=1 (clamped), and dielectric < 1 (invalid charges/NaN capacitance). Added validate_cpm_surface_params and compute_cpm_surface_checked (finite mu_min < mu_max, n_points >= 2, finite dielectric ≥ 1, geometry/element coverage via compute_cpm_charges_checked), routed Python/WASM through it, and kept the bare core helper for internal callers. The WASM compute_cpm_charges/compute_cpm_surface were gated only on the legacy experimental-cpm feature, so a beta-cpm build omitted both despite the Python surface exposing them; the gates now accept either alias. Docs: documented the checked scan in CPM. Tests: test_surface_params_are_validated, Python test_cpm_surface_validation_and_values, Node CPM surface cases.
LIB-055compute_giao_nmr (Python)FIXEDBehaviour: water at the defaults returns nucleus="1H", method="RHF/GIAO", basis_set="STO-3G", 7 basis functions, 2 target protons, SCF converged in 8 iterations at −74.96297768393549 Ha, shifts 20.571745539049964/20.58437132306211 ppm. Fix: the Python wrapper indexed chunks(3) before checking the coordinate count, so partial triplets panicked; empty coordinates reached the SCF stack. Added exact-3N/non-empty/finite prechecks with ValueError. Docs: documented the coordinate contract in NMR and the Python/TypeScript APIs. Tests: Python test_giao_nmr_validation_and_water_values, Node GIAO cases.
LIB-056compute_epr_hyperfine (Python/WASM)FIXEDBehaviour: the hydrogen atom gives one entry, g=5.5856946893, spin density 0.3946941451474386 and A_iso=1420.405751 MHz; water/multiplicity mismatches are rejected. Fixes: Python's nucleus: Option<u8> raised OverflowError for 256/999 and accepted 0/119–255 until the core returned a generic error; invalid multiplicity/charge surfaced as RuntimeError. WASM's u8 parameter wrapped JavaScript values (256→0, 999→231, −1→255), silently selecting a different element or all nuclei. Changed Python to Option<i64> with an explicit 1..=118 check, changed WASM to u32 with a >118 check and 0 sentinel, added finite-coordinate checks, and classified multiplicity/charge/empty-selection errors as ValueError. Docs: documented the nucleus ranges and sentinel in EPR. Tests: expanded test_epr_mp2_and_xps_report_the_expected_scales, Node EPR wrap/parameter cases.
LIB-057compute_xps_binding_energies (Python)FIXEDBehaviour: water gives O 1s at 550.8072020511141 eV (orbital −20.241791324847487 Ha, localization 0.9890001722318176) and two equivalent H 1s at 16.809737412933615 eV (localization 0.19805); the methane C 1s test remains in 200–400 eV. Fixes: empty geometry, non-finite coordinates, an empty elements_filter, an incompatible charge/multiplicity and a filter that selects no core-like atom all surfaced as RuntimeError; only non-convergence should be a runtime failure. Added explicit empty/finite/filter checks and classified the core validation messages as ValueError, leaving UHF did not converge as NotConvergedError. WASM already returned structured {error} but now has regression cases for the same inputs. Docs: documented the Python/WASM error contract in XPS. Tests: expanded test_epr_mp2_and_xps_report_the_expected_scales, Node XPS validation cases.
LIB-058compute_dosFIXEDBehaviour: water (σ=0.3 eV, −30…5 eV, 500 points) gives energies[1]=-29.929859719438877, first DOS 8.019326492574992e-19, maximum 1.9053227261243049 states/eV and n_atoms_pdos=3. Fixes: the WASM binding hand-formatted energies with 4 decimals and DOS with 6, so it disagreed with Python and rounded small physical values to zero; it now serializes the full f64 arrays with n_atoms_pdos. The root also validates sigma/e_min/e_max/n_points before the EHT solve, so malformed parameters no longer waste a calculation. Docs: documented the full-precision WASM contract and measured example in density of states. Tests: expanded test_dos, Node full-precision DOS grid and error cases.
LIB-059compute_htst_rate / compute_htst_sweep (Python), evaluate_htst_rate coreFIXEDBehaviour: ΔG‡=0.2 eV, ΔG_rxn=−0.1 eV, 300 K gives forward 2729583501.679446 s⁻¹, reverse 57038792.46247201 s⁻¹ and K=47.85486129418576; an explicit prefactor_s_inv=1e12 gives 436664490.35612327 s⁻¹; the 300/400 K sweep gives 2729583501.7/25176662146.4 s⁻¹. Fixes: the optional prefactor was not validated, so 0, negative, NaN and Inf produced zero, negative, NaN or infinite rates; pressure_bar was also unvalidated. Core now requires a finite prefactor > 0 and a finite positive pressure. Python maps temperature/pressure/free-energy/prefactor failures to ValueError while preserving engine failures. The WASM sweep also rejected an empty temperature list, matching Python instead of returning a successful empty array. Docs: added the prefactor/pressure rules to HTST. Tests: htst_rejects_invalid_prefactor_and_state, Python test_htst_rate_and_sweep_validation, Node HTST state/sweep cases.
LIB-060compute_qmmm_energy (core/Python/WASM)FIXEDBehaviour: water QM region + one MM point charge at 5 Å gives, with UHF singlet, qm_energy=-47039.97870065027, total=-47039.76176888472 kcal/mol and a decomposition that sums exactly; GFN2-xTB singlet gives total=-3181.372265962703. Fix: the xTB backend rejected charged regions but silently ignored qm_multiplicity, so doublets and triplets returned exactly the singlet energy. It now returns Unsupported for any multiplicity ≠ 1; UHF remains open-shell capable. Docs: corrected the xTB gate in QM/MM. Tests: xtb_rejects_open_shell_multiplicities, Python test_qmmm_mechanical_embedding_and_xtb_spin_gate, Node QM/MM spin/decomposition cases.
LIB-061solve_microkinetic_network / solve_microkinetic_steady_state (Python/WASM)FIXEDBehaviour: the built-in A⇌B demo at 20 frames returns 1 rate, 2 final populations summing to 1, and a steady-state residual of 7.94623340044654e-6; tol=1e-10 is echoed and the residual is finite. Fixes: both wrappers clamped n_steps=0/1 to 2 instead of rejecting it, and the steady-state solver accepted tol=0/negative/NaN/Inf and ignored it; the core also forced n_frames.max(2). Added n_steps >= 2 checks in Python/WASM, tol finite > 0 in both layers, and let the core validate the requested frame count instead of silently extending it. Docs: documented the frame/tolerance contract and added the missing Python/WASM steady-state entry points in microkinetic networks. Tests: microkinetic_steady_state_rejects_bad_tolerance_and_frames, Python test_microkinetic_network_and_steady_state_validation, Node network/steady-state cases.
LIB-062run_kinetic_monte_carlo (Python)FIXEDBehaviour: the 10-A→B demo with seed 7 gives final counts [0,10], 3 frames (stride 5), mass conservation on every event and an exact same-seed replay. Fix: core validation failures (max_events=0, frame_stride=0, max_time_s<=0, empty species/steps, invalid state) surfaced as RuntimeError even though they are caller input. The Python wrapper now maps every kMC error to ValueError; malformed JSON was already ValueError. Docs: documented the input-error contract in kMC. Tests: expanded test_kmc_conserves_mass_and_is_deterministic, Node kMC invalid-config matrix.
LIB-063compute_gcmc_isotherm (Python)FIXEDBehaviour: a 10 Å empty box, 1 bar, 300 K reproduces the ideal-gas loading within 15 % and returns 10000 production samples; an empty framework, one guest site and the same config are the reference. Fix: framework/guest/config validation failures surfaced as RuntimeError although they are caller input; Python now maps them to ValueError (invalid JSON was already ValueError). The core already rejected empty pressure grids, non-positive temperature/steps/cutoff/max-guests/sample interval, probabilities outside [0,1], non-finite guest/framework parameters and zero/negative cell volume. Docs: documented the input-error contract in GCMC. Tests: expanded test_gcmc_empty_box_matches_the_ideal_gas, Node GCMC invalid-config matrix.
LIB-064run_uff_metadynamics / run_uff_opes (Python)FIXEDBehaviour: ethanol with 200 steps returns 201 CV trace points, 3 metadynamics Gaussians / 2 OPES kernels, 27 final coordinates and finite free-energy grids. Fix: core validation and UFF/coordinate failures all surfaced as RuntimeError; they are caller input. Python now maps them to ValueError (invalid JSON was already ValueError). Docs: documented the sampling input-error contract in enhanced sampling. Tests: expanded test_metadynamics_and_opes_run_requested_steps with both backends and the full invalid-config matrix; Node metaD/OPES error cases.
LIB-065conformal_calibrate (Python)FIXEDBehaviour: predictions [1,2,3], targets [1.1,2.1,3.1] at 0.9 coverage give radius 0.10000000000000009, coverage 0.9 and 3 calibration points. Fix: mismatched/empty arrays, non-finite predictions/targets and coverage outside (0,1) surfaced as RuntimeError; they are input errors and now raise ValueError. Docs: documented the calibration contract in active learning. Tests: expanded test_conformal_calibration_radius, Node calibration error matrix.
LIB-066solve_3d_rism (Python)FIXEDBehaviour: a 2×2×2 ideal-gas grid returns shape=[2,2,2], mean_g=max_g=1.0 within 1e-8 at the default mixing and converges. Fix: grid/config/array validation errors surfaced as RuntimeError; they are caller input. Python now maps them to ValueError (invalid JSON was already ValueError). The core already rejected dimensions <2, non-positive box/temperature/max-iterations/tolerance, mixing outside (0,1], negative density, non-finite arrays and nx*ny*nz mismatches. Docs: documented the input-error contract in 3D-RISM. Tests: expanded test_rism_ideal_gas_limit, Node RISM invalid-config/array matrix.
LIB-067estimate_free_energy (Python)FIXEDBehaviour: FEP/BAR/MBAR recover the constant offset 1.5 kBT, delta_g=0.888727424570645 kcal/mol at 298.15 K, and report convergence. Fix: sample/config validation failures (empty samples, wrong state count, non-finite potentials, unknown state, missing temperature) surfaced as RuntimeError; they are input errors and now raise ValueError. Invalid estimator names and malformed JSON were already ValueError. Docs: documented the estimator/sample error contract in free energy. Tests: expanded test_free_energy_estimators_recover_a_constant_offset, Node estimator/config/sample matrix.
LIB-068discover_reaction_network (Python)FIXEDBehaviour: the C→CC rule with depth 2/max 10 returns canonical species ["C","CC"], one edge with barrier 0.05 eV. Fix: malformed rules/configs (negative barrier, empty reactants/products, zero prefactor, invalid element, empty initial species, no rules, zero depth/species caps) surfaced as RuntimeError; they are input errors and now raise ValueError. Deserialized template rules were also used without canonicalisation, so a valid rule written as OCC silently never matched canonical CCO, and an invalid reactant SMILES was ignored while an invalid product errored later. TemplateNetworkConfig::discover now canonicalises both sides and rejects invalid fragments before BFS. Docs: documented the discovery error/canonicalisation contract in reaction networks. Tests: expanded test_reaction_network_discovery_validates_rules, Node rule/config matrix.
LIB-069compute_raman_spectrum / compute_vcd_spectrum / compute_roa_spectrum (Python)FIXEDBehaviour: water gives 3 modes; the first Raman mode is 1757.4598999427346 cm⁻¹ with activity 1.4748428641833797 and depolarization 0.5870549451075456; VCD/ROA rotational/circular intensities are finite. Fix: step_angstrom=0/negative/NaN/Inf and min_frequency_cm1<0/NaN/Inf surfaced as RuntimeError, and invalid SMILES also leaked as engine errors. Added explicit finite/range checks and routed SMILES failures through smiles_or_engine_error, so they are ValueError. Docs: documented the step/frequency/SMILES contract in Raman and VCD/ROA. Tests: expanded test_raman_vcd_and_roa_report_finite_modes, Node Raman/VCD/ROA error matrix.
LIB-070compute_kmesh / monkhorst_pack_meshFIXEDBehaviour: a [2,1,1] Monkhorst-Pack mesh returns 2 points, fractional coords [-0.25,0,0]/[0.25,0,0] and weights summing to 1; [3,3,1] gamma-centered returns 9 points and includes Γ; [4,4,4] returns 64 points. Fixes: Python grid: [usize;3] raised OverflowError for negative values, and the core computed grid.iter().product::<usize>() without checking overflow or size, so huge grids could wrap or allocate unbounded memory. Changed Python to [i64;3] with a positive-dimension precheck, added checked multiplication and a MAX_KMESH_POINTS = 2^20 cap in the core, and rejected [0,·,·], overflow and oversized grids. Docs: documented the validation and measured mesh in alpha. Tests: monkey_mesh_rejects_overflow_and_oversized_grids, expanded test_periodic_kmesh_bloch_and_electron_validation, Node k-mesh cases.
LIB-071compute_periodic_dos (Python)FIXEDBehaviour: a two-orbital chain on a [2,1,1] mesh with order 64 and 128 points returns n_kpoints=2, 128 finite DOS values and finite band edges. Fixes: negative grids raised OverflowError, while grid=0, order=0, n_points=1, reversed/NaN windows and non-finite Fermi energies surfaced as RuntimeError. The wrapper now accepts [i64;3], validates every KPM parameter explicitly and maps mesh/KPM failures to ValueError. Docs: documented the periodic-DOS parameter contract in alpha. Tests: expanded test_periodic_kpm_and_randnla_adapters, Node periodic KPM invalid-config matrix.
LIB-072compute_edl_profile / compute_edl_capacitance_scan / Helmholtz / Gouy-Chapman / GCS (Python)FIXEDBehaviour: a 0.1 V GCS profile returns 32 points, total drop 0.1 V, compact+diffuse sum 0.1 V and the expected series capacitance; the scan over −0.1…0.1 V is symmetric and peaks at the PZC. Fixes: the Gouy-Chapman and GCS core paths checked bulk_dielectric and extent_angstrom only for <= 0, so bulk_dielectric=0/NaN produced NaN capacitances and extent=NaN produced NaN grids; Python surfaced all validation as RuntimeError. Added validate_numerics (finite positive extent, n_points>=2) and reused validate_thermal/validate_compact/validate_diffuse (finite positive dielectrics and ionic strength), then mapped Python EDL errors to ValueError. Docs: documented the profile/scan validation in EDL. Tests: edl_profiles_reject_invalid_dielectrics_and_extents, expanded test_edl_profiles_are_potential_based_for_every_model, Node EDL profile/scan error cases.
LIB-073GSM SCF/force-field backends beyond MMFF94/PM3FIXED (measured)Behaviour: the H₂ [H][H] 0.74→1.20 Å smoke test (n_nodes=3, 276 evaluations) now covers xTB (TS −616.6311506734645 eV, Ea −0.42710728660608765 eV, reverse −26.657136987426043 eV, 0.51 s), GFN1 (−650.533799529669, −0.36089904631433, −34.43871150562188; 0.48 s), GFN2 (same as xTB; 0.36 s), HF-3c (−681.8535417330825, 1.0599499575856726, −58.27451457044401; 0.63 s) and ReaxFF (19.983288204118665, −18384.849979624618, −1637.977820326337 kcal/mol; <0.01 s). xTB is bit-for-bit deterministic on replay. Note: negative barriers are expected because the stretched endpoint is not a minimum; this validates backend wiring/units, not quantitative barriers. Docs: backend table and caveat added to GSM. Tests: Python/Node xTB smoke cases; the existing PM3/MMFF94 cases remain.
LIB-074compute_ensemble_j_couplingsFIXEDBehaviour: ethanol (CCO, seed 42) returns 15 couplings; first geminal 12.0 Hz, first vicinal 2.286988681 Hz, second vicinal 10.259108668 Hz. Fixes: the root only checked that each conformer was non-empty and a multiple of three, so short/long/ragged conformers and NaN coordinates produced plausible but wrong or NaN couplings; it now parses the SMILES, requires exactly 3N finite coordinates per conformer and rejects mismatches. Python classifies these as ValueError. Docs: documented the exact-conformer/finite-coordinate contract in NMR. Tests: expanded test_ensemble_j_couplings, Node ensemble-J error matrix, core ensemble_j_couplings_validate_their_inputs.
LIB-075analyze_gsm_mbh_htst_step (Python/WASM)FIXEDBehaviour: ethane CC torsion (UFF, endpoints from seeds 1/2, 298.15 K) returns barrier 2.3296949072539617 kcal/mol, reverse 2.5448965043172294, TS energy 4.077237307738234, imaginary mode −123.05798463964997 cm⁻¹, 11 nodes, 3600 evaluations, k_f=7.231890603820995e10 s⁻¹, k_r=5.029304634101373e10 s⁻¹ and K=1.4379503987061972. Fix: malformed/identical endpoints, bad temperature or pressure and invalid SMILES surfaced as RuntimeError; the Python classifier now treats reactant/product/state/MBH failures as ValueError while preserving genuine engine failures. Docs: added the adapter contract and measured ethane example to HTST. Tests: Python test_gsm_mbh_htst_step_contract_and_measured_barrier, Node GSM+MBH+HTST case.
LIB-076compute_thermal_prop_chart (Python/WASM)FIXEDBehaviour: ΔG‡=0.2 eV, ΔG_rxn=10 eV at 300/400 K returns two finite series (arrhenius, equilibrium_constant), with ln(K_eq)[0] = -386.81727071834405. Fixes: extreme reaction free energies made K_eq underflow/overflow and the chart contained -inf/inf; both bindings now validate every ln(K_eq) and return an input error. Empty temperature grids were already rejected. Docs: documented the finite-ln(K) contract in HTST. Tests: Python test_thermal_property_chart_rejects_non_finite_ln_k, Node thermal-chart cases.
LIB-077compute_phase_portrait_chart / solve_microkinetic_networkFIXEDBehaviour: the built-in A⇌B demo returns a 5-frame phase portrait with equal x/y lengths and a finite trajectory. Fix: the core accepted duplicate or empty species names, so the phase-portrait chart resolved both axes to the first duplicate ID and plotted a diagonal; the network solver now rejects empty/duplicate species names. Docs: documented the unique-ID contract in microkinetic networks. Tests: microkinetic_network_rejects_duplicate_species_names, expanded test_chart_builders_validate_and_report_series, Node duplicate-network phase-portrait case.
LIB-078compute_trajectory_chart / compute_reaction_coordinate_chart (Python/WASM)FIXEDBehaviour: ethane endpoints (seeds 1/2, UFF) return an 11-node trajectory with path energy 1.7475424004842728 kcal/mol at node 0, accumulated distance 0.37784954214178074 Å at node 1, and 11 trajectory frames; the reaction-coordinate chart shares the same distances. Fix: identical reactant/product geometries were accepted and produced a meaningless path; an invalid backend leaked as RuntimeError in Python. Both chart helpers now reject identical endpoints before GSM, and the Python classifier maps Invalid 'method' to ValueError. Docs: documented the endpoint/backend contract and measured path in alpha. Tests: expanded test_chart_builders_validate_and_report_series, Node trajectory/reaction-coordinate cases.
LIB-079validate_chart_schema / pack_chart_payload (Python/WASM)FIXEDBehaviour: a one-series chart validates, chart_to_json/chart_from_json round-trip the wrapper, and pack_chart_payload returns 2 columns (s_x, s_y) of length 2 with round_trip_ok=true. Fixes: pack_chart_payload accepted series of different lengths, producing an Arrow-style “record batch” whose columns were not rectangular while still reporting success. Added pack_chart_payload_checked (validates the chart and equal series lengths), routed Python/WASM through it, and kept the bare core helper for internal callers. validate_chart_schema remains a schema check: a ragged chart is valid as a chart but not packable. Docs: documented the rectangular-packing and numeric-round-trip limits in alpha. Tests: checked_pack_requires_rectangular_series, expanded test_chart_json_round_trip_and_validation, Node packed/ragged cases.
LIB-080compute_fermi_surface_chart / compute_periodic_dos block parserFIXEDBehaviour: a one-orbital chain gives a finite 12-point Fermi contour at E_F=−1 eV with n_kx=n_ky=4; the DOS chart path shares the same blocks. Fixes: parse_blocks accepted non-symmetric real-space matrices (silently feeding the symmetric eigensolver), non-finite entries and out-of-range translations that were cast with as i32 (wrapping). It now requires finite entries, symmetry within 1e-10 relative tolerance and i32::try_from translations; Python raises ValueError, WASM {error}. Docs: documented the block contract in alpha. Tests: expanded test_chart_builders_validate_and_report_series, Node Fermi/DOS block cases.
LIB-081compute_band_structure_chart / compute_kpoint_path_chart (Python/WASM)FIXEDBehaviour: a one-atom cell ([6], lattice 3 Å) with 3 points/segment returns 4 bands of 10 finite points; the standard k-path returns 10 k-points and 3 series (k_x, k_y, k_z). Fixes: Z=0, non-finite coordinates and singular/non-finite lattices surfaced as RuntimeError; Python now validates Z=1..118, finite coordinates and maps lattice-collinearity errors to ValueError. compute_kpoint_path_chart already rejected zero points and preserves the n>=1 path. Docs: documented both chart contracts in alpha. Tests: expanded test_chart_builders_validate_and_report_series, Node band-structure invalid-cell matrix.
LIB-082compute_edl_chart / compute_capacitance_chart (Python)FIXEDBehaviour: a 0.2 V, 0.1 M Gouy-Chapman chart returns potential and charge_density series starting at 0.20000000000000007 V and 0.1889214584530636; a −0.1…0.1 V GCS capacitance scan returns 5 symmetric points, Q(0)≈0 and C(−0.1)=C(0.1). Fix: invalid surface potential/ionic strength in compute_edl_chart, and charge-conversion failures inside compute_capacitance_chart, surfaced as RuntimeError; they are caller input and now raise ValueError. Docs: documented the EDL chart input contract in alpha. Tests: expanded test_chart_builders_validate_and_report_series, Node EDL-chart invalid cases.
LIB-083compute_dos_chart (Python/WASM)PASSBehaviour: [-1,0,1] eV with DOS [0.1,0.5,0.1] returns a Periodic DOS chart with one dos series, exact x/y arrays and eV / a.u. units. Limits checked: empty arrays, length mismatch, unsorted energies, negative DOS, NaN energy and infinite DOS are all rejected (ValueError in Python, {error} in WASM); the implementation already validated the same invariants. Docs: chart contract documented in alpha. Tests: expanded test_chart_builders_validate_and_report_series, Node DOS-chart cases.
LIB-084bloch_phase, build_bloch_hamiltonian, bz_integrate_scalar, bz_integrate_vector, validate_kmesh_weights, assemble_periodic_operators (Python/WASM)FIXEDBehaviour: the one-orbital chain gives bloch_phase(0.5,0,0,1,0,0)≈(-1,0), H(0.25)=−1, bz_integrate_scalar([1,2],[0.5,0.5])=1.5, bz_integrate_vector([[1,2],[3,4]],[0.5,0.5])=[2,3], and the [2,1,1] assembly returns 2 k-points. Fixes: non-finite k-points produced (NaN,NaN) or null matrices, BZ integration accepted NaN values/weights and negative weights, ragged BZ vectors were silently truncated, and validate_kmesh_weights([-0.5,1.5]) returned true. Added finite/range validation, equal vector widths, i64 grid parsing with positive checks and ValueError mapping; validate_kmesh_weights now rejects negative/non-finite weights and tolerances. Docs: documented the periodic entry-point contract in alpha. Tests: expanded test_periodic_kmesh_bloch_and_electron_validation, Node periodic assembly/BZ matrix.
LIB-085compute_all_nmr / active_nmr_isotopes (Python/WASM)FIXEDBehaviour: carbon returns exactly 13C; water returns 1H and 17O with converged SCF, no failures, and 2 target H atoms. Fix: max_scf_iterations=0, multiplicity=0 and non-finite coordinates surfaced as RuntimeError; Python now classifies those input errors as ValueError. active_nmr_isotopes intentionally returns [] for Z=0 and unknown elements, and unsupported GIAO elements remain explicit failures. Docs: documented the error/failure distinction in all-nuclide NMR. Tests: expanded test_all_nuclide_nmr_registry_and_driver, Node all-NMR config/geometry cases.
LIB-086active_learning_propose (Python/WASM)FIXEDBehaviour: the 1-D distance example proposes candidate [2]; a forest with a split on feature 1 accepts 2-D vectors and proposes [1]. Fixes: candidate/labelled vectors shorter than the forest's highest split feature were silently padded with 0.0 by TreeNode::predict, producing plausible but wrong scores; RandomForest::required_feature_count now exposes the requirement and propose_active_learning rejects short vectors. Python maps proposal/config errors to ValueError. Docs: documented the model-feature contract in active learning. Tests: proposal_rejects_vectors_shorter_than_the_forest_requires, expanded test_active_learning_proposes_and_validates_requests, Node deep-model case.
LIB-087compute_sasa / compute_nonpolar_solvationFIXEDBehaviour: water gives total SASA 121.0663203982794 Ų with atom 0 at 53.461340888129484 Ų, 960 points and probe 1.4 Å; non-polar energy is −8.401347730858445 kcal/mol on the same area. Fixes: the roots accepted Z=0 and Z>118 and silently used the generic 1.70 Å vdW radius. Added validate_atomic_numbers (1..=118) to both roots; Python raises ValueError and WASM returns {error}. Docs: documented the element and probe limits in SASA. Tests: expanded test_sasa/test_nonpolar_solvation, Node SASA/non-polar cases.
LIB-088compute_alpb_solvation / compute_alpb_born_radii (feature experimental-alpb)FIXEDBehaviour: water positions [0,0,0,0.757,0.586,0,-0.757,0.586,0] with charges [-0.834,0.417,0.417] give electrostatic=-6.005624703582335, nonpolar=0.6060052641760819, total=-5.399619439406253 kcal/mol, Born radii [1.7555611083229967,1.7117601396189632,1.7117601396189632] Å and ALPB factor 0.9870459347975585. Fixes: the core born-radii path accepted Z=0/119 via the generic 1.70 Å fallback and the solvation path accepted negative/non-finite surface tension. Added validate_atomic_numbers, surface_tension >= 0 finite, and finite-probe checks. Python returns ValueError; WASM returns {error}. Docs: corrected the stale ALPB numeric example and documented the element/tension/probe limits in implicit solvation. Tests: test_alpb_rejects_invalid_elements_and_surface_tension, Python/Node ALPB parity cases.
LIB-089compute_dos_multimethod (Python/WASM)FIXEDBehaviour: water at σ=0.3 eV/64 points covers all six methods: EHT (6 orbitals, HOMO −14.800000, LUMO −8.431381, gap 6.368619), PM3 (6/−12.333422/4.078556/16.411978), xTB (6/−12.176981/2.462260/14.639242), GFN1 (8/−13.620965/−4.292050/9.328915), GFN2 (same as xTB) and HF-3c (7/−10.645928/16.472897/27.118825). Fixes: empty/non-finite geometries and unsupported-element failures surfaced as RuntimeError; Python now validates non-empty finite coordinates and maps those messages to ValueError, while SCF non-convergence remains a runtime failure. Docs: added the measured per-method table and validation contract to density of states. Tests: expanded test_dos_multimethod, Node multi-method DOS matrix.
LIB-090solve_periodic_randnla (Python/WASM)FIXEDBehaviour: the two-orbital chain on [2,1,1] with sketch_size=1 gives 2 k-points, HOMO −0.9999999999999997 eV, LUMO 1.0 eV, gap 2.0 eV, residual 2.2e-16 and no fallback. Fixes: negative grids raised OverflowError, while zero grids, sketch_size=0, n_electrons=0/99, and Hamiltonian/overlap count or dimension mismatches were accepted or surfaced as RuntimeError; the assembly silently ignored extra overlap blocks. Python now accepts [i64;3], validates positive grids, equal counts and matching dimensions, and maps mesh/config errors to ValueError. Docs: documented the RandNLA mesh/electron/sketch contract and measured result in alpha. Tests: expanded test_periodic_kpm_and_randnla_adapters, Node periodic RandNLA error matrix.
LIB-091compute_pka / compute_redox_potential (Python/WASM)FIXEDBehaviour: acetic acid gives absolute pKa 116.88090049031462 (ΔG_dep 159.4544193232432 kcal/mol) and the self-reference cycle reproduces 4.76 exactly; TFA relative to acetic acid gives 0.821273767634362 (experimental 0.23). The redox formula fixture gives E_abs −18.445112550288258 V and E_SHE −22.88511255028826 V, exactly 4.44 V apart. Fixes: non-finite reference pKa/potential ran the whole SCF before failing, n_conformers=0/n_electrons=0, malformed SMILES and charged xTB states surfaced as RuntimeError, and negative/non-finite surface tension was only caught later by ALPB. Core now validates reference values and surface tension before SCF; Python maps parse/validation/geometry/unsupported errors to ValueError while numerical failures stay RuntimeError/NotConvergedError. Docs: redox and pKa now shows the measured absolute failure, the relative TFA value and the error taxonomy. Tests: config_and_references_reject_non_finite_values_before_solving, expanded Python pKa/redox test, Node pKa/redox error matrix.
LIB-092compute_empirical_pka (Python/WASM)FIXEDBehaviour: acetic acid gives 5.463 carboxylic_acid_oxygen; phenol 10.762; ethanethiol 10.716; ethylamine 11.627; pyridine 5.677; pyrrole 16.441 pyrrole_like_nitrogen with no basic site; imidazole 16.421 acid plus 5.642 aromatic_nitrogen; aniline 5.397 aniline_like; pyridinium 5.418 pyridinium_like; ammonium 10.069 ammonium_like; methane/acetamide none. Fixes: the old rule classified any N+ as an acid, so quaternary ammonium and nitro groups produced a false ~10 pKa; any aromatic N was basic, so pyrrole/indole/imidazole N-H were false bases; pyridinium used the ammonium pKa (~9.9 instead of 5.2) and primary/secondary anilines were missed entirely; empty SMILES returned an empty result. Added N-H requirements, pyrrole N-H acid, pyridine-like base, primary/secondary aniline base with amide exclusion, pyridinium pKa and empty-SMILES rejection. Docs: new empirical pKa sites page with rules, measured table, pipeline and limits; linked from the Rust/Python/TypeScript API pages and the algorithm sidebar. Tests: test_empirical_pka_rejects_false_sites_and_covers_aromatic_nitrogen, test_compute_empirical_pka_finds_acidic_site_for_acetic_acid, expanded Python test_uvvis_and_empirical_pka, Node empirical-pKa matrix.
LIB-093compute_uff_energy_with_aromatic_heuristics (Python/WASM)FIXEDBehaviour: benzene at the embedded geometry gives raw 13.816634907943163 kcal/mol, aromatic stabilization −0.48 (six aromatic bonds), corrected 13.336634907943163 and two notes; ethanol has zero aromatic bonds and an unchanged energy. Fixes: non-finite coordinates produced a NaN raw/corrected energy and empty SMILES returned a zero result; the same gap existed in compute_uff_energy and compute_uff_energy_breakdown. All three UFF roots now share validate_flat_geometry (3N finite coordinates, non-empty molecule) and reject non-finite raw energies. Python maps the geometry errors to ValueError; WASM returns {error}. Docs: added the E_aromatic = -0.08 N_aromatic section, pipeline, measured benzene values and validation contract to force fields; linked from the Rust/Python/TypeScript API pages. Tests: expanded test_compute_uff_energy_with_aromatic_heuristics_applies_correction, Python test_uff_aromatic_heuristic_and_geometry_validation, Node UFF aromatic test, Python error-taxonomy unit test.
LIB-094compute_mmff94_energy / compute_mmff94_energy_breakdown (Python/WASM)FIXEDBehaviour: ethanol at the embedded geometry (seed 42) gives total 2.3253890756250906 kcal/mol; the breakdown is bond 1.3913486280932996, angle 3.1273972497932854, stretch_bend −0.7329293668360718, torsion −2.21633624454027 and vdw 0.7559088091148465, summing to the total. Fixes: non-finite coordinates produced a NaN total and NaN/Inf breakdown terms, and empty SMILES returned 0.0/[]. Both roots now share the renamed validate_force_field_geometry (3N finite coordinates, non-empty molecule) and reject non-finite total or term energies. Python maps the geometry errors to ValueError; WASM returns {error}. Docs: added the measured ethanol total/term table and validation contract to MMFF94; linked from the Rust/Python/TypeScript API pages. Tests: expanded test_mmff94_energy_breakdown_sums_to_total, Python test_mmff94_energy/test_mmff94_energy_breakdown, Node MMFF94 total/breakdown test.
LIB-095compute_cisd (Python/WASM)FIXEDBehaviour: the PySCF water fixture [0,0,0.1173,0,0.7572,-0.4692,0,-0.7572,-0.4692] gives 141 determinants, correlation −0.04885002271124961 Ha, SCF −74.96302312869669 Ha, 7 basis functions, 5 occupied, and first excitation 0.4191404324575245 Ha / 11.405392104191437 eV / 108.70664670479528 nm with oscillator 0.2694557295780764 and transition [[4,5]]. Fixes: WASM accepted negative n_states by wrapping it to a huge usize (returning 140 states) and truncated fractional values (1.5 → 1); Python negative values raised OverflowError instead of ValueError. The WASM wrapper now takes an f64, requires a finite integer ≥1 and returns {error}; Python takes i64 and returns ValueError for zero/negative. Docs: added the reproducible water geometry, the integer n_states contract and the Python-vs-CLI/WASM metadata difference to configuration interaction; updated the Python/TypeScript API notes. Tests: expanded test_cisd/test_cisd_rejects_invalid_inputs, new Node CISD water/validation test.
LIB-096compute_population (Python/WASM)FIXEDBehaviour: PySCF water gives Mulliken charges [-1.172140982427667, 0.5860704912138248, 0.5860704912138263], Löwdin [-1.0926415761622188, 0.5463207880810946, 0.5463207880810956], AO populations summing to 8, charge error 1.6e-14, HOMO −14.800000000000024 eV, LUMO −8.43736333327947 eV and gap 6.3626366667205545 eV. Fix: homo_lumo_from_orbitals used n_electrons / 2 (floor) while the EHT solver uses div_ceil; for odd-electron references such as boron it reported the 2s orbital as HOMO (−15.2 eV) instead of the SOMO p orbital (−8.5 eV), with a spurious 6.7 eV gap. It now uses div_ceil, matching the SOMO and the EHT frontier exactly. Docs: corrected the stale Mulliken/Löwdin numbers in population analysis and both SVGs, added the measured water table and the odd-electron SOMO contract. Tests: test_population_odd_electron_frontier_matches_eht, expanded Python test_population, new Node population water/odd-electron test.
LIB-097compute_eht_gradient (Python/WASM)PASSBehaviour: PySCF water gives energy 92.57766304910245 eV, RMS gradient 78.0929862371739 eV/Å and max component 149.33940221766306 eV/Å; the net gradient is (2.4e-9, 2.2e-9, 0.0) eV/Å and the per-atom vectors match between Python and WASM. Limits checked: empty geometry, coordinate-length mismatch, Z=119 and non-finite coordinates are rejected (ValueError in Python, {error} in WASM); the core already delegates validation to solve_eht. Docs: the EHT gradient section now shows the measured water values, clarifies that the returned vector is ∂E/∂R (not the force) and includes the WASM compute_eht_gradient example. Tests: expanded Python test_eht_gradient, new Node EHT-gradient parity/error test; F80 still validates the finite-difference surface. No code defect found beyond the documentation gap.
LIB-098compute_rohf (Python/WASM)FIXEDBehaviour: CH₃ at the test geometry gives E=−39.066274183948494 Ha, S²=0.75, nα/nβ=5/4 and n_basis=8. Fixes: (1) ROHF used the β-spin "LUMO" (the same SOMO) in the global frontier, collapsing the reported gap to 0.0; the HOMO is now the SOMO and the LUMO the next spatial orbital, giving HOMO −0.05274290209831729 Ha, LUMO 0.7230371688184877 Ha and gap 21.110051151657142 eV. (2) multiplicity 10 passed the electron-count parity check but required 9 α electrons for 8 spatial orbitals, panicking inside build_spin_density; run_uhf now rejects nα/nβ > n_basis before building matrices. (3) Python compute_uhf/compute_rohf mapped validation/geometry errors to RuntimeError; empty geometry was also classified as Other instead of Geometry. The shared core_error mapper now returns ValueError for parse/validation/geometry/unsupported and keeps numerical failures as RuntimeError/NotConvergedError. Docs: added the CH₃ UHF/ROHF frontier table, SOMO-gap contract, basis-capacity rule and error taxonomy to open-shell HF; updated the Python/TypeScript/Rust API notes. Tests: expanded rohf_energy_is_recomputed_from_the_projected_density, Python UHF/ROHF tests and Node open-shell validation.
LIB-099compute_d4_energy (Python/WASM)FIXEDBehaviour: PySCF water gives e2=−0.00035654274698183484 Ha, total kcal −0.22373395163958412, coordination numbers [1.61115652116297, 0.8055782605814851, 0.8055782605814851]; three-body adds 1.5051867516949722e-10 Ha. Fixes: the checked surface validated geometry/elements but not the damping parameters, so s6=NaN, s6<0, s8=Inf, a1=NaN or a2<0 returned NaN, sign-flipped or diverging energies; D4Config::validate now requires all five factors finite and ≥0. The Hartree→kcal conversion used the truncated 627.509; it now uses HARTREE_TO_KCAL = 627.5094740631. Docs: D4 now distinguishes the always-compiled Rust module from the experimental-d4 bindings, adds Python/WASM examples, measured water terms and the parameter contract; the CLI example was made reproducible and its stale kcal values were corrected. Tests: test_d4_checked_rejects_invalid_config, Python test_d4_dispersion_energy_and_config_validation, Node D4 water/config/geometry matrix.
LIB-100compute_eeq_charges / compute_eeq_energy (Python/WASM)FIXEDBehaviour: PySCF water gives charges [-0.5460852203904293, 0.2730426101952145, 0.2730426101952145], total charge −3.3e-16 e, coordination [1.6471164240972276, 0.8236554505895528, 0.8236554505895528] and electrostatic energy −12.467194851527106 kcal/mol; total_charge=±1 shifts the sum to ±1 while keeping the energy finite. Limits checked: empty geometry, length mismatch, non-finite coordinates, Z=0, Z=87 and non-finite total_charge are rejected (ValueError in Python, {error} in WASM); the checked core already validated these paths. Fix: the energy conversion used the truncated 23.06 kcal/eV; it now uses EV_TO_KCAL_MOL = 23.060548867. Docs: EEQ now distinguishes the always-compiled Rust module from the experimental-eeq bindings, adds Python/WASM examples and measured water values, and the stale SVG charges/TypeScript feature table were corrected. Tests: test_eeq_energy_water_reference, Python test_eeq_charges_and_energy, Node EEQ water/charge/geometry matrix.
LIB-101compute_pbe0_energy (Python/WASM)FIXEDBehaviour: water at the test geometry gives total energy −75.2454830117255 Ha, gap 14.522742631047386 eV, n_basis 7, 10 electrons, 6 SCF iterations and converged=true. Fixes: (1) Python max_iterations=0 was misclassified as NotConvergedError and negative values raised OverflowError; it now validates an i64 ≥ 1 and returns ValueError for invalid input. Empty/non-finite geometries and open-shell PBE0 are also ValueError; actual SCF non-convergence is NotConvergedError. (2) Python/WASM returned a JSON result with converged=false for max_iterations=1..5; both now reject a non-converged SCF like the CLI. (3) WASM took usize, so negative values wrapped and fractional values truncated; it now takes an f64, requires a finite integer ≥ 1 and returns {error} otherwise. Docs: hybrid DFT now states that the standalone bindings use the Minimal/STO-3G basis (the pKa path selects 3-21G separately), records the measured water result and the convergence/max_iterations contract; the CLI page no longer claims 3-21G for the standalone command. Tests: expanded Python test_pbe0_water_converges and Node PBE0 validation.
LIB-102compute_ml_descriptors / predict_ml_properties (Python/WASM)FIXEDBehaviour: ethanol gives MW 46.06900000000002, n_aromatic 0, total_abs_charge 0.8770485170010166, Balaban J 4.1447263667447585; benzene gives n_aromatic 6, total_abs_charge 0.7473192980309791, Balaban J 3.6035674514745475 and prediction logP 1.24057 / MR 42.929232. Fixes: (1) the bindings passed empty aromatic flags, so n_aromatic was always 0 and the aromatic corrections were missing; aromatic atoms are now derived from aromatic bonds. (2) They passed empty charge vectors, so total_abs_charge/max_charge/min_charge were always zero; Gasteiger charges are now used, with a documented zero-charge fallback for elements without parameters ([Fe], C[Hg]C). (3) Python MolecularDescriptors omitted total_abs_charge, max_charge, min_charge and balaban_j; added. (4) empty SMILES returned zero descriptors and a spurious prediction; it now raises ValueError/{error} (and whitespace/invalid SMILES remain errors). (5) WASM predict_ml_properties rounded every value to four decimals; it now serialises full precision. Docs: added the ML descriptor pipeline, field table, measured ethanol/benzene values, aromatic/charge contract and proxy-model limits to descriptors; linked from the Python/TypeScript API pages. Tests: expanded Python test_ml_descriptors_and_prediction, new Node ML descriptor/prediction test.
LIB-103compute_getaway (Python/WASM)FIXEDBehaviour: PySCF water gives leverages all 0.6666666666666666, HAT autocorrelation [1.3333333333333333,0.6666666666666666,0,…], R autocorrelation [1.3921145418283023,0.4402183483007572,0,…], hat_total 1.0, r_total 0.9161664450645297 and h_information 1.0986122886681096. Fixes: (1) WASM called the unchecked core function: empty/mismatched geometries, self-bonds and out-of-range bonds returned zero/plausible descriptors, and max_lag=-1 wrapped to usize and aborted the WASM instance. It now uses compute_getaway_checked, and max_lag is a finite integer ≥1. (2) compute_getaway_checked now caps max_lag at 10,000 so a malformed request cannot allocate unbounded autocorrelation arrays. (3) Python changed max_lag to i64 and validates geometry/finiteness before bond perception, so negative values are ValueError rather than OverflowError. Docs: GETAWAY now states the 1..=10000 limit, the checked-path behaviour on every surface, and corrects hat_total/r_total from “bonded pairs” to all pairs with a finite topological distance; Python/TypeScript/CLI notes updated. Tests: test_getaway_checked_rejects_bad_lag_and_bonds, expanded Python test_getaway, new Node GETAWAY validation test.
LIB-104compute_mp2_energy (Python/WASM)FIXEDBehaviour: water gives HF −74.96297768393549 Ha, correlation −0.03552066349518875 Ha (−22.28955286823825 kcal/mol), total −74.99849834743068 Ha and dimensions 7/5/2. Fix: Python mapped empty/non-finite geometries, the odd-electron CH₃ reference and the He “no virtual orbital” error to RuntimeError; the wrapper now uses the shared core_error mapper, returning ValueError for geometry/validation/unsupported inputs and NotConvergedError only for a non-converged RHF reference. WASM already returned {error}. Docs: MP2 now records the measured water decomposition and the Python/WASM error contract. Tests: expanded Python MP2 block and Node MP2 validation.
LIB-105analyze_graph_features (Python/WASM)FIXEDBehaviour: benzene returns 6 true aromatic atoms among 12 explicit-H indices and 6 aromatic bonds; C(F)(Cl)(Br)I returns inferred centre 0; C[C@H](O)F returns tagged and inferred centre 1. Fixes: the inferred-centre heuristic only compared the set of neighbour elements, so C(F)(Cl)(Cl)Br (two identical Cl) and C(F)(F)(Cl)Br were falsely reported as tetrahedral centres. It now reuses stereo::find_stereocenters, which compares full CIP substituent trees; the duplicate-substituent cases return no centre. Empty SMILES previously returned an empty feature set; it is now a parse error (ValueError/{error}). Docs: added the graph-feature section (CIP-vs-element rule, surfaces, no CLI) to rings and stereochemistry; linked from the Python/TypeScript API pages. Tests: test_analyze_graph_features_uses_cip_substituent_trees, expanded Python test_graph_features, new Node graph-feature test.
LIB-106analyze_stereo (Python/WASM)FIXEDBehaviour: C[C@H](F)Cl from its embedded geometry reports centre 1 as S; the same molecule with empty coordinates is topology-only (configuration=None). C/C=C/C and C/C=C\\C with the RDKit fixture geometries report E/Z respectively. Fixes: the root chunked the flat coordinate array with chunks(3) and indexed c[0..2] without checking the remainder: 3N−1 or 3N+1 values panicked (index out of bounds), and a NaN coordinate was interpreted as a valid S/E configuration. It now validates that a non-empty slice is exactly 3N finite values (validate_flat_geometry) and leaves the empty slice as the documented topology-only mode; empty SMILES is a parse error. Python returns ValueError; WASM returns {error}. Docs: rings and stereochemistry documents the coordinate-slice contract and the topology-only mode; Python/TypeScript API notes updated. Tests: test_analyze_stereo_validates_the_coordinate_slice, expanded Python test_stereo_analysis, new Node stereo validation test.
LIB-107assemble_framework_with_linkers (Rust)FIXEDBehaviour: the data-driven xah net with the short carbon linker (type 0) and long nitrogen linker (type 1) places the node atoms plus one linker per edge, selecting the linker by edge_types; empty linker lists place only node atoms and invalid hand-built node indices are skipped. Fix: the unchecked assembler indexed Sbu::positions by elements.len() and accepted non-finite SBU/cell data, so inconsistent public SBU fields could panic or emit NaN fractions. Added assemble_framework_with_linkers_checked, which validates matching element/position arrays, Z=1..=118, finite positions, finite topology nodes and a non-singular cell; the original Rust entry point remains for compatibility and the precondition is documented. Docs: materials assembly now documents the unchecked precondition, the checked entry point and the Rust-only status (Python/WASM expose only the single-linker wrapper); Rust API updated. Tests: test_assemble_with_linkers_checked_rejects_bad_sbu_and_cell, existing edge-type/degenerate tests.
LIB-108compare_methods (Python/WASM)FIXEDBehaviour: methane from the embedded geometry gives a UFF success row with 0.5300345157442865 kcal/mol and an EHT success row with gap 8.6171635221718 eV; the method plan recommends embed. Fix: Python accepted empty and non-finite geometries and returned rows instead of rejecting them; WASM also accepted the empty arrays and returned a nested payload shape that differed from Python. Both wrappers now reject empty/non-finite geometry globally (ValueError/{error}), and WASM adds the flattened energy_kcal_mol, homo_energy, lumo_energy, gap and support_level fields while retaining payload. Per-method failures (for example a UFF SMILES/element mismatch) remain rows. Docs: metal/EHT validity and the Python/TypeScript API notes distinguish global geometry errors from per-method row errors. Tests: expanded Python test_compare_methods, new Node comparison test.
LIB-109compute_eht_or_uff_fallback (Python/WASM)FIXEDBehaviour: methane takes the EHT path with support_level=supported and gap 8.6171635221718 eV; [Fe] with the experimental flag disabled takes mode=uff_fallback with 0.0 kcal/mol and support_level=experimental; with the flag enabled it takes the EHT path. Fixes: the documentation claimed mode="uff" but the core and both bindings emit "uff_fallback". WASM returned the EHT payload only as a nested result object and the fallback support only as a nested support object; it now also exposes the flattened energies, n_electrons, homo_index, lumo_index, homo_energy, lumo_energy, gap, support_level and warnings, matching Python, while retaining the core objects. Invalid geometry is a global error rather than a fallback. Docs: added the support/flag decision table and payload contract to EHT; fixed the Python/TypeScript mode names and schemas. Tests: expanded Python test_eht_or_uff_fallback, new Node fallback test.
LIB-110compute_esp_with_config (Rust)PASSBehaviour: an O-H test geometry with spacing=0.1, padding=0, min_distance 0.05 versus 0.5 produces the same grid dimensions but a grid-value maximum difference > 0.1, proving the nuclear clamp is applied. Limits checked: spacing 0, negative padding, min_distance=0, min_distance=NaN and empty positions are rejected by EspGridConfig::validate/esp_grid_metadata; the grid is capped at 2^30 points. Docs: added the explicit EspGridConfig contract and the min-distance clamp to electrostatic potential. Python/WASM/CLI expose only the spacing/padding wrappers (no config object), which is now documented. Tests: test_compute_esp_with_config_applies_min_distance_and_validates. No code defect found beyond the documentation gap.
LIB-111compute_gb_solvation (Python/WASM)PASSBehaviour: PySCF water with charges [-0.5460852203904293,0.2730426101952145,0.2730426101952145] gives electrostatic −2.5785634795135834, non-polar −8.474218145319718 and total −11.052781624833301 kcal/mol; Born radii [1.7556277223840924,1.7116973225275922,1.7116973225275922] Å and dielectrics 78.5/1.0. Limits checked: zero/NaN solvent dielectric, sub-vacuum solute dielectric, negative/NaN probe radius, wrong coordinate/charge lengths, non-finite charges, empty geometry and unsupported elements are rejected (ValueError/{error}); the existing wrapper tests covered these and the core validates before indexing. Docs: implicit solvation already documented the GB/SA equations, output example and limits; the CLI solvation --charges path was verified as the command-backed surface. Tests: expanded Python test_gb_solvation, new Node valid-GB decomposition test. No code defect found.
LIB-112compute_giao_nmr_configured (Python/WASM)FIXEDBehaviour: water ¹H gives shifts [20.571745539049964,20.58437132306211] ppm, basis STO-3G, 8 SCF iterations; the closed-shell O²⁻ system (charge −2, multiplicity 1, 17O) reports charge −2 and total energy −72.31180548524047 Ha. Fixes: Python silently clamped negative charge to 0 and multiplicity to 1, so O²⁻ was calculated as neutral O and multiplicity=0 was accepted; it also parsed option charges as unsigned. It now accepts signed i32 charge, rejects zero multiplicity, and validates max_scf_iter with i64. WASM took usize for max_scf_iter, wrapping negative values and truncating fractions; it now takes an f64 integer ≥1. The core preflight used from_angstrom, which saturated impossible charges (e.g. charge 10) to zero electrons; it now uses try_from_angstrom, so impossible charges are validation errors. Python maps these to ValueError. Docs: NMR spectroscopy, Python and TypeScript pages document the charge/multiplicity/iteration contract. Tests: test_giao_nmr_rejects_impossible_charge_and_multiplicity, expanded Python GIAO test, Node anion/error matrix.
LIB-113compute_hose_codes (Python/WASM)FIXEDBehaviour: ethanol R=2 gives 9 codes; atom 1 is C/C,H,O/H and oxygen is O/C,H/C,H; benzene R=2 gives 12 codes with carbon C/*C,H/*C,H. Fixes: empty SMILES returned an empty list, max_radius=0 produced the malformed code C/, and Python negative radii raised OverflowError while WASM usize wrapped -1 and aborted the instance. The root now rejects empty SMILES and requires 1 <= max_radius <= 100; Python uses i64 and WASM uses an f64 integer with {error}. Docs: corrected the HOSE page’s delimiter (/), removed the unsupported “connectivity count” claim, documented the actual sphere format, default-radius difference and 1..=100 contract in NMR spectroscopy; Python/TypeScript API notes updated. Tests: test_compute_hose_codes_contract, expanded Python test_hose_codes, new Node HOSE validation test.
LIB-114compute_ir_spectrum_broadened (Python/WASM)FIXEDBehaviour: water EHT with gamma=15, window 400–4000 cm⁻¹ and 200 points gives a 200-point grid from 400 to 3999.9999999999995, gamma=15, maximum broadened intensity 5.953541151456876 km/mol and 2 peaks; the Python EHT test fixture at gamma=10 gives maximum 0.4398296428510253. Fixes: WASM took n_points as usize: -1 wrapped and aborted the instance, and 1.5 was truncated to 1. Python negative values raised OverflowError. Python now takes i64 and WASM an f64, both requiring an integer ≥2 and returning ValueError/{error}. Docs: IR spectroscopy and the Python/TypeScript API pages document the integer n_points contract. Tests: expanded Python test_ir_spectrum_broadened, new Node broadened-IR grid/error test.
LIB-115compute_simplified_neb_path_configurable (WASM)FIXEDBehaviour: ethanol with a 3-image/1-iteration UFF path returns 3 images with finite potential energies and the two exploratory-path notes; n_images=2 also returns the endpoint pair. Fixes: the core duplicated the NEB parameter checks and accepted empty SMILES and unbounded image counts; both the configurable and UFF-only drivers now share validate_simplified_neb_request, reject empty SMILES and cap n_images at 1000. WASM took n_images/n_iter as usize: -1 wrapped and aborted the instance, and 1.5 was truncated; it now takes f64, requires integers (n_images>=2, n_iter>=1) and returns {error}. The configurable backend is Rust/WASM only; Python exposes the UFF-only wrapper. Docs: NEB paths and the Python/TypeScript API pages document the integer/count contract and surface split. Tests: test_simplified_neb_request_validation, new Node configurable-NEB grid/error test.
LIB-116compute_simplified_neb_path (Python/WASM)FIXEDBehaviour: ethanol with a 5-image/2-iteration UFF path returns five images with indices 0–4, finite energies and the two exploratory notes. Fixes: the wrapper itself took n_images/n_iter as usize: Python negative values raised OverflowError, and WASM -1 wrapped and aborted the instance while 1.5 was truncated. Python now takes i64 with an explicit 2..=1000/≥1 check and maps core errors with core_error; WASM takes f64 integers and returns {error}. Wrong coordinate lengths, non-finite coordinates and empty SMILES are rejected by the shared core validator. Docs: Python/TypeScript API pages document the integer counts, 2..=1000 image range and geometry errors. Tests: expanded Python test_simplified_neb_path, new Node UFF-NEB validation test.
LIB-117neb_backend_energy_kcal / neb_backend_energy_and_gradient (CLI/WASM)FIXEDBehaviour: ethanol with UFF gives 6.993048432903878 kcal/mol; the gradient has 27 components with maximum absolute value 54.13723643767103 kcal/(mol·Å); the WASM payloads match the CLI (energy_kcal_mol). Fixes: an empty SMILES built a zero-atom molecule and the UFF backend returned a physically meaningless 0.0 energy; both queries now reject blank SMILES explicitly (CLI, Rust and WASM). The wrappers also reject a non-finite backend energy, a non-finite gradient component and a gradient whose length differs from 3 × n_atoms instead of passing them through. Non-finite coordinates were already rejected by validate_neb_coords. The single-point helpers parsed SMILES with Molecule::from_smiles, which silently kept only the first disconnected component; a valid multi-fragment complex such as [Cl-].CBr was rejected because the coordinate count belonged to all six atoms. Both now use from_smiles_all. Docs: NEB paths documents the empty-SMILES rejection, non-finite result checks and the real surface split; the Python surface row no longer advertises nonexistent neb_energy/neb_gradient bindings. TypeScript API notes the 3 × n_atoms gradient contract. Tests: test_neb_backend_single_point_validation, new test_neb_backend_multi_fragment_single_point, new Node NEB energy/gradient validation test.
LIB-118list_neb_backends (WASM)FIXEDBehaviour: CH₃OH ([6,1,1,8]) reports all seven backends available; Si and Br report HF-3c unavailable; Fe reports MMFF94 available (its typer has Fe²⁺/Fe³⁺) and HF-3c unavailable; U ([92]) reports every backend unavailable. Fixes: the export hardcoded available: true for PM3, xTB, GFN1 and GFN2 even though those solvers reject unsupported elements, and inferred HF-3c availability from a short transition-metal list, so B, Si, Br and Fe were advertised although the basis rejects them. Availability is now derived from the real predicates: UFF atom-type coverage, MMFF94 typer coverage, is_pm3_supported, the GFN1/GFN2 parameter tables, and a new hf3c_supports_element shared with solve_hf3c/CISD. Empty element lists and atomic numbers outside 1..=118 used to return all-true; they are now errors. New is_uff_supported and is_mmff94_supported helpers keep the answer aligned with the typers. Docs: NEB paths and the TypeScript API document the element sets, error contract and that availability is not an SCF-convergence guarantee. Tests: UFF/MMFF94 support-table unit tests, new Node availability test.
LIB-119compute_uhf_configured / UhfConfig (Rust)FIXEDBehaviour: CH₃ (multiplicity 2) with the default UhfConfig converges to total energy −39.06969115534437 Ha, identical to compute_uhf within 1e-10. Fixes: UhfConfig had no validation: max_iterations=0 returned a non-converged result, zero/negative/NaN thresholds made convergence impossible, and damping outside [0,1] extrapolated the density (1 - damping < 0) instead of being rejected; an infinite level shift was also accepted. UhfConfig::validate now requires max_iterations >= 1, finite positive energy/density thresholds, a finite level shift and damping in [0, 1], and run_uhf calls it before building the basis or integrals. Docs: open-shell HF documents the config contract and the Rust-only status; Rust API updated. Tests: uhf_config_validation_rejects_invalid_controls.
LIB-120predict_nmr_shifts_with_hose_database / HoseDatabase (Rust)FIXEDBehaviour: an ethanol CSV row built from the full H HOSE code with shift_ppm=4.321 overrides 3 of 8 ¹H/¹³C shifts (the three methyl hydrogens share the code) and adds the HOSE: environment; an empty database keeps all built-in shifts and adds the empty-database note. Prefix fallback still matches a sphere-1 entry at radius 1. Fixes: from_csv parsed NaN/inf through f64, accepted element 0/119 and empty HOSE codes, silently skipped short data rows and ignored an invalid count; from_json accepted empty codes and elements outside 1..=118. lookup could therefore apply a NaN shift. Both loaders now validate every record (non-empty code, element 1..=118, finite shift), malformed CSV rows/counts are errors, and lookup ignores malformed records added through push. New HoseDatabase::validate reports such records. Docs: NMR spectroscopy documents the JSON/CSV contract and empty-database behaviour; Rust API adds the database section. Tests: external_hose_database_rejects_malformed_records, external_hose_database_ignores_malformed_pushed_records, external_hose_database_csv_overrides_and_empty_database_keeps_builtin.
LIB-121run_multi_opes / MultiOpesConfig (Rust)FIXEDBehaviour: the 2D harmonic test (2,000 steps, pace 50, trace stride 10, 3 flow iterations, grid [−1,1]²) returns 201 trace points and 40 kernels; all potential/bias/CV values and both free-energy surfaces are finite, and replaying the same seed reproduces final_coords exactly. The flow is honestly reported as not converged (flow_residual=3.428939527375e-3). Fixes: masses were never validated, so zero/negative/NaN masses produced infinities or NaNs in the initial velocities; initial coordinates and the initial potential/CV values were unchecked; x_bins * y_bins could overflow or allocate without bound; reweight_free_energy_2d accepted non-finite grid bounds, NaN trace CV/bias and overflowing Boltzmann weights. Added finite/positive mass and finite-coordinate checks, initial potential/CV checks, checked grid multiplication with a 4,194,304-point cap, finite trace/grid validation, weight-overflow rejection and a final finite-surface check for both surfaces. Docs: enhanced sampling documents the full config/geometry contract, grid cap and deterministic seed. Tests: expanded two_dimensional_opes_runs_and_reweights, new multi_opes_rejects_invalid_coordinates_masses_and_config and reweight_free_energy_2d_rejects_bad_grid_and_trace.
LIB-122compute_vibrational_analysis_uff (Rust/Python/WASM)FIXEDBehaviour: water at [0,0,0,0.9572,0,0,-0.239987,0.927297,0] gives 3 real UFF modes at 1757.4598999427346, 3706.0462968790475 and 3759.6865897106463 cm⁻¹, intensities 53.54736588595092, 38.67119987475052 and 60.185558680804775 km/mol, ZPVE 0.5717650778752449 eV and no imaginary mode. Fixes: the core accepted any elements array, so a composition different from the SMILES silently used the wrong atomic masses, and a mismatched elements/positions length could index the Hessian out of bounds; non-finite positions were also unchecked. It now parses the SMILES first, requires elements to match its atom sequence and positions to be exactly 3N finite values. Python mapped these caller errors to RuntimeError; they now use the shared core_error taxonomy (ValueError). Python VibrationalAnalysis also omitted elements and n_imaginary_modes; both are now exposed (elements as a list of integers, not bytes). Docs: IR spectroscopy, Python/TypeScript API and Rust API document the element/geometry contract and measured water modes. Tests: new Rust test_ir_vibrational_analysis_uff_validates_smiles_elements_and_geometry, expanded Python UFF block and Node UFF payload/error cases.
LIB-123predict_nmr_shifts_for_nucleus (Rust/Python/WASM)FIXEDBehaviour: ethanol 1H returns 6 shifts (first 0.9 ppm, sp3_methyl), 13C returns 2 (20.0/36.9 ppm), 2H returns 6 relative shifts (first 0.95 ppm, sp3_methyl_relative), 35Cl returns 0 for ethanol and one −25.5 ppm shift for [Cl]; aliases (proton, carbon, either mass-number order/case) resolve. Fix: an empty SMILES was parsed as an empty molecule and silently returned []; it now raises a parse error (ValueError/{error}). The lookup filters atoms by atomic number, so a valid nucleus absent from the molecule remains an empty list, and unknown nucleus labels are rejected with the supported-label list. Docs: Python API corrected the return type from NucleusShiftSeries to list[ChemicalShift]; NMR spectroscopy, Python/TypeScript and Rust pages document alias/case handling, the empty-result contract, empty-SMILES errors and the fact that isotope abundances are not modeled. Tests: new Rust test_nmr_shifts_for_nucleus_contract_and_empty_smiles, new Python test_nmr_shifts_for_nucleus_contract, new Node per-nucleus test.
LIB-124predict_nmr_couplings (Rust/Python/WASM)FIXEDBehaviour: ethanol topology-only gives 15 couplings (first geminal 12.0 Hz, first vicinal 7.0 Hz); the embedded geometry gives the same count with first vicinal couplings 2.2869886806 and 10.259108667554 Hz. Fix: an empty SMILES was parsed as an empty molecule and returned []; it now raises a parse error (ValueError/{error}). Python already rejected non-multiple-of-3/non-finite coordinates and mismatched 3N lengths, and WASM rejected malformed triplets; the core still owns the final 3N finite check. Docs: NMR spectroscopy, Python/TypeScript and Rust pages document the topology-only [] mode, the exact 3N finite coordinate contract, empty-SMILES errors and the measured ethanol couplings. Tests: new Rust test_nmr_couplings_contract_and_empty_smiles, expanded Python test_nmr_couplings, new Node topology/3D coupling cases.
LIB-125compute_nmr_spectrum / compute_nmr_spectrum_with_coords (Rust/Python/WASM)FIXEDBehaviour: water 1H with gamma=0.02, window 0–12 ppm and 1000 points returns a 1000-point descending axis and one peak at 2.5 ppm with intensity 2.0 and alcohol_O-H; ethanol 1H gives the documented multiplet pattern. Fixes: empty or whitespace-only SMILES parsed as an empty molecule and returned a spectrum with no peaks; they are now parse errors (ValueError/{error}). Python n_points was usize, so -1 raised OverflowError; it is now an i64 and raises ValueError for values below 2. WASM took n_points as usize, so -1 aborted the instance (unreachable) and fractional values were truncated; it now takes an f64, requires a finite integer ≥2 and returns {error}. The core keeps the final gamma/window/point-count and 3N finite-coordinate validation. Docs: NMR spectroscopy and the Python/TypeScript API pages document the integer n_points contract, empty-SMILES rejection and coordinate validation. Tests: new Rust test_nmr_spectrum_rejects_empty_smiles_and_bad_grid, expanded Python test_nmr_spectrum, expanded Node NMR validation matrix.
LIB-126compute_rmsd / compute_sssr (Rust/Python/WASM)FIXEDBehaviour: identical 2-atom coordinates give RMSD 0.0 and a stretched pair 0.5 Å; benzene SSSR is one six-membered ring, naphthalene two six-membered rings, ethanol zero rings. Fixes: try_align_coordinates/try_align_quaternion checked only lengths, so NaN/Inf coordinates produced a NaN RMSD and NaN aligned coordinates (the docs claimed NaN was never emitted); both now reject non-finite values in either array, and Python/WASM raise/return an error while the legacy compute_rmsd returns the documented -1.0 sentinel. compute_sssr parsed an empty SMILES as an empty molecule and returned an empty ring set; empty/whitespace SMILES are now parse errors (ValueError/{error}). Docs: rings and stereochemistry, Python and TypeScript document the finite-coordinate and SMILES contracts; Rust alignment docs record the -1.0 sentinel. Tests: new test_nonfinite_coordinates_are_errors_not_nan_rmsd, expanded Python test_rmsd/test_sssr, new Node RMSD/SSSR validation test.
LIB-127compute_ecfp / compute_ecfp_batch / compute_tanimoto (Rust/Python/WASM)FIXEDBehaviour: benzene at radius 2/1024 bits has 6 on-bits and density 0.005859375; benzene/toluene Tanimoto is 0.3333333333333333 and CCO/CCN 0.28. Fixes: compute_ecfp silently clamped n_bits < 64 to 64, accepted empty SMILES and had no radius/bit-width cap; the public contract is now radius 0..=100, n_bits 64..=1,048,576, with empty/whitespace SMILES rejected. compute_ecfp_batch now applies the same parameter and empty-SMILES checks. compute_tanimoto silently compared fingerprints with different n_bits or radii; rings::ecfp::try_compute_tanimoto now rejects mismatches and malformed on-bits, and Python/WASM use it (ValueError/{error}). Python radius/n_bits were usize (negative OverflowError); both are i64. WASM took usize (negative aborted the instance) and now takes f64 integers. Docs: descriptors, Python/TypeScript and Rust pages document the ranges, empty-SMILES errors, batch contract and Tanimoto compatibility. Tests: expanded ecfp_params_and_tanimoto_compatibility_are_validated, Python test_ecfp_and_tanimoto/test_ecfp_batch_contract, Node ECFP validation matrix.
LIB-128compute_tpsa / compute_tpsa_from_smiles (Rust/Python/WASM/CLI)FIXEDBehaviour: ethanol 20.23, benzene 0.0, acetic acid 37.30, methanethiol 38.80 and phosphoric acid 87.57 Ų; the P/S fragments are included, not just N/O. Fixes: compute_tpsa_from_smiles("") parsed an empty molecule and returned 0.0 in Rust/WASM (Python already rejected it); empty/whitespace SMILES are now parse errors (ValueError/{error}, CLI exit 1). The raw compute_tpsa(elements, bonds) silently skipped out-of-range bonds, self-bonds, invalid orders and unknown elements; a new try_compute_tpsa/compute_tpsa_checked validates non-empty elements (1..=118), bond indices, self-bonds and orders 1..=4, while the raw helper remains documented as tolerant. Docs: descriptors now states N/O/P/S coverage, adds the S/P measured rows and documents the empty-SMILES and checked-graph contracts; Python/TypeScript/Rust notes updated. Tests: new tpsa_checked_validates_elements_and_bonds, expanded Python test_tpsa, Node TPSA empty/S/P cases.
LIB-129compute_topology / compute_topology_checked (Rust/Python/WASM)FIXEDBehaviour: cisplatin ([78,17,17,7,7,1…]) returns one Pt centre with CN=4, square_planar and score >0.8; an organic molecule returns no centres plus the no-metal warning. Fix: compute_topology_checked validated lengths/emptiness/finiteness but not atomic numbers, so Z=0 and Z=119 were silently accepted as non-metals; it now calls validate_atomic_numbers (1..=118), and Python/WASM surface the error as ValueError/{error}. The infallible Rust compute_topology remains the documented tolerant entry point. Docs: metal coordination topology, Python and TypeScript pages record the invalid-element rejection; the validation table now includes Z=0/119. Tests: extended test_compute_topology_checked_contract, Python cisplatin test and Node topology validation matrix.
LIB-130compute_bond_orders (Rust/Python/WASM)FIXEDBehaviour: H₂ at 0.74 Å returns one pair (0,1), distance 0.74 Å, Wiberg and Mayer 1.0 and per-atom valences; a single atom returns no pairs and zero valences. Fix: the root validated lengths/emptiness/finiteness but not atomic numbers, so Z=0/Z=119 reached EHT and surfaced as an engine RuntimeError; it now calls validate_atomic_numbers and Python maps the structured error with core_error, so invalid elements and valid-but-EHT-unsupported elements (e.g. Z=104) are ValueError. Docs: population analysis, Python and TypeScript pages document the 1..=118, empty/non-finite and unsupported-element contracts. Tests: test_compute_bond_orders_contract_and_limits extended with Z=0/119; Python bond-order test now asserts ValueError for NaN, invalid Z and Z=104; Node matrix adds invalid elements.
LIB-131compute_frontier_descriptors / compute_fukui_descriptors / compute_reactivity_ranking (Rust/Python/WASM)FIXEDBehaviour: water gives HOMO -14.800000000000008 eV, LUMO -8.431381200943433 eV, gap 6.368618799056575 eV, 3 atoms, HOMO contribution 1.0 on oxygen; Fukui f_plus[0]=0.1873418284999793 and ranking sites [2,1,0]. Fix: all three roots validated geometry but not atomic numbers, so Z=0/Z=119 reached EHT and surfaced as engine errors; they now call validate_atomic_numbers (1..=118), and the Python bindings use core_error, so invalid and EHT-unsupported elements are ValueError instead of RuntimeError. Docs: Python/TypeScript frontier, Fukui and ranking contracts now include the element range. Tests: extended phase3_frontier_descriptors_exist, Python test_frontier_and_fukui/test_reactivity_ranking, Node reactivity matrix with Z=0/119/104.
LIB-132compute_dipole (Rust/Python/WASM)FIXEDBehaviour: water returns vector (2.0190582283436167, 2.6101516953941104, 0.0) D, magnitude 3.2999224236958686 D, with nuclear/electronic decomposition summing to the total. Fix: the root validated geometry but not atomic numbers, so Z=0/Z=119 reached EHT and Python raised RuntimeError; it now calls validate_atomic_numbers (1..=118) and the Python binding uses core_error, so invalid elements and EHT-unsupported elements (Z=104) raise ValueError. Docs: Python/TypeScript/Rust dipole pages document the element, finite-coordinate and unsupported-EHT contracts. Tests: new test_dipole_rejects_invalid_elements, Python dipole loop now expects ValueError for Z=0/119/104, Node dipole matrix updated.
LIB-133compute_dos (Rust/Python/WASM)FIXEDBehaviour: water at σ=0.3 eV, −30…5 eV and 500 points returns a 500-point energy grid from −30 to 5 eV, total_dos[0]=8.019326492574992e-19, maximum 1.9053227261243049 states/eV, 3 per-atom PDOS rows and sigma=0.3. Fixes: Python n_points was usize, so -1 raised OverflowError; it now takes i64 and rejects values below 2 with ValueError. WASM took usize, so -1 aborted the instance and fractional values were truncated; it now takes f64, requires a finite integer ≥2 and returns {error}. The root now validates non-empty/finite geometry and atomic numbers (1..=118) before the EHT solve, so Z=0/Z=119 are validation errors and Z=104 is an unsupported-element error. The docs no longer claim pdos is empty on this path. Docs: density of states and Python/TypeScript APIs document the integer n_points, element and geometry contracts. Tests: new test_dos_rejects_invalid_elements_and_points, expanded Python test_dos, Node DOS validation matrix.
LIB-134compute_esp / compute_esp_grid (Rust/Python/WASM)FIXEDBehaviour: water with spacing=0.5, padding=2.0 returns dims [12,11,9] (1188 points), origin [-2.239987,-2,-2], first value -0.02307187804467846, minimum -1.9910324013699727 and maximum 2.696800266810882 Hartree/e. Fixes: compute_esp_with_config checked grid metadata but not the element/position pairing or atomic numbers, and WASM compute_esp_grid_info discarded the elements entirely, so it returned metadata for Z=0/Z=119 that compute_esp would reject. Added esp_grid_metadata_checked (geometry, 1..=118, grid caps), used by compute_esp_with_config and the WASM info/typed paths; invalid elements and length mismatches are now rejected consistently before EHT/population. Docs: electrostatic potential, Python/TypeScript pages document the element and metadata contract. Tests: new test_esp_grid_metadata_checked_validates_elements, expanded Node ESP matrix with Z=0/119, existing Python ESP grid tests cover length/non-finite/zero-spacing.
LIB-135compute_charges / compute_charges_configured (Rust/Python/WASM/CLI)FIXEDBehaviour: ethanol returns 9 charges, first -0.04183875391825285 e, total -2.7755575615628914e-17 e, 30 iterations, converged; configured with max_iter=6 returns 6 iterations, not converged, first charge -0.04182525705714308. Fixes: empty/whitespace SMILES parsed as an empty molecule and returned an empty charge result with converged=true; both roots now reject it. Python max_iter was usize (negative OverflowError), now i64 with max_iter >= 1 and ValueError; WASM took usize (negative abort, fractional truncation), now f64 integer validation with {error}. The stale regression test_acetic_acid_charges expected 6 iterations even though the default is 100 sweeps; it now pins the measured 31 converged iterations. Docs: descriptors, Python/TypeScript pages document empty SMILES and integer max_iter. Tests: new test_empty_smiles_and_invalid_config_are_rejected, Python empty/negative cases, Node max_iter matrix.
LIB-136compute_ani / compute_ani_with_models (Rust/Python/WASM)FIXEDBehaviour: water at [0,0,0.117, 0,0.757,-0.469, 0,-0.757,-0.469] gives energy 0.24130339982580346 Ha, per-atom energies [0.1533636996147924, 0.04396985010550552, 0.04396985010550552] and three finite force vectors; unsupported elements (H, C, N, O, F, S, Cl only) and malformed geometries are rejected. Fix: both roots validated geometry but not atomic numbers, relying on the engine to reject Z=0/Z=119; they now call validate_atomic_numbers (1..=118) before ANI, so invalid elements are validation errors and valid-but-unsupported elements (Z=104, He) remain unsupported errors. Python maps both to ValueError; WASM returns {error}. Docs: machine-learning potentials and Python/TypeScript APIs document the 1..=118/ANI species and finite-3N contracts; test-weight caveat unchanged. Tests: Python test_ani invalid-element loop, new Node ANI geometry/element matrix; existing test_compute_ani_with_models_validates_the_contract covers cutoff/models.
LIB-137compute_aevs_tm / compute_aevs_tm_checked (Rust/Python/WASM)FIXEDBehaviour: water returns 3 rows of the full 176256-value ANI-TM descriptor, all finite; Fe (Z=26) is supported, while He (Z=2), Z=0, Z=119 and Z=104 are rejected. Fix: the checked entry point validated geometry and the 24-element species set but not the supplied AevParams, so a custom zero/NaN cutoff or empty eta/shift list could produce all-zero or NaN descriptors. AevParams::validate now requires finite positive cutoffs and non-empty finite parameter lists, and compute_aevs_tm_checked calls it. Python/WASM already used the checked entry point; their invalid-element/geometry paths are now pinned by tests. Docs: machine-learning potentials, Rust, Python and TypeScript pages document the 176256 length, element set and checked parameter contract. Tests: new test_ani_tm_checked_validates_elements_and_params, expanded Python test_aevs_tm, new Node ANI-TM matrix.
LIB-138evaluate_mlip / MlipOnnx (Rust)FIXEDBehaviour: the callback MLIP fixture answers 1.0 eV and evaluate_mlip returns 23.060548867 kcal/mol with both force components converted; the toy ONNX checkpoint returns energy 1.0 and two zero force vectors. Fixes: evaluate_mlip delegated to any MlipModel without revalidating its manifest/geometry or result, so a hand-written model could return NaN energy, a short force array or missing declared stress; it now validates the manifest (1..=118, cutoff, licence), non-empty finite 3N geometry, element coverage, finite energy, one finite force vector per atom and the stress contract. MlipOnnx::evaluate now also rejects non-finite tensor energy/forces. Docs: MLIP documents the root entry-point checks and ONNX finite-output contract; Rust API row updated. Tests: new root_wrapper_validates_manifest_geometry_and_result covering missing coverage, invalid geometry, invalid manifest, NaN energy, short forces and NaN force; existing EV-unit and ONNX toy/cell tests remain.
LIB-139refine_barrier_with_gsm (Rust/Python/WASM)FIXEDBehaviour: H₂ UFF (0.74→1.20 Å, max_nodes=3, max_iter=2, step_size=0.1) gives barrier 0.05800377327557044 eV / 1.337598848091681 kcal/mol, TS 1.8233085007320669 kcal/mol, 3 nodes and 276 evaluations. Fixes: the function checked only equal/non-empty flat lengths; it now validates GsmConfig, parses the backend name, rejects empty/malformed SMILES and requires exact finite 3N reactant/product coordinates. Backend evaluation errors are captured and returned instead of being folded into an infinite energy, and non-finite/non-physical activation or TS energies are rejected. Python now maps parse/validation/geometry/unsupported failures with core_error (ValueError), while genuine numerical/backend failures remain engine errors. Docs: reaction networks documents the preflight and the measured H₂ values. Tests: new Rust refine_barrier_validates_inputs_and_returns_finite, new Python test_refine_barrier_with_gsm_contract, new Node GSM-refinement matrix.
LIB-140eht_support / get_eht_support (Rust/Python/WASM)FIXEDBehaviour: CH₄ is supported with sorted supported_elements=[1,6]; FeCl₂ is experimental, has_transition_metals=true, provisional_elements=[26]; La (Z=57) is experimental but not a transition metal (has_transition_metals=false); Z=118 is unsupported. Fixes: has_transition_metals was set from any provisional element, so lanthanides/actinides were misreported as transition metals; it now uses is_transition_metal over the input. Python exposed supported_elements/provisional_elements/unsupported_elements as bytes because they were Vec<u8>; they are now list[int]. Docs: extended Hückel theory documents levels, the d-block-only flag, array ordering and the alias. Tests: new transition_metal_flag_is_not_set_for_lanthanides, expanded Python test_eht_support, new Node support/alias test.
LIB-141system_capabilities / system_method_plan (Rust/Python/WASM)FIXEDBehaviour: CH₄ reports embed/UFF/EHT/population/orbital-grid available; FeCl₃ keeps EHT experimental with warnings; empty or Z=0 element lists now report every capability unavailable and no recommendations. Fixes: an empty element list vacuously reported UFF/EHT/population/orbital-grid as available because their unsupported-element arrays were empty; availability now requires at least one element, embedding also requires atomic numbers in 1..=118, and empty EHT confidence is unsupported. Python exposed MethodCapability.unsupported_elements as bytes (it was Vec<u8>); it is now list[int]. Docs: Python/TypeScript system-planning pages document the empty/invalid contract and array type. Tests: new phase1_capabilities_reject_empty_and_invalid_elements, expanded Python test_system_capabilities_and_plan, new Node capability/alias matrix.
LIB-142embed_coords_into (Python)FIXEDBehaviour: embed_coords_into("CCO", array('d', 27), seed=42) writes 9 atoms directly, first coordinates [-0.8930637240409851, 0.06926389038562775, 0.06360100954771042]; wrong length, read-only, float32, non-contiguous and invalid-SMILES calls leave the buffer untouched. Fixes: F64Buffer::writable_f64 propagated the exporter's BufferError for read-only/non-contiguous buffers, contradicting the documented ValueError contract; the shared buffer helper now maps PyObject_GetBuffer failures to ValueError with the original diagnostic. This also fixes compute_esp_grid_into, which uses the same helper. Docs: Python API/guide document the float64, writable, C-contiguous, exact-3N buffer contract, accepted array('d')/NumPy/memoryview forms and unchanged-on-error guarantee. Tests: new test_embed_coords_into_zero_copy_contract covering direct writes, wrong length, read-only, float32, non-contiguous and invalid SMILES.
LIB-143split_worker_tasks / estimate_workers (Python/WASM)FIXEDBehaviour: splitting ["CCO","CCC"] into 2 workers returns 2 tasks with kind=EmbedBatch; empty input returns []; Python estimate_workers(100,8) returns a positive count. Fixes: core split_batch divided by zero for an empty SMILES list; it now returns an empty vector. Python n_workers was usize (-1 → OverflowError), now i64 with >=1 and ValueError; WASM took usize (negative abort/truncation), now f64 integer validation with {error}. Python built each task's smiles JSON by hand, so a quote produced invalid JSON; it now uses serde_json::to_string. estimate_workers accepts non-negative integers in Python and returns 0 for invalid WASM counts instead of aborting. Docs: Python/TypeScript transport sections document empty batches, count ranges and JSON escaping. Tests: test_split_batch_empty_and_zero_workers, expanded Python test_transport, new Node worker-splitting matrix.
LIB-144pack_conformers / pack_batch_arrow (Rust/Python/WASM)FIXEDBehaviour: packing CCO (9 atoms) and C (5 atoms) returns num_rows=2, five columns in the order success, num_atoms, time_ms, coords, elements, num_atoms=[9,5], 42 flat coordinates, 14 elements and byte_size=382; a failed embed_batch entry is kept as a zero-atom row with success=0; an empty input returns a five-column batch with num_rows=0. Fixes: pack_conformers silently filtered results whose coords.len() != 3 * num_atoms or elements.len() != num_atoms, losing rows without telling the caller; it now returns SciFormError::Validation with the offending index, SMILES and lengths. num_rows was accidentally the leading dimension of the last-added column, i.e. the total atom count (9 for one CCO); it is now the conformer count (1), matching the per-conformer columns, while coords/elements keep their atom-major shapes [total_atoms, 3]/[total_atoms] (documented). The same last-column overwrite made pack_esp_grid report dims[2] (3) instead of 27 voxels and pack_dos report the atom count instead of the number of energy points; both now set their logical row counts. Python maps the validation failure to ValueError; WASM pack_conformers/pack_batch_arrow return {"error": ...} instead of dropping ragged JSON rows. Docs: web transport no longer documents the non-existent x/y/z/energy columns or round-robin split; it now matches the real struct, column list, 10,000-SMILES chunk cap, min(8, max_workers, max(1, n/100)) worker heuristic and runnable Python/WASM examples. The transport-arrow and transport-chunked diagrams were regenerated from scripts/docs/generate_animated_svgs.py with the real five columns, num_rows=1 and two contiguous chunks of 100. Python/TypeScript API pages document the row semantics and ragged-input errors. Tests: new test_pack_conformers_rejects_inconsistent_shapes, test_pack_conformers_rows_and_atom_payload, test_pack_dos_rows_are_energy_points, expanded test_pack_esp_grid, Python test_transport, new Node conformer-batch matrix (rows, aliases, failed rows, empty and ragged input).
LIB-145parse_smirks / apply_smirks (Rust/Python/WASM)FIXEDBehaviour: deprotonating acetic acid returns products=["C([O-])(C)=O"] with mapping {1:1, 2:3}; ethanol deprotonation returns ["CC[O-]"]; acetaldehyde reduction returns ["[OH]CC"]; benzene chlorination returns ["Clc1ccccc1"]; nitration returns ["[N+](c1ccccc1)([O-])=O"]; ethyl-acetate hydrolysis returns ["C(=O)([OH])C"]; acid + methanol esterification returns ["COC(C)=O"]; a non-matching pattern returns success=false with no products. Fixes: apply_smirks was recognition-only and returned the product SMARTS template ([C:1](=O)[O-:2]) instead of a product; it now builds the transformed graph (mapped element, formal charge, exact hydrogen count, bond order, product-only atom creation and reactant-only atom deletion), canonicalises it and rejects any product SMILES that does not round-trip to the same formula/charge. Multi-component transforms merge the matched reactants before applying the template, so esterification forms the new C–O bond. parse_smirks accepted empty transforms and transforms without a shared atom map, and its bond_changes were fabricated pairs with atom2_map=0; it now requires at least one map on both sides and derives bond changes from the real reactant/product bonds. The SMARTS parser interpreted a standalone bracket [H] as the hydrogen-count primitive, so [c:1][H:2] mapped the H to a carbon; standalone H is now Element(1) (while [CH3] remains TotalH(3)). Atom map numbers above 255 were silently truncated to u8; the parser now rejects them with a 255 limit. Empty/whitespace SMILES, a multi-fragment SMILES with a one-component transform and unmapped SMIRKS raise ValueError/{"error"}. Python omitted SmirksResult.atom_mapping and SmirksTransform.atom_map/bond_changes; all are exposed now. SmirksRule duplicated the application code and now delegates to apply_smirks, gaining atom creation/removal and element changes. Docs: Python/TypeScript API pages document applied-product semantics, validation and the full transform/result shapes; reaction networks documents the applied fields and includes a Mermaid map→template→product diagram. Tests: new test_apply_smirks_returns_applied_products, test_apply_smirks_rejects_empty_and_unmapped_input, test_parse_smirks_reports_real_bond_changes, SMARTS test_hydrogen_atom_is_not_a_hydrogen_count, expanded Python test_smirks_roundtrip, new Node SMIRKS matrix; the 15 existing Rust SMIRKS integration tests and the Python SMIRKS script still pass.
LIB-146reweight_free_energy_correlated / reweight_free_energy (Rust/Python/WASM)FIXEDBehaviour: a three-point zero-bias trace on [0,1] with 3 bins and block_size=2 gives a flat surface [0,0,0] and standard_error=[0.596161277592249, …], n_blocks=2; the surface is identical to reweight_free_energy. Fixes: reweight_free_energy did not check the exponentiated weight, so a bias of 1e6 kcal/mol overflowed to inf, produced -inf surface values and the JSON encoders emitted null; it now returns a numerical error for overflow, for accumulated-weight overflow and for all-zero underflow. reweight_free_energy_correlated silently returned standard_error=[0,0,0] when block_size >= trace.len() left a single block; it now rejects that with a validation error. It also caps the 1D grid at 4,194,304 bins and the block×bin matrix at 4,194,304 cells (the metadynamics/OPES grids use the same bin cap). Python mapped every reweighting validation failure to RuntimeError; 1D/2D/correlated now use core_error, so invalid grids, temperatures and block sizes are ValueError while overflow remains RuntimeError. Docs: enhanced sampling documents the block-SE formula, the two-block rule, the caps, grid-edge clamping, overflow/underflow behaviour and a Mermaid trace→weights→surface/SE diagram; Python/TypeScript API pages document the JSON contracts. Tests: exact-SE assertion in correlated_reweighting_reports_block_error, new correlated_reweighting_needs_two_blocks, correlated_reweighting_caps_grid_and_block_cells, reweighting_rejects_overflow_and_underflow, reweighting_rejects_non_finite_trace_and_invalid_config, expanded Python test_correlated_reweighting_contract, new Node correlated-reweighting matrix.
LIB-147compute_hf3c / compute_hf3c_custom (Rust/Python/WASM)FIXEDBehaviour: water at the embed("O",42) geometry converges in 10 iterations (n_basis=7, n_electrons=10): E_HF=-74.96293224449488 Ha, D3 -0.0026317759655851217, gCP +0.001826132468671334, SRB +0.17233190248316532, total -74.79140598550863 Ha, with the four terms summing to the total. Fixes: HfConfig::max_scf_iter=0 skipped the SCF loop and returned the superposition energy with converged=false; HfConfig::validate now rejects it. The backend is closed-shell, so an odd electron count (for example CH₃) silently dropped the unpaired electron; it now returns an unsupported error pointing to compute_rohf/compute_uhf. The root now validates atomic numbers (1..=118) before integral work, and the unsupported-element message (“no STO-3G basis”) is classified as Unsupported instead of Other. Non-finite SCF/CIS energies, orbitals, charges or excitation terms are rejected. Python now takes elements: list[int]/max_scf_iter/n_cis_states through signed validation (ValueError, not OverflowError), maps core errors with core_error (invalid input ValueError, non-finite engine RuntimeError), and exposes the CIS block (Hf3cCis, Hf3cExcitation) that it previously computed but discarded. WASM compute_hf3c_custom now takes f64 counts and rejects non-integer/negative max_scf_iter/n_cis_states with {"error": ...} instead of accepting usize truncation/abortion. Docs: HF-3c engine documents closed-shell/even-electron, config, finite-output and Python/WASM contracts; the measured 10-iteration water values are printed there. Python/TypeScript API pages document the parameter ranges and CIS payload. The hf3c-architecture.svg diagram was regenerated from its generator with the correct 10 SCF iterations (it said nine) and a matching aria-label. Tests: new hf3c_validates_config_and_open_shell_electrons, water_hf3c_decomposes_into_measured_terms, test_compute_hf3c_rejects_invalid_elements_and_config, expanded Python test_hf3c (exact terms, CIS, alias, invalid elements/config/odd electrons), new Node custom-HF-3c matrix.
LIB-148webgpu_status / init_webgpu (WASM)FIXEDBehaviour: before initialisation webgpu_status() returns {"initialized":false,"backend":"CPU-fallback","gpu_available":false,"error":null}. In Node (no navigator.gpu) init_webgpu() returns the fallback with "error":"WebGPU is unavailable: navigator.gpu is missing in this JavaScript environment"; webgpu_status() returns the same error synchronously, and a retry is stable. On success the payload carries the adapter backend, four limits and error:null. Fixes: init_webgpu() previously aborted the WASM instance with RuntimeError: unreachable in Node because wgpu::Instance::default() assumed navigator.gpu; a JS preflight now returns the fallback JSON. The success/fallback payloads were duplicated and inconsistent (the failure path had no backend, and webgpu_status() forgot the last error); both now use shared helpers, retain the last error in a thread-local, and always expose initialized/backend/gpu_available/error. Building with experimental-gpu failed because the accelerated ESP path called the removed esp_grid_geometry; it now uses sci_form::esp::esp_grid_metadata_checked with EspGridConfig (same single source of truth as the CPU path). gpu_available is documented as “current runtime usable now”, not a hardware probe. The export is WASM-only; Python/Rust have no webgpu_status and native callers use GpuContext::try_create. Docs: WebGPU validation and the TypeScript API/guide document the stable status schema, error retention, Node fallback, WASM-only scope and build command. Tests: new Node async WebGPU status reports fallback and retains init errors (skips if experimental-gpu is absent), the experimental-gpu WASM build now compiles, and the accelerated ESP metadata path is shared with the audited CPU grid.
LIB-149compute_pka_relative / compute_pka (Rust/Python/WASM)FIXEDBehaviour: the self-reference acetic-acid cycle returns exactly pka=4.76, relative=true and a reference summary; raising the reference pKa from 4.76 to 9.76 shifts the result to 9.76 (exact +ΔpKa invariance). The trifluoroacetic/acetic pair returns pka=0.821273767634362 (delta_g=154.08102382731158 kcal/mol), matching the validation table. Absolute acetic acid remains pka=116.88090049031462, delta_g=159.4544193232432. Fixes: empty target or reference SMILES reached conformer generation and returned a misleading RuntimeError: conformer generation failed for : Empty molecule; evaluate_state now rejects empty/whitespace SMILES as Validation before embedding (Python ValueError, WASM {"error": ...}). The reference pair/pKa are checked before target work, and every conformer energy, ALPB term, Mulliken charge, coordinate and conformer summary must be finite. Python took n_conformers: usize, so -1 raised OverflowError; it now takes i64 and rejects < 1 with ValueError (also for redox). Python exposed the target result but discarded the reference summary; PkaResult.reference now returns PkaReferenceResult (reference pKa, ΔG and selected energies/spreads). WASM empty/non-finite reference inputs return {"error": ...}. Docs: pKa and redox now documents the relative cycle, measured TFA value, validation limits, Python/WASM signatures, reference summary and a Mermaid target/reference→ΔG→pKa diagram; Python/TypeScript API pages document compute_pka/compute_pka_relative, result fields and error contracts. Tests: new Rust relative_pka_shift_is_invariant_and_inputs_are_validated, expanded Python test_pka_and_redox_report_relative_cycles_and_validate_inputs (reference object, TFA, shift, empty target/reference, negative conformers), expanded Node pKa matrix (reference summary, shift, TFA, empty/infinity).
LIB-150compute_redox_potential_relative / compute_redox_potential (Rust/Python/WASM)FIXEDBehaviour: the self-reference acetic-acid pair returns potential_vs_reference_v=0.0 with reference.potential_v=0; a reference potential of 0.5 V returns exactly 0.5 V for the same couple. The absolute cycle remains absolute_potential_v=-18.445112550288258 V and potential_vs_reference_v=-22.88511255028826 V (SHE at 4.44 V), differing by exactly 4.44 V. Fixes: WASM took n_electrons as u32, so 1.5 was silently truncated to 1; Python raised OverflowError for -1 and TypeError for 1.5. Both wrappers now take a floating value, require a finite integer in 1..=4 and return ValueError/{"error": ...} otherwise. Empty reference oxidised/reduced SMILES are rejected before target work; the reference potential must be finite and the reference transfer count must match the target. Python discarded the reference summary; RedoxResult.reference now exposes RedoxReferenceResult (potential, ΔG, selected energies and spreads). State conformer energies, ALPB terms, charges, coordinates and summaries are finite-checked (shared with LIB-149). Docs: pKa and redox documents the relative redox formula, self-reference/shift invariants, n_electrons range, reference validation, Python/WASM signatures, RedoxReferenceResult and a Mermaid target/reference→ΔG→E diagram; Python/TypeScript APIs document the result fields and errors. Tests: new Rust relative_redox_self_reference_and_validation (self 0.5 V, mismatch electrons, empty reference, n=0/5), expanded Python pKa/redox test (reference summary, 0.5 V shift, invalid n, empty reference, infinite potential) and Node redox matrix (fractional/negative n, reference summary, shift, empty reference, infinity).
LIB-151get_* aliases + WASM validator/chart aliasesFIXEDBehaviour: get_eht_support/get_system_capabilities/get_system_method_plan are byte-identical to their canonical names for valid, empty, Z=0, Z=119 and malformed JSON inputs; the Rust deprecated aliases match the canonical functions. validate_electron_count(64,4,8)=true, (65,4,8)=false, zero bands/k-points false, and the saturating capacity accepts huge band/k-point counts. Fixes: WASM/Python validate_electron_count took usize, so 4.5 bands was truncated to 4 and NaN was accepted; it now takes f64 and requires three finite non-negative integers, returning {"error": ...}/ValueError otherwise. The capacity uses saturating multiplication instead of wrapping 2 * n_bands * n_kpoints. The historical _wasm names (validate_electron_count_wasm, validate_kmesh_weights_wasm, chart_to_json_wasm, chart_from_json_wasm, validate_chart_schema_wasm, pack_chart_payload_wasm) are pinned as exact aliases of the canonical names. Docs: TypeScript naming/validator sections and the Python periodic-validator section document the integer/range/overflow contracts and alias spellings. Tests: Rust deprecated_get_aliases_match_their_canonical_functions, Node get-alias parity matrix (valid/empty/invalid), Node capacity validator matrix (fractional/negative/NaN/infinity/saturation) and chart/_wasm alias parity.
LIB-152compute_edl_chart chart-output invariant (Python/WASM)FIXEDContext: LIB-082 already audited the basic NaN/zero/negative EDL-chart input taxonomy. This follow-up closes the remaining finite-but-extreme path. Behaviour: the valid 0.2 V/0.1 M chart has two series (potential/V and charge_density/C·m⁻³), equal x/y lengths, finite values and starts at [0.20000000000000007, 0.1889214584530636] V. Fix: finite extremes such as 10^6 V or a 10^300 M ionic strength produced inf/NaN charge-density values; Python returned them directly and WASM serialised them as JSON null. The wrappers now run ChartPayload::validate() and return ValueError/{"error": ...} when any series is ragged or non-finite. Docs: alpha documents the whole-chart finiteness contract and corrects the title example to EDL profile (Gouy-Chapman). Tests: expanded Python/Node EDL chart tests with series lengths, units, finiteness, deprecated edl_chart parity and the 10^6 V/10^300 M rejection cases.
LIB-153assemble_framework (Rust/Python/WASM)FIXEDBehaviour: the pcu/Zn/octahedral/10 Å unit cell has 7 atoms ([6, 30]), and supercell=2 returns 56 atoms (8×). Fixes: Python/WASM accepted metal=0/119 and emitted invalid atomic numbers; lattice_a=0/-10/NaN produced a singular cell with null fractional coordinates; supercell=0 divided by zero, -1 aborted WASM, and 1.5 was truncated. Both wrappers now validate metal as an integer in 1..=118, lattice_a finite/positive and supercell as an integer >= 1, route through assemble_framework_with_linkers_checked (SBU/cell/topology validation) and cap the replicated structure at 1,000,000 atoms with a checked supercell³/atom-count calculation. The Rust unchecked single-linker entry point keeps its documented precondition; the new MAX_FRAMEWORK_ATOMS constant is the shared cap. Docs: materials assembly documents the wrapper preflight, the atom cap and the n³ scaling; Python/TypeScript API pages document the accepted ranges. Tests: expanded Python test_assemble_framework (valid 7/56 atoms, finite coordinates/elements, invalid metal/cell/supercell/cap) and new Node framework-assembly matrix.
LIB-154compute_pm3_gradient (Rust/Python/WASM)FIXEDBehaviour: water gives energy=-324.8987548272898 eV, heat_of_formation=-53.234594942110505 kcal/mol, three finite gradients and a net per-component gradient below 1e-3 eV/Å. Fixes: the root validated only geometry, so Z=0/Z=119 reached the PM3 solver and Python surfaced RuntimeError; it now validates 1..=118 before differentiation and maps through core_error, so invalid elements are ValueError. Python took elements: Vec<u8> (-1/large values gave OverflowError or reached the solver); it now takes signed integers, validates 1..=118 and returns ValueError. The core now rejects a non-finite reference energy, heat of formation or any gradient component. Docs: semiempirical gradients documents the element/finite-output contract and measured water values; Python/TypeScript pages document the input and error taxonomy. Tests: new Rust test_compute_pm3_gradient_water_and_validation, expanded Python test_pm3_gradient (exact values, net force, invalid elements, length mismatch), expanded Node PM3-gradient matrix.
LIB-155compute_xtb_gradient (Rust/Python/WASM)FIXEDBehaviour: water gives energy=-137.97181114461645 eV, three finite gradients and a net per-component gradient below 1e-3 eV/Å. Fixes: the root validated only geometry, so Z=0/Z=119 reached GFN2 and Python surfaced RuntimeError; it now validates 1..=118 and maps through core_error, making invalid elements ValueError (He remains unsupported). Python took elements: Vec<u8> (negative/large values gave OverflowError); it now takes signed integers and validates the range. The core rejects a non-finite reference energy or gradient component. Docs: semiempirical gradients records the measured GFN2 value and the element/finite-output contract; Python/TypeScript pages document the errors. Tests: new Rust test_compute_xtb_gradient_water_and_validation, expanded Python test_xtb_gradient (exact energy, net force, invalid elements, length mismatch), expanded Node xTB-gradient matrix.
LIB-156discover_template_network / template-network discovery (Rust/Python/WASM)FIXEDBehaviour: the C → CC template network returns species [C, CC], one edge with barrier_ev=0.05, and discover_template_network is byte-identical to the compatibility discover_reaction_network JSON on Python/WASM. Rule OCC is canonicalised to CCO. Fixes: an empty initial species ("" or whitespace) was accepted and produced a network whose only species was "smiles":""; empty rule reactant/product SMILES were also accepted. TemplateNetworkConfig::discover now rejects empty/whitespace initial species and rule SMILES, duplicate rule names and non-empty-rule-name violations before BFS. Added MAX_NETWORK_DEPTH=64 and MAX_NETWORK_SPECIES=100_000 caps so a huge JSON configuration cannot request unbounded BFS memory. Python and WASM gained the canonical discover_template_network export (the JSON config is a TemplateNetworkConfig) while keeping discover_reaction_network as the compatibility name. Docs: reaction networks documents the empty/duplicate/cap contract and both export names; Python/TypeScript feature tables list the canonical alias. Tests: new Rust template_config_rejects_empty_species_duplicate_names_and_caps, expanded Python reaction-network test (alias equality, empty species/rule SMILES, duplicate names, depth/species caps) and Node template-network matrix.
LIB-157predict_ensemble / predict_ensemble_from_smiles (Rust/Python/WASM)FIXEDBehaviour: ethanol returns logp=-0.5850213822006243, logp_std=0.9045703967460684, log_solubility=0.3749356707863932, tpsa=20.23, acidic pKa 13.371400000000001, no basic pKa, bbb_permeable=true, bbb_score=0.8, confidence=0.6834003611388759 and all Veber flags true. Fixes: WASM predict_ensemble("") parsed an empty molecule and returned a zero-feature ensemble (logp=-0.9333…) while Python raised ValueError; predict_ensemble_from_smiles now rejects empty/whitespace SMILES. Added ml::predict_ensemble_checked for untrusted Rust arrays: non-empty elements, Z=1..=118, in-range non-self bonds, bond orders 1..=4, charges/aromatic flags empty or exactly N, all finite; non-finite predictions are rejected. Python now routes through the checked entry point and maps core errors with core_error. Docs: property ensemble documents the input/finiteness contract, the unchecked legacy entry point and the proxy-model caveat; Python API documents empty/malformed SMILES. Tests: new Rust test_predict_ensemble_from_smiles_values_and_empty and checked_ensemble_rejects_invalid_arrays_and_non_finite_output, expanded Python test_predict_ensemble and Node ensemble matrix (exact fields, empty/invalid SMILES).
LIB-158predict_nmr_shifts (Rust/Python/WASM)FIXEDBehaviour: ethanol returns 6 ¹H shifts (0.9, 0.9, 0.9, 2.0120000000000005, 2.0120000000000005, 2.5 ppm) and 2 ¹³C shifts (20.0, 36.900000000000006 ppm), with environments/confidences (sp3_methyl, 0.75, etc.) and finite values. Fixes: empty/whitespace SMILES parsed as an empty molecule and returned an empty result with notes on Python/WASM; predict_nmr_shifts and the HOSE variant now reject it. Added finite/range validation for every shift (shift_ppm, confidence in 0..1, atom index inside the molecule) and applied it to the per-nucleus path too. Docs: NMR spectroscopy records the empty/finite contract and measured ethanol values; Python/TypeScript pages document the errors. Tests: new Rust test_predict_nmr_shifts_values_and_empty, expanded Python test_nmr_shifts and new Node all-nuclei shift matrix.
LIB-159to_canonical_smiles (Rust/Python/WASM)FIXEDBehaviour: CCO/OCC canonicalise to OCC; C(F)(Cl)(Br)I to FC(Cl)(Br)I; the salt pair [Na+].[Cl-] and [Cl-].[Na+] both canonicalise to [Cl-].[Na+]; empty/whitespace/malformed SMILES are rejected. Fixes: the root used Molecule::from_smiles, which keeps only the largest fragment, so salts silently lost atoms ([Na+].[Cl-] → [Cl-]); it now parses with from_smiles_all and uses the new canonical_smiles::to_canonical_smiles_all, which canonicalises every connected component and joins them in lexicographic order. Empty SMILES previously returned ""; it is now a parse error. The canonical writer only had symbols for 13 elements and emitted ? for Na and most of the periodic table; element_symbol now covers all 1..=118. Docs: canonical SMILES documents fragment preservation, the 118-element symbol table and both Rust entry points; Python/TypeScript examples now show the measured FC(Cl)(Br)I and [Cl-].[Na+] output (WASM returns a JSON-quoted string). Tests: new Rust all_supported_atomic_numbers_have_a_symbol, all_fragments_survive_canonicalisation, test_to_canonical_smiles_preserves_fragments_and_rejects_empty, expanded Python canonical test and new Node canonical matrix.
LIB-160compute_arrhenius_chart (Python/WASM)FIXEDBehaviour: temperatures [300,400,500] K and rates [0.001,0.1,5] s⁻¹ return an Arrhenius Plot with one arrhenius series, x=[1000/300,2.5,2.0] (1000/K) and y=[ln 0.001,ln 0.1,ln 5] (ln(s⁻¹)). Fixes: finite positive inputs could still produce non-finite chart points: a subnormal temperature (5e-324 K) made 1000/T overflow to inf, which Python returned and WASM serialised as null. Both wrappers now validate the whole ChartPayload (x/y lengths and finite values) and return ValueError/{"error": ...}; mismatched, empty, zero, NaN and infinite inputs remain rejected. Docs: alpha documents the temperature/rate contract, units, finite projection and the subnormal-temperature failure mode. Tests: expanded Python test_chart_builders_validate_and_report_series (exact x/y/units and invalid matrix) and Node Arrhenius cases.
LIB-161compute_gcs_profile (Rust/Python/WASM)FIXEDBehaviour: 0.1 V, 0.1 M, 298.15 K, 3 Å returns total_interfacial_drop_v=0.10000000000002698 V, compact + diffuse summing to it, capacitance_total_f_per_m2=0.14411840178871757 and finite distance/potential/field/charge series. Fixes: a finite but extreme Stern thickness (1e-300 Å) made the compact capacitance and field series non-finite; Python returned NaN/inf and WASM serialised null. The core now validates every profile series and capacitance term and returns an error. WASM’s GCS payload omitted field_strength_v_per_m, so its shape differed from Python; it is now included. Docs: EDL documents the finite-series contract and the extreme-thickness failure mode. Tests: expanded Python test_edl_profiles_are_potential_based_for_every_model (finite series, field length, 1e-300 Å rejection) and Node GCS matrix.
LIB-162all_space_groups / space_group_by_number / space_group_by_symbol (Python/WASM)FIXEDBehaviour: all 230 groups are present with unique ITC numbers and unique Hermann-Mauguin symbols (1 = P 1, 225 = F m -3 m, 230 = I a -3 d); every symbol resolves back to its number, and P21/c/P 21/c both resolve to 14. Fixes: WASM took number as u16, so 14.5 silently truncated to 14, -1 became 65535 in the error message and NaN became 0; it now takes f64, rejects fractional/non-finite values with {"error": ...}, and returns JSON null for integers outside 1..=230. Python now takes f64 and returns None for out-of-range integers (instead of OverflowError for -1) while rejecting fractional/NaN/infinite values with ValueError. WASM unknown symbols now return null, matching Python’s None, instead of an error. Docs: Python/TypeScript pages document the integer/null contract, space-insensitive case-sensitive symbol matching, uniqueness of the 230 entries and the round-trip guarantee. Tests: expanded Python test_space_groups (all 230 entries, uniqueness, every-symbol round-trip, invalid numbers/symbols) and new Node space-group matrix.
LIB-163train_random_forest / train_gradient_boosting (Python/WASM)FIXEDBehaviour: the four-point linear fixture returns Random Forest predictions [1.505 ×4], train_rmse=1.118045169033881, n_estimators=100; Gradient Boosting returns [1.510925865628068 ×4], train_rmse=1.1180873733924923. Fixes: Python/WASM received n_trees/n_estimators, max_depth, min_samples_split and min_samples_leaf as unsigned integers, so -1 raised OverflowError/aborted and 1.5 raised TypeError/truncated; both wrappers now take floating values, require finite non-negative integers and return ValueError/{"error": ...} before the checked trainer runs. Core train_*_checked still enforces the tighter minima (n_trees >= 1, max_depth >= 1, min_samples_split >= 2, min_samples_leaf >= 1). Docs: tree models documents the wrapper count contract and measured example; Python/TypeScript APIs document the values and errors. Tests: expanded Python test_train_random_forest/test_train_gradient_boosting (exact predictions/RMSE/metadata, negative/fractional counts) and new Node tree-regressor matrix including BigInt seeds.
LIB-164build_periodic_molecule (Rust/Python/WASM)FIXEDBehaviour: a cubic 5 Å cell with C at fractional (0,0,0) and (0.34,0,0) gives Cartesian [[0,0,0],[1.7,0,0]] and one C–C bond at 1.7000000000000002 Å; bond_tolerance=0 removes it while omitted/None keeps the 0.3 Å default. Fixes: Python extracted elements as u8, so -1/300 raised OverflowError instead of ValueError; it now extracts i64 and validates 1..=118 before casting. WASM parsed elements as u8 (same overflow on 300) and treated bond_tolerance=0 as “use the 0.3 Å default”, contradicting Python and the CLI, where 0 disables the extra tolerance; it now validates i64 elements and passes Some(0.0) explicitly. Docs: Python/TypeScript pages document None→0.3 Å versus 0.0→no extra tolerance, element/coordinate/cell validation and the WASM surface’s required explicit tolerance; the Rust/WASM doc comments match. Tests: expanded Python test_periodic_molecule_and_hapticity (Cartesian coords, bond distance, zero tolerance, Z=0/119, ragged coords/length mismatch, zero cell, negative/NaN tolerance) and new Node periodic-molecule matrix.
LIB-165optimize_framework (Rust/Python/WASM)FIXEDBehaviour: embedded CCO with max_iter=3 returns energy=0.20983819887782174 eV, max_force=3.538165038540779 eV/Å, n_iterations=3, converged=false, 9 positions and 9 forces. Fixes: a NaN initial coordinate previously produced energy=NaN, max_force=0, converged=true and NaN positions. Core optimize_framework now rejects empty geometries, position/atom count mismatches, non-finite initial coordinates, and any callback result with a non-finite energy/force component or a force count different from the atom count, so a NaN surface cannot be reported as a minimum. Python/WASM took max_iter as usize, so -1 raised OverflowError/aborted and 1.5 raised TypeError/truncated; both now take a floating count and require a finite non-negative integer, leaving the deeper max_iter >= 1 check to the core. Python fixed_atoms negative indices raised OverflowError; they are now signed and validated as non-negative (the core still checks < n_atoms), and WASM parses signed indices so -1 is a range error rather than a JSON parse error. Docs: framework optimization and the Rust/Python/TypeScript APIs document the geometry/finiteness checks, count taxonomy and measured fixture. Tests: new Rust optimize_rejects_non_finite_geometry and optimize_rejects_non_finite_energy_or_forces; expanded Python test_optimize_framework (measured energy/iterations, NaN coords, count/index/method/tolerance matrix) and new Node optimizer matrix.
LIB-166optimize_geometry_eht (Rust/Python/WASM)FIXEDBehaviour: the [6,6,8] / [0,0,0, 1.2,0.6,0, 2.4,0.6,0] fixture with max_steps=3 and the default step_size=0.2 Å returns energy=752.5049338566063 eV, rms_gradient=186.4590465586736 eV/Å, n_steps=3, converged=false and the trajectory [979.6373699739364, 846.7316238435671, 794.4753935747987, 752.5049338566063] eV. Fixes: the Python default step_size was 0.05 Å while the Rust config, CLI and documentation all specified 0.2 Å; it is now 0.2. Python extracted elements as u8 (-1/300 → OverflowError) and max_steps as usize (-1 → OverflowError, 1.5 → TypeError); it now takes signed elements and a floating count, returning ValueError for elements outside 1..=118 and for non-finite/fractional/negative counts. WASM took max_steps as usize, truncating fractional values; it now takes a floating count and returns {"error": ...}. The shared WASM geometry parser now rejects non-finite coordinate arrays before any EHT call. Docs: EHT records the default step, validation and measured trajectory; Python/TypeScript/Rust pages document the same contract. Tests: expanded Python test_optimize_geometry_eht (measured values/trajectory, default step, count/element/coordinate matrix) and new Node optimizer matrix.
LIB-167extract_kinetics_diagnostics (+ _wasm alias) and the microkinetic frame countFIXEDBehaviour: the built-in A ⇌ B demo at 20 frames returns is_steady_state=false, max_population=0.9800069400037741, total_population=1.0000000000000002, mass_conservation_error=2.220446049250313e-16 and max_rate_of_change=7.94623340044654e-6. A custom network with n_frames=2 and n_steps=2 returns max_rate_of_change=980.0069400033173, max_population=0.9800069400033172, mass_conservation_error=0; the same network with n_steps=20 returns the 20-frame values, proving that n_steps overrides n_frames. Fixes: Python/WASM took n_steps as usize: Python -1 raised OverflowError, 1.5 raised TypeError; WASM -1 aborted with unreachable, NaN/Infinity were accepted as zero and clamped to two frames, and 1.5 was truncated. All three kinetics wrappers now take a floating count, require a finite non-negative integer and then >= 2, so Python raises ValueError and WASM returns {"error": ...} without aborting. WASM extract_kinetics_diagnostics/solve_microkinetic_network used a custom network's n_frames and ignored n_steps, while Python overrode it; all three Python/WASM functions now set config.n_frames = n_steps (Python steady state previously did not). The _wasm aliases (extract_kinetics_diagnostics_wasm, solve_microkinetic_network_wasm, solve_microkinetic_steady_state_wasm) delegate to the same code and remain byte-identical. The CLI microkinetic_config silently clamped n_frames to n_steps.max(2) and ignored --n-steps for custom networks; it now assigns cfg.n_frames = n_steps, so --n-steps is honoured and 0/1 reach the core error. Docs: microkinetic networks documents the override and the count contract; Python/TypeScript API pages gained the diagnostics/solver signatures, JSON fields and errors; the CLI page notes the override and the fixed 20-frame diagnostics default. Tests: expanded Python test_microkinetic_network_and_steady_state_validation (exact diagnostics, custom n_frames override, count matrix for all three functions, bad JSON) and the Node microkinetic matrix (exact fields, alias equality, override, count matrix without aborts).
LIB-168compute_helmholtz_profile / compute_gouy_chapman_profile (Rust/Python/WASM)FIXEDBehaviour: at 0.2 V, 0.1 M, 298.15 K the Gouy-Chapman profile has 128 points, compact_layer_drop_v=0, diffuse_layer_drop_v=total_interfacial_drop_v=0.2, capacitance_total_f_per_m2=17.71542571824761, first potential 0.20000000000000007 V, first field 1308607484.0659342 V/m and first charge density -23182538678.312984 C/m³; Helmholtz at 0.2 V gives total_interfacial_drop_v=0.19999999999999998 and capacitance_total_f_per_m2=0.177083756256. Fixes: Python mapped Gouy-Chapman validation failures to RuntimeError; they are now ValueError. The core accepted extreme but finite inputs and returned non-finite series/capacitances (GC 1e308 V, 1e300 M, 1e-300 K; Helmholtz 1e308 V); all three profile constructors now share checked_profile, which rejects any non-finite series, drop or capacitance. Helmholtz now validates temperature and ionic strength instead of silently ignoring zero/NaN values. The WASM Gouy-Chapman payload omitted field_strength_v_per_m; it now matches Python and the other models. WASM Helmholtz/GC/GCS lacked a temperature argument; each now takes an optional temperature_k (default 298.15 K), preserving existing two-/three-argument calls while allowing parity with Python/CLI. Docs: EDL documents the finite-output contract, extreme inputs and optional temperature; Python/TypeScript APIs gained detailed profile signatures, payload fields and error contracts. Tests: expanded Python test_edl_profiles_are_potential_based_for_every_model (exact GC/Helmholtz values, temperature dependence, invalid/extreme matrix, Python ValueError) and Node EDL matrix (field parity, optional temperature, extreme inputs).
LIB-169embed_seed64, embed_coords_seed64, embed_coords_typed_seed64, embed_batch_seed64, compute_md_trajectory_seed64, compute_md_trajectory_nvt_seed64, compute_md_trajectory_with_method_seed64, search_conformers_with_uff_seed64, split_worker_tasks_seed64 and 32-bit seed validation (WASM)FIXEDBehaviour: embed("CCO", 42) is byte-identical to embed_seed64("CCO", 42n); embed_seed64("CCO", 2⁴⁰+42) differs from seed 42 and is deterministic. The same parity holds for embed_coords, embed_coords_typed, embed_batch, search_conformers_with_uff, split_worker_tasks, compute_md_trajectory, compute_md_trajectory_nvt and compute_md_trajectory_with_method; their _seed64 forms use the high bits (NVT, method, search and split produce different trajectories/tasks for 2⁴⁰+42). Fixes: every 32-bit seed parameter was a Rust u32, which wasm-bindgen coerces with >>> 0: 2^32+42 silently aliased seed 42 and -1, 1.5, NaN and Infinity were wrapped/accepted, contradicting the documented rejection. All nine 32-bit wrappers now take an f64 and return {"error": ...} unless it is an exact integer in 0..=u32::MAX (the typed-array variant returns an empty array; embed_batch preserves its array shape). Separately, the conformer RNG used seed as u32, so _seed64 embedding ignored everything above 32 bits; conformer.rs now folds the high half with seed ^ (seed >> 32), preserving every seed below 2³² while making 64-bit seeds distinct. Search and batch inherit the fix through embed. Docs: the TypeScript seed section documents the exact 32-bit range, the error/empty-array behaviour and that _seed64 uses all bits. Tests: new Node 64-bit seed variants match canonical outputs and use all bits (parity, high-bit differences, determinism, invalid-seed matrix for all nine wrappers) and new Rust test_embed_uses_full_64_bit_seed.
LIB-170*_wasm aliases, typed-array aliases and deprecated ML names (WASM)FIXEDBehaviour: every historical *_wasm name returns exactly the canonical payload: compute_periodic_dos_wasm = compute_periodic_dos, solve_periodic_randnla_wasm = solve_periodic_randnla, bloch_phase_wasm = bloch_phase, build_bloch_hamiltonian_wasm = build_bloch_hamiltonian, assemble_periodic_operators_wasm = assemble_periodic_operators, bz_integrate_scalar_wasm = bz_integrate_scalar, bz_integrate_vector_wasm = bz_integrate_vector, analyze_gsm_mbh_htst_step_wasm = analyze_gsm_mbh_htst_step (and the kinetics aliases covered by LIB-167). compute_ml_properties = predict_ml_properties and compute_molecular_descriptors = compute_ml_descriptors are byte-identical. eht_orbital_grid_typed equals eht_orbital_grid_from_coefficients_typed fed the coefficients from solve_eht (3315 values for the water fixture at spacing=0.5); invalid spacing/MO index/coefficients return an empty Float32Array. Fix: the aliases were already delegating correctly, but the sweep added explicit regression coverage for the table and the typed-array failure contract. Docs: the TypeScript naming section now lists every *_wasm alias explicitly. Tests: expanded Node periodic-DOS/RandNLA/assembly/Bloch/BZ/GSM alias assertions and new Typed-array and deprecated-name aliases match canonical outputs.
LIB-171parse_smiles, eht_volumetric_grid_info, compute_neb_path_with_method, neb_single_point_energy, neb_energy_and_gradient (WASM)PASSBehaviour: parse_smiles("CCO") returns 9 atoms/8 bonds, atom 0 element=6, hybridization="SP3", formal_charge=0; an empty string returns an empty molecule (0/0, matching Python), while whitespace-only and malformed SMILES return {"error": ...}. eht_volumetric_grid_info for water at spacing=0.2, padding=2.0 returns a finite 3-component origin and three positive integer dimensions; zero/NaN spacing and negative/NaN/infinite padding are rejected. UFF neb_single_point_energy("uff","CCO",coords) returns energy=6.993048432903878 kcal/mol; neb_energy_and_gradient returns the same energy with 27 finite gradient components; compute_neb_path_with_method returns 3 images and 2 notes for the 3-image fixture and rejects invalid image/iteration counts, empty SMILES and unknown backends. Fixes: no code defect found in this sweep; the row closes the remaining library-only WASM names and pins the contracts that were previously only exercised incidentally. Docs: Python/TypeScript parse/parse_smiles now document the empty-string result; the NEB and grid contracts were already documented and were verified against the measured values. Tests: new Node SMILES parsing and volumetric grid extents report stable payloads plus the existing NEB single-point/gradient/path matrices.
LIB-172compute_gfn1, compute_gfn2, create_unit_cell, eht_orbital_mesh, parse_cif, write_cif (Python/WASM)FIXEDBehaviour: the E/C fixture ([6,6,8]) returns compute_gfn1.total_energy=-236.44118839233613 eV and compute_gfn2.total_energy=-220.90198575403002 eV; create_unit_cell(5,5,5) returns volume=125 ų; the EHT orbital mesh for that fixture returns vertices/normals and isovalue=0.02; parse_cif/write_cif round-trip the existing CIF fixture. Fixes: Python/WASM create_unit_cell accepted zero/negative/non-finite lengths and angles outside (0°,180°); Python returned volume=NaN, and WASM emitted invalid JSON containing "beta":NaN. Both wrappers now validate CellParameters and raise ValueError / return {"error": ...}. Python eht_orbital_mesh accepted isovalue=NaN/inf and returned a mesh whose isovalue was non-finite; it also took elements as u8 and mo_index as usize, so -1/large elements and negative/fractional indices raised OverflowError/TypeError. It now validates elements 1..=118, a finite non-negative integer mo_index, and a finite isovalue, and the WASM mesh wrapper gained the same mo_index/isovalue checks. Python compute_gfn1/compute_gfn2 took elements: Vec<u8>, so negative/large values raised OverflowError and Z=0 reached the solver as RuntimeError; they now take signed elements, validate 1..=118 and return ValueError. validate_coords now rejects non-finite coordinates as ValueError for the GFN/electronic wrappers instead of surfacing an engine error. Docs: Python/TypeScript pages document the cell, mesh and GFN validation contracts. Tests: new Python test_create_unit_cell_validates_parameters, expanded test_gfn1/test_gfn2/test_eht_orbital_mesh, and new Node Unit cells, GFN wrappers and orbital meshes validate input; existing CIF round-trip tests cover parse_cif/write_cif.
LIB-173build_periodic_molecule bond-order heuristic (Rust/Python/WASM)FIXEDBehaviour: for two carbons in a cubic 5 Å cell at fractional separations 0.20, 0.24 and 0.32, the single perceived bond is TRIPLE at 1.0 Å, DOUBLE at 1.2 Å and SINGLE at 1.6 Å. Fix: the builder checked dist < 0.85·(r_i+r_j) before dist < 0.75·(r_i+r_j), so the TRIPLE branch was unreachable and every short contact was labelled DOUBLE. The thresholds are now evaluated shortest-first; the existing transition-metal 0.3× tolerance and 0.4 Å lower bound are unchanged. Docs: periodic molecules documents the distance-ratio order assignment. Tests: new Rust test_periodic_bond_order_uses_shortest_threshold_first, expanded Python test_periodic_molecule_and_hapticity and Node periodic-molecule matrix (TRIPLE/DOUBLE/SINGLE distances).
LIB-174create_unit_cell and create_unit_cell_checked (Rust)FIXEDBehaviour: create_unit_cell_checked(5,5,5,90,90,90) returns a cubic cell with volume=125 ų; the checked variant rejects a=0, a=-5, a=NaN, alpha=0/180 and the 179/179/179 angle combination with SciFormError::validation. The historical create_unit_cell remains the documented unchecked constructor and returns a degenerate cell for those inputs instead of an error. Fix: added the checked Rust entry point, routed validation through CellParameters::validate, and documented the unchecked precondition in the Rust API and materials docs; Python/WASM already validated. Tests: new Rust test_create_unit_cell_checked_and_unchecked_contract (valid volume/lattice, six invalid parameter sets, degenerate unchecked result).
LIB-175write_cif and write_cif_checked (Rust)FIXEDBehaviour: a cubic P 1 structure with one Na site writes a CIF containing data_test/Na1 and round-trips through parse_cif with the same data block and atom count. write_cif_checked rejects an empty data block, empty/duplicate atom labels, a symbol/atomic-number mismatch, an empty atom list, occupancy 0 and a NaN fractional coordinate with SciFormError::validation; the historical write_cif still serializes the structure verbatim. Fix: added the checked Rust writer, strengthened CifStructure::validate with data-block/label/symbol checks, and documented the unchecked precondition; CLI/Python/WASM already called CifStructure::validate. Docs: CIF I/O and the Rust API now name both entry points. Tests: new Rust test_write_cif_checked_and_unchecked_contract (round-trip and invalid structure matrix: empty/duplicate/mismatched labels, bad data block/occupancy/coordinate, unchecked output).
LIB-176compute_pm3 (Rust)PASSBehaviour: water [8,1,1] at [0,0,0.1173, 0,0.7572,-0.4692, 0,-0.7572,-0.4692] returns total_energy=-324.8987548272898 eV, gap=16.410434936900526 eV, heat_of_formation=-53.234594942110505 kcal/mol, finite orbitals and converged=true. Empty geometry, position/atom count mismatch and non-finite coordinates return errors; Z=0 and Z=119 are rejected. Notes: the root already delegated to the validated solve_pm3; this row pins the single-point contract (the gradient was LIB-154). Tests: new Rust test_compute_pm3_single_point (exact values, invalid geometry/element matrix).
LIB-177compute_xtb (Rust)PASSBehaviour: the same water returns total_energy=-137.97181114461645 eV, gap=14.629711256177073 eV; it is numerically identical to compute_gfn2 (total_energy, gap, electron count and Mulliken charges) and rejects empty/mismatched/non-finite geometries and out-of-range elements. Notes: compute_xtb is explicitly the GFN2 alias; no separate parameterisation is claimed. Tests: new Rust test_semiempirical_single_point_contracts (GFN2 parity, invalid matrix).
LIB-178compute_gfn1 (Rust)PASSBehaviour: the water fixture returns total_energy=-156.97270581210833 eV, gap=9.327144586131357 eV, converged=true; empty/mismatched/non-finite geometries and elements without GFN1 parameters are rejected. Notes: validation lives in solve_gfn1; the root propagates it as SciFormError. Tests: new Rust test_compute_gfn1_single_point (exact values, invalid matrix).
LIB-179compute_gfn2 (Rust)PASSBehaviour: the water fixture returns total_energy=-137.97181114461645 eV, gap=14.629711256177073 eV, 8 SCC iterations and converged=true; invalid geometries/elements are rejected. Notes: validation lives in solve_gfn2; compute_xtb is the numerical alias covered by LIB-177. Tests: new Rust test_compute_gfn2_single_point (exact values, 8 SCC iterations).
LIB-180compute_reaction_dynamics_3d (Rust, alpha-reaction-dynamics)FIXED (ASE NEB parity)Behaviour: the CCO -> OCC pipeline with the default convergence controls reports neb_converged=Some(true), neb_iterations>0 and neb_max_force_kcal_mol_per_a<5.0; two quantitative gates pass: (a) butane torsion on UFF returns 3.231756647224 kcal/mol versus ASE 3.30 3.248789188474 (absolute difference 0.0170, gate 0.05), and (b) the connectivity-changing tautomerisation CC=O -> C=C-O on PM3 returns 12.6314 kcal/mol versus ASE 12.6695 (absolute difference 0.0381, gate 0.1), with neb_converged=true in both. The default PM3 pipeline (no fixed coordinates) reproduces the second barrier through endpoint relaxation and identity atom mapping. Fixes: (1) added ReactionDynamics3DConfig::validate (method, image count 2..=1000, iterations, spring/step/threshold finiteness, approach/departure counts, distances, complex-step cap) and CiNebConfig::validate; (2) validated CI-NEB start/end lengths against 3N, finite coordinates, topology/atom count and final energies; (3) switched CI-NEB, constrained relaxation, reactive-complex optimisation, IRC, orientation sampling and approach/departure frame energies to Molecule::from_smiles_all so multi-fragment paths keep every fragment; (4) fixed the energy backend element order (&p_elements → &r_elements) for the reordered product coordinates; (5) relaxed both endpoints when optimise_complex is enabled, added a backtracking energy line search, and discarded a post-NEB relaxation that raised the band energy; (6) exposed neb_converged, neb_iterations and neb_max_force_kcal_mol_per_a; (7) default controls are now 500 iterations, 5.0 kcal/mol/Å, optimise_complex=true and 1000 endpoint steps; (8) endpoint relaxation uses a 0.02 kcal/mol/Å RMS-gradient threshold and a 0.02 Å step; (9) added fixed_start_coords/fixed_end_coords with together/length/finiteness validation so an external fixture can drive the exact band; (10) added Python compute_uff_gradient (analytic UFF energy and Cartesian gradient) used by the ASE reference script; (11) CI-NEB optimizer fixes: the line search now accepts a step only when the NEB band objective decreases (regular images) or the climbing image rises by a bounded 50 kcal/mol (CI), rejects trial geometries with any atom pair closer than 0.6 Å, and no longer calls the periodic redistribute_images pass that corrupted connectivity-changing paths; (12) the product endpoint is rigid-body aligned to the reactant before NEB so the band does not spend length on an artificial rotation; (13) non-isomorphic reactions use identity mapping when the element sequences match and a heavy-atom Kabsch/hydrogen-parent fallback otherwise; (14) UFF/MMFF return an explicit error for connectivity-changing reactions, while PM3/GFN1/GFN2/xTB/HF-3c are supported. Docs: alpha documents both gates, the PM3 connectivity contract and the force-field rejection; scope boundaries records the approach/departure geometric-contract boundary; the fixture generator is scripts/validation/ase_neb_reference.py. Tests: reaction_dynamics_3d_matches_ase_butane_reference, reaction_dynamics_3d_matches_ase_pm3_tautomerization, connectivity_changing_reaction_default_pipeline_matches_ase, connectivity_changing_reaction_rejects_fixed_topology_backends, reaction_dynamics_3d_endpoint_relaxation_reaches_ase_minimum, reaction_dynamics_3d_validates_config_before_embedding, ci_neb_validates_config_and_geometry_before_optimization, 45 3D tests and 4 robustness tests; Python test_uff_gradient_matches_energy_and_finite_difference.
LIB-181WebGPU browser harness and ESP accelerated parity (WASM/browser)FIXEDBehaviour: crates/wasm/examples/vite-webgpu-hybrid/ now builds with Vite, runs CPU/hybrid/GPU ESP and EHT orbital-grid comparisons on water and benzene, and fills window.__SCI_FORM_WEBGPU_REPORT__. A Chrome 158 / BrowserWebGpu run with iterations=3 reported 12/12 comparisons passed: ESP max abs diff 1.13e-6 (water) and 3.35e-7 (benzene), orbital-grid 1.19e-7 and 2.46e-7; all RMS diffs finite. Fixes: the WASM ESP GPU uniform block omitted min_distance/padding, so the nuclear singularity was unclamped and CPU/GPU differed by 2.65; the CPU slice also dropped atoms closer than 0.01 Å instead of clamping at DEFAULT_ESP_MIN_DISTANCE. Both now use the shared 0.1 Å clamp. The Playwright runner supports SCI_FORM_CHROMIUM for distributions where the bundled browser is unavailable and terminates the preview process group cleanly. Docs: WebGPU validation now documents the harness, commands, report contract, measured diffs and the fallback/skip path; the TypeScript and GPU portability guides no longer call the harness missing. Tests: harness npm run webgpu:benchmark:build, Playwright webgpu:test (12/12), and the existing webgpu:compare policy.
LIB-182compute_approach_dynamics (Rust, alpha-reaction-dynamics)FIXEDBehaviour: [Cl-] + CBr with six approach frames returns six phase="approach" frames ordered far→contact (minimum inter-fragment separation 17.448 → 3.366 Å) with finite energies 0.256 → -0.191 kcal/mol; reaction_energy_kcal_mol=0, neb_converged/neb_iterations/neb_max_force_kcal_mol_per_a=None; fewer than two fragments and an invalid image count are rejected. Fixes: (1) frame energies used Molecule::from_smiles, which kept only one disconnected component (5 atoms for 6 atoms of coordinates), producing 10³–10⁵ kcal/mol and energies that increased with separation; switched to Molecule::from_smiles_all; (2) the far→contact scan was reversed after construction, contradicting the documented frames[0]=far, frames[last]=contact order; removed the reversal; (3) reaction_energy_kcal_mol reported last − first even though the public contract says it is always 0.0 because no product is known; now returns 0.0. Docs: alpha documents the approach-only and departure contract. Tests: approach_dynamics_contract (frame count/order, separations, exact fixture energies, finite values, zero reaction energy, error matrix) and departure_dynamics_separates_products.

Inventory reconciliation (2026-11-28) ​

The machine-generated export-inventory.md lists 120 Rust root functions, 178 Python names and 240 WASM exports. A strict diff against the LIB rows, the CLI catalogue and the surface audit (excluding names that appear only in the reconciliation queue itself) leaves 0 Rust / 0 Python / 0 WASM names not mentioned verbatim. The reconciliation is now 0/0/0: every Rust, Python and WASM name in the inventory has an explicit LIB row. The *_seed64/*_typed/*_wasm spellings and deprecated aliases are covered by LIB-169–LIB-171; the six former CLI-only Rust roots are covered individually by LIB-174–LIB-179.

Audited from this queue since the previous reconciliation:

  • LIB-142–LIB-144: zero-copy/worker helpers.
  • LIB-145: SMARTS/SMIRKS.
  • LIB-146: reweighting.
  • LIB-147–LIB-150: HF-3c, WebGPU status and pKa/redox relatives.
  • LIB-151–LIB-152: get_*, validators/chart aliases and EDL chart finiteness.
  • LIB-153: assemble_framework.
  • LIB-154: compute_pm3_gradient.
  • LIB-155: compute_xtb_gradient.
  • LIB-156: discover_template_network / template-network discovery.
  • LIB-157: predict_ensemble / predict_ensemble_from_smiles.
  • LIB-158: predict_nmr_shifts.
  • LIB-159: to_canonical_smiles.
  • LIB-160: compute_arrhenius_chart.
  • LIB-161: compute_gcs_profile.
  • LIB-162: space-group lookups and listing.
  • LIB-163: tree-regressor training helpers.
  • LIB-164: periodic-molecule builder.
  • LIB-165–LIB-166: UFF and EHT geometry optimizers.
  • LIB-167: kinetics diagnostics and frame-count parity.
  • LIB-168: Helmholtz and Gouy-Chapman profiles.
  • LIB-169: 64-bit seeds and 32-bit seed validation.
  • LIB-170: WASM aliases and typed-array wrappers.
  • LIB-171: SMILES parsing, volumetric grid metadata and NEB WASM wrappers.
  • LIB-172: GFN, unit-cell, orbital-mesh and CIF wrappers.
  • LIB-173: periodic bond-order threshold order.
  • LIB-174–LIB-175: Rust unit-cell and CIF checked/unchecked contracts.
  • LIB-176–LIB-179: PM3, xTB, GFN1 and GFN2 single-point roots.
  • LIB-180: 3D reaction-dynamics convergence, endpoint relaxation and ASE NEB parity.
  • LIB-181: WebGPU harness and ESP accelerated parity.
  • LIB-182: approach-only reaction-dynamics scan contract.

CLI-covered names are not repeated as library-only rows. Chart builders and periodic validation helpers keep their existing LIB-076–LIB-083 coverage.

PASS-row revalidation (2026-11-28) ​

The nine PASS rows were re-run against their named tests; the four new Rust single-point roots use the same test_semiempirical_single_point_contracts fixture. The full per-row execution log is pass-revalidation, generated by scripts/audit/revalidate_pass_rows.py (14 LIB checks + 24 CLI checks, 0 failures).

RowFunctionEvidence
LIB-083compute_dos_chartPython test_chart_builders_validate_and_report_series; Node Chart builders validate inputs and return real series
LIB-097compute_eht_gradientPython test_eht_gradient; Node EHT gradient agrees with the Python surface and is translation invariant
LIB-110compute_esp_with_configRust test_compute_esp_with_config_applies_min_distance_and_validates
LIB-111compute_gb_solvationPython test_gb_solvation + four rejection tests; Node GB solvation reports the water energy decomposition + rejection cases
LIB-171parse_smiles, eht_volumetric_grid_info, NEB WASM wrappersNode SMILES parsing and volumetric grid extents report stable payloads, NEB single-point energy and gradient validate input, Configurable NEB validates image and iteration counts
LIB-176compute_pm3Rust test_compute_pm3_single_point (exact values, invalid geometry/element matrix)
LIB-177compute_xtbRust test_compute_xtb_matches_gfn2 (GFN2 parity and exact energy)
LIB-178compute_gfn1Rust test_compute_gfn1_single_point (exact values, invalid matrix)
LIB-179compute_gfn2Rust test_compute_gfn2_single_point (exact values, 8 SCC iterations)

The 24 CLI PASS rows are exercised by cargo test -p sci-form-cli --features alpha-kinetics, whose every_example_runs test executes all 120 commands in crates/cli/src/catalog.tsv; the filtered CLI suites also cover the kinetics diagnostics and NEB examples.

compute_reaction_dynamics is no longer blocked: LIB-010 is FIXED with labelled-graph atom mapping. Reactions outside the 1D topology contract are rejected explicitly and documented.

compute_reaction_dynamics_3d is parity-validated against ASE 3.30 for same-topology UFF paths and a connectivity-changing PM3 path (LIB-180). UFF/MMFF reject connectivity changes, so no fixed-topology path is silently reported as a quantitative barrier. Approach/departure frames are validated against their geometric contract, not as external barriers; see scope exclusions. compute_approach_dynamics has its own contract row (LIB-182).

Released under the MIT License.