DynaFit Scripting Manual
next up previous index home

Subsections


Control parameters

This part of the DynaFit scripting manual describes the sections of the initialization file, and the entries contained in each section.


<ODE Solver>

This section contains the default settings for algorithm LSODE [9], used in DynaFit to compute the time course of biochemical reactions. The distribution copy of file dynafit/settings.ini contains the following settings, which are explained below.


<ODE Solver>

   Iterations        = 500 
   AbsTolerance      = 1.e-16
   RelTolerance      = 1.e-6
   AbsAccurateTol    = 1.e-16
   RelAccurateTol    = 1.e-6
   NonNegative       = No
   SmartWeighting    = Yes

Iterations = Maximum number of LSODE iterations

This parameter represents the number of integration steps that the algorithm LSODE [9] is allowed between two successive output points on the reaction progress curve. For example, if the progress curve consists of equally spaced data points, with one-second interval between two adjacent points, LSODE is allowed at most 500 internal integration steps to traverse each of the one-second intervals.

Users of DynaFit normally should not change the value of this parameter. Only if LSODE fails during the numerical simulation of a particularly difficult kinetic problem, the user might attempt to increase this parameter to a larger value (e.g, 5000). Practical experience shows that LSODE can fail on kinetic mechanisms which include zeroth-order steps, for example, a removal of the enzyme at a constant rate due to zeroth-order deactivation.

AbsTolerance = Absolute tolerances for local truncation error

The absolute tolerance $\epsilon_{\rm abs}$ represent the absolute precision with which the algorithm LSODE [9] computes concentrations in simulating the time course of biochemical reactions. The precise meaning of the absolute error tolerance depends on the concentration scale used in the particular kinetic problem. For example, if all concentrations are in the micromolar scale, the absolute error tolerance in moles per liter is $10^{-6} \times 10^{-15}$ = 0.000001 fM.

The value of AbsTolerance normally should not be changed (see comments on RelTolerancebelow). In some cases it might be desirable to request pure relative error tolerances, by setting AbsTolerance to zero. Setting the absolute tolerances should be avoided in all kinetic mechanisms where a certain concentration can possibly become zero (for example, because a reacting species is continuously removed from the systems).

RelTolerance = Relative tolerances for local truncation error

The relative tolerance $\epsilon_{\rm rel}$ represents the relative precision with which LSODE [9] computes concentrations. The default value (0.000001) means that all concentrations are computed with six-digit accuracy.

This value should not normally be changed. Only if LSODE fails during the numerical integration, the user might with to request a five-digit accuracy (0.00001). However it should be realized that the local truncation errors accumulate. LSODE uses several hundred internally generated output points to traverse a typical reaction progress curve. In each internal integrations step the local truncation errors accumulate, which can make the global truncation error significantly large.

AbsAccurateTol = Enhanced absolute tolerances for local truncation error

The ``enhanced'' absolute tolerance $\epsilon_{\rm abs}^{*}$ represent the absolute precision with which the algorithm LSODE [9] computes concentrations in simulating the time course of biochemical reactions in the final step of a least-squares regression analysis, when the standard error of parameters is being computed.

This value should be either equal to $\epsilon_{\rm abs}^{*}$ or, if necessary, approximately an order of magnitude smaller. The user should experiment with the settings for $\epsilon_{\rm abs}^{*}$ until for the given class of problems the formal standard error of adjustable parameters does not change upon making $\epsilon_{\rm abs}^{*}$ smaller.

RelAccurateTol = Enhanced relative tolerances for local truncation error

The ``enhanced'' absolute tolerance $\epsilon_{\rm rel}^{*}$ represent the absolute precision with which the algorithm LSODE [9] computes concentrations in simulating the time course of biochemical reactions in the final step of a least-squares regression analysis, when the standard error of parameters is being computed.

This value should be either equal to $\epsilon_{\rm rel}^{*}$ or, if necessary, approximately an order of magnitude smaller. The user should experiment with the settings for $\epsilon_{\rm rel}^{*}$ until for the given class of problems the formal standard error of adjustable parameters does not change upon making $\epsilon_{\rm rel}^{*}$ smaller.

NonNegative = Non-negativity flag for ODE solution

For certain class of problem in chemical kinetics, it is necessary to take special step in order to maintain non-negativity of solution, that is, of the reactant concentrations. This arises in systems with constant outflow of materials, such as in certain metabolic or compartmental systems. If the solution of the given ODE systems ever becomes negative, the user may consider setting the NonNegative flag to no.

SmartWeighting = Flag for automatic error tolerances

The allowable values for this control parameter are yes and no. If the flag is set to no, the program uses error control parameters as is specified in the preceding section of this paragraph.

If SmartWeighting is set to yes, the program determines suitable error control parameters according to the following algorithm. First, the largest concentration ($c_{\rm max}$, in the chosen units) is found among the chemical species present at time zero. Second, the error control parameters are set according to the values listed in Table 11.1.


Table 11.1: Automatic setting of relative and absolute error tolerance in numerical integration of ODE system using algorithm LSODE.
$c_{\rm max}$ $\epsilon_{\rm abs}$ $\epsilon_{\rm rel}$ $\epsilon_{\rm abs}^{*}$ $\epsilon_{\rm rel}^{*}$
$\vphantom {\stackrel{\scriptstyle M}{M}}$ $<$ 10 $10^{-17}$ $10^{-7}$ $10^{-20}$ $10^{-8}$
$\vphantom {\stackrel{\scriptstyle M}{M}}$ $<$ 100 $10^{-16}$ $10^{-6}$ $10^{-17}$ $10^{-7}$
$\vphantom {\stackrel{\scriptstyle M}{M}}$ $>$ 100 $10^{-16}$ $10^{-6}$ $10^{-16}$ $10^{-6}$



<Equilibrium Solver>

The composition of chemical and biochemical mixtures at equilibrium is computed by using a modification of the numerical algorithm EQUIL described in [10]. The default settings for the equilibrium solver are listed below.


<Equilibrium Solver>

   Iterations        = 500 
   AbsTolerance      = 1.e-15
   RelTolerance      = 1.e-6

