Target Mediated Drug Disposition (TMDD)

Hi all. Just trying to understand TMDD model. Here is the attached code that I am sharing. I am able to capture the graph of a typical TMDD profile, but I don’t replicate the plots in the book (Gabrielson PK27), I have tried my best to construct the model, I would highly appreciate someone to go through my model and identify the flaw…!

pk27 = @model begin
   @param begin
       tvcl ∈ RealDomain(lower=0)
       tvkon ∈ RealDomain(lower=0)
       tvkoff ∈ RealDomain(lower=0)
       tvvc ∈ RealDomain(lower=0)
       tvvp ∈ RealDomain(lower=0)
       tvq ∈ RealDomain(lower=0)
       tvkout ∈ RealDomain(lower=0)
       tvkerl ∈ RealDomain(lower=0)
       tvkin ∈ RealDomain(lower=0)
       Ω ∈ PDiagDomain(9)
       σ ∈ RealDomain(lower=0)
       σ_prop ∈ RealDomain(lower=0)
   end

   @random begin
     η ~ MvNormal(Ω)
   end

   @pre begin
       cl = tvcl * exp(η[1])
       kon = tvkon * exp(η[2])
       koff  = tvkoff * exp(η[3])
       vc = tvvc * exp(η[4])
       vp = tvvp * exp(η[5])
       q = tvq * exp(η[6])
       kout = tvkout * exp(η[7])
       kerl = tvkerl * exp(η[8])
       kin = tvkin * exp(η[9])
       ro = kin/kout
   end
      ### I wanted to include ro = kin/kout in @init begin block, but when if do so,an error pops up saying ro not defined. So I had to define ro in the pre block! Why does that show up?


      ### Assuming my complex would be present in the central compartment, and it is the concentration of the complex, I use complex/vc in the equation !

    @dynamics begin
        Central' = - (cl/vc) * Central - (q/vc) * Central + (q/vp) * Peripheral - kon * (Central) * (ro) + koff * (Complex/vc)
        Peripheral' = (q/vc) * Central - (q/vp) * Peripheral
        Target' = kin - kout * (ro) - (kon) * Central * (ro) + koff * (Complex/vc)
        Complex' = kon * (Central) * (ro) - (koff)* (Complex/vc) - kerl * (Complex/vc)
   end

   @derived begin
       cp = @. Central/vc
       dv ~ @. Normal(cp,sqrt(cp^2*σ))
       target = @. Target
       complex = @. Complex

   end
end

Parameters

para = (  tvcl = 0.001,
          tvkon = 0.096 ,
          tvkoff = 0.001,
          tvvc = 0.05,
          tvvp = 0.100,
          tvq = 0.003,
          tvkout = 0.009,
          tvro = 12,
          tvkerl = 0.003,
          tvkin = 0.11,
          Ω = Diagonal([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]),
          σ_prop = 0.00,
          σ = 0.00)
evs1 = DosageRegimen(1.5,time=0,cmt=1)
S1 = Subject(id=1, evs=evs1)
evs2 = DosageRegimen(5,time=0,cmt=1)
S2 = Subject(id=2, evs=evs2)
evs3 = DosageRegimen(15,time=0,cmt=1)
S3 = Subject(id=3, evs=evs3)
evs4 = DosageRegimen(45,time=0,cmt=1)
S4 = Subject(id=4, evs=evs4)
population = Population([S1,S2,S3,S4])
obs1 = simobs(pk27,population,para,obstimes=0:0.1:500);
obs2 = simobs(pk27,population,para,obstimes=[0, 1, 10, 24, 72, 120, 168, 240, 360, 500])
obs3= simobs(pk27, population, para, obstimes=[0, 1, 5, 10, 10, 15, 20, 24, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 72, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 168, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, 240, 240, 245, 250, 255, 260, 265, 270, 275, 280, 285, 290, 295, 300, 305, 310, 315, 320, 325, 330, 335, 340, 345, 350, 355, 360, 360, 365, 370, 375, 380, 385, 390, 395, 400, 405, 410, 415, 420, 425, 430, 435, 440, 445, 450, 455, 460, 465, 470, 475, 480, 5, 490, 495, 500, 504])
df = DataFrame(obs1)
df1 = DataFrame(obs2)
df2 = DataFrame(obs3)
plot(obs1,yaxis=:log, yticks=[0.001,0.01,0.1,1,10,100,1000], ylims=(0.001,1000))
plot(obs2)
gr()
@df df plot(:time, :cp, yaxis=:log, yticks=[0.001,0.01,0.1,1,10,100,1000], ylims=(0.001,1000))
@df df plot!(:time, :target)
@df df plot!(:time, :complex)
@df df1 scatter!(:time, :target, color=[:blue])
@df df1 scatter!(:time, :complex, color=[:darkgreen])
@df df1 scatter!(:time, :cp, color=[:red])

image
image
image

Hi @Aishwarya

I slightly changed @dynamics block in your code as below.

        Central' = - (cl/vc) * Central - (q/vc) * Central + (q/vp) * Peripheral - kon * (Central) * (Target) + koff * (Complex*vc)
        Peripheral' = (q/vc) * Central - (q/vp) * Peripheral
        Target' = kin - kout * (Target) - (kon) * (Central/vc) * (Target) + koff * (Complex)
        Complex' = kon * (Central/vc) * (Target) - (koff)* (Complex) - kerl * (Complex)
  • Changed ro into Target because Target is dynamically changed, but ro is constant parameter.
  • Just make sure that unit of compartment and its parameters are well matched. I just changed to my preference. Central and Peripheral is amount, Target and Complex is concentration in my code.

For the target related parameters, you need two of three parameters (kin, kout, ro). And you have to initialize for Target compartment, not parameter ro. So @init block is as below.

  @init begin
          Target = ro
      end

where ro is defined in @pre block as ro = kin/kout. Or you can define directly in @init like this Target = kin/kout as you did in your original code.

I got the plots below. I don’t have textbook now so I’m not able to check this figure is similar to figure in the textbook. Please let me know if it’s not well matched.


4 Likes

Hey @wpark. Thanks for that detailed explanation. It gave me more clarity now.
And the plots are matching perfectly. Thanks for helping. :grinning:

@wpark may i know , why two compartments are in amount and remaining two in concentration?

@sai_matcha That was just my preference. Actually, it’s easy to understand to write these differential equations in concentration unit. But unit of dose is amount so it should be scaled before entering the central compartment. In Pumas, I tried bioav parameter for this purpose. In terms of simulation, it shows exactly same plot but I didn’t try if there is any difference between two differential equation model in estimation step. Following code is differential equations as concentration unit.

 @pre begin
       cl = tvcl * exp(η[1])
       kon = tvkon * exp(η[2])
       koff  = tvkoff * exp(η[3])
       vc = tvvc * exp(η[4])
       vp = tvvp * exp(η[5])
       q = tvq * exp(η[6])
       kout = tvkout * exp(η[7])
       kerl = tvkerl * exp(η[8])
       kin = tvkin * exp(η[9])
       ro = kin/kout
       bioav = 1/vc
   end

    @init begin
        Target = ro
      end

    @dynamics begin
        Central' = - (cl/vc) * Central - (q/vc) * Central + (q/vp) * Peripheral - kon * (Central) * (Target) + koff * (Complex)
        Peripheral' = (q/vc) * Central - (q/vp) * Peripheral
        Target' = kin - kout * (Target) - (kon) * (Central) * (Target) + koff * (Complex)
        Complex' = kon * (Central) * (Target) - (koff)* (Complex) - kerl * (Complex)
   end
1 Like