Toolbox: tox
Toxicokinetics in relation to effects of chemicals on organisms and populations, i.e. on survival, body growth, reproduction, population growth.
The theory for the models can be found in:
Kooijman, S. A. L. M. and Bedaux, J. J. M. 1996.
The analysis of aquatic toxicity data.
VU University Press, Amsterdam.
Kooijman, S. A. L. M. 2010
Dynamic Energy and Mass Budgets theory for Metabolic Organisation.
Cambridge University Press.
Demo that runs:
 mydata_fomort:
effects on mortality of individuals
 mydata_algatox:
effects on nutrientlimited population growth of algae
These files are scriptfiles that illustrate the use of fomort
and algatox
.
Consult these scriptfiles for further explanation.
Meant to be used as subroutine for scsurv2
.
The name of the routine stands for firstorder mortality.
The function specifies the survival probability of blank individuals, that are exposed to a constant concentration of toxic compound.
The toxicokinetics is assumed to be of the firstorder type;
the hazard rate is assumed to be linear in the internal concentration.
Concentrations below the internal noeffect concentration do not affect survival.
The proportionality factor with which the hazard rate increases with concentration minus the noeffect concentration is called the killing rate.
The hazard rate in the blank is assumed to be constant.
Parameter interpretation:
 1/d, hazard rate in the blank (>0)
 M, NoEffectConcentration
 1/(d*M), killing rate
 1/d, elimination rate
An example of application of fomort in regression and plotting routines is given in the scriptfile mydata_fomort
.
Meant to be used as subroutine for scsurv2
.
Like fomort, but the no effect concentrations follows a log normal distribution.
Parameter interpretation:
 1/d, hazard rate in the blank (>0)
 M, NoEffectConcentration
 1/(d*M), killing rate
 1/d, elimination rate
 , scatter parameter for the NoEffectConcentration
The use is similar to fomort.
Meant to be used as subroutine for scsurv2
.
The name of the routine stands for firstorder mortality with effects on pH.
The model is identical to fomort
, except that the NEC and the killing rates depend on the pH, because the these parameters differ for the molecular and the ionic form.
Parameter interpretation:
 1/d, hazard rate in the blank
 M, NoEffectConcentration of molecular form
 1/(d*M), killing rate of molecular form
 1/d, elimination rate
 M, NoEffectConcentration of ionic form
 1/(d*M), killing rate of ionic form
 , ionproduct constant
An example of application of fomortph in regression and plotting routines is given in the scriptfile mydata_fomortph.
Notice that this model does not specify a response surface;
thus shsurv2
only works properly with option 'plotnr' = 1
.
Calculates the minus loglikelihood function for firstorder mortality, if timetodeath data are available for each individual.
The model is otherwise the same as in fomort
.
The toxicokinetics is assumed to be of the firstorder type;
the hazard rate is assumed to be linear in the internal concentration.
Concentrations below the internal noeffect concentration do not affect survival.
The proportionality factor with which the hazard rate increases with concentration minus the noeffect concentration is called the killing rate.
The hazard rate in the blank is assumed to be constant.
Input:
 (4,k)matrix with parameters. Parameter interpretation in first column:
 1/d, hazard rate in the blank (>0)
 M, NoEffectConcentration
 1/(d*M), killing rate
 1/d, elimination rate
 (n,2) or (n,3)matrix with in each row:
 time
 concentration
 indicator.
If it equals 1 the time is treated as timetodeath, otherwise it is treated as a time at which the subject is still alive.
Output:
 scalar with minus loglikelihood
An example of application of lfohaz in combination with nmmin
is given in the scriptfile mydata_fohaz
.
Meant to be used as subroutine for scsurv2
.
The name of the routine stands for firstorder mortality with a mixture of 2 compounds.
The function specifies the survival probability of blank individuals, that are exposed to a constant concentration of toxic compound.
The toxicokinetics is assumed to be of the firstorder type; the hazard rate is assumed to be linear in the internal concentration. The compounds compete for capacity to cancel effects.
The effective part, that exceeds to cancel capacity can interact at a rate that can be negetive, zero (independent action), or positive.
See further fomort
.
Parameter interpretation:
 1/d, hazard rate in the blank (>0)
 M, NoEffectConcentration for compound A
 M, NoEffectConcentration for compound B
 1/(d*M), killing rate for compound A
 1/(d*M), killing rate for compound B
 1/d, elimination rate for compound A
 1/d, elimination rate for compound B
 1/(d*M*M), interaction rate between A and B
An example of application of fomort in regression and plotting routines is given in the scriptfile mydata_fomort2.
Routine that specifies a model for effects on nutrientlimited alga growth, with three modes of action:
 partial killing of inoculum
 killing during growth
 increase of costs for growth
Instantaneous equilibrium is assumed for the internal concentration.
Growth is assumed to be nutrient limited, and the nutrient pool is exchanging with a pool that is not available to the algae.
Algal mass is measured in Optical Densities.
The contribution of living biomass, dead biomass and ghost biomass might differ.
The toxic compound can tranfer living into dead biomass, the dead biomass decays to ghost biomass according to a first order process.
The noeffectconc for the three effects are taken to be the same, but they might actually be different, however!
Input:
 (17,k)matrix with parameters values in the first column
 mM, background nutrient
 mM, initial nutrient conc
 mM, initial biomass
 OD/mM, weight of living in optical density (redundant par)
 OD/mM, weight of dead in optical density
 OD/mM, weight of ghosts in optical density
 mM, half saturation constant for nutrient
 mM/mM, yield of reserves on structure
 mM/(mM*h), max spec nutrient uptake rate
 1/h, reserve turnover rate
 1/h, exchange from nutrient to background
 1/h, exchange from background to nutrient
 1/h, dead biomass decay rate to ghost
 mM, noeffect concentration
 mM, tolerance conc for initial mortality
 mM, tolerance concentration for costs of growth
 1/(mM*h), spec killing rate
 vector with exposure times
 vector with concentrations of toxic compound
Output:
 matrix with Optical Densities
An example of application of fomort in regression and plotting routines is given in the scriptfile mydata_algatox
.
Calculates LC50 and lcx values, given values for the NEC, killing rate and elimination rate.
Input:
 3vector with NEC, killing rate and elimination rate
 nvector with exposure times
 optional scalar for lcx: effect level, expressed as a number between 0 and 1
Default is 0.5
Output:
 nvector with LC50 or LCx values for the exposure times
An example of application of lc50:
lc50([1, 1, 1], [3 4])
, which results in a 2vector with [LC50.3d LC50.4d].
Another application in regression and plotting routines is given in the scriptfile mydata_lc50
, where LC50 data are used to extract the toxicity parameters (so just opposite to the previous application).
Consult the scriptfile for further explanation.
See also lc503
.
lc503 calculates values for the NEC, killing rate and elimination rate given three LC50 values.
Input:
 (3,2)matrix with exposure times in column 1 and LC50 values in column 2
 3vector with initial values for NEC, killing rate and elimination rate
Output:
 3vector with final values for NEC, killing rate and elimination rate
 scalar with indicator for failure (0) or success (1) of numerical procedure
