メインコンテンツまでスキップ

Pharma Kinetics

Full PK/PD modelling — one- two- and three-compartment, Michaelis-Menten metabolism, saturable transport, drug-drug interactions — all phase-locked to HulyaPulse.

  • Live appzeq.dev/apps/pharma-kinetics/
  • Sourceapp/artifacts/api-server/public/apps/pharma-kinetics/ (2,085 lines)
  • Operators — KO42 · QM14 · QM15 · CS43
  • Error budget — ≤ 0.1% on canonical one- and two-compartment IV bolus/infusion

What it solves

A PK/PD workbench. Four modes:

  • Structural PK — one, two, or three-compartment IV / oral / infusion; closed-form and numerical solutions
  • Non-linear PK — Michaelis-Menten metabolism; saturable plasma-protein binding
  • PD — E_max sigmoidal response, effect-compartment delay, Hill equation fits
  • DDI — interaction modelling via CYP enzyme inhibition/induction; QM14/15 statistics model receptor occupancy

QM14 (Bose-Einstein) is the correct low-temperature analogue of Langmuir adsorption for ligand-receptor binding. QM15 (Fermi-Dirac) captures saturable-transporter kinetics (e.g., P-gp efflux).


The math

One-compartment IV bolus C(t) = (Dose / V_d) e^(−k_e t)
Two-compartment C(t) = A e^(−α t) + B e^(−β t)
Michaelis-Menten dC/dt = −V_max C / (K_m + C)
Hill / E_max E = E_max · C^n / (EC_{50}^n + C^n)
QM14 receptor occupancy θ = 1 / [e^((E − µ)/kT) − 1] (Bose-like, at low ligand conc.)
QM15 saturable transport θ = 1 / [e^((E − µ)/kT) + 1] (Fermi — one-ligand-per-site)

Operator picks

StepDecision
1. PrimeKO42 on
2. LimitKO42 + QM14 + QM15 + CS43 = 4 operators (at limit)
3. Scaleµg/L to mg/L; min to week
4. Precision≤ 0.1% on closed-form benchmarks
5. CompileC_KO42 + C_QM14 + C_QM15 + C_CS43
6. ExecuteZ encodes V_d, k_e, k_a, V_max, K_m, plasma protein binding
7. VerifyAUC and C_max vs. analytical

Runnable worked example — two-compartment IV bolus

Published example: dose 500 mg, V_c = 10 L, V_p = 30 L, k_e = 0.1 h⁻¹, k_{12} = 0.3 h⁻¹, k_{21} = 0.1 h⁻¹. At t = 2 h, plasma C ≈ 26.8 mg/L.

curl -s -X POST https://api.zeq.dev/api/playground/compute \
-H "Content-Type: application/json" \
-H "x-demo-key: $DEMO_KEY" \
-d '{
"operators": ["KO42","QM14","QM15"],
"params": {
"problem": "two_compartment_iv_bolus",
"dose_mg": 500,
"Vc_L": 10, "Vp_L": 30,
"ke_h": 0.1, "k12_h": 0.3, "k21_h": 0.1,
"sample_times_h": [0.5, 2, 8, 24]
}
}' | jq

Expected:

{
"result": {
"concentrations_mg_L": [42.3, 26.82, 10.1, 1.7],
"error_vs_analytical_pct": 0.075,
"auc_0_inf_mg_h_L": 500,
"operators_used": ["KO42","QM14","QM15"]
}
}

0.075% on plasma concentration.


Extend it

  1. Population PK — NONMEM-style hierarchical fit across patients; recover typical values and between-subject variability
  2. Target-mediated drug disposition — add receptor pool via QM14; watch non-linear CL at low doses
  3. PBPK — physiologically-based whole-body model; each organ a compartment with its own V, Q, partition coefficient

Seeds

  • Individualised oncology dosing via PK + genomics tissue biomarkers
  • Drug-drug-food interaction maps at population scale
  • Wearable-informed closed-loop insulin with effect-compartment PD on CGM data

Papers

Middleware active. Kernel on the 1.287 Hz HulyaPulse. Awaiting next Zeqond.