Structural Model

The [structural_model] block specifies the pharmacokinetic model used to generate predictions.

Analytical PK Models

For standard compartmental models, use the pk keyword with a model function:

pk MODEL_NAME(param=VALUE, param=VALUE, ...)

Available Models

Model FunctionCompartmentsRouteRequired Parameters
one_cpt_iv_bolus1IV boluscl, v
one_cpt_oral1Oralcl, v, ka
one_cpt_infusion1IV infusioncl, v
two_cpt_iv_bolus2IV boluscl, v1, q, v2
two_cpt_oral2Oralcl, v1, q, v2, ka
two_cpt_infusion2IV infusioncl, v1, q, v2

Examples

One-compartment oral:

[structural_model]
  pk one_cpt_oral(cl=CL, v=V, ka=KA)

Two-compartment IV bolus:

[structural_model]
  pk two_cpt_iv_bolus(cl=CL, v1=V1, q=Q, v2=V2)

Two-compartment oral:

[structural_model]
  pk two_cpt_oral(cl=CL, v1=V1, q=Q, v2=V2, ka=KA)

Bioavailability

For oral models, bioavailability (F) defaults to 1.0. To estimate it, define an F parameter in [individual_parameters] -- it will be automatically used by the oral PK functions.

Dose Handling

Analytical models support:

  • Bolus doses: Instantaneous input (default when RATE=0 in data)
  • Infusions: Zero-order input (when RATE>0 in data)
  • Steady-state: Pre-computed steady-state concentrations (when SS=1 and II>0 in data)
  • Dose superposition: Multiple doses are handled by summing contributions from each dose event

Numerical Stability

The analytical solutions include special handling for:

  • Near-equal rate constants: When absorption and elimination rates are similar (KA ~ k), L'Hopital's rule is used to avoid division by zero
  • Two-compartment eigenvalues: Vieta's formula is used for robust computation of alpha and beta

ODE Models

For non-standard kinetics (e.g., saturable elimination), use the ODE specification:

[structural_model]
  ode(obs_cmt=COMPARTMENT_NAME, states=[state1, state2, ...])

See ODE Models for full ODE syntax.