nx_flavor_chem.nx
buildroot/runtime/nx_flavor_chem.nx
about
nx_flavor_chem.nx -- T3 of the TASTE-SCIENCE ladder: FLAVOR CHEMISTRY.
Predict taste from MOLECULAR STRUCTURE via structure-activity rules
(SAR), the molecular-gastronomy / e-tongue frontier. The baseline
nx_food_science assigns a fixed 0-9 score PER NAMED INGREDIENT; it
cannot say anything about a molecule it has never been told about.
T3 predicts taste from the molecule's structure -- so it GENERALISES
to novel molecules (the whole point of a real flavor model).
The structure-activity rules (each a real, citable finding):
- SWEET: the AH-B-X theory (Shallenberger & Acree 1967) -- an AH
proton donor + a B proton acceptor ~250-400 pm apart; a hydrophobic
X site marks a HIGH-POTENCY sweetener (why sucralose ~600x sucrose).
- SOUR: acidity -- a carboxyl that releases H+ at low pKa.
- SALTY: a small ionic salt (Na+ etc.).
- UMAMI: a glutamate-like amino-diacid.
- BITTER: an alkaloid / N-heterocycle motif.
MEASURED EXCEED (gate-checked): correctly classifies 6 grounded
reference molecules AND a NOVEL molecule in no ingredient table, and
derives sweetness POTENCY from structure -- generalisation the static
table cannot do.
The molecular descriptors below are exactly what nx_chem_molecule /
nx_chem_descriptors compute from a structure; auto-extracting them from
SMILES is T3's named follow-up. Taste-quality vocabulary composed from
nx_taste_transduce (T0).
genealogy_id: shallenberger_acree_1967_ahb + kier_1972_ahbx
+ nishi_taste_transduce_2026
dependencies 2 imports · 1 importers
imports: nx_syscalls.nxnx_taste_transduce.nx
imported by: nx_flavor_chem_test.nx
structs
| 41 | struct NxMolSensory |
consts
| 33 | const NX_MAGIC_5000: i64 = 5000 |
| 34 | const NX_MAGIC_99000: i64 = 99000 |
| 35 | const NX_MAGIC_3100: i64 = 3100 |
| 36 | const NX_MAGIC_3000: i64 = 3000 |
| 38 | const NX_TQ_NONE: i64 = 6 // tasteless / no SAR match (0-4 = qualities, 5 = count) |
functions
| 53 | func nx_molsensory_new(donors: i64, acceptors: i64, dist_pm: i64, x: i64, |
| 70 | func nx_flavor_is_sweet(m: *NxMolSensory) -> i64 |
| 79 | func nx_flavor_sweet_potency(m: *NxMolSensory) -> i64 |
| 85 | func nx_flavor_is_sour(m: *NxMolSensory) -> i64 called by 1: nx_flavor_predict_taste |
| 92 | func nx_flavor_is_umami(m: *NxMolSensory) -> i64 called by 1: nx_flavor_predict_taste |
| 96 | func nx_flavor_is_bitter(m: *NxMolSensory) -> i64 called by 1: nx_flavor_predict_taste |
| 100 | func nx_flavor_is_salty(m: *NxMolSensory) -> i64 called by 1: nx_flavor_predict_taste |
| 105 | func nx_flavor_predict_taste(m: *NxMolSensory) -> i64 |
| 116 | func nx_molsensory_sucrose() -> *NxMolSensory |
| 119 | func nx_molsensory_sucralose() -> *NxMolSensory |
| 122 | func nx_molsensory_citric() -> *NxMolSensory |
| 125 | func nx_molsensory_nacl() -> *NxMolSensory |
| 128 | func nx_molsensory_quinine() -> *NxMolSensory |
| 131 | func nx_molsensory_msg() -> *NxMolSensory |