PBPK Models

Physiologically-based pharmacokinetic (PBPK) model building blocks.

Base class

class openpkpd.pk.pbpk.PBPKModel[source]

Bases: PKSubroutine

Base class for PBPK models.

Wraps ADVAN6 (generic ODE solver) with organ-specific compartment naming. Subclasses define compartment_names and the DES callable describing inter-organ blood flow and metabolic/elimination processes.

compartment_names

Ordered list of compartment names (length must equal the number of ODEs in the DES block).

output_compartment

Name of the compartment used to compute IPRED. Must appear in compartment_names.

output_compartment_name: str = 'central'
__init__()[source]
Return type:

None

compartment_index(name)[source]

Return the 1-based compartment index for the given organ name.

Return type:

int

Parameters:

name (str)

solve(pk_params, dose_events, obs_times, pk_callable=None, des_callable=None)[source]

Solve the PBPK model ODE system via ADVAN6.

The des_callable must define dA(n)/dt for each compartment in the order specified by compartment_names.

IPRED is extracted from compartment output_compartment_name divided by pk_params[‘V’] (or ‘V_central’) if present.

Return type:

PKSolution

Parameters:
apply_trans(pk_params, trans=1)[source]

PBPK models use TRANS1 (micro-parameters directly).

Return type:

dict

Parameters:

Five-organ template

class openpkpd.pk.pbpk.FiveOrganPBPK[source]

Bases: PBPKModel

Five-organ human PBPK template.

Organs (compartments in order):

0: lung 1: liver 2: kidney 3: gut 4: central (blood / plasma)

Typical parameters (all flows in L/h, volumes in L):

Q_lung, Q_liver, Q_kidney, Q_gut — organ blood flows V_lung, V_liver, V_kidney, V_gut, V_central — organ volumes CL_liver, CL_kidney — metabolic clearances Kp_lung, Kp_liver, Kp_kidney, Kp_gut — tissue:plasma partitioning

DES example (to be compiled and passed as des_callable):

DADT(1) = Q_lung  * (C_central - A(1)/V_lung  / Kp_lung)   ; lung
DADT(2) = Q_liver * (C_central - A(2)/V_liver / Kp_liver) - CL_liver*(A(2)/V_liver)
DADT(3) = Q_kidney*(C_central - A(3)/V_kidney/ Kp_kidney)- CL_kidney*(A(3)/V_kidney)
DADT(4) = Q_gut   * (C_central - A(4)/V_gut   / Kp_gut)
DADT(5) = -(Q_lung+Q_liver+Q_kidney+Q_gut)*C_central \
          + Q_lung*(A(1)/V_lung/Kp_lung) \
          + Q_liver*(A(2)/V_liver/Kp_liver) \
          + Q_kidney*(A(3)/V_kidney/Kp_kidney) \
          + Q_gut*(A(4)/V_gut/Kp_gut)

where C_central = A(5) / V_central.

compartment_names: list[str] = ['lung', 'liver', 'kidney', 'gut', 'central']
output_compartment_name: str = 'central'

Usage

from openpkpd.pk.pbpk import FiveOrganPBPK

model = FiveOrganPBPK(
    organs=["gut", "liver", "lung", "kidney", "muscle"],
    blood_flow_fractions={"gut": 0.18, "liver": 0.065, "lung": 1.0,
                          "kidney": 0.19, "muscle": 0.16},
    tissue_volumes={"gut": 1.2, "liver": 1.8, "lung": 1.0,
                    "kidney": 0.3, "muscle": 35.0},
    cardiac_output=5.0,  # L/min
)

See examples/22_pbpk_model.py for a full end-to-end example.