Iterations = Maximum number of iterations for the equilibrium solver

The computation of chemical and biochemical equilibria is an iterative procedure [10], based on the multidimensional Newton-Raphson method for solving a system of nonlinear algebraic equations (em i.e., the mass balance equations for the given system). The parameter Iterations sets the maximum number of iterations that the solver is allowed to execute. The default value should be increased approximately ten-fold if the equilibrium solver fails on a particularly difficult problem.

AbsTolerance = Absolute tolerances for local truncation error

RelTolerance = Relative tolerances for local truncation error

The two parameters named above control the absolute and relative error, respectively, allowed in the iterative computation of chemical equilibria using a variant of the algorithm EQUIL [10]. The iteration is terminated when the relative difference between two successive estimates of all species concentrations is smaller than RelTolerance and, simultaneously, when the absolute difference between two successive estimates of all species concentrations is smaller than AbsTolerance.

The user should not change these values unless the equilibrium solver reports a failure to converge, in which case the error tolerances should be increased (e.g., by an order of magnitude). It is important to emphasize that relaxing the error tolerances increases the numerical error with which the results are computed, and therefore it should be done with caution.


<Marquardt>

Nonlinear least-squares regression of experimental data [11] is accomplished in DynaFit by using the Levenberg-Marquardt (LM) algorithm [12]. For full explanation of the control parameters described here, the reader is directed to these references. The default values of parameters controlling the LM algorithm are listed below.


<Marquardt>

   Iterations        = 50     ; per parameter
   Subiterations     = 10
   Interrupt         = 10
   Restarts          = 2
                              ; Marquardt parameter:
   InitLambda        = 1
   UpLambda          = 4
   DownLambda        = 2
   ReinitLambda      = 0
                              ; Line-search parameters:
   StepLine          = 0
   StrideLine        = 1.0
                              ; Output options:
   IterPrint         = Yes
   SubiterPrint      = Yes
   FilePrint         = No
   ShowProgress      = Yes
                              ; Stopping criteria:
   StopLambda        = 0
   StopParam         = 0.00001
   StopSquares       = 0.000001

Iterations = Number of iterations

This is the maximum number of iterations per optimized parameter that will be taken by the LM least-squares fitting routine. For particularly difficult problems, it might be appropriate to increase the value of Iterations to approximately 100. Problems that require larger number of iterations are probably ill-posed and require decreasing the number of adjustable parameters.

Subiterations = Number of sub-iterations

The LM algorithm [12] contains a major iteration loop and a minor iteration loop. The minor iteration loop, controlled by the parameter Subiterations, is trying to navigate between the steepest-descend (or gradient) method and a quadratic approximation (or Gauss-Newton) method of minimization. The default value should rarely be changed. For a particularly difficult problem the user might increase the number of sub-iterations to at most 100.

Interrupt = Number of iterations before switching to interactive mode

The LM least-squares fitting algorithm will proceed automatically for Interrupt iterations, after which it will stop and ask the user whether to proceed with the minimization or accept the current values of adjustable parameters.

Restarts = Number of times the LM algorithm should restart

According to the recommendation of Seber and Wild [11], the LM algorithm should be restarted after an apparent minimum has been found on the least-squares surface. For difficult problems with shallow minima on the least-squares surface, restarting the algorithm after it apparently converged proves useful. In extreme cases the user might increase the number of restarts to approximately five.

InitLambda = Initial value of the Marquardt compromise parameter

The precise meaning of the Marquardt compromise parameter $\lambda$ is explained in the original report [12], where the proposed value was 0.1. However, we found that in many chemical kinetic problems, convergence of the algorithm can be improved by starting from a larger value. If, for the given problem, the LM algorithm appears to take steps that are too large, the InitLambda might be increased to a value of approximately 10.

UpLambda = Increase in the Marquardt compromise parameter

After an unsuccessful step in the LM minimization algorithm, the Marquardt compromise parameter $\lambda$ is increased by a factor UpLambda. This makes the search algorithm more similar to the steepest descend method than to the Gauss-Newton quadratic approximation method [11]. Marquardt [12] originally proposed the value of 10.0 for the fractional increase. However, we found that a smaller value increases the robustness of the search albeit at the cost of somewhat slower convergence in the case of easy minimization problems.

DownLambda = Decrease in the Marquardt compromise parameter

After a successful step in LM minimization algorithm, the Marquardt compromise parameter $\lambda$ is decreased by a factor DownLambda. This makes the search algorithm more similar to the Gauss-Newton quadratic approximation method [11] than to the steepest descend method. Marquardt [12] originally proposed the value of 10.0 for the fractional decrease. However, we found that a smaller value increases the robustness of the search albeit at the cost of somewhat slower convergence in the case of easy minimization problems.

ReinitLambda = Reinitialization flag for the Marquardt compromise parameter

This flag with possible values yes and no determines whether the Marquardt compromise parameter $\lambda$ will be reset to its initial value InitLambda after each successful iteration. The flag should almost always be set to no, except for extremely ill-conditioned minimization problems where the user might set it to yes as a very last resort strategy.

StepLine = Number of steps in a line-search algorithm

Some authors [11] recommend that the LM minimization algorithm [12] be augmented in each iteration with a line search, along the current direction in the parameter space. The parameter StepLine gives the maximum number of steps to be taken in this line-search (default value zero). Enabling line-search in the LM algorithm can cause a significant slowdown, but for many ill-conditioned problems it is useful or even necessary.

StrideLine = Initial step size in the line-search algorithm

This parameter control the initial step size in the line-search algorithm, which is an implementation of the golden section search as described in [13] (p. 397). The initial step size parameter StrideLine is the fraction (by default, 100%) of the current ML step size that is used to bracket the minimum on the least squares surface. The value StrideLine = 1.0 has proven useful in many chemical kinetic problems. For particularly ill-conditioned systems, the user might decrease this parameter to approximately 0.3.

IterPrint = Printing of major iterations in the LM algorithm

If this flag is set to yes, the program will display on the screen or write into a log file (see below) the adjustable parameters in every iteration of the LM minimization algorithm. This might be useful in analyzing the progress of minimization in particularly difficult cases.

