Skip to content

PBPK summary(): printed t1/2 = ln2*Vss/CL is 37-56% below the model's terminal half-life #4

Open

Description

@MikeMike88

DerivedParams.half_life_h returns ln2 * Vss / CL, and summary() prints it as "t1/2". That equals the elimination half-life only for a one-compartment model. For this whole-body model it is not the terminal half-life of the model itself, which is set by the slowest eigenvalue of M.

The number appears in docs/validation_body.md and docs/validation_body.json as "t1/2 ~2.6 h" (bottom-up) and "~2.4 h" (middle-out).

Reproduce (main)

import numpy as np
from vh.body import MIDAZOLAM, PBPKModel, reference_individual

m = PBPKModel(MIDAZOLAM, reference_individual("male"))
sinks = ("elim_hepatic", "elim_renal", "elim_gut_wall", "feces")
keep = [i for i, n in enumerate(m.names) if n not in sinks]
A = m.M[np.ix_(keep, keep)]
lam, W = np.linalg.eig(A)
k = np.argmax(lam.real)                      # slowest mode (eigenvalue closest to 0)
print("summary() t1/2 = ln2*Vss/CL : %.2f h" % m.p.half_life_h)
print("terminal t1/2 of the model  : %.2f h" % (np.log(2) / -lam[k].real))
w = np.abs(W[:, k].real) / np.abs(W[:, k].real).sum()
print("terminal mode lives in       :", {m.names[keep[i]]: round(float(w[i]), 2) for i in np.argsort(-w)[:3]})
summary() t1/2 = ln2*Vss/CL : 2.61 h
terminal t1/2 of the model  : 4.14 h
terminal mode lives in       : {'adipose': 0.71, 'muscle': 0.11, 'skin': 0.05}

So the printed value is 37% below the model's own terminal half-life. Across sample_population(200, seed=0) the gap reaches 56%. The terminal exponential carries 91% of the IV AUC(0, inf), and it is driven by redistribution out of adipose tissue.

This matters as soon as anyone compares the printed "t1/2" with a clinical terminal half-life. It is a different quantity: Vss/CL is the mean residence time, so ln2 * Vss/CL is an "effective" half-life.

Suggested fix

Either report the terminal half-life, ln2 / -max(Re eig(A)) on the non-sink block of M, or rename the current value to something like "effective t1/2 (ln2*Vss/CL)". Reporting both is probably the clearest option.

Smaller notes (not important for predictions)

All checked exactly from M (AUC = -e^T A^-1 x0, x_ss = -A^-1 u). Mass balance, F = fa*fg*fh and 1 - fa = (1 + ka/kt)^-7 match the matrix to 1e-15. The two remaining differences are far below inter-individual variability:

  • cl_total_plasma_l_h is 8e-5 high. Renal loss is taken from kidney tissue, so it is flow-limited by Q_k / (Q_k + CL_r/bp).
  • vss_l is 0.5% high. At steady state, the liver and kidney sit below Kp * Cp by their extraction ratios.

The exact closed forms CL = bp (Q_h E_h + Q_k E_k) and Vss = sum Kp V - Kp_liver V_liver E_h - Kp_kidney V_kidney E_k + V_blood bp, with E = k / (Q + k), match M to 7e-15. One consequence for testing: test_iv_auc_equals_dose_over_clearance uses rel=0.01 with trapezoid AUC, and that tolerance also absorbs a 0.6% trapezoid bias from the bolus spike. An exact AUC from M would let that test check the matrix assembly to ~1e-12, as its docstring intends.

Activity

  1. rohanarun commented on Nov 10, 2026

    @rohanarun
    Owner

    I reproduced this on current main. For reference-male midazolam, the summary prints about 2.6 h, while fitting the terminal slope of the simulated IV plasma curve gives 4.14 h. The updated labels in #5 correctly distinguish those two quantities for that case.

    The new eigenvalue calculation still includes the stomach and intestinal transit states, which an IV dose never reaches. In a fast-clearance test, #5 reports 0.329 h, while the simulated IV plasma curve gives 0.045 h. The IV calculation needs to use the compartments reachable from the dose that contribute to the plasma signal. I posted the full repro on #5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions