code wiki / (root) / nx_chem_valence.nx

nx_chem_valence.nx

buildroot/runtime/nx_chem_valence.nx

8747 B204 linesdepth 7pulls 8 transitivereach 18 importersview sourcekind librarytopic chem
docsdependenciesstructsconstsfunctions

about

nx_chem_valence.nx -- C2.3a milestone: implicit-H valence inference + molecular weight computation. Provides: nx_chem_default_valence(z) -- Daylight 1988 default valence (organic subset) nx_chem_compute_implicit_h(m) -- walks atoms; sets h_count for -1 sentinels per (valence - bond_order_sum) for unambiguous cases nx_chem_mol_weight_q3(m, table) -- sum atomic weights * 1000 (milli-AMU) including implicit Hs; matches NIST WebBook standard molecular weight Honest gaps (preserved for future milestones): - Aromatic non-carbon atoms (n / o / s / p in rings) leave h_count = -1 because pyrrole- vs-pyridine disambiguation requires C2.5 ring-electron-counting; substrate refuses to fabricate H counts rather than guess wrong. - Hypervalent forms (N+5, S+4/+6, P+5, etc.) require explicit bracket specification. - Non-organic-subset atoms (Si, B with non-standard, transition metals, etc.) leave h_count = -1 unless specified in brackets. nx_safety_envelope: intended_use: implicit-H + molecular-weight for cheminformatics + MS downstream sil_target: SIL1 evidence: [C2.3a KAT in nx_chem_valence_test.nx; NIST WebBook reference values] verdict: BENCH-PENDING

dependencies 2 imports · 16 importers

nx_chem.nx nx_chem_molecule.nx nx_chem_valence.nx nx_chem_adulterant_db.nx nx_chem_adulterant_db_test.nx nx_chem_descriptors.nx nx_chem_descriptors_test.nx nx_chem_isotope_pattern_test.nx nx_chem_mass_test.nx nx_chem_peak_list_test.nx nx_chem_report_csv_test.nx nx_chem_report_json_test.nx nx_chem_sildenafil_probe_test.nx

diagram shows first 10 each side; +0 more imports, +6 more importers in the complete lists below.

imports: nx_chem.nxnx_chem_molecule.nx

imported by: nx_chem_adulterant_db.nxnx_chem_adulterant_db_test.nxnx_chem_descriptors.nxnx_chem_descriptors_test.nxnx_chem_isotope_pattern_test.nxnx_chem_mass_test.nxnx_chem_peak_list_test.nxnx_chem_report_csv_test.nxnx_chem_report_json_test.nxnx_chem_sildenafil_probe_test.nxnx_chem_tadalafil_probe_test.nxnx_chem_valence_test.nxnx_supplement.nxnx_supplement_batch.nxnx_supplement_check.nxnx_supplement_csv.nx

structs

none

consts

none

functions

33func nx_chem_default_valence(z: nx_int) -> nx_int
58func nx_chem_atom_bond_summary(
105func nx_chem_compute_implicit_h(m: *MolGraph) -> nx_int
154func nx_chem_mol_weight_q3(m: *MolGraph, table: *Element) -> nx_int
180func nx_chem_mol_heavy_atom_count(m: *MolGraph) -> nx_int
194func nx_chem_mol_h_count_total(m: *MolGraph) -> nx_int