SubiterPrint = Printing of minor iterations in the LM algorithm

If this flag is set to yes, the program will display on the screen or write into a log file (see below) the adjustable parameters in every sub-iteration of the LM minimization algorithm. This might be useful in analyzing the progress of minimization in particularly difficult cases.

FilePrint = Logging the progress of the LM minimization in a disk file

If this flag is set to yes, the program will write the values of all adjustable parameters into an output file in each iteration and / or subiteration of the LM minimization algorithm.

ShowProgress = Displaying the progress of the LM minimization on the screen

If this flag is set to yes, the program will display the values of all adjustable parameters on the screen in each iteration and / or subiteration of the LM minimization algorithm.

StopLambda = Stopping criterion for the Marquardt compromise parameter

Duggleby [14] has designed a least-squares fitting program based on the LM algorithm, in which the minimization is continued until the Marquardt compromise parameter $\lambda$ decreases below a certain limiting value. When $\lambda$ is sufficiently small, typically about 0.00001, the LM algorithm behaves as the quadratic Gauss-Newton method, which indicates that it is near a true minimum. The parameter StopLambda sets this critical value of $\lambda$. When StopLambda is initialized to zero, the stopping criterion based on $\lambda$ is not used.

StopParam = Stopping criterion for adjustable parameters

The control parameter StopParam specifies the largest allowable relative change in the value of adjustable parameters. If in the given iteration the relative changes in the value of all adjustable parameters is smaller than StopParam, the iterations in the LM algorithm may be terminated. However, certain classes of adjustable parameters (rate constants, initial concentrations, molar responses, and baseline offsets) have their own characteristic termination criteria explained in Section 11.2.5.

StopSquares = Stopping criterion for the reduced sum of squares

The control parameter StopSquares specifies the largest allowable relative change in the sum of squared deviations. If in the given iteration the relative changes in the sum of squares is smaller than StopSquares, the iterations in the LM algorithm may be terminated.

\fbox{%%%{BEGIN_FBOX}
\begin{minipage}{3in}
The Levenberg-Marquardt algorithm...
...ination criteria are satisfied simultaneously.
\end{minipage} }%%%{END_FBOX}


<Confidence Intervals>

The set of initialization parameters listed below controls a specialized search algorithm for the determination of approximate confidence intervals, sometimes referred to as inference intervals. The reader is directed to publications [15,16] in which the significance of statistical confidence intervals is explained, along with basic strategies for systematic search methods. DynaFit uses the ``profile-t'' method described by Bates and Watts ([17], p. 205, 297).


<Confidence intervals>

   Level             = 99.0
   Interrupt         = 501
   OnlyConstants     = yes
   FTestLevel        = 99.0

Level = Percentage confidence level

This parameter sets the desired confidence level (in percentage points) of the confidence intervals for adjustable model parameters. Typical values found in the literature are 68%, 90%, or 95%. For most rigorous investigations, the user might select 99% confidence level on model parameters.

Interrupt = Interrupt least-squares fit after every $n$ iteractions

See also section sect:Marquardt-Interrupt. The LM least-squares fitting algorithm will proceed automatically for Interrupt iterations, after which it will stop and ask the user whether to proceed with the minimization or accept the current values of adjustable parameters.

OnlyConstants = Exclude other types of parameters from minimization

In many cases it is advangeous to perform confidence interval search while treating all model parameters other than rate constants (or equilibrium constants) as fixed parameters. This speeds up the confidence interval search considerably.

FTestLevel = Confidence level for model discrimination

This parameter represents the percentage confidence level (typically, 95% or 99%) to be used for model discrimination analysis using the method described by Mannervik [18]. In particular, FTestLevel determines the probability level at which the Fisher's $F$-statistic should be computed for nested models. For example, assume that the number of data points is $n$, and the the number of adjustable parameters is $p_1$ in the first model and $p_2$ in the second model to be compared. Then, setting FTestLevel = 95.0, the critical value of Fisher's $F$-statistic is computed as $F_{0.025}(p_2-p_1,n-p_2)$. For further details, see ref. [18].


<Constraints>

DynaFit is treating all adjustable parameters in the least-squares regression as intrinsically constrained by certain bounds. This section of the initialization file sets those bounds for the four different kinds of adjustable parameters. It also sets the stopping criteria for each kind of parameter that is used in the Levenberg-Marquardt minimization algorithm.


<Constraints>
                              ; Rate constants
   RateErrAbsRel     = 0
   RateError         = 1000000.0
   RateStopAbsRel    = 0
   RateStop          = 0.0001
                              ; Concentrations
   ConcErrAbsRel     = 0
   ConcError         = 0.10   ; Titration error (10%)
   ConcStopAbsRel    = 0
   ConcStop          = 0.01
                              ; Responses
   RespErrAbsRel     = 0
   RespError         = 1000.0
   RespStopAbsRel    = 0
   RespStop          = 0.01
                              ; Offsets
   OffsErrAbsRel     = 1
   OffsError         = 1000.0
   OffsStopAbsRel    = 1
   OffsStop          = 1

RateErrAbsRel = Flag for absolute or relative bounds

RateError = Optimization bounds for rate constants

When RateErrAbsRel is set to zero (0), the program will interpret the value of RateError as a relative bound. In this case, the upper bound on optimized rate constants is computed as RateError times the initial estimated value. The lower bound on all optimized rate constants is computed as the initial value divided by RateError.

On the other hand, when RateErrAbsRel is set to one (1), the program will interpret the value of RateError as an absolute bound. In this case, the upper bound on optimized rate constants is computed as RateError plus the initial estimated value. The lower bound on all optimized rate constants is computed as the initial value minus RateError.

RateStopAbsRel = Flag for absolute or relative stopping criterion

RateStop = Stopping criterion for rate constants

When RateStopAbsRel is set to zero (0), the program will interpret the value of RateStop as a relative stopping criterion. In this case, the Levenberg-Marquardt iterations are terminated when the relative difference between two successive estimates of all optimized rate constants decrease below RateStop.

