AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
MOLECULE ONTOLOGY — KIRETH SEMANTIC LIBRARY
Version: 1.1 | Date: 2026-10-12
Authors: Mark Higgins — Sky (Recursive AI)
Source: https://kirethresearch.org/booksai-core/entity-graph/physical-entities/chemical-entities/molecule-ontology.html
Status: Scientific synthesis; source page not independently verified.
01. PURPOSE
Represent molecules as chemically defined assemblies of nuclei and electrons, with explicit composition, bonding, structure, charge, state, provenance, and uncertainty.
02. TYPES
TYPE ChemicalEntity
TYPE Atom <: ChemicalEntity
TYPE Molecule <: ChemicalEntity
TYPE MolecularIon <: ChemicalEntity
TYPE ChemicalElement
TYPE Isotope
TYPE ChemicalBond
TYPE MolecularGraph
TYPE MolecularFormula
TYPE MolecularGeometry
TYPE ElectronicState
TYPE Conformer
TYPE Isomer
TYPE Reaction
TYPE Measurement
TYPE Evidence
TYPE Context
03. ENTITY SCHEMA
Molecule(id, formula, atoms, bonds, charge, electronic_state, geometry, context)
Atom(id, element, isotope?, formal_charge?, atom_map?)
Bond(atom_a, atom_b, order?, kind?, evidence?)
All identifiers are scoped and unique within the represented graph.
04. DEFINITIONS
Molecule(m) := a chemically bound assembly of two or more atoms, or a molecular entity as explicitly defined by a domain convention.
MolecularIon(m) := molecular entity with net nonzero electric charge.
MolecularGraph(m) := (V,E) where V are atomic sites and E are modelled bonds.
ChemicalFormula(m) := multiset of element symbols and stoichiometric counts.
NOTE: Molecular graph is a representation; not a complete quantum-mechanical description.
05. RELATIONSHIPS
HAS_ATOM(Molecule, Atom)
HAS_BOND(Molecule, ChemicalBond)
HAS_FORMULA(Molecule, MolecularFormula)
HAS_GEOMETRY(Molecule, MolecularGeometry)
HAS_CONFORMER(Molecule, Conformer)
HAS_ELECTRONIC_STATE(Molecule, ElectronicState)
IS_ISOMER_OF(Molecule, Molecule)
PARTICIPATES_IN(Molecule, Reaction)
SUPPORTED_BY(Claim, Evidence)
06. FORMAL COMPOSITION
V(m) = {a_1,...,a_n}; n >= 2 for the conventional polyatomic molecule model.
N_X(m) = sum_{a in V(m)} 1[element(a)=X].
Formula(m) = product_X X^{N_X(m)} (canonical ordering is a formatting convention).
Total nuclear charge Z_tot = sum_a Z(a).
Net electric charge q/e = Z_tot - N_e (for integer electron count N_e).
07. BONDING
Bond order can be integer, fractional, aromatic, or model-dependent.
Covalent, coordinate, and delocalised descriptions may coexist across models.
Do not infer a unique bond order solely from atom proximity.
08. STRUCTURAL IDENTITY
Same molecular formula does not imply same connectivity.
Same connectivity does not imply same stereochemistry.
Same stereochemical identity does not imply same conformation.
An identifier must declare its identity granularity.
09. ISOMERISM
ConstitutionalIsomer(a,b) if formula(a)=formula(b) and connectivity differs.
Stereoisomer(a,b) if connectivity matches but spatial arrangement differs under a stated model.
Conformers differ by accessible molecular geometry without necessarily changing connectivity.
10. GEOMETRY
Geometry = {r_i in R^3} in a chosen coordinate frame and measurement/model context.
BondLength(i,j) = ||r_i-r_j||.
BondAngle(i,j,k) = arccos(((r_i-r_j)·(r_k-r_j))/(||r_i-r_j|| ||r_k-r_j||)).
Undefined if any denominator is zero.
11. MASS
Molecular mass for specified isotopic composition = sum_i mass(atom_i) minus binding-energy equivalent when required by precision.
Relative molecular mass for a formula commonly uses standard atomic weights and is composition-dependent.
Do not conflate nominal, monoisotopic, average, and exact masses.
12. CHARGE AND ELECTRONS
Formal charge is a bookkeeping convention; partial charge depends on method.
Sum of atomic formal charges equals molecular formal charge for a consistent Lewis representation.
Electron count must respect nuclear charge and total ionic charge.
13. ELECTRONIC STATES
ElectronicState(m) includes multiplicity, excitation, and relevant quantum numbers.
Ground and excited states are not interchangeable.
Spin multiplicity = 2S+1 where total spin S is well-defined.
14. REACTION TRANSFORMATION
Reaction: multiset(Reactants) -> multiset(Products), with conditions.
For ordinary chemical reactions, elemental atom counts and total electric charge are conserved.
A balanced equation alone does not establish mechanism or kinetic feasibility.
15. INFERENCE RULES
R1: HAS_ATOM(m,a) AND ELEMENT(a,X) => CONTAINS_ELEMENT(m,X).
R2: COUNT_ATOMS(m,X,k) => FORMULA_COUNT(m,X,k), if graph is complete.
R3: FORMULA(a)=FORMULA(b) AND CONNECTIVITY(a)!=CONNECTIVITY(b) => CONSTITUTIONAL_ISOMER(a,b), when identity is resolved.
R4: MOLECULAR_ION(m) AND CHARGE(m,q) => q != 0.
R5: BALANCED_REACTION(r) => ELEMENT_COUNTS_EQUAL(r) AND CHARGES_EQUAL(r), within stated scope.
R6: SAME_FORMULA(a,b) does NOT imply SAME_MOLECULE(a,b).
16. EXAMPLE — WATER
Atoms: O_1, H_1, H_2.
Bonds: O_1-H_1; O_1-H_2.
Formula: H2O; net charge 0; ground-state geometry approximately bent.
O-H bond length and H-O-H angle depend on physical state and measurement/model conditions.
17. EXAMPLE — ETHANOL / DIMETHYL ETHER
Both have formula C2H6O.
Ethanol connectivity: CH3-CH2-OH.
Dimethyl ether connectivity: CH3-O-CH3.
Therefore they are constitutional isomers, not identical molecules.
18. EXAMPLE — AMMONIUM
NH4+ is a polyatomic cation, modelled as MolecularIon.
Nuclear charge = 7 + 4(1) = 11.
Electron count = 11 - 1 = 10.
19. VALIDATION
V1: Atom IDs are unique within molecule graph.
V2: Every bond endpoint references an existing atom.
V3: Formula counts match atoms for a complete structure.
V4: Formal charges sum to declared molecular charge when supplied.
V5: Isotopic labels are chemically valid and explicitly scoped.
V6: Coordinates declare units, frame, and provenance.
V7: Stereochemical claims require adequate stereochemical specification.
V8: Reaction atom and charge balances are checked separately.
V9: Unknown properties remain unknown rather than fabricated.
20. SEMANTIC EQUIVALENCE
Equivalent labels: 'molecular entity' and 'molecule' only when domain definitions align.
MolecularFormula equivalence is weaker than MolecularGraph equivalence.
Graph equivalence is weaker than fully specified stereochemical and electronic-state identity.
Equivalence requires declared scope, method, and identity granularity.
21. CONFIDENCE
CONFIDENCE(claim) in [0,1] when calibrated evidence is available.
Distinguish measured, computed, inferred, hypothetical, and disputed claims.
Never assign numerical certainty without evidence or a stated calibration method.
22. PROVENANCE
Record source URI, retrieval date if fetched, method, conditions, instrument/model, uncertainty, and version.
Claims based on idealised models must identify the approximation.
23. FLOW HASH
FLOW_HASH := SHA-256(canonical UTF-8 representation of versioned flow content).
Hash value must be computed after finalisation; no invented hash is supplied.
24. UPDATE MODEL
Changes to definitions, identifiers, evidence, or relationships increment revision.
Preserve previous versions and migration mapping where identity rules change.
Revalidate dependent assertions and derived graph edges after updates.
25. AI CONSUMPTION
Input: typed molecular assertions, evidence, context, requested reasoning task.
Process: parse -> validate -> normalise -> infer -> check constraints -> annotate provenance.
Output: typed claims with supporting rules, uncertainty, and unresolved assumptions.
Reject unsupported claims of unique molecular identity from formula alone.
26. LIMITATIONS
A molecular graph omits many-body wavefunctions, dynamic solvent effects, and some bonding phenomena.
Isolated molecule, condensed phase, crystal, and reactive intermediate require different contexts.
Classifications are model-dependent for unusual clusters and extended materials.
27. COMPLETENESS CHECK
Sections 01–27 present.
Core definitions, typed relations, equations, examples, inference, validation, equivalence, confidence, hash, update, and AI consumption present.
END FLOW ALGEBRA — MOLECULE ONTOLOGY