An example of application of lc503 is for an appropriate (3,2) matrix tc
:
[p, err] = lc503(tc, [1, 1, .1])
.
The effect is very similar to p = nmregr("lc50", [1, 1, .1]', tc)
, but lc503
is much faster and exact.
Calculates ecx values, given parameter values.
It uses a symplex method, so the conversion is slow.
Input:
 characterstring with function name (e.g.
marep
or grgrowth
)
 parametervector with toxicity parameters
 nvector with exposure times

 optional scalar for ecx: effect level, expressed as a number between 0 and 1
Default is 0.5
Output:
 nvector EC(100x) values for the exposure times
An example of application:
ecx('marep', [.13 1 .16 15 .1 .13 .42 1]', 21, .99)
,
which results in the EC99.21d for effects on reproduction via effects on maintenance.
Calculates internal concentrations, given the elimination rate and BioConcentration Factor (BCF) given exposure to a constant external concentration of a compound.
The initial internal concentration is assumed to be nil.
Input:
 (3,1)matrix with values for the elimination rate, BCF and external concentration
 (nt,1)matrix with exposure times
Output:
 (nt,1)matrix with internal concentrations
An example of application of acc
is given in mydata_acc
for fitting accumulation data.
See also acceli
for the case of accumulation and elimination data.
Calculates internal concentrations, given the elimination rate and BioConcentration Factor (BCF) given exposure to a constant external concentration of a compound, followed by an elimination in absence of the compound.
The initial internal concentration is assumed to be nil.
Input:
 (3,1)matrix with values for the elimination rate, BCF and external concentration
 (nt1,1)matrix with exposure times of accumulation phase
 (nt2,1)matrix with times during elimination phase
Output:
 (nt1,1) and (nt2,1)matrices with internal concentrations
An example of application of acceli
is given in mydata_acceli
for fitting accumulation/elimination data.
See also acc
for the case of accumulation data only.
Calculates body lengths during exposure to a constant external concentration of a compound, given parameter values.
The initial internal concentration is assumed to be nill and food availability abundant.
Toxicokinetics is assumed to follow the onecompartment model, but dilution by growth is taken into account.
No elimination via reproduction is assumed.
The internal concentration and the reserve are treated as hidden variables.
These functions are meant to be used via parameter estimation procedures nrregr2
, nmregr2
or garegr2
.
The optional second column of the initial parameter matrix should be used, where most, if not all, of the physiological parameters are fixed (corresponding to value zero in the second column), because toxicity assays hardly contain information about these parameters.
In the cases of slow and fast kinetics, the third parameter, the elimination rate, should be kept fixed as well.
Three cases for elimination rates can be chosen and three modes of action, which gives 9 combinations:
 slow kinetics: * stands for

fe0
feeding

as0
assimilation

ma0
maintenance

gr0
growth
 normal kinetics: * stands for

fe
feeding

as
assimilation

ma
maintenance

gr
growth
 fast kinetics: * stands for

fei
feeding

asi
assimilation

mai
maintenance

gri
growth
Input:
 7vector with parameters
 c0, mM, NoEffectConcentration (external, may be zero)
 cT, mM, tolerance concentration
 ke, 1/d, elimination rate at L = Lm
 g, , energy investment ratio
 kM, 1/d, somatic maint rate coeff
 v, cm/d, energy conductance
 L0, cm, initial body length
In the cases of slow (ke = 0) and fast (ke = infty) kinetics, the third parameter is not used.
In the case of slow kinetics parameters one and two have a different interpretation:
concentrationtimes, rather than concentrations.
This is inherent to the fact that the compound accumulates without boundary if the elimiation rate is zero.
 (nt,1)matrix with exposure times
 (nc,1)matrix with (external) concentrations
Output:
 (nt,nc)matrix with lengths
An example of application of *growth
is given in mydata_growth
for fitting length data.
Calculates cumulative number of offspring per female during exposure to a constant external concentration of a compound, given parameter
values.
The initial internal concentration is assumed to be nill and food availability abundant.
Toxicokinetics is assumed to follow the onecompartment model, but dilution by growth is taken into account.
No elimination via reproduction is assumed.
The internal concentration, maturity, reserve and structure are treated as hidden variables.
The parameters of the embryo are assumed to be affected by the compound in the same way as in the mother;
the relevance is in the amount of reserve that is required per egg.
The reproduction buffer is assumed to have capacity zero.
These functions are meant to be used via parameter estimation procedures
nrregr2
,
nmregr2
or
garegr2
.
The optional second column of the initial parameter matrix should be used, where most, if not all, of the physiological parameters are fixed (corresponding to value zero in the second column), because toxicity assays hardly contain information about these parameters.
In the cases of slow and fast kinetics, the third parameter, the elimination rate, should be kept fixed as well.
Three cases for elimination rates can be chosen and five modes of action, which gives 15 combinations:
 slow kinetics: * stands for

fe0
feeding

as0
assimilation

ma0
maintenance

gr0
growth

co0
costs per offspring

ha0
hazard of offspring
 normal kinetics: * stands for

fe
feeding

as
assimilation

ma
maintenance

gr
growth

co
costs per offspring

ha
hazard of offspring
 fast kinetics: * stands for

fei
feeding

asi
assimilation

mai
maintenance

gri
growth

coi
costs per offspring

hai
hazard of offspring
Input:
 12vector with parameters
 c0, mM, NoEffectConcentration (external, may be zero)
 cT, mM, tolerance concentration
 ke, 1/d, elimination rate at L = Lm
 kap, , fraction of mobilised reserve allocated to soma
 kapR, , reproduction efficiency
 g, , energy investment ratio
 kJ, 1/d, maturity maint rate coeff
 kM, 1/d, somatic maint rate coeff
 v, cm/d, energy conductance
 Hb, d.cm^2, scaled maturity at birth
 Hp, d.cm^2, scaled maturity at puberty
 L0, cm, initial body length
In the cases of slow (ke = 0) and fast (ke = infty) kinetics, the third parameter is not used.
In the case of slow kinetics parameters one and two have a different interpretation:
concentrationtimes, rather than concentrations.
This is inherent to the fact that the compound accumulates without boundary if the elimiation rate is zero.
 (nt,1)matrix with exposure times
 (nc,1)matrix with (external) concentrations
Output:
 (nt,nc)matrix with cumulative number of offspring
An example of application of *rep
is given in mydata_rep
for fitting length data.
Calculates (microbial) population size during exposure to a constant external concentration of a compound, given parameter values.
The internal concentration is assumed to be equilibrium instantaneously.
Input:
 (4,1)matrix with values for
 NEC
 tolerance concentration
 initial population size
 spec population growth rate
 (nt,1)matrix with exposure times
 (nc,1)matrix with external concentrations
* stands for

gr
growth

ha
hazard rate

ad
adaptation
The adaptiation model is basically the same as the hazard model, but only during the first time increment;
the survivors are no longer affected by the compound and the overall effect is a delay of growth only.
Output:
 (nt,nc)matrix with population size
An example of application of *pop
is given in mydata_pop
for fitting population growth data.
Back to the DEBtool page