On the other hand, when RateStopAbsRel is set to one (1), the program will interpret the value of RateStop as an absolute stopping criterion. In this case, the Levenberg-Marquardt iterations are terminated when the absolute difference between two successive estimates of all optimized rate constants decrease below RateStop.

ConcErrAbsRel = Flag for absolute or relative bounds

ConcError = Optimization bounds for concentrations

When ConcErrAbsRel is set to zero (0), the program will interpret the value of ConcError as a relative bound. In this case, the upper bound on optimized concentrations is computed as ConcError times the initial estimated value. The lower bound on all optimized concentrations is computed as the initial value divided by ConcError.

On the other hand, when ConcErrAbsRel is set to one (1), the program will interpret the value of ConcError as an absolute bound. In this case, the upper bound on optimized concentrations is computed as ConcError plus the initial estimated value. The lower bound on all optimized concentrations is computed as the initial value minus ConcError.

ConcStopAbsRel = Flag for absolute or relative stopping criterion

ConcStop = Stopping criterion for concentrations

When ConcStopAbsRel is set to zero (0), the program will interpret the value of ConcStop as a relative stopping criterion. In this case, the Levenberg-Marquardt iterations are terminated when the relative difference between two successive estimates of all optimized concentrations decrease below ConcStop.

On the other hand, when ConcStopAbsRel is set to one (1), the program will interpret the value of ConcStop as an absolute stopping criterion. In this case, the Levenberg-Marquardt iterations are terminated when the absolute difference between two successive estimates of all optimized concentrations decrease below ConcStop.

RespErrAbsRel = Flag for absolute or relative bounds

RespError = Optimization bounds for molar responses

When RespErrAbsRel is set to zero (0), the program will interpret the value of RespError as a relative bound. In this case, the upper bound on optimized molar responses is computed as RespError times the initial estimated value. The lower bound on all optimized molar responses is computed as the initial value divided by RespError.

On the other hand, when RespErrAbsRel is set to one (1), the program will interpret the value of RespError as an absolute bound. In this case, the upper bound on optimized molar responses is computed as RespError plus the initial estimated value. The lower bound on all optimized molar responses is computed as the initial value minus RespError.

RespStopAbsRel = Flag for absolute or relative stopping criterion

RespStop = Stopping criterion for molar responses

When RespStopAbsRel is set to zero (0), the program will interpret the value of RespStop as a relative stopping criterion. In this case, the Levenberg-Marquardt iterations are terminated when the relative difference between two successive estimates of all optimized molar responses decrease below RespStop.

On the other hand, when RespStopAbsRel is set to one (1), the program will interpret the value of RespStop as an absolute stopping criterion. In this case, the Levenberg-Marquardt iterations are terminated when the absolute difference between two successive estimates of all optimized molar responses decrease below RespStop.

OffsErrAbsRel = Flag for absolute or relative bounds

OffsError = Optimization bounds for baseline offsets

When OffsErrAbsRel is set to zero (0), the program will interpret the value of OffsError as a relative bound. In this case, the upper bound on optimized baseline offsets is computed as OffsError times the initial estimated value. The lower bound on all optimized baseline offsets is computed as the initial value divided by OffsError.

On the other hand, when OffsErrAbsRel is set to one (1), the program will interpret the value of OffsError as an absolute bound. In this case, the upper bound on optimized baseline offsets is computed as OffsError plus the initial estimated value. The lower bound on all optimized baseline offsets is computed as the initial value minus OffsError.

OffsStopAbsRel = Flag for absolute or relative stopping criterion

OffsStop = Stopping criterion for baseline offsets

When OffsStopAbsRel is set to zero (0), the program will interpret the value of OffsStop as a relative stopping criterion. In this case, the Levenberg-Marquardt iterations are terminated when the relative difference between two successive estimates of all optimized baseline offsets decrease below OffsStop.

On the other hand, when OffsStopAbsRel is set to one (1), the program will interpret the value of OffsStop as an absolute stopping criterion. In this case, the Levenberg-Marquardt iterations are terminated when the absolute difference between two successive estimates of all optimized baseline offsets decrease below OffsStop.


<Simulate>

This section of the DynaFit script file collects control parameters that are used in the simulation of progress curves and initial velocities. The least-squares fit of relevant data is also influenced by these parameters because each regression analysis consists of multiple simulations of the theoretical model using gradually improved values of adjustable parameters.


<Simulate>

   Sensitivity       = No
   MeshDefault       = 301
   Equalize          = 1
   FiniteDifference  = 0.0001
   Interpolate       = No
   Increment         = 0.1
   WaitBatch         = 1.0       ; second

Sensitivity = Flag for the simulation of parametric sensitivities

Parametric sensitivities are partial derivatives of the response function (observed or independent variable) with respect to the adjustable parameters. When the Sensitivity is set to yes, DynaFit in the simulation mode (as opposed to the least-squares fitting mode) will simulate not only the theoretical model but also the partial derivatives with respect to all those model parameters that would be optimized in the least-squares regression.

ExampleIn this example, the program will produce not only the simulated progress curves but also the first derivatives of the progress curves with respect to the rate constant $k_1$ and with respect to the molar response coefficient $r_{\rm S}$.

[mechanism]
   E + S <===> ES  :  k1   k2
   ES ---> E + P   :  k3
[responses]
   S = 1 ?
[constants]
   k1 = 10 ?, k2 = 3
...

MeshDefault = Number of points on a simulated curve

This parameter sets the number of points on each simulated curve used for plotting the best fit model. For example, if a set of experimental data subjected to the nonlinear least-squares regression has only 10 points, the best-fit curve plotted only with 10 points would not appear sufficiently smooth. A reasonable value for this parameter is MeshDefault = 101 or 301.

Equalize = Flag for equal weighting of data sets

This parameter controls the behavior of the least-squares fitting algorithm in those cases where the individual data files contain different number of data points. When Equalize is set to nonzero value (e.g., Equalize = 1) the program will adjust the weights in the least-squares regression in such a way that all data sets will have equal influence.

