Skip to content

Commit

Permalink
simple phamacodynamic models
Browse files Browse the repository at this point in the history
  • Loading branch information
metelkin committed Sep 23, 2024
1 parent 4276f02 commit 7a38758
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 0 deletions.
41 changes: 41 additions & 0 deletions cases/0017/index0.heta
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
Create one compertement classic pharmacokinetic (PK) model for oral drug. Dose each 24 hours.
Use also pharacodynamic (PD) model with linear effects.
*/
// index.heta
t {units: hour};

// compartments
''' Central compartment volume '''
Vd @Compartment {units: litre} .= 5.5;

// species
''' Drug amount in gut compartment '''
A0 @Species {compartment: Vd, units: gram, isAmount: true} .= 0;
''' Drug amount in the central compartment '''
C1 @Species {compartment: Vd, units: gram/litre} .= 0;

// reactions
''' Drug absorption from the gut compartment (first-order law) '''
r0 @Reaction {actors: A0 => C1, units: gram/hour} := kabs * A0;
''' Drug elimination from the central compartment (first-order law) '''
r1 @Reaction {actors: => C1, units: gram/hour} := CL * C1;

// parameters
''' Drug clearance '''
CL @Const {units: litre/hour} = 1e-1;
''' Intravenous drug dose '''
Dose @Const {units: gram} = 1e-3;
''' Absorption rate constant '''
kabs @Const {units: 1/hour} = 1e-2;
''' Bioavailability '''
BA @Const {units: 1} = 0.9;

// Injection event
sw1 @TimeSwitcher { start: 0, period: 24 };
A0 [sw1]= BA * Dose;

// linear drug effect
''' Drug effect '''
E1 @Record {units: 1} := sens * C1;
sens @Const {units: 1/gram*litre} = 1e-1;
55 changes: 55 additions & 0 deletions cases/0018/index0.heta
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
Create one compertement classic pharmacokinetic (PK) model.
Use also pharacodynamic (PD) model with different effects: linear, Emax, sigmoidal (Hill), logarithmic.
*/
// index.heta
t {units: hour};

// compartments
''' Central compartment volume '''
Vd @Compartment {units: litre} .= 5.5;

// species
''' Drug amount in the central compartment '''
C1 @Species {compartment: Vd, units: gram/litre} .= 0;

// reactions
''' Drug elimination from the central compartment (first-order law) '''
r1 @Reaction {actors: => C1, units: gram/hour} := CL * C1;

// parameters
''' Drug clearance '''
CL @Const {units: litre/hour} = 1e-1;
''' Intravenous drug dose '''
Dose @Const {units: gram} = 1e-3;
''' Absorption rate constant '''
kabs @Const {units: 1/hour} = 1e-2;
''' Bioavailability '''
BA @Const {units: 1} = 0.9;

// Injection event
sw1 @TimeSwitcher { start: 0, period: 24 };
C1 [sw1]= Dose / Vd;

// drug effects

''' Linear Drug effect '''
E1 @Record {units: 1} := sens * C1;
sens @Const {units: 1/gram*litre} = 1e-1;

''' Emax Drug effect '''
E2 @Record {units: 1} := Emax_2 * C1 / (EC50_2 + C1);
Emax_2 @Const {units: 1} = 1;
EC50_2 @Const {units: gram/litre} = 1e-1;

''' Hill Drug effect '''
E3 @Record {units: 1} := Emax_3 * (C1 / EC50_3)^n / (1 + (C1 / EC50_3)^n);
n @Const {units: 1} = 2;
Emax_3 @Const {units: 1} = 1;
EC50_3 @Const {units: gram/litre} = 1e-1;

''' Logarithmic Drug effect '''
E4 @Record {units: 1} := a_4 + b_4 * log(C1 / EC50_4);
a_4 @Const {units: 1} = 1;
b_4 @Const {units: 1} = 1;
EC50_4 @Const {units: gram/litre} = 1e-1;

0 comments on commit 7a38758

Please sign in to comment.