ADAPT-5 code for model in Figure-2
**********************************************************************
C ADAPT *
C Version 5 *
C**********************************************************************
C *
C MODEL *
C *
C This file contains Fortran subroutines into which the user *
C must enter the relevant model equations and constants. *
C Consult the User's Guide for details concerning the format for *
C entered equations and definition of symbols. *
C *
C 1. Symbol- Parameter symbols and model constants *
C 2. DiffEq- System differential equations *
C 3. Output- System output equations *
C 4. Varmod- Error variance model equations *
C 5. Covmod- Covariate model equations (ITS,MLEM) *
C 6. Popinit- Population parameter initial values (ITS,MLEM) *
C 7. Prior - Parameter mean and covariance values (ID,NPD,STS) *
C 8. Sparam- Secondary parameters *
C 9. Amat - System state matrix *
C *
C**********************************************************************
C######################################################################C
Subroutine SYMBOL
Implicit None
Include 'globals.inc'
Include 'model.inc'
CC
C------C
C Enter as Indicated C
C----c------C
NDEqs = 3 ! Enter # of Diff. Eqs.
NSParam = 6 ! Enter # of System Parameters.
NVparam = 2 ! Enter # of Variance Parameters.
NSecPar = 1 ! Enter # of Secondary Parameters.
NSecOut = 0 ! Enter # of Secondary Outputs (not used).
Ieqsol = 1 ! Model type: 1 - DIFFEQ, 2 - AMAT, 3 - OUTPUT only.
Descr = ' Minimal-PBPK with two tissue compartments '
CC
C------C
C Enter Symbol for Each System Parameter (eg. Psym(1)='Kel') C
C----c------C
Psym(1)='f1'
Psym(2)='f2'
Psym(3)='Kp1'
Psym(4)='Kp2'
Psym(5)='CL'
Psym(6)='V1'
CC
C------C
C Enter Symbol for Each Variance Parameter {eg: PVsym(1)='Sigma'} C
C----c------C
PVsym(1)='intercept'
PVsym(2)='slope'
CC
C------C
C Enter Symbol for Each Secondary Parameter {eg: PSsym(1)='CLt'} C
C----c------C
PSsym(1)='Vss'
C------C
C------C
C
Return
End
C######################################################################C
Subroutine DIFFEQ(T,X,XP)
Implicit None
Include 'globals.inc'
Include 'model.inc'
Real*8 T,X(MaxNDE),XP(MaxNDE),Qco,Kp1,Kp2,f1,f2,V1,V2,Vp,BW,CL,f
Real*8 ECF
CC
C------C
C Enter Differential Equations Below {e.g. XP(1) = -P(1)*X(1) } C
C----c------C
f1 = P(1)
f2 = P(2)
Kp1 = P(3)
Kp2 = P(4)
CL = P(4)
V1 = P(5)
CC----ECF is Extracelluar fluid------
ECF = 18.200
V2 = ECF-V1-Vp
CC----Cp is blood concentration---
Vp = 5.200
BW = 70
cc----Oco is cardiac output------
Qco = 5.600
f = f1+f2
c----blood compartment-----
IF(f .gt. 1) then
XP(1) = 0
else
XP(1) = R(1)+ f1*Qco*X(2)/Kp1 + f2*Qco*X(3)/Kp2 -
c (f1*Qco+f2*Qco+CL)*X(1)/Vp
endif
c----Tissue Compartment 1------
XP(2) = (f1*Qco*X(1)/Vp - f1*Qco* X(2)/Kp1)/V1
c----Tissue Compartment 2-----
XP(3) = (f2*Qco*X(1)/Vp - f2*Qco* X(3)/Kp2)/V2
C------C
C------C
C
Return
End
C######################################################################C
Subroutine OUTPUT(Y,T,X)
Implicit None
Include 'globals.inc'
Include 'model.inc'
Real*8 Y(MaxNOE),T,X(MaxNDE),Vp
CC
C------C
C Enter Output Equations Below {e.g. Y(1) = X(1)/P(2) } C
C----c------C
Vp = 5.200
Y(1) = X(1)/Vp
C------C
C------C
C
Return
End
C######################################################################C
Subroutine VARMOD(V,T,X,Y)
Implicit None
Include 'globals.inc'
Include 'model.inc'
Real*8 V(MaxNOE),T,X(MaxNDE),Y(MaxNOE)
CC
C------C
C Enter Variance Model Equations Below C
C {e.g. V(1) = (PV(1) + PV(2)*Y(1))**2 } C
C----c------C
V(1) = (PV(1) + PV(2)*Y(1))**2
C------C
C------C
C
Return
End
C######################################################################C
Subroutine COVMOD(Pmean, ICmean, PC)
C Defines any covariate model equations (MLEM, ITS)
Implicit None
Include 'globals.inc'
Include 'model.inc'
Real*8 PC(MaxNCP)
Real*8 Pmean(MaxNSP+MaxNDE), ICmean(MaxNDE)
CC
C------C
C Enter # of Covariate Parameters C
C----c------C
NCparam = 0 ! Enter # of Covariate Parameters.
CC
C------C
C Enter Symbol for Covariate Params {eg: PCsym(1)='CLRenal'} C
C----c------C
CC
C------C
C For the Model Params. that Depend on Covariates Enter the Equation C
C {e.g. Pmean(1) = PC(1)*R(2) } C
C----c------C
C------C
C------C
C
Return
End
C######################################################################C
Subroutine POPINIT(PmeanI,ICmeanI,PcovI,ICcovI, PCI)
C Initial parameter values for population program parameters (ITS, MLEM)
Implicit None
Include 'globals.inc'
Include 'model.inc'
Integer I,J
Real*8 PmeanI(MaxNSP+MaxNDE), ICmeanI(MaxNDE)
Real*8 PcovI(MaxNSP+MaxNDE,MaxNSP+MaxNDE), ICcovI(MaxNDE,MaxNDE)
Real*8 PCI(MaxNCP)
CC
C------C
C Enter Initial Values for Population Means C
C { e.g. PmeanI(1) = 10.0 } C
C----c------C
CC
C------C
C Enter Initial Values for Pop. Covariance Matrix (Lower Triang.) C
C { e.g. PcovI(2,1) = 0.25 } C
C----c------C
CC
C------C
C Enter Values for Covariate Model Parameters C
C { e.g. PCI(1) = 2.0 } C
C----c------C
C------C
C------C
C
Return
End
C######################################################################C
Subroutine PRIOR(Pmean,Pcov,ICmean,ICcov)
C Parameter mean and covariance values for MAP estimation (ID,NPD,STS)
Implicit None
Include 'globals.inc'
Include 'model.inc'
Integer I,J
Real*8 Pmean(MaxNSP+MaxNDE), ICmean(MaxNDE)
Real*8 Pcov(MaxNSP+MaxNDE,MaxNSP+MaxNDE), ICcov(MaxNDE,MaxNDE)
CC
C------C
C Enter Nonzero Elements of Prior Mean Vector C
C { e.g. Pmean(1) = 10.0 } C
C----c------C
CC
C------C
C Enter Nonzero Elements of Covariance Matrix (Lower Triang.) C
C { e.g. Pcov(2,1) = 0.25 } C
C----c------C
C------C
C------C
C
Return
End
C######################################################################C
Subroutine SPARAM(PS,P,IC)
Implicit None
Include 'globals.inc'
Real*8 PS(MaxNSECP), P(MaxNSP+MaxNDE), IC(MaxNDE)
Real*8 Kp1,Kp2,V1,V2,Vp,BW,ECF
CC
C------C
C Enter Equations Defining Secondary Paramters C
C { e.g. PS(1) = P(1)*P(2) } C
C----c------C
Kp1 = P(3)
Kp2 = P(4)
V1 = P(6)
CC----ECF is Extracelluar fluid------
ECF = 18.200
V2 = ECF-V1-Vp
CC----Cp is blood concentration---
Vp =5.200
PS(1) = Vp+Kp1*V1+Kp2*V2
C------C
C------C
C
Return
End
C######################################################################C
Subroutine AMAT(A)
Implicit None
Include 'globals.inc'
Include 'model.inc'
Integer I,J
Real*8 A(MaxNDE,MaxNDE)
DO I=1,Ndeqs
Do J=1,Ndeqs
A(I,J)=0.0D0
End Do
End Do
CC
C------C
C Enter non zero elements of state matrix {e.g. A(1,1) = -P(1) } C
C----c------C
C------C
C------C
C
Return
End
C######################################################################C
ADAPT-5 code for model in Figure-3
**********************************************************************
C ADAPT *
C Version 5 *
C**********************************************************************
C *
C MODEL *
C *
C This file contains Fortran subroutines into which the user *
C must enter the relevant model equations and constants. *
C Consult the User's Guide for details concerning the format for *
C entered equations and definition of symbols. *
C *
C 1. Symbol- Parameter symbols and model constants *
C 2. DiffEq- System differential equations *
C 3. Output- System output equations *
C 4. Varmod- Error variance model equations *
C 5. Covmod- Covariate model equations (ITS,MLEM) *
C 6. Popinit- Population parameter initial values (ITS,MLEM) *
C 7. Prior - Parameter mean and covariance values (ID,NPD,STS) *
C 8. Sparam- Secondary parameters *
C 9. Amat - System state matrix *
C *
C**********************************************************************
C######################################################################C
Subroutine SYMBOL
Implicit None
Include 'globals.inc'
Include 'model.inc'
CC
C------C
C Enter as Indicated C
C----c------C
NDEqs = 9 ! Enter # of Diff. Eqs.
NSParam = 8 ! Enter # of System Parameters.
NVparam = 2 ! Enter # of Variance Parameters.
NSecPar = 1 ! Enter # of Secondary Parameters.
NSecOut = 0 ! Enter # of Secondary Outputs (not used).
Ieqsol = 1 ! Model type: 1 - DIFFEQ, 2 - AMAT, 3 - OUTPUT only.
Descr = 'minimal-PBPK with hepatic compartment'
CC
C------C
C Enter Symbol for Each System Parameter (eg. Psym(1)='Kel') C
C----c------C
Psym(1)='f1'
Psym(2)='f2'
Psym(3)='Kp'
Psym(4)='CLint'
Psym(5)='V1'
Psym(6)='ka'
C-----—FG is pre-hepatic bioavailability------
Psym(7)='FG'
C-----—CLnh is non-hepatic clearance------
Psym(8)='CLnh'
CC
C------C
C Enter Symbol for Each Variance Parameter {eg: PVsym(1)='Sigma'} C
C----c------C
PVsym(1)='intercept'
PVsym(2)='slope'
CC
C------C
C Enter Symbol for Each Secondary Parameter {eg: PSsym(1)='CLt'} C
C----c------C
PSsym(1)='Vss'
C------C
C------C
C
Return
End
C######################################################################C
Subroutine DIFFEQ(T,X,XP)
Implicit None
Include 'globals.inc'
Include 'model.inc'
Real*8 T,X(MaxNDE),XP(MaxNDE),Qco,Kp,f1,f2,V1,V2,Vp,CLint,f
Real*8 BW,ka,FG,Q,VL,CLnh
CC
C------C
C Enter Differential Equations Below {e.g. XP(1) = -P(1)*X(1) } C
C----c------C
f1 = P(1)
f2 = P(2)
Kp = P(3)
CLint = P(4)
V1 = P(5)
ka = P(6)
FG = P(7)
CLnh = P(8)
CC----body weight-----
BW = 70
CC----Cp is blood concentration---
Vp = 5.200
V2 = BW-Vp-V1-VL
cc----Oco is cardiac output------
Qco = 5.600-Q
f = f1+f2
cc----Q is portal vein blood flow------
Q = 87/60
cc----VL is liver volume------
VL = 1.69
cc-----Oral------
CC---Drug Absorption compartment
XP(1) = -ka*X(1)
cc---Liver Compartment
XP(2) = ka*X(1)*FG + Q*X(3)-((X(2)/VL)/Kp)*Q
c -((X(2)/VL)/Kp)*CLint
c----blood compart-----
IF(f .gt. 1) then
XP(3) = 0
else
XP(3) = ((X(2)/VL)/Kp*Q+f1*Qco*X(4)/Kp + f2*Qco*X(5)/Kp -
c (f1*Qco+f2*Qco+Q+CLnh)*X(3))/Vp
endif
c----Compart1------
XP(4) = (f1*Qco*X(3) - f1*Qco* X(4)/Kp)/V1
c----Compart2-----
XP(5) = (f2*Qco*X(3) - f2*Qco* X(5)/Kp)/V2
ccc-----IV------
C----Liver compartment------
XP(6) = Q*X(7)/Vp - ((X(6)/VL)/Kp)*Q-((X(6)/VL)/Kp)*CLint
c----blood compart-----
IF(f .gt. 1) then
XP(7) = 0
else
XP(7) = R(1)+ f1*Qco*X(8)/Kp + f2*Qco*X(9)/Kp+((X(6)/VL)/Kp)
c *Q-(f1*Qco+f2*Qco+Q+CLnh)*X(7)/Vp
endif
c----tissue Compartment 1------
XP(8) = (f1*Qco*X(7)/Vp - f1*Qco* X(8)/Kp)/V1
c----tissue Compartment 2-----
XP(9) = (f2*Qco*X(7)/Vp - f2*Qco* X(9)/Kp)/V2
C------C
C------C
C
Return
End
C######################################################################C
Subroutine OUTPUT(Y,T,X)
Implicit None
Include 'globals.inc'
Include 'model.inc'
Real*8 Y(MaxNOE),T,X(MaxNDE),Vp
CC
C------C
C Enter Output Equations Below {e.g. Y(1) = X(1)/P(2) } C
C----c------C
Vp = 5.2
Y(1) = X(3)
Y(2) = X(7)/Vp
C------C
C------C
C
Return
End
C######################################################################C
Subroutine VARMOD(V,T,X,Y)
Implicit None
Include 'globals.inc'
Include 'model.inc'
Real*8 V(MaxNOE),T,X(MaxNDE),Y(MaxNOE)
CC
C------C
C Enter Variance Model Equations Below C
C {e.g. V(1) = (PV(1) + PV(2)*Y(1))**2 } C
C----c------C
V(1) = (PV(1) + PV(2)*Y(1))**2
V(2) = (PV(1) + PV(2)*Y(2))**2
C------C
C------C
C
Return
End
C######################################################################C
Subroutine COVMOD(Pmean, ICmean, PC)
C Defines any covariate model equations (MLEM, ITS)
Implicit None
Include 'globals.inc'
Include 'model.inc'
Real*8 PC(MaxNCP)
Real*8 Pmean(MaxNSP+MaxNDE), ICmean(MaxNDE)
CC
C------C
C Enter # of Covariate Parameters C
C----c------C
NCparam = 0 ! Enter # of Covariate Parameters.
CC
C------C
C Enter Symbol for Covariate Params {eg: PCsym(1)='CLRenal'} C
C----c------C
CC
C------C
C For the Model Params. that Depend on Covariates Enter the Equation C
C {e.g. Pmean(1) = PC(1)*R(2) } C
C----c------C
C------C
C------C
C
Return
End
C######################################################################C
Subroutine POPINIT(PmeanI,ICmeanI,PcovI,ICcovI, PCI)
C Initial parameter values for population program parameters (ITS, MLEM)
Implicit None
Include 'globals.inc'
Include 'model.inc'
Integer I,J
Real*8 PmeanI(MaxNSP+MaxNDE), ICmeanI(MaxNDE)
Real*8 PcovI(MaxNSP+MaxNDE,MaxNSP+MaxNDE), ICcovI(MaxNDE,MaxNDE)
Real*8 PCI(MaxNCP)
CC
C------C
C Enter Initial Values for Population Means C
C { e.g. PmeanI(1) = 10.0 } C
C----c------C
CC
C------C
C Enter Initial Values for Pop. Covariance Matrix (Lower Triang.) C
C { e.g. PcovI(2,1) = 0.25 } C
C----c------C
CC
C------C
C Enter Values for Covariate Model Parameters C
C { e.g. PCI(1) = 2.0 } C
C----c------C
C------C
C------C
C
Return
End
C######################################################################C
Subroutine PRIOR(Pmean,Pcov,ICmean,ICcov)
C Parameter mean and covariance values for MAP estimation (ID,NPD,STS)
Implicit None
Include 'globals.inc'
Include 'model.inc'
Integer I,J
Real*8 Pmean(MaxNSP+MaxNDE), ICmean(MaxNDE)
Real*8 Pcov(MaxNSP+MaxNDE,MaxNSP+MaxNDE), ICcov(MaxNDE,MaxNDE)
CC
C------C
C Enter Nonzero Elements of Prior Mean Vector C
C { e.g. Pmean(1) = 10.0 } C
C----c------C
CC
C------C
C Enter Nonzero Elements of Covariance Matrix (Lower Triang.) C
C { e.g. Pcov(2,1) = 0.25 } C
C----c------C
C------C
C------C
C
Return
End
C######################################################################C
Subroutine SPARAM(PS,P,IC)
Implicit None
Include 'globals.inc'
Real*8 PS(MaxNSECP), P(MaxNSP+MaxNDE), IC(MaxNDE)
Real*8 Qco,Kp,V1,V2,Vp,BW,CLint
CC
C------C
C Enter Equations Defining Secondary Paramters C
C { e.g. PS(1) = P(1)*P(2) } C
C----c------C
Kp = P(3)
CLint = P(4)
V1 = P(5)
BW = 70
V2 = BW-V1-Vp-1.69
Vp = 5.2
PS(1) = Vp+Kp*V1+Kp*V2
C------C
C------C
C
Return
End
C######################################################################C
Subroutine AMAT(A)
Implicit None
Include 'globals.inc'
Include 'model.inc'
Integer I,J
Real*8 A(MaxNDE,MaxNDE)
DO I=1,Ndeqs
Do J=1,Ndeqs
A(I,J)=0.0D0
End Do
End Do
CC
C------C
C Enter non zero elements of state matrix {e.g. A(1,1) = -P(1) } C
C----c------C
C------C
C------C
C
Return
End
C######################################################################C