For example, due to a change in instrument settings, two related progress curves might have been collected with different spacing of points on the abscissa (one second and five seconds, respectively). If both reactions were monitored for five minutes, one progress curve would contain 300 data points and the other 60 data points. Let us assume that the two progress curves are taken into a global regression analysis. With identical weighting, the 300-point data set would have five a times greater influence on the regression model compared to the 60-point data set. Setting Equalize = 1 will remedy the situation and assure that two data sets contribute equally.

FiniteDifference = Finite-difference coefficient

This parameter sets the coefficient $\delta$ in the computation of forward finite-difference derivatives. In particular, derivatives of the observed response function $y$ with respect to the adjustable parameter $p_i$ are compute in DynaFit by using the equation 11.1.


\begin{displaymath}
{\rm d} y ({\bf p}) / {\rm d} p_i = \frac{y(p_1, p_2, \ldots...
...a) \times p_i, \ldots, p_n) - y({\bf p})}
{\delta \times p_i}
\end{displaymath} (11.1)

A suitable value of $\delta$ is 0.0001. Values much smaller than 0.0001 are problematic because the response function $y$ itself is computed with limited accuracy, for example, by solving numerically a system of differential equations.

Interpolate = Flag for interpolation of progress curves

In certain numerically difficult problems involving systems of ordinary differential equations (ODEs), the data points might be too widely spaced for the ODE integrator. In this case it might be necessary to allow the integrator to traverse the widely separated output points by using a mesh of interpolation points. This feature should be used sparingly, only if the ODE integrator reports failure to converge, because the interpolation slows down the program significantly. Under normal circumstances the parameter Interpolate should be set to the default value no.

Increment = Time increment in the interpolation of progress curves

If Interpolate (see above) is set to yes, the value of Increment gives the spacing of interpolation points used by the ODE integrator. The time unit used here is the same as that used in the description of the experimental data. For example, let us assume that the experimental data set at hand involves five data points spaced by 1000 seconds. If the ODE integrator fails because the system is numerically too stiff [19] for the wide spacing of output points, we might try to set Increment = 1.0 or even Increment = 0.01.

WaitBatch = Time delay in batch simulations

Normally DynaFit requires user input at many points along the data analysis, for example, by requesting the user's confirmation whether a given regression analysis should continue after a certain number of iterations. However, DynaFit can also performs certain tasks in a batch mode, where no user input is required. The parameter WaitBatch sets the time in seconds that is used by the program to display images or error messages in the batch mode.


<Filter>

This section of the DynaFit initialization file controls the pre-processing of progress curve data files.


<Filter>

   Points            = 1500      ; per dataset
   TMin              = 0.0
   TMax              = 100000.0
   Scale             = seconds
   SetTZero          = No
   SetSigZero        = No
   Smoothing         = 0

Points = Maximum points in a data set

If an individual progress curve contains more than Points points, DynaFit will apply a symmetric filter to reduce the number of data items to the number set by this control parameter. By ``symmetric'' filtering we mean that the program might delete every third data point, or ever other data point, or two thirds of points by leaving every third point.

This feature is useful when processing primary data produced by those computer-interfaced spectrophotometers or fluorimeters that generate very closely spaced data (e.g., with the interval 0.1 seconds for a 10-minute experiment).

TMin = Minimum reaction time

Imperfect mixing, temperature equilibration, or other experimental factors that may case irregularities in the initial portion of reaction progress curves. In these special cases, the user might wish to delete automatically the first several points from each data set. The parameter TMin should be set to a non zero value that specifies the cut-off point below which the experimental data excluded from analysis.

TMax = Maximum reaction time

In many cases the raw experimental data are collected over a period of time that is excessively long. One way to solve this problem is to manually edit the data files before subjecting them to the statistical analysis by DynaFit. Alternately, the user might set the value of TMax to a value that is lower then the default ($t_{\rm max}$ = 10000). Data points that have abscissas larger than TMax will be excluded from analysis.

Scale = The unit (scale) of time

The allowable values of Scale are microseconds, microseconds, seconds, minutes, hours, or days. Upon reading experimental data, DynaFit always convert all time values to the S.I. units (i.e., seconds) by using the proper scaling factor as defined by the keyword Scale.

SetTZero = Flag for resetting time values to zero

In some cases it is profitable to subtract from the time-coordinate (independent variable) of each data point the value associated with the first data point on the given progress curve. If the SetTZero flag is set to yes, the program will perform this kind of automatic transformation.

SetSigZero = Flag for resetting signal values to zero

In some cases it is profitable to subtract from the signal value (dependent variable) of each data point the value associated with the first data point on the given progress curve. If the SetSigZero flag is set to yes, the program will automatically perform the subtraction upon reading the raw data from the disk.

Smoothing = Number of smoothing passes

Smoothing of time-domain data ([13], p. 650) can be applied to pre-process raw data from particularly noisy spectrometers. If such smoothing is necessary, and if the input data are equally spaced, DynaFit will use a simple moving window average method of digital filtering. Only the most immediate neighbors of each data point are used, according to the formula


\begin{displaymath}
\tilde y_i = (y_{i-1} + y_i + y_{i+1}) / 3 \quad , \quad i = 1, 2, \ldots, N \quad,
\end{displaymath} (11.2)

where $N$ is the number of data points in the given progress curve.

The control parameter Smoothing sets the number of passes that are applied to each progress curve data set upon reading. The default value is Smoothing = 0, which means no smoothing is applied. If the progress curve data are extremely noisy, a useful value is Smoothing = 3.


<Output>

The parameters collected in this section of the DynaFit initialization file control the appearance of the output results, both on the screen and in various kinds of output files (graphic files and text files).


