1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//! Rasayan — Biochemistry Engine
//!
//! **Rasayan** (Sanskrit: रसायन — alchemy, chemistry of life) provides
//! computational models of biochemistry for the AGNOS ecosystem. Enzyme
//! kinetics, metabolic pathways, signal transduction, protein structure,
//! membrane transport, and bioenergetics.
//!
//! # Architecture
//!
//! Twenty-two core modules (plus optional `logging`):
//!
//! - [`enzyme`] — Michaelis-Menten kinetics, competitive/uncompetitive/mixed
//! inhibition, substrate inhibition, allosteric regulation (Hill equation),
//! reversible reactions (Haldane), multi-substrate kinetics (ping-pong,
//! sequential), temperature dependence (Arrhenius, Q10), linearization
//! transforms (Lineweaver-Burk, Eadie-Hofstee), enzyme database.
//! - [`metabolism`] — Metabolic state: ATP/ADP balance, energy charge,
//! aerobic/anaerobic yield, oxygen-dependent ATP regeneration, metabolic rate.
//! - [`signal`] — Signal transduction: ligand-receptor binding, dose-response
//! (Hill function), second messengers (cAMP, Ca2+, IP3), Gs/Gq/Gi pathway
//! activation, messenger decay.
//! - [`protein`] — Protein structure primitives: 20 amino acid properties
//! (molecular weight, hydrophobicity, pKa), sequence molecular weight,
//! composition analysis.
//! - [`neurotransmitter`] — Neurotransmitter synthesis: serotonin (TPH),
//! dopamine (TH), norepinephrine (DBH), GABA (GAD), glutamate, ACh (ChAT),
//! endorphins (POMC). Bridge functions for mastishk/bhava.
//! - [`hormonal`] — Hormonal pathways: HPA axis cortisol (CRH→ACTH→cortisol,
//! negative feedback), melatonin (serotonin→melatonin, light suppression),
//! oxytocin, BDNF. Bridge functions for bhava.
//! - [`pathway`] — Metabolic network: unified simulation connecting all
//! pathways with shared cofactor pools, steady-state flux analysis,
//! respiratory quotient.
//! - [`membrane`] — Membrane transport: Nernst potential, Goldman-Hodgkin-Katz
//! equation, Fick's first law diffusion, ionic state.
//! - [`glycolysis`] — 10-step glycolytic pathway with individual enzyme kinetics,
//! regulatory checkpoints (hexokinase, PFK, pyruvate kinase), configurable
//! parameters, and per-tick ATP/NADH flux accounting.
//! - [`tca`] — TCA (Krebs) cycle: pyruvate dehydrogenase + 8 cycle steps,
//! regulatory checkpoints (citrate synthase, isocitrate DH, α-KG DH),
//! NADH/FADH2/GTP/CO2 flux output.
//! - [`etc`] — Electron transport chain: complexes I-IV, ATP synthase, proton
//! motive force, respiratory control, ubiquinone and cytochrome c carrier pools.
//! - [`amino_catabolism`] — Amino acid catabolism: transamination,
//! oxidative deamination (GDH), carbon skeleton routing to TCA entry
//! points, NH4+ clearance.
//! - [`beta_oxidation`] — Fatty acid beta-oxidation: acyl-CoA activation,
//! CPT-I malonyl-CoA regulation, spiral producing acetyl-CoA/NADH/FADH2.
//! - [`energy`] — Bioenergetics: ATP hydrolysis, phosphocreatine system,
//! anaerobic/aerobic thresholds, metabolic equivalent (MET).
//! - [`constants`] — Shared physical constants (gas constant, Faraday constant).
//!
//! # Relationship to Other Crates
//!
//! ```text
//! rasayan (this) — enzyme kinetics, metabolism, signal transduction
//! | metabolic state feeds into
//! mastishk — neuroscience (neurotransmitter synthesis depends on precursors)
//! | neurotransmitter levels feed into
//! bhava — emotion/personality
//! also:
//! kimiya — general chemistry (rasayan uses reaction kinetics from kimiya)
//! jivanu — microbiology (microbial metabolism, pharmacokinetics)
//! sharira — physiology (muscle bioenergetics, fatigue)
//! ```
pub use RasayanError;