Skip to main content

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/
  • Sourceapps/zeq-me/public/apps/_in-development/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.

The anonymous playground takes a domain plus named inputs and lets the seven-step wizard pick the operators (always KO42 + the domain fit). It returns a sealed envelope:

curl -s -X POST https://zeqsdk.com/api/playground/compute \
-H "Content-Type: application/json" \
-d '{
"domain": "pharmacokinetics",
"inputs": { "dose": 500, "volume": 10, "volume_peripheral": 30, "time": 2 }
}' | jq

The response carries value, unit, the operators the wizard chose, the equations it evaluated, and a zeqProof digest. Compare the returned value against the published two-compartment plasma concentration (C ≈ 26.8 mg/L at t = 2 h) yourself — the platform hands you a result any node can recompute, not a printed figure to trust.


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.