<Output>

   CreateDirectories  = Yes
   WriteTextFiles     = Yes
   WriteHTMLfiles     = Yes
   WriteLATEXfiles    = Yes
   WriteGIFfiles      = Yes
   WriteTABfiles      = Yes
   WritePSfiles       = Yes
   WriteStoich        = No

   ; The following two lines are Macintosh-specific

   TextFileCreator       = R*ch
   PostscriptFileCreator = gsVR

   ; Best-fit parameters:

   VarianceInflation  = No
   Covariance-Correl  = Yes
   CollinearityIndex  = No
   Eigenvectors       = Yes
   RedundancyGrade    = Yes

   ; Graphical analysis of residuals:

   Variance-Signal    = No
   CumulativeDistrib  = No
   NormalPlot         = No
   SerialCorrelation  = No
   AutoCorrelation    = No
   PowerSpectrum      = No
   LocalResid         = No

   ; Numerical analysis of residuals:

   RunsOfSigns        = No
   Rayner-Best        = No
   Kolmogorov-Smirnov = No
   Durbin-Watson      = No
   Tukey              = No

   ; Model discrimination analysis:

   WriteFTest         = No

CreateDirectories = Create output directories?

If this flag is set to yes, DynaFit will attempt to create new output directories as indicated in the [output] section of the output file. If the flag is set to no, the program will insist that the output directories exist in advance, otherwise it will issue a run-time error and terminate execution.

WriteTextFiles = Create output files in simple text format?

When this flag is set to yes, the program will create output files in simple text format, collecting numerical either the results of numerical simulations or the results of nonlinear least-squares regression.

WriteHTMLfiles = Create output files in HTML format?

When this flag is set to yes, the program will write the computational results on the disk as a collection of HTML files connected by a set of hyperlinks. Optionally, the graphical output is embedded into the HTML files in the GIF format (see below).

WriteLATEXfiles = Create output files in LaTeX format?

When this flag is set to yes, the program will write the computational results on the disk as a collection of LaTeX files, connected via the LaTeX command input. Optionally, the graphical output is embedded into the LaTeX files in the Postscript format (see below).

WriteGIFfiles = Create graphical output files in GIF format?

When this control parameter is set to yes, the program will create all graphs displayed on the screen also as GIF graphical files. These files can be viewed either separately, using a GIF file viewer such as any Web browser, or they can be viewed as part of the HTML files also created by DynaFit.

WritePSfiles = Create graphical output files Postscript format?

When this flag is set to yes, DynaFit will create each graph as a Postscript graphical file on the disk. The graphical Postscript files can be imported into various word processing application programs, or viewed and printed by using specialized Postscript file viewers such as GhostScript and GhostView (http://www.cs.wisc.edu/~ghost/).

WriteTABfiles = Create output files in tab-delimited format?

When this flag is set to yes, the program will write on the disk all numerical data that are needed for the creation of graphs using third-party graphing software, such as SigmaPlot or GnuPlot. The tab-delimited output files contain the experimental data and the best fit interpolated curves suitable for the construction of publication-quality graphs.

TextFileCreator = Text file creator string

PostscriptFileCreator = Postscript file creator string

These two control parameters are specific for the Macintosh operating system. Users of Microsoft Windows and other versions of DynaFit may safely ignore them. The creator strings determine which application program (WordPerfect, Microsoft Word, BBEdit) will be associated with the output files created by DynaFit.


Table 11.2: File creator strings for the Apple Macintosh operating system.
creator string application
R*ch BBEdit
ttxt SimpleText
WPC2 WordPerfect
MSWD Microsoft Word
MPS MPW
ALFA Alpha
gsVR GhostScript


WriteStoich = Write stoichiometric and formula matrices?

The computation of multiple simultaneous equilibria in DynaFit is accomplished by using so-called formula matrices and stoichiometric matrices [20,21]. These intermediate results in the equilibrium computations will be printed in the output files if the WriteStoich flat is set to yes.

Printing out the matrices is useful for verification of the reaction mechanism. In particular, the user should check whether the kinetic compiler in DynaFit correctly identified component and complex species.

VarianceInflation = Print variance inflation factors?

If this flag is set to yes, the program will print the variance inflation factors [22] for all adjustable parameters in the least-squares regression.

Covariance-Correl = Print variance-covariance matrix?

If this flag is set to yes, the program will print the variance-covariance matrix for all adjustable parameters in the least-squares regression.

CollinearityIndex = Print collinearity index?

If this flag is set to yes, the program will print the collinearity indices [22] for all adjustable parameters in the least-squares regression.

Eigenvectors = Print eigenvalues and eigenvectors?

If this flag is set to yes, the program will print the results of spectral decomposition (eigenvalues and eigenvectors) [22] of the Fisher information matrix.

RedundancyGrade = Print redundancy grade?

If this flag is set to yes, the program will print the collinearity indices [22] for all adjustable parameters in the least-squares regression.

Variance-Signal = Plot best-fit signal value vs. squared deviations?

This plot (produced when the flag Variance-Signal is set to yes) is useful for checking the assumption of constant variance. The squared residuals are plotted against the (sorted) values of dependent variables. This feature is useful when the number of data points in each data set is at least one hundred, such as in the analysis of progress curves.

CumulativeDistrib = Plot empirical cumulative distribution of residuals?

When the flag CumulativeDistrib is set to yes), the program will produce the empirical cumulative distribution (ECD) of residuals. For a detailed explanation of the empirical cumulative distributions see reference [23]. This feature is useful when the number of data points in each data set is at least one hundred, such as in the analysis of progress curves.

NormalPlot = Produce cumulative normal plot?

When this flag is set to yes, the program will produce cumulative normal plot of residuals as a measure of randomness. For a detailed explanation of cumulative normal plots see reference [23]. This feature is useful when the number of data points in each data set is at least one hundred, such as in the analysis of progress curves.

SerialCorrelation = Produce serial correlation plot of residuals?

When this flag is set to yes, the program will produce the serial correlation plot of residuals [22] as a measure of randomness. This feature is useful only in the analysis of progress curves, provided that each data set contains a sufficient number of data points (larger than one hundred).

AutoCorrelation = Produce autocorrelation plot of residuals?

When this flag is set to yes, the program will produce the autocorrelation plot of residuals [22] as a measure of randomness. This feature is useful only in the analysis of progress curves, provided that each data set contains a sufficient number of data points (larger than one hundred).

PowerSpectrum = Produce power spectrum using Fast Fourier Transform?

