code wiki / (root) / nx_chem_stereo_test.nx

nx_chem_stereo_test.nx

buildroot/runtime/nx_chem_stereo_test.nx

20272 B454 linesdepth 9pulls 11 transitivereach 0 importersview sourcekind gate/prooftopic chem
docsdependenciesstructsconstsfunctions

about

nx_chem_stereo_test.nx -- C2.3d KAT: stereo emit (@/@@ for atoms + /\ for bonds). Verifies the canonical emit preserves stereo markers stored during parse. C2.3d MVP: emits stored stereo verbatim (no parity correction for canonical-order rearrangement -- that's C2.3e with CIP rules). Round-trip property: parse -> emit canonical -> parse same molecule gives back the same stereo on atoms and bonds for molecules where canonical DFS direction matches input direction. expect_exit: 0 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_chem_molecule.nx nx_chem_smiles.nx nx_chem_smiles_emit.nx nx_chem_stereo_test.nx

imports: nx_chem_molecule.nxnx_chem_smiles.nxnx_chem_smiles_emit.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main a_atom_stereo_ccw parse_canonical nx_chem_parse_smiles nx_chem_mol_new smi_is_digit nx_chem_mol_atom nx_chem_mol_bond_add nx_chem_mol_bond smi_parse_bracket smi_is_digit ↻ smi_is_upper smi_is_lower smi_bracket_symbol_two_cha smi_bracket_symbol_single_ smi_aromatic_lower_to_z nx_chem_mol_atom_add smi_connect nx_chem_mol_atom ↻ nx_chem_mol_bond_add ↻ nx_chem_mol_bond ↻ smi_aromatic_lower_to_z ↻ smi_is_upper ↻ smi_organic_atom nx_chem_smiles_populate_st nx_chem_emit_canonical_smi nx_chem_morgan_canonical_r nx_chem_morgan_initial_inv nx_chem_morgan_densify_ini nx_chem_morgan_refine nx_chem_morgan_signature nx_chem_morgan_sort_indice nx_chem_morgan_sig_cmp nx_chem_emit_state_new nx_chem_emit_byte nx_chem_emit_prescan_canon nx_chem_emit_subtree nx_chem_emit_bond_marker nx_chem_emit_byte ↻ nx_chem_compute_stereo_par

structs

none

consts

none

functions

20func parse_canonical(src: *u8, n: nx_int, out: *u8, cap: nx_int, len: *nx_int) -> nx_int
27func buf_contains(buf: *u8, n: nx_int, byte_val: nx_int) -> nx_int
40func a_atom_stereo_ccw() -> nx_int
called by 1: main calls 2: parse_canonicalbuf_contains
58func b_atom_stereo_roundtrip() -> nx_int
88func c_atom_stereo_cw() -> nx_int
115func d_bond_stereo_up() -> nx_int
137func e_bond_stereo_down() -> nx_int
158func f_no_stereo_no_markers() -> nx_int
called by 1: main calls 2: parse_canonicalbuf_contains
175func g_bond_stereo_roundtrip() -> nx_int
208func h_bond_stereo_reverse_dfs() -> nx_int
255func i_bond_stereo_cis() -> nx_int
305func j_atom_stereo_parity_h_count() -> nx_int
354func k_atom_stereo_h0() -> nx_int
395func main() -> nx_exit