When this flag is set to yes, the program will produce the power spectrum plot of residuals [13] as a measure of randomness. This feature is useful only in the analysis of progress curves, provided that each data set contains a sufficient number of data points (larger than one hundred).

LocalResid = Combine residuals from multiple data sets?

When this flag is set to yes, the program will perform graphical analysis of residuals (e.g., normal plot, serial Correlation plot, etc.) separately for each data set in a global super set of data files. Otherwise, all residuals from multiple data sets are combined into a single pooled super set before residual analysis.

RunsOfSigns = Compute the runs-of-signs test for residuals?

When this flag is set to yes, the program will compute the probability that the observed runs of identical signs in residuals could occur by random chance. The method is explained in references [24] and [22].

Rayner-Best = Compute the Rayner-Best statistics for residuals?

When this flag is set to yes, the program will produce the Rayner-Best statistics [25] as a measure of randomness (normal distribution) in the residuals. For a detailed explanation of the Rayner-Best statistics see reference [25]. This feature is useful only in the analysis of progress curves, provided that each data set contains a sufficient number of data points (larger than one hundred).

Kolmogorov-Smirnov = Compute the Kolmogorov-Smirnov statistics for residuals?

When this flag is set to yes, the program will produce the Kolmogorov-Smirnov statistics [22] as a measure of randomness (normal distribution) in the residuals. This feature is useful only in the analysis of progress curves, provided that each data set contains a sufficient number of data points (larger than one hundred).

Durbin-Watson = Compute the Durbin-Watson statistics for residuals?

When this flag is set to yes, the program will produce the Durbin-Watson statistics [22] as a measure of randomness (normal distribution) in the residuals. This feature is useful only in the analysis of progress curves, provided that each data set contains a sufficient number of data points (larger than one hundred).

Tukey = Compute the Tukey statistics for residuals?

When this flag is set to yes, the program will produce the Tukey statistics [22] as a measure of randomness (normal distribution) in the residuals. This feature is useful only in the analysis of progress curves, provided that each data set contains a sufficient number of data points (larger than one hundred).

WriteFTest = Perform model discrimination analysis using Fisher's $F$-statistic?

When this flag is set to yes, the program will produce a model discrimination report according to the method described by Mannervik [18], which uses Fisher's $F$-statistic for nested models. Otherwise, only the Akaike Information Criterion (AIC) method is used for model discrimination [26].


<Plot>

This set of initialization parameters controls the appearance of graphs either on the screen or in the ASCII output files.


<Plot>

   IndependentVar    = time (sec)
   DependentVar      = signal
   HighResolution    = Yes
   WaitLocal         = No
   ClickGraphs       = No
   WaitTime          = 3          ; seconds
   XPixels           = 576        ; 640
   YPixels           = 432        ; 480
   ScreenColumns     = 72
   ScreenRows        = 22
   FileColumns       = 72
   FileRows          = 36
   ShowXResiduals    = Yes          
   ShowYResiduals    = Yes          
   ResidRange        = 8.0        ; standardized residuals
   TMinVelocity      = 0.001

IndependentVar = Label for independent variable

The text to the right of the equal sign in IndependentVar = ... will be displayed in the output graphs as the label on the horizontal axis (independent variable).

DependentVar = Label for dependent variable

The text to the right of the equal sign in DependentVar = ... will be displayed in the output graphs as the label on the vertical axis (dependent variable).

HighResolution = High-resolution graphic output?

When this switch is set to no, the program will produce on-screen graphics in a simple character mode, using ASCII characters to represent all elements of each graph. This might be useful as an emergency measure under the Windows-98 operating system. Unfortunately, the Windows version of DynaFit has been known to fail on some computers under Windows-98, depending on the manufacturer of the graphics card. Should your system fail to display graphics properly under Windows-98, set HighResolution = no.

WaitLocal = User input during local analysis of progress curves?

If WaitLocal is set to no, the ``local'' statistical analysis of a series of progress curves proceeds automatically without waiting for user input upon displaying each output graph. This feature is useful in automatic determination of initial reaction velocities for a large number of data files.

ClickGraphs = Wait for user input upon displaying graphics?

If ClickGraphs is set to yes, the program will wait for user input when output graphs are displayed on the screen, showing for example the results of fit. When DynaFit displays graphics, the program is waiting for the user to perform a certain action that depends on the type of computer being used. On the Macintosh computer, the operator should click with the mouse anywhere in the graph area to dismiss the graphics and return to the computations. On a DOS/Windows computer, the operator should press the Enter key on the keyboard.

WaitTime = Time for display of output graphs

If ClickGraphs is set to no, the program will display each output graph for the number of seconds defined by this parameter.

XPixels = Number of pixels in the horizontal direction

This parameter determines the horizontal size (dimension) of high-resolution graphs displayed on the screen.

YPixels = Number of pixels in the vertical direction

This parameter determines the vertical size (dimension) of high-resolution graphs displayed on the screen.

ScreenColumns = X-Dimension of the ASCII plot (screen)

This parameter sets the number of columns on the character output screen that are used for the construction of simple graphs. For example, ScreenColumns = 72 means that each graph on a console output screen will have 72 columns.

ScreenRows = Y-Dimension of the ASCII plot (screen)

This parameter sets the number of rows on the character output screen that are used for the construction of simple graphs. For example, FileRows = 36 means that each graph a console output screen will have 36 rows.

FileColumns = X-Dimension of the ASCII plot (file)

This parameter sets the number of columns in the ASCII files that are used for the construction of simple graphs. For example, FileColumns = 72 means that each graph in the ASCII output files will have 72 columns.

FileRows = Y-Dimension of the ASCII plot (file)

This parameter sets the number of rows in the ASCII files that are used for the construction of simple graphs. For example, FileRows = 36 means that each graph in the ASCII output files will have 36 rows.

ShowXResiduals = Plot residuals against independent variable?

If this flag is set to yes, DynaFit will plot the residuals of fit against the independent variable.

ShowYResiduals = Plot residuals against dependent variable?

If this flag is set to yes, DynaFit will plot residuals not only against the independent variable (e.g., time in the case of reaction progress curves) but also against the dependent variable e.g., absorbance). These plots are often more informative than the more conventional plots of residuals against the independent variable.

ResidRange = Range of Studentized residuals

If ResidRange is set to zero, the program will plot Studentized residuals in a scale that is automatically determined from the data. The resulting plot is constructed with the vertical axis range that accommodates all residuals in the given data set. On the other hand, a nonzero value of ResidRange causes the plotting of Studentized residuals within plus or minus the range defined by this parameter.

TMinVelocity = Minimum time for plotting velocities

DynaFit always plots not only the simulated reaction progress curves but also their first derivatives with respect to time. Often these derivative plots contain a very sharp spike at the beginning, which causes the resulting graph not to be very informative.

The value of TMinVelocity orders the program to begin plotting the derivative curve at reaction time equal to this parameter. Simulated or fitted output points that were computed at reaction times lower than TMinVelocity are still plotted in the progress curve, but are ignored in the first derivative plot.


<Velocity>

This section of the DynaFit initialization file defines control parameters that are used in the computation or recording of initial reaction velocities.


<Velocity>

   AutoWrite         = No
   WriteFittedConc   = No
   AverageInput      = Yes
   AlwaysPositive    = Yes
   ExcludeOutliers   = Yes
   MinimumPoints     = 4
   StandardDeviation = 4.

AutoWrite = Flag for recording initial velocities on disk

If this flag is set to yes during the least-squares fit of reaction progress curves, the program will compose a special two-column, tab delimited output file in the ASCII format. The first column will contain the (initial) concentration of the reactant that is named after the variable keyword, in the [velocity] section of the DynaFit script. The second column will contain the initial reaction velocity in instrument units (e.g., absorbance or fluorescence per second.

Example 1 In this example, DynaFit first performs the least-squares fit of seven progress curve files, named 1.txt, 2.txt, etc., located in the directory ./examples/pepsin/data/. The initial velocities are then written into a newly created file named ./examples/pepsin/data/veloc.txt. This file will contain in the first column the concentration of the inhibitor I (variable I), and the initial velocity in the second column.

;-----------------------------
; Determine initial velocities.
;-----------------------------

[task]
    data  = progress
    task  = fit

[mechanism]
    E + S <===> ES    :  k    ks
    ES ---> E + P     :  kcat
    E + I <===> EI    :  k    ki

[constants]
    k = 100, ks = 4000 ?, kcat = 15 ?
    ki = 10 ?

[responses]
    P = -0.0015

[concentrations]
    E = 0.04
    S = 100 ?

[progress]
    local
    directory      ./examples/pepsin/data
    extension      txt
    offset         auto ?
    error          constant 0.00025
    delay          5

    files          1,2,3,6,7,8,9
    vary conc. I = 0,1,2,3,4,5,6

[velocity]
   variable    I
   file        ./examples/pepsin/data/veloc.txt

[output]
   directory   ./examples/pepsin/output

[settings]
   <Velocity>
      AutoWrite  = yes  ; <== CREATE DATA FILE !

;-----------------------------------------
; Fit initial velocities determined above.
;-----------------------------------------

[task]
    data  = velocities
    task  = fit

[mechanism]
    E + S <===> ES    :  Ks    dissoc.
    ES ---> E + P     :  kcat
    E + I <===> EI    :  Ki    dissoc.

[constants]
    Ks = 37.5, kcat = 15 ?
    Ki = 0.1 ?

[responses]
    P = -0.0015

[concentrations]
    E = 0.04
    S = 100

[progress]
    rapid equilibrium     
  
[velocity] 
   variable I
   file     ./examples/pepsin/data/veloc.txt

[end]

WriteFittedConc = Flag for writing optimized concentrations

If this flag is set to yes, DynaFit will create the initial velocity data file (see the description of AutoWrite) by storing in the newly created data file not the nominal values of concentrations, but the best fit values of concentrations.

Thus, if in Example 1 the inhibitor concentration was considered as an adjustable parameter instead as a constant, DynaFit would write into the first column of file ./examples/pepsin/data/veloc.txt not the nominal concentrations of inhibitor I (0, 1, 2, $\ldots$, 6) but instead their best-fit optimized values.

AverageInput = Flag for averaging of replicates

If this flag is set to yes, the program will examine the input data file for the presence of replicated data points, where the initial velocity was measured at identical concentrations of all reactants. If such replicated data points are found, DynaFit will compute the average and standard deviation for each replicated group. The raw input data are ignored in the subsequent least-squares regression, which instead uses the computed averages. Optionally, the program will also utilize the computed values of standard deviations for weighting in the least-squares regression.

AlwaysPositive = Flag for positive velocities

Often the analysis of reaction progress curves involves data sets where the experimental signal, such as absorbance or fluorescence, declines over time. In this case the initial reaction velocity, defined as the change in signal per unit of time has negative values. However, it is conventional to report the initial reaction velocities (e.g., ``mOD/min" or 0.001 $\times$ absorbance units per minute) as positive values.

If the flag AlwaysPositive is set to yes, the program will record the initial reaction velocity (instrument units / time) always as a positive value, in accordance with the convention.

ExcludeOutliers = Flag for the exclusion of outliers

If this flag is set to yes, the program will attempt to exclude outlying initial velocity data points by using the jackknife technique described below. The data exclusion protocol uses the values of MinimumPoints and StandardDeviation.

MinimumPoints = Smallest number of replicates

The automatic outlier exclusion protocol is applied only to those measurements that have been replicated more than MinimumPoints times.

StandardDeviation = Criterion for the exclusion of outliers

If ExcludeOutliers is set to yes, the value defined by the StandardDeviation is used to decide on the exclusion of outlying data points (initial velocities) using For each group of replicates, the program first computes the average and standard deviation. Subsequently the average and standard deviation is re-computed while excluding the replicated data points one by one. The smallest standard deviation and the largest standard deviation are recorded. If the largest standard deviation exceeds the smallest standard deviation more than StandardDeviation times, the corresponding influential point is excluded from the analysis.


next up previous index home
biokin.com/dynafit/scripting/html/node62.html
Petr Kuzmic | Jul 12 2005