Model CreationIntroduction
The COPASI graphical user interface has been written using the Qt toolkit. This allows us to
release COPASI on all platforms that Qt supports.
It also has the advantage that COPASI essentially behaves the same on
all platforms supported, while still showing platform specific
behavior. E.g. on a computer running Mac OS X, the user
will have the menu at the top of the screen and the menu entry for the
about dialog will appear in the COPASI menu rather than the help menu.
In the following sections, we will explain how to use the graphical
user interface of COPASI. Everything should be applicable to all
supported platforms. If there is a difference for some platforms we
will try to point that out explicitly.
Commandline Version and Commandline Options
COPASI comes in two versions. One with a (hopefully) nice GUI for
interactive work and one without a GUI for batch processing of model
files. Both versions support the same set of commandline arguments,
although some do not make sense for the GUI version and will be
ignored.
In addition to the commandline options, you can specify one or more
COPASI (or Gepasi) files after the commandline options which will then
be processed. Specifying more than one file again only makes sense for
the commandline version of COPASI. For each of the files, the
activated tasks will be run. The commandline options for importing and
exporting SBML as well as the --save option are ignored if more than one
file is specified. Since the GUI version of COPASI can only handle one
file at a time, it only makes sense to specify one file after the
commandline options.
Commandline options--SBMLSchema
This switch works in combination with the --exportSBML switch and
determines which SBML level and version is going to be used for SBML export.
Currently the following schemas are supported L1V2 for SBML Level 1 Version 2,
L2V1 for SBML Level 2 Version 1, L2V2 for SBML Level 2 Version 2 and L2V3 for
SBML Level 2 Version 3.
If no schema is given, the exported creates SBML Level 2 Version 3 files.
--home
This can be used to tell COPASI where your home directory is
located. Normally you don't have to use this.
--configdir
This can be used to specify the directory where COPASI stores its
configuration files. Normally this is called .copasi and is located in
the users home directory. But if you want COPASI to use a different
one, you can specify it with this switch.
--configfile
This can be used to specify the filename where COPASI loads and stores
its configuration. Normally this is called COPASI and is located in
the directory specified with --configdir. But if you want COPASI to use
a different filename, you can specify it with this switch.
-c--copasidir
This specifies the directory where COPASI has been installed. It is
needed to find e.g. help files. On Windows and Mac OS X this is set
automatically. On Linux it has to be specified if you want to use
certain features. The GUI version of COPASI will issue a warning on
startup if this has not been set. The commandline version does not
need this directory to be specified and therefore ignores this option.
--exportBerkeleyMadonna
With this option you can specify a name for the Berkeley Madonna file
COPASI should export. This is useful if you want to export some COPASI
files to Berkeley Madonna file format in a batch job. This only makes
sense for the commandline version and it will be ignored by the GUI
version.
--exportC
With this option you can specify a name for the C source file COPASI
should export. This is useful if you want to export some COPASI files
to C source code in a batch job. This only makes sense for the
commandline version and it will be ignored by the GUI version.
-e--exportSBML
With this option you can specify a name for the SBML file COPASI
should export. This is useful if you want to export some COPASI files
to SBML in a batch job. This only makes sense for the commandline
version and it will be ignored by the GUI version.
--exportXPPAUT
With this option you can specify a name for the XPPAUT file
COPASI should export. This is useful if you want to export some COPASI
files to XPPAUTs ODE file format in a batch job. This only makes
sense for the commandline version and it will be ignored by the GUI
version.
--license
With this commandline option, COPASI will print its license and exit.
-i--importSBML
This options lets you specify an SBML file that COPASI shall import.
-s--save
This option is used to specify the name file where COPASI should store
a model. This is useful if you intend to convert some SBML files to
COPASI files in a batch job. This also makes sense only for the
commandline version and will be ignored by the GUI version.
-t--tmp
This option can be used to specify a temporary directory where COPASI
will auto-save some data periodically. Normally COPASI uses the
systems temporary directory (e.g. /tmp/ under Linux).
--verbose
This commandline option tells COPASI to print more output on what it
is doing to std::out.
--nologo
This option suppresses the output of the "Logo" when CopasiSE is run. The "Logo" usually consist of the version of COPASI and some license statement.
--validate
This commandline version can be used to validate the given file. The file can either be a COPASI file or an SBML file.
COPASI GUI Elements
The COPASI graphical user interface essentially consists of four
elements.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/06/2008
COPASI GUI elements.
Elements of the COPASI user interface
On the top of the main window, you have the menu bar (on the Mac, the
menu bar is on the top of the screen). Below that, you have a tool bar
with some common tasks like opening a file or saving a file. The rest
of the window is vertically divided into two parts by a slider. The
size of the two elements can be adjusted by moving the bar that
separates them. The left element is called the object tree and it
shows your current model and the tasks that you can perform on this
model. Depending on the element that is selected in the object tree,
the view on the right will change in order to enable you to edit the
model or run and modify the task you selected in the object tree.
If you start COPASI without any command line argument, COPASI will
start with a new model. The root of the object tree will be selected
and on the right side of the main window, you will see the COPASI
logo.
The object tree has five branches below the root element. The first
one contains all objects that belong to the current model. The second
and third ones contain all tasks that COPASI can execute, the fourth
one contains the different output objects COPASI can handle and the
last branch contains all the (kinetic) functions that are
defined. These include the build in functions as well as functions
defined by the user.
If you now click on the Model branch, the view
to the right of the object tree will change and you will see a screen
that allows you to make . In the
following sections, we will describe the individual dialogs that you
can open by selecting different branches in the object tree. During
this explanation, you will learn how to create a model in COPASI and
run different tasks on this model like calculating a trajectory.
General Model Settings
If you click on the Model branch of the object
tree which was explained in the
section, you activate the dialog that lets you specify certain
parameters for your model like its name and the units that are to be
used for time, volume and concentration quantities throughout the
current model. You can also give a textual description of your model
that is more expressive than reactions and equations. You could for
example state which part of the metabolism the model describes
(e.g. glycolysis) and add some references to articles related to the
model. This will help others (and yourself) to understand and identify
your models.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/06/2008Dialog for general model settings
Dialog for general model settings
You should be aware that changing the default units actually changes
the model. If you, for example, change the default volume units from
liters to milliliters, all the particle numbers in your model change
by a factor of 1000.
COPASI internally represents amounts of species by particle
numbers. If a concentration has to be displayed or is needed for some
output this is calculated from the particle number, the volume of the
compartment the species belongs to and Avogadro's number
(6.0221415*1023particlesMole).
Lets assume that you have set your default volume units to fl and your
default substance units to nMol and species A is present in the amount
of
1.0*1015particles.
Further assuming that the volume of the compartment containing A is
set to
1.0
(fl), A would be present in a concentration of 1.0*1015particles6.0221415*1023particlesMole*1.0 fl. Since the default substance unit is set
to nMol instead of Mole we have to multiply the result by
1.0*109.
So COPASI would display a concentration of
1.661nMolfl.
You are able to easily change the display between concentrations and particle numbers by selecting the drop down list in the menu bar at the top. COPASI, per default, displays the concentrations.
With the drop down list labeled Rate Law
Interpretation you can specify how COPASI should interpret
the kinetic rate laws you specify for your reactions. Per default,
COPASI will interpret all rate laws as deterministic rate laws. Since
COPASI allows the user to simulate a model either deterministically or
stochastically, COPASI has to make some corrections to deterministic
rate laws when using them for a stochastic simulation. This
functionality sometimes interferes with rate laws that have been
written for stochastic simulation and where the before mentioned
corrections have already been made by the modeler. So if you have a
model with rate laws that have been written be used in a stochastic
simulation, you have to specify this by selecting stochastic from this
drop down list. If you do this, COPASI will not apply any corrections
to the rate laws specified in the model when doing stochastic
simulation.
With the edit field labeled Time (s) under
the text of Initial the user
can tell COPASI to take the given value as the initial time for tasks
like time course. For example, if you already have run a time course
simulation for 1000 seconds in another program and your model values
reflect the state of the model after those 1000 seconds of simulation,
you can continue your simulation at that time point by setting the
initial time to 1000. (This assumes that the models time units in the
same widget are set to seconds.) If you run a time course simulation
and check the update model box there, COPASI will
automatically set the initial time to the end time of the time course
simulation after running it. For more information on running time
course simulation is COPASI see Compartments
In COPASI, most of the time there are several ways to do something and
you just choose the way you prefer. This is especially true for
defining the elements of the model.
Actually if you are just defining a model that has a single
compartment, you will most likely not even bother to add the
compartment explicitly, but we will come back to this in the and
sections.
Although you will probably not add compartments to often, it is good
to know how it is done, especially since adding other components of
the model, e.g. species or reactions, works essentially the same.
There are three methods to add a new compartment to a model, but for
all three, we have to navigate to the
Compartments branch of the object tree which is
located under the Model->Biochemical
branch. So first open the Model branch and
there open the Biochemical branch by clicking
on the expansion sign in front of the branch name, or by double
clicking on the branch name.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/18/2008Compartment table without entries
Empty compartment table
If you start with a new model and you select the
Compartments branch, you will get an empty
table with eight columns (see above). The columns are named
Status, Name, TypeInitial Volume, Volume, Rate, Initial Expression
and Expression. The meaning of the
Status column will be explained below.
Name is the actual
name of the compartment.
The Type specifies how the transient volume of the compartment is
determined whereas the Initial Volume and the Volume columns
show the volume of the compartment before any calculations and after re-calculation, respectively.
These two values, given in the volume units defined in the dialog, should be the same if the type is set to fixed.
The Rate column show the rate of change of the compartment (if it has been set by a calculation). The Initial Expression and the Expression columns show the mathematical expressions used to calculate the initial compartments volume and the transient one, respectively. These fields are empty if no expressions has been set.
The most obvious way to add a new compartment is to click the
New button on the bottom of the window. This
will create a new compartment that is added to the table with a status
of new (see below).
Produced with COPASI 4.3 (Build 25) on Leopard on 02/18/2008Compartment table with newly added compartment
Compartment table with new compartment
A status of new means that the compartment has been created, but it
has not been added to the model yet. It will get added to the model if
you either click on the Commit button on the
bottom of the screen, if you select another element in the object tree
on the left, or if you double click on the table. In case of clicking on the Commit button, you will notice
that the status of the new compartment is no longer defined as new
since it has been added to the model.
While the status of a compartment is shown as
new, you can remove the compartment from the
table by clicking the Revert button which will
cancel all modifications you made to the compartments that have not
been committed yet.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/18/2008Compartment table with deleted compartment entry
Compartment table with deleted compartment
If you have already committed the compartment, you can delete it by
selecting the table row (or one cell of the table row) that contains
the compartment you want to delete and clicking the
Delete button. You will notice that the
compartment does not get deleted at once, but rather the status
changes to delete (see above). You can still undo the delete
by clicking the Revert button or the
Delete/Undelete button, or you can finalize the
delete action by clicking on the Commit
button. Again leaving this dialog by selecting another object in the
object tree or double clicking on the table has the same effect as
clicking on the Commit button.
The clear button is just a convenience function
to delete all compartments. If you click on it, the status of all
compartments in the table will be changed to
delete and a subsequent
Commit will remove the compartments from the
model.
The most convenient way to add a compartment is to just click on an
empty name cell in the table and type the name of the
compartment. Once you leave the cell by either hitting the return or
the tab key or by clicking somewhere else, the compartment appears in
the table with a status of new. Actually hitting
the return key after typing the name brings you directly into the next
row and you can continue adding compartments until all compartments
are defined. You now only have to commit your changes in one of the
ways mentioned above and all the compartments get added to the model.
The third way to add a new compartment is to double click on an empty
row in the table. This is essentially the same as clicking the
New button and double clicking on the newly
added compartment entry.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/18/2008Dialog for changing compartment parameters
Compartment definition dialog
Double clicking on any compartment entry in the table will bring you
to another input dialog that lets you specify the parameters of the
compartment (see above). For each compartment, you are able to change
the name of the compartment, the type of simulation specifying how
the compartment volume, or its rate of change, will be determined, and
the initial volume.
The field labeled Volume specifies the
volume the compartment has right now, e.g. during or at the end of a
simulation. Since the current version of COPASI does not support
variable compartment volumes yet, this will always be the same as the
initial volume.
As stated above, compartment volumes don't have to have a constant value
but they can be reassigned during e.g. a time course simulation depending
the values of one or more model entities. In order to specify whether a compartment has a constant volume
or the volume is calculated on the fly according to a mathematical expression,
the drop down list called Simulation Type can be used.
It contains three entries:
Compartments Simulation TypesNameDescriptionfixed the volume of the compartment has a constant value (which corresponds to the given initial value)assignmentthe volume of the compartment is determined by evaluating the given mathematical expressionodethe rate of change of the compartments volume is determined by an ordinary differential equation
If you want the compartment to be calculated from a given mathematical expression you select the entry called assignment from the drop down list. This enables a text field where the mathematical expression can be entered.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/18/2008Compartment widget with assignment rule
Compartment widget with assignment rule
Please note, it is not possible in COPASI to calculate the volume of a compartment through an assignment based on the concentration of a species contained in the compartment. The reason for this restriction is that COPASI preserves the amount of a species during calculation, which leads to the following equation for the concentration [S]=S#/V and therefore V=S#/[S]. Obviously, specifying any assignment for the compartment volume like V=f([S]) would lead to conflicting values.
Likewise if you want the rate of change of the compartments volume to be determined by an ordinary differential equation (ode) you select the entry called ode from the drop down list.
Not only the transient volume of a compartment can be specified as a mathematical expression (see above), but also the initial one (see below).
If you want to specify such a mathematical expression for the initial volume of a compartment, check the check box called Use Initial Expression.
An initial expression can only be specified if the Simulation Type drop down list is either set to fixed or to ode. If the list is set to assignment, the given assignment automatically acts as an initial assignment and there is no need to specify an additional initial assignment.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/18/2008Compartment widget with initial assignment
Compartment widget with initial assignment
The mathematical expressions that can be specified for rules and initial assignments may contain the same elements as the expressions used to defined function definitions. For a detailed description of the elements see .
When it comes to referencing values of other model entities within mathematical expressions, there is a slight difference between the mathematical expression for a rule and that for an initial assignment. The mathematical expression for a rule may reference transient values of other model entities whereas the mathematical expression for an initial assignment may only reference initial values of other model entities.
As you might already have noticed, this dialog for changing
compartment parameters is associated with the individual compartment
leaves in the object tree. So if you want to change the parameters, you can also navigate to the leave in the object tree
that represents the compartment you want to change instead of double
clicking on an entry in the compartment table.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/18/2008Compartment widget with ode rule and initial assignment
Compartment widget with ode rule and initial assignment
If there are already species defined that are part of the compartment
being edited, they will be listed in the text widget at the bottom of the
dialog called Contained Species. Otherwise, you should add new species.
Species
Adding new species works exactly the same as adding new compartment,
so we strongly suggest reading the section
if you haven't already done so. Here we will just cover the
differences between adding a compartment and adding a species.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/18/2008Species table with new entry
Species table with new entry
First of all in order to add a new species, as it is
called in COPASI, you have to navigate to the
Species branch of the object tree which is
located in the Model->Biochemical branch
directly below the Compartments. Here
again you see a table (see above), but this table consists of nine columns. This
is due to the fact that a species has more parameters than a
compartment. The Status and
Name columns should already be familiar from the
compartments table. The other columns specify the compartment where
the species is located in,
the way the concentration of the species is calculated, initial
concentration of the species, the transient concentration, the rate of change of the species as well as two mathematical expressions used to determine the initial concentration and the transient one, respectively.
For newly created species the rate will be empty since
it needs to be calculated first, e.g. during a time course simulation.
When a species is added and the model does not contain a
compartment yet, COPASI will automatically add a new compartment to
the model and the species will be added to this compartment. If
there already is one or more compartments, the species will be
added to the first compartment in the list. This can be changed
later.
To add a new species you have the same three ways as for adding
compartments and if you are not familiar with those, we recommend to
read the section first.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/18/2008Dialog for changing species parameters
Species definition dialog
Editing the parameters of a species also works exactly the way it
does for compartments. Either you double click on a species entry
in the table, or you use the object tree to navigate to the species
leaf you intend to edit. The parameters of a species lying on below
the separator line are determined automatically and
can not be changed by the user. The parameters that you can change are
the Species Name, the
Compartment the species belongs to, and how the concentration is calculated.
Unless the Simulation Type is set to assignment, its Initial Concentration could also be changed.
If you would rather change the initial particle number instead
of the Initial Concentration, you should select Particle Numbers
in the drop down list in the menu bar at the top. This will change all displays in the program to use particle numbers
rather than concentrations and you can now enter the
Initial Particle Number (note the label will be changed).
The volume used to calculate particle numbers from concentration
comes from the compartment associated with the species.
If you change back to initial concentration, COPASI will internally recalculate the initial particle number.
In some situations COPASI will prevent the user from changing the initial concentration. This is done when changing the concentration would lead to circular dependencies during the calculation of all initial values. The cause for this is most likely an assignment rule for the containing compartment. In such a case it is still possible to change the initial particle number.
Normally the concentration of a species is determined by its initial concentration and by the reaction kinetics of the reactions it participates in either as a substrate or a product. The reactions are listed at the bottom of the species widget (see above).
Species Simulation TypesNameDescriptionreactions the concentration/amount of the species is determined by the kinetic laws of the reactions that modify the speciesfixed the concentration/amount of the species has a constant value (which corresponds to the given initial value)assignmentthe concentration/amount of the species is determined by evaluating the given mathematical expressionodethe rate of change of the species volume is determined by an ordinary differential equation
Newer versions of COPASI also allow the concentration of a species to be determined by a mathematical expression or by providing an ordinary differential equation for its rate of change.
In order to specify whether a species has a constant volume, it is determined by reactions,
or its volume is calculated on the fly according to a mathematical expression,
the drop down list called Simulation Type should be used. It contains four entries listed on the above table.
If you want the species to be calculated from a given mathematical expression you select the entry called assignment from the drop down list. This enables a text field where the mathematical expression can be entered (see below). Likewise if you want the rate of change of the species concentration to be determined by an ordinary differential equation (ode) you select the entry called ode from the drop down list.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/18/2008Species widget with assignment rule
Species widget with assignment rule
Produced with COPASI 4.3 (Build 25) on Leopard on 02/18/2008Species widget with constant species and initial assignment
Species widget with constant species and initial assignment
Not only the transient concentration of a species can be specified as a mathematical expression, but also the initial concentration of the compartment.
If you want to specify such a mathematical expression for the initial concentration of a species, check the check box called Use Initial Expression.
An initial expression can be specified unless the Simulation Type drop down list is set to assignment. Since the given assignment automatically acts as an initial assignment, there is no need to specify an additional initial assignment.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/18/2008Species widget with ode rule and initial assignment
Species widget with ode rule and initial assignment
The mathematical expressions that can be specified for rules and initial assignments may contain the same elements as the expressions used to defined function definitions. For a detailed description of the elements see .
When it comes to referencing values of other model entities within mathematical expressions, there is a slight difference between the mathematical expression for a rule and that for an initial assignment. The former may reference transient values of other model entities whereas the latter may only reference initial values of other model entities.
Reactions
Again adding reactions essentially works the same way as adding
compartments or species.
When you navigate to the
Reactions branch of the object tree which is
located under the Model->Biochemical branch,
you will see a table with five columns. The first two are
Status and Name of the
reaction. The third column called Equation
describes the chemical formula and maybe additional modifiers of the
reaction. The fourth column states the name of the kinetics for the
reaction which depends on the equation. We will come to this in a
second. The last column shows the flux through
this reaction. The flux can not be set by the user but is calculated
automatically when you do a time
course simulation.
The easiest way to add a reaction is to type the chemical equation
into an empty equation cell in the table. After you typed the
equation, you hit the return key and automatically land in the next
row where you can type the next reaction equation. This way you can
enter all the reactions that make up your model. When you are finished
with typing the reaction equations, you commit all the reactions. If
any of the reactions contain species that are not already present
in the model, they are added automatically. If there was no
compartment before, a compartment is also added and all new
species get added to this compartment. If there is already one or
more compartments, all new species get added to the first
compartment that is listed in the object tree.
When typing reaction equations you should keep in mind that species
names in COPASI can contain characters like "+" or even
white-spaces. Since these characters would make it very hard if not
impossible to parse the chemical reaction equation, you have to place
those species names in double quotes. E.g. "Species 1" +
"Species 2" -> "Species 3". No matter if your species names
contain special characters or not, the species names have to be
separated from the reaction symbols ( "+" , "=" and "->" ) by
white-spaces.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/18/2008Reaction table with new entry
Reaction table with new entry
Each new reaction gets a default kinetic which is irreversible mass
action for reactions that contain a substrate. For reaction that only
have a product (e.g. influx into a system) a constant flux kinetic is
chosen.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/18/2008Dialog for changing reaction parameters
Reaction definition dialog
Double clicking on an entry in the table will bring you to another
dialog that lets you change certain parameters of the reaction. You
can change the name of the reaction, the chemical equation and whether
the reaction is reversible or not. Changing the chemical equation and
the reversibility of a reaction influences the type of kinetics you
can choose for the reaction. Each kinetic function defines how many
substrates, products and modifiers it expects. Additionally it defines
whether it can be used for reversible or irreversible reactions only
or if it can be used on either. So depending on how many substrates,
products and modifiers your kinetic equation has and whether it is
reversible or not, only a subset of the defined kinetic functions will
be available in the Kinetics combo box. If the
kinetic function you want to assign to the reaction is not available
yet, you can add it by clicking on the New Rate
Law button (see also ). Depending on the kinetic function you chose, you get a selection
of parameters in the table named Symbol
Definition, all functions parameters get a default value of
0.1 which can be changed by clicking into the corresponding cell and
typing a new value.
Per default all parameters to a kinetic function are local parameters
and they exist only in the scope of the rate law of one
reaction. Sometimes it is of advantage to use the same parameter in
the rate laws for several reactions. This way if you want to change to
value of this parameter, you only have to change it in once instead of
having to change it in every reaction it occurs in
individually. Parameters that can be used in more than one reaction
are called global quantities
in COPASI.
How you add
a global quantity to your model is described in the section called
. Let us for the moment assume you
already added such a global quantity to your model and now want to use
it in a rate law. Each parameter in the Symbol
Definition table has a check box labeled
global. When you check this box, COPASI knows
that the parameter that belongs to it is a global quantity and lets
you select one from a list of global quantities that have been defined
in the model. If none have been defined yet, the list contains only an
entry termed unknown. In this case, you will have
to define one or more global quantities first and then come back to
the reaction where you want to use it. If the name of the global
quantity is set to the unknown term, COPASI will
reset the type of parameter to local if you leave the reaction widget.
So far we did not go into the details of how chemical equations are to
be specified. Chemical equations have a simple schema. First you state
all the substrates separated by "+" characters. Please make sure that
you separate the name of the substrate and the "+" character by at
least one space character, otherwise COPASI will interpret the "+"
sign as belonging to the species name. (Having the "+" character
as part of a species name is allowed in COPASI !) after the list of
substrates, you specify either an equals ("=") character if the
reaction is reversible or the character combination "->" if the
reaction is irreversible. This is followed by the list of products
which must also be separated by the "+" character. Again make sure you
have spaces around the separating "+" characters. Optionally this term
can be followed by a semicolon and a list of modifiers which are
separated by spaces. Either the list of substrates or the list of
products may also be empty, but at least one of them must be
present. Lets look at two examples:
Species A is irreversibly converted into Species B. The chemical
equation you would type is "A -> B".
Species A and B are reversibly converted to Species C, the
reaction has 2 modifiers C and D. The chemical equation for this in
COPASI would be: "A + B = C; C D"Note that one of the
modifiers is the product!
If the reaction takes place in one compartment, the reaction kinetic
specifies a rate of concentration change, whereas if the reaction
takes place in several compartments, the kinetic specifies the amount
of substance change over time.
E.g. in the reaction A -> B, if A and B are in the same compartment,
the kinetic function for the reaction returns its result in
mol/(l*s). If A and B reside in different compartments, the result is
returned in mol/s. (This assumes that your default units are set to
mol, l and s.)
Global Quantities
In the model tree right below the Reaction
branch is the Global Quantities branch. If you
select this branch, you see a table with all the global quantities
that have been defined in your model. When you start a new model this
table, just like all the others so far, is empty (see below). The table has eight
columns and the ones named Status and
Name should by now be already familiar. The third
column specifies the type of the global quantity. There are three
alternatives for that:
fixed means the global quantity has a
constant value (that can be used as a global parameter),
assignment means the value of the quantity is calculated from a mathematical expression, and ode.
If the type is ode the quantity is treated as a variable of the model and a differential equation for this variable can be
provided. The forth and fifth column contain the initial and transient
value of the global quantity as well as the rate of change of the value is displayed on the sixth column.
The last two columns contains the mathematical expressions which may be required as long as the type is not fixed.
As with all other model elements, you can choose how you want to add a
global parameter. The most convenient way is to just enter a name in
an empty cell of the column termed Name.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/18/2008Global quantities table with three entries
Global quantities table with three entries
If you click on the name of a global quantity in the tree on the left
or double click on a row of the table only the information correlated with
the chosen global quantity will be displayed.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/18/2008Global quantity user interface with ode rule
Global quantity user interface with ode rule
Just as compartments and species, global quantities do not have to be a constant
but can be reassigned during e.g. a time course simulation depending
the values of one or more model entities. In order to specify whether a parameter has a constant value
or the value is calculated on the fly according to a mathematical expression,
the drop down list called Simulation Type should be used.
The drop down list contains three following entries:
Global Quantities Simulation TypesNameDescriptionfixed the value of the parameter is constant (which corresponds to the given initial value)assignmentthe value of the parameter is determined by evaluating the given mathematical expressionodethe rate of change of the parameters value is determined by an ordinary differential equation
If you want the parameters value to be calculated from a given mathematical expression you select the entry called assignment from the drop down list. This enables a text field where the mathematical expression can be entered. Likewise if you want the rate of change of the parameters value to be determined by an ordinary differential equation (ode) you select the entry called ode from the drop down list.
Not only the transient value of a parameter can be specified as a mathematical expression, but also the initial value of the parameter.
If you want do specify such a mathematical expression for the initial volume of a compartment, check the check box called Use Initial Expression.
An initial expression can only be specified if the Simulation Type drop down list is either set to fixed or to ode. If the list is set to assignment, the given assignment automatically acts as an initial assignment and there is no need to specify an additional initial assignment.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/18/2008Global quantity widget with an initial assignment
Global quantity widget with an initial assignment
The mathematical expressions that can be specified for rules and initial assignments may contain the same elements as the expressions used to defined function definitions. For a detailed description of the elements see .
When it comes to referencing values of other model entities within mathematical expressions, there is a slight difference between the mathematical expression for a rule and that for an initial assignment.
The former may reference transient values of other model entities whereas the latter may only reference initial values of other model entities.
Even so COPASI does not support building models from ordinary
differential equations, one can specify a model as a set of
differential equations using a set of global parameters which have the
type ode.
Annotating models and model elements
Sometimes it would be beneficial to include additional information in a model that describes the model creation process or that gives biological information about the individual model elements. Especially when you get a model from someone or load some published model from the authors webpage or some model repository, this information sometimes comes in handy.
In order to standardize the process of model annotation, the MIRIAM (Minimal Information Requested in the Annotation of biochemical Models) guidelines have been developed at the EBI in Hingston. These guidelines specify what information is needed to create properly annotated models that are suitable for publication.
Current versions of COPASI allow the user to annotate the model and all model elements according to the MIRIAM guidelines.
For this, the model widget, as well as the widgets for the compartment, the species, the reaction and the global quantities have two additional tabs at the top of the widgets. One tab is called Annotation the other tab is called RDF Browser.
Produced with COPASI 4.4 (Build 29) on Leopard on 12/15/2008Widget showing the annotation to model 123 from the biomodels database.
Annotation widget with annotation from model 123 from biomodels
Before you use the annotation feature for the first time, you have to update the MIRIAM annotation that COPASI uses to create the list of ressources that can be associated with an element. You update the list by pressing the the update MIRIAM button in the toolbar. Pressing this button triggers the download of the MIRIAM ressources from the internet, so this will only work if you are connected to the internet (once this is done, you should restart COPASI).
COPASI (as well as SBML) use RDF (Ressource Description Framework) to store the annotation in the model file. To view the resulting RDF tree, you can select the RDF Browser tab. This is purely for displaying and not for editing. You will probably not look at this information very often.
If you select the Annotation tab, the same annotation is presented in a more user friendly way. There are different pieces of information that can be given for a certain model element, e.g. the author you added the element or created the model or for species some biological information to the identity of the species.
Each piece of information is stored as a triplet that is composed of the relationship, the ressource for that relationship and the corresponding id. The relationship can be chosen from a limited set of relationships. The same goes for the ressource. E.g. if you want to specify that species A in the model corresponds to ATP, the relationship would be set to is and the ressource could for example be the ChEBI (Chemical Entities of Biological Interest) dictionary. The id would then be the ChEBI identifier for ATP, which is CHEBI:A15422.
The COPASI GUI allows the user to store more information than the MIRIAM guidelines for SBML allow, so if you export your model to SBML after annotating it, some information might not be available for other SBML tools.
There is also a webpage on the COPASI webserver that has some more technical details about the way annotations are stored in COPASI.
Parameter View
The parameter view widget can be displayed by selecting the leaf
called Parameter Overview on the Model->Biochemical branch (see below).
This widget allows you to view and edit
all parameters of the model in one place. This saves you from moving
around the model tree if you e.g. first have to edit the initial
concentrations for some species and afterward parameters of one or
more reactions. The view shows you the initial concentrations for the
species at the top followed by the initial time and the volumes of
all the compartments and at the bottom the kinetic parameters of all
reactions.
In order to change a value, you double click on it which
lets you input a new value. On hitting the return key or clicking
somewhere else, the new value is not written to the object directly,
but a '*' character appears in front of the name of the changed
parameter. If you now leave this widget or press the Commit button at
the bottom of the dialog, the new value is written to the
corresponding object in the model.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/18/2008Parameter View
Parameter View
User Defined Functions
COPASI already defines a large set of commonly used kinetic functions
to choose from. The list of defined functions is located at the last branch in the object tree.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/18/2008Function table with predefined functions
Function table
Nevertheless sometimes you need to define your own kinetic function to solve a specific problem. COPASI enables you to add a new function either by double clicking on an empty table row or by clicking on the New button on the bottom of the screen.
In the function definition dialog, you give your function a name in the Function Name field.
This name has to be unique within the list of defined functions. Next, you
have to specify a formula that defines the reaction rate of your
kinetic function in the Formula field. The
function string only covers the right side of the rate function.
Produced with COPASI 4.3 (Build 25) on Leopard on 03/07/2008Dialog for the definition of functions
Function definition dialog
So for Michaelis-Menten which is defined as
v=V*(S/(Km+S))
you would enter
v=V*(S/(Km+S))
into the Formula field. While you are typing the
formula, COPASI already tries to parse the equation and extract the
parameters. All parameters that COPASI finds are listed in the
Parameters table.
Produced with COPASI 4.3 (Build 25) on Leopard on 03/07/2008Function definition dialog with committed function
Function definition dialog with graphical display of the function
In COPASI parameters can have
arbitrary names, there are only a few rules that one has to be aware
of. If a parameter starts with a letter or underscore character and
contains only letters, digits and underscore characters all is well,
if however the parameter name contains other characters, the whole
parameter name has to be enclosed in double quotes. If the parameter
name contains double quotes or backslashes those have to be escaped by
a backslash.
As all variables found are defined, per default, as
Parameters, you should specify their correct types by selecting one from the drop down list Description.
However, the specific type of variables will affect to the type of reactions the function can be used for.
E.g, if you define the function to contain two
substrates and a modifier, you can later only use it for reactions
that really do have two substrates.
The restrictions on
the number of modifiers is not strict since substrates and
reactants could act as modifiers. So the above mentioned rate law
could be used on reactions that do not explicitly specify a
modifier. You can also see this in the
Application restrictions table below the
Parameters table. Let's say you define the
function
A*B
and define A and B to be
substrates, you will see that the Application
restrictions say that there must be exactly two substrates
in the reaction for that kinetics to be applicable. After defining
this function, you will be able to use it for all chemical reaction
that have exactly two substrates. Last but not least, you have to
define whether this function can be applied to reversible,
irreversible or both reaction types by selecting the
reversible, irreversible or
General radio button respectively. You can also
call other functions from function definitions. There are four things
you have to watch out for when you call a function within another
function.
Recursive function calls are not permitted. That is a function may not
call itself, neither directly nor by calling another function that
might call the first function again further along the line.
You have to specify the correct number of arguments to the function called.
You have to specify the correct argument types to the function
call. I.e. if you call "Henry-Michaelis-Menten (irreversible)" from
within another function, you have to make sure that the first call
argument has a usage of Substrate and the other two have the usage Parameter.
Which brings me to the last point. The built in function names in
COPASI often use characters like "-" or even spaces, so if you want to
call one of those functions, you have to quote this function name. So
calling "Henry-Michaelis-Menten (irreversible)" from another function
would look like this:
"Henry-Michaelis-Menten (irreversible)" ⁡ ( S , Km , V )
After you commit the function, you can use it for the definition of
reactions.
The operators and functions that COPASI knows and therefore can be
used to create user defined functions are the following:
Standard OperatorsOperator/FunctionDescription+plus operator-minus operator/division operator*multiplication operator%modulus operator^power operator
Miscellaneous FunctionsOperator/FunctionDescriptionabs / ABSabsolute valuefloor / FLOORfloor valueceil / CEILnext highest integerfactorial / FACTORIALfactorial functionlog / LOGnatural logarithmlog10 / LOG10logarithm for base 10exp / EXPexponent function
Logical FunctionsOperator/FunctionDescriptionand / ANDlogical and (&)or / ORlogical or (|)xor / XORlogical xornot / NOTlogical negationle / LEsmaller or equal (<=)lt / LTsmaller (<)ge / GEgreater or equal (>=)gt / GTgreater (>)ne / NEnot equal (!=)eq / EQequal (=)
MiscellaneousOperator/FunctionDescriptionif / IFif statement for the construction of piecewise defined functions etc.()parenthesis for grouping of elements
The functions name can be written with either all lowercase letters
or all letters uppercase. Mixing of upper and lowercase letters is not
allowed and will lead to errors.
Although COPASI allows the usage of discontinuous functions (ceil,
floor, factorial, etc) all integration is done by LSODA which
officially can not handle discontinuous functions. Nevertheless in
most cases this will lead to correct results, however you should be
aware of the fact that the usage of discontinuous functions in COPASI
can lead to errors. Later versions of COPASI will use different
integration methods that will be able to deal with discontinuous
functions.
In addition to the function above, COPASI knows some predefined constant names:
Built-in ConstantsNameDescriptionpi / PI quotient of a circles circumference and its diameter ( 3.14159...) exponentiale / EXPONENTIALE Euler's number ( 2.7183... ) true / TRUEboolean true value for conditional expressionsfalse / FALSE boolean false value for conditional expressionsinfinity / INFINITY positive infinity
Again, built-in constant names can be written with either all
lowercase letters or all letters uppercase. Mixing of upper and
lowercase letters is not allowed and will lead to errors.
In addition to defining "normal" functions, COPASI allows the
definition of piecewise defined functions. Piecewise defined functions
are constructed with the IF statement. The IF statement in COPASI is
used like a function with three arguments. The first argument is a
conditional expression that evaluates to either TRUE or FALSE, the
second argument is an expression that is evaluated if the condition
evaluates to TRUE otherwise the third argument, which can also be an
expression, determines the value of the function. The second and third
argument to the IF statement must evaluate to a double value, that
means it can not be a conditional expression like the first
argument. On the other hand, the second and third arguments themselves
can be IF statements. So in order to make this a little more clear, we
will look at how one would implement the Heaviside step function in
COPASI:
if(x lt 0.0, 0.0, if(x gt 0.0, 1.0, 0.5))Sliders
Sliders are user interface elements that let the user change model
values without having to go to the corresponding dialog first. This
way the user can change certain model values and immediately see the
result this has on e.g. a time course simulation. The use of sliders
is not limited to the Time Course task, but they can also be used for
the Steady-State task and the Metabolic Control Analysis.
Per default the slider dialog is hidden, if you want it to be
displayed, you have to activate it by toggling the corresponding menu
entry in the Tools menu or through the slider
button in the tool-bar. Depending on what element is selected in the
object tree, the dialog will be disabled and a text will be displayed
within the dialog that tells you so. If you select a task (or an
element below the task) that supports sliders, the sliders dialog will
be enabled.
Once the slider dialog has been activated, you can add new sliders
with the new slider button at the top of the
slider dialog. To edit the parameters of an already defined slider,
just click on the edit button, which is located
on the right side of the slider towards the bottom. If you no longer
need a slider you have defined, you can close it by clicking on the
remove button which is the top button on the
right side of the slider. Alternatively you can add or modify the
existing sliders via a context menu. The context menu can be activated
with the right mouse button (CTRL + Mouse button for single button
mice on Macs!). If you right click on an existing slider, the menu
will offer the possibilities to remove this
slider or to edit it. If you right click into
the dialog window where there is no slider, you will be offered the
possibility to define a new slider.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/19/2008Linux screenshot that shows COPASI with a plot window and the slider dialog
COPASI with plot window and sliders
Once you are in the dialog for the definition of a new slider (see above), you
have to choose an object to manipulate via the slider. This object can
be selected from the selection dialog that pops up when you click on
the choose object button. The selection tree is
the same as the ones you get when selecting objects for a report
definition. The selection dialog also offers an expert mode in
case the object you want to manipulate with the slider is not present
in the simplified tree. Usually the objects that you want to modify in
the time course simulation are one or several of the reaction
parameters. This way you can interactively see how the behavior of
your model changes when you change a specific parameter. In
combination with plots this is a very powerful way to examine the
behavior of your model.
After selecting an object, you can set the parameters for the
slider. You specify the range the slider has to cover in the
Minimum Value and Maximum
Value fields. Additionally you can specify if the slider
shall have a logarithmic or a linear scale
. Per default sliders have a
linear scale
. Normally a slider will be available for all tasks
that support sliders. An exception to this are slider for objects that
are directly associated with a specific task, e.g. the number of steps
in a time series, if you choose such an object for a slider, the
slider will only be available for this task.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/19/2008Basic dialog for the definition of a slider
Basic slider definition dialog
At the bottom of the dialog there is a button labeled
Advanced. If you click on this button more
options that influence the sliders behavior will show up (see above). Clicking the
button a second time will hide these options again. The advanced
options contain mostly fields that let you modify how many steps the
slider has (see explanation below). The Object
Value field determines the current value of the object that
is associated with the slider. In the Number of Minor
Ticks field you specify how many minor ticks your slider
will have. And in the Tick size factor field you
specify how many minor ticks make a major tick. Major ticks can be
used to coarsely go through the range of the slider whereas minor
ticks allow you to step through the range in a more fine grained
fashion. Instead of specifying the number of minor ticks, you can
specify the size of a minor tick. If you change either of those two
values, the other one will be adjusted accordingly. The formula is
minor tick size=(Maximum Value-Minimum Value)/number of minor ticks.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/19/2008Extended dialog for the definition of a slider
Extended slider definition dialog
Once you have made all the settings, you confirm the slider definition
with the OK button. A new slider will appear in
the slider dialog.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/19/2008Slider dialog with three sliders
Slider dialog with three sliders
Each slider shows the name of the object, the current value and the
range in its label (see above). If the current value of the slider is outside of
the defined range, a corresponding warning will be shown. The slider
dialog has a check box called update
automatically if this box is checked, COPASI will run the
corresponding task each time you release a slider handle after moving
it. If you don't want COPASI to automatically run the task each time
you change a sliders value, you can uncheck this box and run the task
manually by clicking on the run task button.
If the value of an object for which a slider has been defined changes
when a task is run, the slider will automatically show the new
value. If the check box called update ranges is
checked, the sliders will automatically adjust their range if the
value falls outside of the defined range. If the new value is larger
than the old maximum value, the new maximum will be set to twice the
new value. Likewise if the new value falls below the old minimum
value, the new minimum will be set to half the current value.
Modifying a slider is essentially the same as defining a slider. The
only difference being that you can not change the object the slider is
connected to. In order to do that, you have to delete the slider and
define a new slider for the new object.
Most people will probably use the sliders in combination with the
mouse, dragging the sliders pointer to the desired new value. Since
this way of using a slider is rather coarse, especially if the slider
contains a large number of steps, you can also use the keyboard to
change a sliders value. In order to do this, the slider you want to
manipulate needs to have the keyboard focus. To give the keyboard
focus, you have to hit the TAB key several times until the slider is
surrounded by a small frame. Once the slider has this frame, you can
increment and decrement the sliders value via the cursor and the page
up/down keys on the keyboard. The cursor keys are used to change the
value in small steps, the page up/down keys can be used to change the
value in larger steps (see the explanation for major and minor keys
above).
Tutorial Wizard
COPASI also includes a short tutorial on how you create a model and
run a time course simulation with plotting. You can start the wizard
from the help menu. The corresponding menu entry is
called Simple Wizard.
On the left side of the wizard there are six buttons that correspond
to the six steps. When you first open the wizard, step one is selected
and the widget on the right shows some documentation that you should
read and possibly repeat the steps explained. Once you are finished
with step 1, you can either click directly on the button that
corresponds to step 2, or you can click the
forward button which will always bring you to
the next step. If you would like to reread something from an earlier
step, you can move to the specific step with the buttons or use the
forward>> and <<back
buttons to navigate.
The wizard leads you in six steps from creating a model to doing a
time course simulation of the model and plotting the results of the
time course.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Tutorial wizard dialog screenshot
Tutorial wizard
Output
After you have defined all
reactions that make up your model, you could go ahead and do
some calculations with your model. For some of the task this is fine
since they show you the results in a separate results dialog and it
might not be necessary to store those results into a file. For other
tasks, like e.g. a time course, it is very likely that you want to
store the resulting trajectory in a file or plot the result for visual
inspection. So if you want COPASI to store the results or do a plot of
them, you have to define either a report and associate it with a file
or define a plot. (In the
section we will also offer an alternative, albeit less flexible, way
for storing the results of a time course simulation.)
COPASI already has a list of predefined reports suitable for some of
the calculation task. These are described in the next paragraph. If
you want to create your own plots or reports you can either use the
output assistant (the easy way) or you can define the output manually
(the flexible way), as described in the section.
Predefined Reports
For some of the calculation tasks predefined reports exist in
COPASI. They are automatically created when COPASI is started or when
a file is loaded that does not already contain them. These reports
have the same name as the task they are suitable for. E.g. the
predefined report for Steady-State calculations is Steady-State.
The predefined reports print a description of the settings you provided
for the calculation, usually (if it applies for the specific
calculation) a table with intermediate results, and in the end a
detailed report of the result. The report definitions can be changed
or deleted using the mechanism described in the section. If you changed one of
the predefined reports and want to go back to the original, just
delete the report definition and save the file. When you load it again
the current missing default report will be generated automatically.
If you want to use the predefined reports you have to make sure that
the report is selected for a task and that a filename is associated
with the report. For this you can use the Report button as
described in the sections about the specific calculation tasks below.
Output Assistant
The output assistant presents the easiest way to generate your own
output definitions which you can later adapt to your wishes using the
techniques described in . Almost all task dialogs in COPASI have a button at the lower right
that is labeled Output Assistant. If you click
on this button, a new dialog will open with a list
of predefined output definitions on the left. If you select one of the
output definitions from the list, you will get a short description of
what the output does on the right side of the dialog. Above the
description is the title of the output definition. This title can be
changed in order to be able to identify the different output
definitions in case you are planning on creating more than one output
definition of a certain type. Using this dialog both plots and reports
can be created.
Creating an instance of the selected output objects is as easy as
clicking on Create! at the bottom of the
dialog. Once you clicked this button, a new report or plot, depending
on what you selected in the dialog, will appear in the corresponding
branch of the Output section of the model
tree. The Output branch is the second to last branch
in the tree on
the left. The name of the output definitions will be the title of the
object which you selected from the list. If another output definition
in this section already has the same name, a postfix will be appended
to the name. The so created output can now be edited or deleted. If
the newly created output is a report it will automatically be selected
as the active report for the current task. You then still have to
select a filename for the output using the Report button.
This is
described in the sections about the specific calculation tasks
below. How output definitions are created, edit and deleted manually
is the topic of the next sections.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Output Assistant Window
Output assistant selection dialog
Manual DefinitionReports
This section describes how to create or edit a report definition. Keep
in mind that you still have to select this report for the specific
calculation task you want to perform. You can do this (and also choose
a filename to write to) using the Report button as described below
in the sections about the different tasks.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Report table with default reports
Report Table with default Reports
The dialog for defining report definitions is located under the
Output->Reports branch in the object
tree. Double clicking on an empty row in the table creates a new
report object and opens the dialog for modifying the report
definition. In this dialog, you can specify a name for the report in
the Name field. From the
Task drop down list, you can choose for which
kind of task this report should be written. So if you want to store
the result of a time course, you should choose
Time-Course here. The report usually stores the
results of its task as a table; the standard separator character for
elements in this table is the tab character (\t). If you want to have
another character as the separator field, you have to uncheck the
<tab> check box and specify the separator
character or string you want in the Separator field.
Beside the <tab> check box there is another
input field labeled Precision. With this field you
can specify how many significant digits are used for numerical
output. The default value is 6.
If you want to, you can also add a comment for the report, e.g. you
could state what this report is supposed to represent.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Simple selection dialog
Simple selection dialog
Next you have to define the objects that you want to appear in the
report. There are two modes to define a report definition. Per
default, the report is laid out as a table. For example, the report for a time
course simulation will write one line per time step and each line will
typically contain the time followed by one or more species
concentrations. In the advanced mode activated by clicking on
the button labeled Advanced, the report is
split up into three sections, a header, a body and a footer. You can
define the output for each of the sections separately by clicking on
the corresponding tab. In order to get back to the standard table
layout, you have to click on the Advanced
again. COPASI will warn you that you might loose some information by
converting from the advanced report definition format to the table
format.
Le us discuss how to define a report definition with table layout
first since you will probably use this most of the time. To add a new
object to the report definition, you have to click on the button
labeled Item. This will open the object browser
dialog.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Object browser dialog expert mode
Object browser dialog expert mode
The selection dialog shows a tree that contains what we think are the
objects that would be most commonly used in generating report, plots,
sliders etc. You select objects by clicking on the corresponding leave
in the selection dialogs tree view. For plots and report, the simple
selection dialog will allow you to select several objects at once. To
select a continuous range of objects, you select the first object of
the range, then you press and hold the SHIFT button and select the
last object in the range. You can also make non-continuous selection
by holding down the CTRL key while clicking on the object to
select/deselect. Also selecting a whole branch in the selection dialog
will select all the leaves under that branch.
If this simple selection dialog does not contain the object that you
want to include in your report, you can activate an extended selection
tree by activating the expert mode check box.
The tree you now see contains all objects COPASI knows about. In
this tree, the objects belonging to your model are located in the
branch that corresponds to the name of your model. The position of
that branch varies since the branches are sorted alphabetically. The
selection that you have already made in the simple selection
tree should be preserved, and vice versa. Any selection you make in the
full tree is preserved when you switch back to the simple tree. Each
branch of the full tree has a check box up front which can assume
three states. The unchecked state means that no objects in this
subtree are selected. A check mark on a black background means that
the whole subtree is selected, i.e. all objects in this subtree are
selected. A check mark on a gray background means that part of the
subtree is selected.
Due to the model structure, most objects appear more than once in the
tree.
So do not be surprised if you select some objects you may be see that
not only the selected objects will suddenly change their selection
state. E.g. if you select the whole
Compartments subtree of your model, all the
species which are part of the compartments get selected as well,
which means that on selecting the Compartments
branch, the whole Species branch changes
its state to be selected.
Let us assume you want to define the report for a trajectory task in
expert mode. In this case, you will probably want the time and some or
all of the transient concentrations of the species in your report.
The time for the time course is the last item in the
Model branch, you select
it by clicking on the check box in front of the name. If you want to
add the concentrations of all species, you open the
Species sub-branch in the
Model branch and open the Select by
attribute branch. There you can select the
Concentration attribute. Selecting the
Concentration attribute will select the
concentrations for all species. If you only want to have some of
the species in your report, you open the sub-branches of the
wanted species in the Species branch
and select the Concentration attribute only for
those species. If your model contains many species and you
want to have all except one species in your report, it is often easier to first
select all concentrations via the Select by
attribute branch and then deselect the one you don't
want, rather then selecting the individual concentrations you
want. Once you are finished with selecting the objects for your
report, you confirm the selection by clicking the
OK button in the selection dialog. The objects
you selected will now appear in the list box of the report definition
dialog.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Report definition dialog
Report definition dialog
They will appear in the report in the same order as they appear in
this list. To reorder the entries in the list, you can select
individual entries and move them up and down in the list with the
corresponding buttons on the left of the list. For example it might be a
good idea to move the time object to the top of the list so that it
will appear as the first table column in the file since this is the
way most programs would expect it. Also in order to delete unnecessary
items, you just select them and click on the
Delete button. The only thing that is now left
is to connect this report to a file. This has to be done in the dialog
for the specific task and we will cover this when we explain how to
run the individual tasks.
The report we just defined will be written in the form of a table. So
if this is a report for a time course simulation, the final output
would have one line per time step of the simulation and in each line,
each object that is in the list would be written once separated by
whatever you defined as your separator character (Normally this would
be the <tab> character).
Per default, the check box labeled Title Row is
activated, which means that COPASI will write a header line before the
table with the names of the objects that make up the individual
columns. If you don't want such a header in the output you have to
deactivate this check box.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Advanced report definition dialog
Advanced report definition
As stated above, the advanced report definition allows you to define
the output for the three parts of the report separately. The header
part of the report is written once before the corresponding task, the
output of the body elements occurs once per step of the corresponding
task, e.g. for the time course once every time step, and the footer is
written once after the task has finished. In this sense, the standard
table report definition is nothing but an advanced report definition
with a title header and a body that consists of the time and some
species concentrations separated by separator items. The footer is
empty. If you write your own advanced report definition, you are
responsible to add separator tags where appropriate. An advantage to
the advanced report definition is that you can add arbitrary text to
any of the three sections. Everything else works as described for the
standard report definition, you can add and delete items by selecting
them from the object browser dialog. You can also move these items up and down
by selecting them and clicking on the Up or
Down button. Separator items can be added by
clicking on the Separator button. The symbol or
text that makes up the separator item is again defined by the check box
and the adjacent input field towards the top of the report
definition dialog.
Plots
Plotting is another form of output that COPASI can do. Most of the
time, you probably want to plot some or all of the species
concentrations during a time course simulation and, as described above,
this is easiest done by choosing that predefined plot template from
the Output Assistant. But since
the output assistant can not cover all possible plots sometimes you
will have to define your own plots.
Currently, COPASI only supports two dimensional plotting. To define a
plot, you open the plot definition dialog by selecting
the Output->Plots branch in the object
tree. A plot in COPASI is made up of a number of curve or histogram
objects. In order to add a new curve object you click on the
New curve... button.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Empty plot widget
Empty plot widget
A selection dialog similar to the one described for the creation of reports will
appear. The major difference is that you now have two tree views side
by side instead of only one. The left tree is
a single selection dialog that lets you specify the object
to be drawn along the x-axis. For a plot of concentration against time
this would be the simulation time. The right tree is, again, a
multi-selection tree that lets you specify what would be drawn along
the y-axis. In case of plotting concentrations against time, this would
be one or more concentrations of species. Just as described for
the report definitions, you can switch between a simple tree and the
full tree, but for most plots the simple tree will be enough.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Selection dialog with some items selected
Simple selection dialog with selected items
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Expert selection dialog for curve objects
Selection dialog in expert mode
Once you have finished your selection, you click on the
OK button which will take you back to the curve
definition dialog. For each object selected in the right tree, you
will now see one tab which represent the corresponding curve object
for the plot. To remove one of the curves, select the tab
that corresponds to the curve you want to remove and then click on the
Delete curve button. The next time you do a
time course simulation,
each plot that is marked as active will be plotted automatically. How
you define a plot as being active will be explained below.
Each curve object has a title, and the information what will be drawn
on the x- and y-axis. Additionally you can specify whether the curve
should be drawn as a line, as points or as symbols. This has to be
specified for each curve separately. You can also specify if the plot
should be drawn with a logarithmic scale for one or both of the
axis.
In the plot definition dialog, in addition to adding and removing
curve objects, you can give a name for the plot definition and
specify whether the plot should be active or not with the
active check box. (Only plots that are active are
drawn when a time course
simulation is run!)
Another way to specify whether a plot is active or not is in the plot
table where all the plots are listed. Each row in the table contains a
column named active that contains a check box
with which you can toggle the state of a plot. If you changed the
state of one or more plots, you have to commit these changes either by
clicking the Commit button or any other action
that is equivalent to pressing the Commit
button (see section).
In addition to curves, you can also tell COPASI to draw a histogram of
the data generated during a time course simulation (see ) or a parameter scan (see ). A histogram draws a bar graph that shows
how often the parameter took a certain value. To define a histogram
instead of a curve, you click on the New
histogram... button in the plot definition dialog. For the
new histogram you can specify a title, the variable for which the
histogram should be drawn, and the increment of the value. The
increment parameter tells COPASI how wide the individual bars of the
histogram are going to be. Let's say the value of the parameter was in
the range of 3 to 8 and you set the increment to 0.1, COPASI will draw
a histogram with 50 bars, each bar representing a value range of 0.1
units. Curves and histograms can be combined in a single plot.
Simple TasksSteady-State Analysis
In order to run a Steady-State analysis, you have to navigate to the
Task->Steady-State branch in the object
tree.
Produced with COPASI 4.3 (Build 25) on Leopard on 03/07/2008Dialog for doing calculating a stability analysis
Steady-State task dialog
In the dialog that appears there, you can make several settings that
influence the way the Steady-State analysis is calculated. First of
all, you can decide whether COPASI should calculate the Jacobian
matrix and/or do a stability analysis as well by checking the
corresponding check box. The executable check box
is used to instruct the commandline version CopasiSE to do this task
if running on the corresponding file. In the Method Parameter
table you can also make several settings that influence the method for calculating
the Steady-State. For a detailed description of those parameters see the corresponding
methods
part of this documentation. To finally run the Steady-State
calculation, click on the Run button at the
bottom of the screen. After the calculation, COPASI will jump to the
Result widget.
The Result widget for the Steady-State calculation
contains several tabs for the individual results.
The first tab contains information about the species at the Steady-State
condition as well as the compartments at the second tab. The third tab
shows the model quantities whereas the reactions and their fluxes are
displayed at the fourth one. The display between the concentration fluxes
and the particle one is depending on what you have selected on the drop down
list at the tab menu. As mentioned at the very beginning this documentation,
you are able to easily change the display at any time.
The fifth and the sixth tab only contain results if you told
COPASI to calculate the Jacobian matrix. The fifth tab then shows the
Jacobian matrix for the full system and the sixth one contains that
for the reduced system. For both Jacobian matrices, the
eigenvalues are also shown. The seventh tab contains the results for the
stability analysis if a stability analysis was requested. The last tab
shows protocol that lists the calculation steps COPASI took
while trying to find a Steady-State.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Dialog that displays the results of the stability analysis
Results of the stability analysis
In order to have an output from the Steady-State Task, you have to
create an output definition as described in the section or you use the default report
named Steady-State. The default report prints a message telling
whether a Steady-State was found. It also reports the concentration,
concentration rate, particle number, particle number rate, and
transition time of all species as well as the flux for all
reactions. If they have been requested, the Jacobian matrix and the eigenvalues are
also reported. The easiest way to get a customized output is probably to
use the output assistant activated via the Output
Assistant button. This is described in the section. All that is left to do in order
to write the output to a specific file is to connect output
definition with a file. This can be achieved by clicking on the
Report button. This opens a dialog that lets
you connect the report of a specific task to a file on your hard
disk. First we choose a report that is suitable for the Steady-State
task from the drop down list at the top of the dialog. Next, we
specify a file that will be used to store the report by clicking on
the browse button and selecting the destination
in the file dialog that opens. Per default, COPASI creates a new file
or overwrites an existing file with the same name. Alternatively, you
can tell COPASI to append the report to the end of an existing file by
selecting the corresponding check box labeled
Append at the bottom of the dialog. Once you are
finished, you click on the Confirm button. If you
now run the task, COPASI will write the output to the file you
specified.
Stoichiometric State AnalysisElementary Flux Modes
Letting COPASI calculate the elementary flux modes for the system is
very easy. Select the
Tasks->Stoichiometry->Elementary Modes in
the object tree and click on the Run button in
the dialog that appears.
The elementary modes found will be displayed directly in this
dialog. Each elementary mode lists the reactions it consists of
together with their chemical equations.
If you want to have output from the Elementary Mode calculation, you
have to create an output definition as described in the section. The easiest way is
probably to use the output assistant which activated via the
Output Assistant button. This is described in
the section. All that is left to do
in order to write the output to a specific file is to connect an
output definition with a file. This can be achieved by clicking on
the Report button. This opens a dialog that
lets you connect the report of a specific task to a file on your hard
disk. First we choose a report that is suitable for the Elementary Flux
Modes analysis task from the drop down list at the top of the
dialog. Next, we specify a file that will be used to store the report
by clicking on the browse button and selection
the destination in the file dialog that opens. Per default, COPASI
creates a new file, if the file does not exist, or overwrites an existing
file with the same name. Alternatively, you can tell COPASI to
append the report to the end of an existing file by selecting the
corresponding check box labeled Append at the
bottom of the dialog. Once you are finished, you click on the
Confirm button. If you now run the task, COPASI
will write the output to the file you specified.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Dialog showing the calculated elementary modes for a model
Elementary flux modes analysis dialog with results
Mass Conservations
Calculating mass conservations in COPASI is also very easy. Navigate
to the Tasks->Stoichiometry->Mass
Conservation branch in the object tree and click on the
Run button as with every other task.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Dialog showing the results of a mass conservation calculation
Mass conservation task dialog with results
Moieties are the result of stoichiometric analysis. The result of this analysis is not unique it depends on the algorithm chosen. COPASI uses the Householder reduction method described in Vallabhajosyula06. To make matters worse it even depends on the implementation of the Householder reduction for which COPASI relies on platform specific libraries for performance reasons, i.e., the result may differ on Windows and MacOS X. These differences are not crucial as the moieties build a basis of the linear dependent subspace of the solution and the choice of such a base system is obviously not unique.
However, often people like to know the total preserved amount of a moiety. Since the moiety calculation is not unique COPASI provides a convenience method to create a global quantity of type assignment to calculate this value. This method is accessible through the tool button. The result of this assignment is now independent from the algorithm chosen to calculate the moieties and thus may even be exported to SBML.
Time Course Simulation
In order to do a time course simulation, you have to navigate to the
corresponding task branch in the object tree which is located at
Tasks->Time Course.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Dialog for calculating a trajectory
Trajectory task dialog
In the Time Course widget you can change several parameters for the
time course, e.g. the duration of the simulation and the number of
intervals that are being calculated in the time range. Alternatively
to setting the number of intervals, you can also set the size of the
interval. If you set either one, the other will be updated
accordingly. Because if you change the duration, the number of intervals
will stay the same, which means that the interval size will be
adjusted. The check box labeled Save Result in
Memory tells COPASI to keep the result of the time series
calculation in memory in order to display it in a result dialog. Since
this can be a large amount of data depending on the size of your model
and/or on the number of intervals you want COPASI to calculate, you
should disable this if you think the result might not fit into
memory. The consequence of disabling this check box is that you need
to define a report in order
to store the results of the time course simulation.
Another thing that you can adjust in this dialog is the time at which
COPASI starts to record the output. Normally COPASI will store all
output and display it in the plot and reports, if there are any, or in
the results dialog, if that feature was not disabled. With
the delayed check box and input field of
Start Output Time, you can specify that COPASI shall
drop all results prior to a certain time point. For example, you could decide
that you want to run a time course simulation for 100 seconds but only interested in
the last 50 seconds of the simulation. In this case you would activate
the delayed check box and specify a
delay of, lets say, 50. This delay will be used for all kinds of output.
The time course simulation does not necessarily start with
t0=0
. The start time of the time course simulation depends on the initial
model time which can be specified in the general model settings dialog.
COPASI supports six different methods for calculating time course
simulations. COPASI can use the LSODA solver, or
its variant called LSODAR,
to calculate the time course deterministically. COPASI is able
to calculate the time course stochastically by means of one of two stochastic
solvers: the Gibson and Bruck method or
the Tau-Leap one. Depending on the solver you
have chosen, you can set several parameters in the Parameter
value table that influence the way the method works. A
detailed explanation of those parameters will follow in the
methods
part of this document.
In addition to purely deterministic or purely stochastic time course
simulations, COPASI can also use a so called hybrid method to
calculate a trajectory. This hybrid method splits the model in two
segments according to the number of particles participating in a
reaction. Reactions with many particles are simulated
deterministically and those reactions with only a few particles are
simulated stochastically. The boundaries of what is considered as to many or
few particles can be set by the user. Depending on the nature of the
model, the hybrid simulation can lead to significant simulation
speedup compared to purely stochastic simulation while still being
more accurate than purely deterministic simulation for small particle
numbers. However, the method should still be considered
experimental. For a more detailed description of the method and the
attributes that you can set see the
methods section
.
The hybrid solver comes in two flavors. One uses LSODA for
deterministic simulation and is called Hybrid
(LSODA), the other uses Runge-Kutta fourth order and is
called Hybrid (Runge-Kutta).
If you haven't created a report definition yet, you can use the output
assistant to easily create one by clicking on the corresponding button
at the bottom of the time course dialog. Once you have created a report definition, you
have to associate this report definition with a file for COPASI to be
able to write the results to that file. To do that, you click on the
Report button.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Dialog to associate a report with a file
File association dialog for a time course report
The dialog that pops up will let you choose the report you want to use
(in case you created more than one) and lets you browse for a file to
store the report to. Additionally, you can choose if you want to
append the report to an already existing file. The default is to
create a new file, or to overwrite an existing file. If you want to
append to the selected file, you have to check the
Append check box.
Once you made all the desired changes to the parameters, you can start
the time course simulation by clicking on the Run button.
COPASI will show a progress bar while running the simulation, which might take
some time depending on several factors, like the hardware you are
using, the simulation method you chose, and/or the size of your
model. Once COPASI finishes the calculation, the results will be displayed
in the report file you defined and/or in a separate result dialog, if
you told COPASI to keep the results in memory.
The Result dialog is located directly below the
Time Course branch in
the object tree. In this widget you can choose whether you want the
results to be displayed as concentrations or as particle numbers, and
you have the possibility to store the results to a file. The advantage that
a report has rather than writing a file in the Result
widget is that you can choose exactly which species concentrations you want
to store whereas the Result dialog always stores all species
concentrations. You also can't change the order in which the
species concentrations are written, if you store the result from this dialog.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Dialog that shows the results of the trajectory task
Trajectory results
Working with Plots
If you have defined an active plot before calculating a trajectory,
COPASI will draw the plot. The plot window has three elements. A tool
bar at the top, that lets you print the plot or save the data into a
file; the legend, which is interactive such that the drawing of certain
curves can be toggled by clicking on the corresponding legend entry;
and the actual plot.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Dialog window showing a plot
COPASI plot window
During moving the mouse cursor inside a plot widget, the mouse
coordinates with respect to the coordinate system of the plot
are displayed beside the mouse cursor.
In order to zoom further into a plot, you can select a rectangular
area on the plot by clicking somewhere in the plot and dragging the
pointer. The plot will now zoom into the area you just selected. To go
back to the original plot, right click on the plot area.
Macintosh users with single button mice should use CTRL-click.
The qwt plot widget has some problems under Mac OS X. Especially
zooming often leads to strange artifacts. Also the mouse coordinates
that are normally drawn with the cursor are unreadable on COPASI for
Mac OS X
Metabolic Control Analysis (MCA)
COPASI can also do a Metabolic Control Analysis (MCA)
for your model. The MCA task is located under Tasks->Metabolic
Control Analysis.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Dialog for running a metabolic control analysis
MCA task dialog
In order to do a full MCA (elasticities and control coefficients),
COPASI needs to look for a Steady-State first, otherwise COPASI can
only calculate the elasticities. If you did not already do a Steady-State calculation
right before so that the system already is in the Steady-State, if one
was found, you should enable the check box that tells COPASI to do a
Steady-State calculation before calculating the MCA. Depending on
whether COPASI needs to do a Steady-State analysis or not, you can
change one or more parameters that influence the way the MCA and the
Steady-State are calculated. The parameters for the Steady-State
calculation or that for the Steady-State widget explained in
the section.
To start the calculation, you click the Run
button. After the calculation is finished, COPASI will automatically
switch to the Result dialog. The dialog shows
three tabs that contain the results of the Elasticities,
Flux Control Coefficients and Concentration
Control Coefficients.
Depending on whether a steady state condition was found or not, only the
Elasticities tab might be enabled. COPASI will
state the status of finding a steady state in a label right above the tabs.
For all of the results, you can choose if you want COPASI to display them
scaled or unscaled.
In order to have an output from the MCA, you have to create a report
as described in the section or you
decide to use the default report. The default report will output all
matrices that are calculated as well as the Steady-State, if steady
state calculation is requested. All that is left to do in order to
write the output to a specific file is to connect output definition
with a file. This can be achieved by clicking on the
Report button. This opens a dialog that lets
you connect the report of a specific task to a file on your hard
disk. First we choose a report that is suitable for the MCA task from
the drop down list at the top of the dialog. The default report for
MCA is called Metabolic Control Analysis. Next,
we specify a file that will be used to store the report by clicking on the
browse button and selecting the destination in
the file dialog that opens. Per default, COPASI creates a new file or
overwrites an existing file with the same name. Alternatively, you can
tell COPASI to append the report to the end of an existing file by
selecting the corresponding check box labeled
Append at the bottom of the dialog. Once you are
finished, you click on the Confirm button. If you
now run the task, COPASI will write the output to the file you
specified.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Dialog showing the results of the metabolic control analysis
MCA results
Produced with COPASI 4.3 (Build 25) on Leopard on 03/07/2008Dialog showing the results of the MCA after no Steady-State was found
MCA results at none Steady-State
Lyapunov Exponents
The widget to calculate Lyapunov exponents in COPASI is located in the
Task branch of COPASI's tree view. If you
select the Lyapunov Exponents item in the tree,
the corresponding widget will be displayed. The first input field in
the widget labeled Number of Exponents lets you
specify how many Lyapunov exponents are to be calculated. This number
should be between one and the number of independent variables in the
system (that is the number of species that are not constant minus
the number of mass conservation relations). If you specify a number
that is higher than the number of independent variables in the system,
COPASI will issue a warning telling you to lower the number and
will also tell what the maximal number should be. During the
calculation of the Lyapunov exponents, a time course simulation is
carried out. If your model shows a long transient, you might want to
exclude the beginning of the trajectory from the calculation of the
Lyapunov exponents. For this, COPASI lets you specify at which time
point the averaging for the Lyapunov exponents should start. You can
specify this delay in the field labeled start averaging
after t= ".
With the check box labeled calculate Divergence,
you can activate the calculation of the average divergence. The
divergence is calculated as the average over the trace of the Jacobian
(see
Lyapunov calculation method
).
The method behind of calculating Lyapunov exponents is called Wolf
Method. For a more detailed description of the method and
its parameters please see the
corresponding methods
section.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Lyapunov task widget
Lyapunov task widget
After clicking the Run button, COPASI will
start the time course simulation in order to calculate the Lyapunov
exponents. Once the calculation is finished, COPASI will jump to the
Result window. The window shows the calculated Lyapunov
exponents in a table and beneath the table it shows the sum of the
calculated exponents. If you told COPASI to calculate the divergence
as well, this will be shown underneath the Sum of Lyapunov
Exponents display. If you
told COPASI to calculate all Lyapunov exponents (as many as there are
independent variables in the model), the sum of the exponents and the
divergence should be equal; if it isn't COPASI will display a
warning. Since the warning only makes sense if all exponents have been
calculated, it will not be displayed otherwise. It is expected
that the divergence and the sum differ in those cases.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Results window for the Lyapunov Exponent calculation.
Results from a Lyapunov Exponent calculation.
Parameter Scan
The leaf for Parameter Scan in the object tree is
located under Multiple Tasks. At the top,
the dialog displays a box called New scan item
together with a ...Create! button. When the dialog
is opened for the first time, the only item in the widget below is a
green box called Task. This widget contains a
drop down list with all the tasks that can be used in a
scan. Additionally there are a check box called always use
initial conditions and a check box called output
from subtask.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Dialog showing scan task dialog when first opened
Initial scan task dialog
The tasks for which scans can be conducted are Steady-State,
Time Course, Metabolic Control Analysis,
and Lyapunov Exponents. So if you want to do a scan for a
time course calculation, you should choose Time Course from
the drop down list in the Task widget. We will ignore the
two check boxes for the time being and take a look at the drop down list at the top of
the Scan Task dialog. This drop down list
contains three entries named Parameter Scan,
Repeat and Random distribution.
Those are additional elements that can be added to the
main widget below to form complex tasks.
Let us look at one after the other and start with the Parameter
Scan. As it is right now, the scan task does not do anything since
we have not told it yet which parameter we want to scan. To define a parameter
for the scan, you choose Parameter Scan from the drop down
list at the top and press the ...Create! button. COPASI
will add a new widget to the dialog that is called Scan.
The Scan widget contains some empty line edit fields and
a button labeled ... and a check box labeled
logarithmic.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Dialog showing scan task dialog with a Parameter Scan item
Scan task dialog with scan item
The first thing you have to do is to select the parameter for the
scan. You do this by clicking on the ... button
and selecting a parameter from the selection dialog that
appears. Once you are finished with your selection and pressed the
OK button, the name of the object you chose
will appear in the line edit field beside the
... button. In the line edit fields below you
can now specify the minimal value the parameter will have during the
scan as well as the maximal value. After choosing the object, these
values will be set to half the objects value for the minimum and
double the objects value for the maximum. In the
Intervals, you can specify how many intervals
COPASI uses during the scan to raise the value from minimum to
maximum. Last but not least, the logarithmic
check box determines whether the value is raised in linear steps if
the box is unchecked or in logarithmic steps if the box is checked.
Now you are set to run your first simple scan by clicking on the
Run at the bottom of the dialog. In order to
actually see some result, you have to have some kind of output
defined. The scan task can generate reports and, if a plot is defined,
the scan task will do plotting while running the scan. If you did not
change the number of intervals from the default, the scan task will
run 10 time course simulations each with a different value for the
chosen parameter and in turn you will see 10 plots overlaid in one
plot window.
If you want to have output from the parameter scan, you have to create
an output definition as described in the section. The easiest way is probably to
use the output assistant which you activate via the Output
Assistant button. This is described in the section. All that is left to do in order
to write the output to a specific file is to connect an output
definition with a file. This can be achieved by clicking on the
Report button. This opens a dialog that lets
you connect the report of a specific task to a file on your hard
disk. First we choose a report that is suitable for the parameter scan
task from the drop down list at the top of the dialog. Next, we
specify a file that will be used to store the report by clicking on
the browse button and selecting the destination
in the file dialog that opens. Per default, COPASI creates a new file
or overwrites an existing file with the same name. Alternatively, you
can tell COPASI to append the report to the end of an existing file by
selecting the corresponding check box labeled
Append at the bottom of the dialog. Once you are
finished, you click on the Confirm button. If you
now run the task, COPASI will write the output to the file you
specified.
So far we have only scratched the surface of the scan dialog. E.g. if
you want to do a two-dimensional scan, i.e. a scan where two
parameters are independently scanned, you can add a second
Scan widget by adding it to the main dialog just
like you did for the first parameter. You select Parameter
Scan in the drop down list and push the ...Create!
button.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Dialog showing scan task dialog with two Parameter Scan items
Scan task dialog with two scan items
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Dialog showing scan task dialog with a Random distribution item
Scan task dialog with random distribution item
After adjusting the minimum and maximum as well as the number of
intervals, you can run the scan task again. COPASI will now do a scan
for the first parameter while holding the second parameter constant at
the minimum. Next, COPASI will raise the second parameter and do
another scan from minimum to maximum for the first parameter. This way
a full scan for the first parameter is done for every value of the
second parameter. You have to be careful because assuming that you
chose 10 intervals for both parameters, COPASI will run 100 time
course simulations during this two-dimensional scan which can take a
long time.
The Random distribution item is similar to the
Parameter Scan item. With the random distribution,
a parameter can be given a random value. After adding a Random
distribution widget to the main dialog,
you first have to choose a parameter for which a random value will be
set. You can then choose from three distribution types to generate the
random value. The three distributions are Uniform
distribution, Normal distribution and
Poisson distribution. Additionally, you
have to set the bounds within which the random value will be set
(uniform distribution) or the mean and average values (normal
distribution) or just the mean value (Poisson distribution). If all has
been set and you press the Run, COPASI will set
the parameter value to a random value from the chosen distribution and
run one time course simulation.
The Repeat item can be used to repeat a certain
action several times. For example, if you add a Repeat
widget above a Random distribution one, the parameter
will be given a random value as many times as specified in the
Repeat widget and time course simulation, or one of the
other tasks specified in the Task one at the bottom
of the main widget, is run with this value.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Dialog showing scan task dialog with a Random distribution and Repeat item
Scan task dialog with random distribution and repeat item
Different items can be combined in many ways to achieve certain
goals. For instance, you could run 10 parameter scans for a certain value,
each with a different random value for another parameter, by combining a
Scan widget with a Random distribution
and a Repeat ones.
With the buttons on the left of each item, except the
Task at the bottom, you can move the items up or
down in the list or close an item you no longer need. The order of the
items in the main widgets determines in which order COPASI will handle
the actions. A widget is controlled by the widget above it. Thus, it
can be rather important, if a Repeat acts on
the widget directly below it.
Consider you have added a Repeat widget and
a Random distribution one to the main widget.
Now the Repeat widget can be either above the
Random distribution widget or below it, and the
results you get after pushing the Run button
are very different.
Lets first look at the case where the Repeat widget
is above the Random distribution widget. If you push
the Run button, COPASI will run the task as many
times as you have specified in the Repeat widget,
each time with a different random value for the parameter you have chosen
in the Random distribution widget. Now lets assume the
Repeat is below the Random
distribution. If you push the Run button
now, COPASI will also run the task as many times as you specified in the
Repeat widget. The difference is that this time,
the parameter value gets a random value before the repeat takes
effect, i.e. all runs are done with the same random value for the
chosen parameter. If you do this for a deterministic time course
simulation and a concentration plot is defined, the difference becomes
obvious because in the first case, you will probably get X different
curves, whereas in the second case you may get X times the same curve.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/28/2008Dialog showing scan task dialog with a more complex combination of actions
Scan task dialog with combination of actions
Produced with COPASI 4.3 (Build 25) on Leopard on 02/29/2008Dialog showing scan task dialog with a repeated random distribution
Scan task dialog with repeated random distribution
Produced with COPASI 4.3 (Build 25) on Leopard on 02/29/2008Plot with 10 different curves
Plot with 10 different curves
Produced with COPASI 4.3 (Build 25) on Leopard on 02/29/2008Dialog showing scan task dialog with a random distribution where the time course task is repeated
Scan task dialog with with random distribution where time course task is repeated
Produced with COPASI 4.3 (Build 25) on Leopard on 02/29/2008Plot with 10 times the same curve
Plot with 10 identical curves
What we have left out so far are the two check boxes at the bottom of
the Task widget. The first check box is labeled
always use initial conditions. If this check box
is checked, each task that is run runs with the same initial
conditions. If the check box is not checked, only the first task that
runs uses the initial conditions from the model, each subsequent task
uses the conditions as they are after the preceding task has
finished.
The second check box is labeled output from
subtask. If it is checked, COPASI will plot or write the
complete time series result each time a time series task
runs. Correspondingly it will output intermediate results for the
other tasks. So if during your scan, 10 time series are calculated,
all ten are overloaded in the same window. If the check box is
unchecked, COPASI will only plot the end result, i.e. the
concentrations after the last step, of each time series. This applies
to reports correspondingly. This feature is useful if you want to plot
some calculation results as a function of the parameter that is
scanned. So e.g. you could plot the end result of a Steady-State
calculation on the y-Axis versus a kinetic parameter on the x-Axis.
Optimization
The optimization task lets you minimize a given objective function by
scanning one or more parameters over a given range. This probably
sounds rather cryptic, therefore, lets try to illustrate this with a
simple example.
We assume you have a model that consists of several reactions and two
of those reactions fluxes (R1, R2) depend on a certain parameter k
(either directly or indirectly). Now you are interested in finding the
optimal value of k so that the ratio of R1/R2 will be maximal. So lets
see how you would do this in COPASI.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/29/2008MacOS screenshot that shows COPASI optimization dialog
Optimization Dialog
If you go to the optimization dialog which you can find in the tree
under Multiple
Task->Optimization, you will get a
screen similar to the one above. At the top of the dialog, you can
find an edit line called Expression where you have to input your
objective function, that is the expression that COPASI will try to
minimize during the optimization. In our case, we want to find the
value of k where the ratio of R1 and R2 is maximal. At the beginning
of this section, I stated that COPASI will minimize a given objective
function, but we would like to maximize the objective function
R1/R2. So how do we generate a function to be minimized out of the
function R1/R2? This can be achieved in two ways, either we inverse
the ratio in order to minimize R2/R1, or we add a "-" sign to our
ratio R1/R2. (For the sake of simplicity, I will assume here that the
fluxes R1 and R2 will always be positive.) For this example I will use
the second possibility and therefore the objective function for COPASI
to minimize will be -(R1/R2). Now you can't just enter this expression
into the line edit field since COPASI does not associate the names R1
and R2 with the fluxes through your reactions. In order to build this
expression, you have to start typing "-(" into the line edit
field. Now, you have to press the button to the right of the line edit
field which opens the object browser. In this object browser, you
select the flux (particle or concentration) which belongs to R1 and
press the OK button. Now you will get a string
that corresponds to this flux object right after the part of the
expression you already typed. You can now go on by typing "/" followed
by the selection of the flux for R2. You end the expression by typing
")". Please be aware that you are allowed to edit the expression, but
only those parts of the expression that do not belong to object
representation strings. That means everything that has been inserted
via selection from the object browser may not be modified. You may
however delete complete identifier expressions.
You can run an optimization task with several different methods which
can be selected via the drop down list below the input field for the
objective function. Each of those methods has a number of parameters
which are documented in the methods chapter.
The optimization task can also be run on either the "Time Course" or
the "Steady-state" subtask. Which one is used for the optimization run
can be selected via the correspondingly named check boxes. So for our
example we would choose the "Time Course" subtask.
The only thing we have not done yet is to tell COPASI which
parameter(s) it should scan in order to minimize the objective
function. In the middle of the widget, there is another line edit
field right after Object where you can specify
which parameter is to be scanned. The selection is again done via
clicking on the button to the right of the edit field and selecting
the correct parameter from the object browser. Please note that is
possible to create multiple parameters at once. Below the Object you
can specify the upper and lower
bounds for the parameter during the optimization. Those bounds can also be
expressions depending on other parameters. Per default, the check boxes
for -Infinity and +Infinity are selected as the boundaries. Since a
computer can't handle infinitely small or large numbers,
the search will effectively proceed from the lowest possible to the
largest possible double precision number. If you want to specify your
own range, you first have to deselect the +Inf or
-Inf check box and then you can set your own
bounds. As a matter of convenience you may enter -X% or +X% as the
lower and upper limits. This instructs COPASI to calculate the limits
based on the start value.
The start value is the initial parameter
value used by COPASI in any fitting attempt. Per default COPASI
selects the current model value of the parameter to be estimated as
the starting value. You may manually override this default or use the
... to reset it to model values, randomize it, or
set it to the last estimated values. Please note, if the start value of a parameter is outside the boundaries specified, COPASI will force it to the nearest boundary during th optimization.
If you want to delete a parameter from the scan list, you just
select it and click on the delete button which
you find at the right side. If you want to scan more than one
parameter, you just add more by clicking on the
new button and add as many parameters as you
need. Please note, you may select multiple parameters and edit them
simultaneously. You can
also change the order in which the parameters are scanned by moving
them up or down in the list with the corresponding buttons at the
right side of the widget. This has only an effect if the parameter
boundaries of one parameter depend on another parameter. COPASI does
not currently determine such a dependency and it is left to the user
to order the parameters appropriately.
In addition to parameters COPASI knows also about
constraints. Constraints are applied to the solution. i.e., they are
evaluated after the simulation which can currently be either a time
course or a Steady-State calculation. A possible constraint could be
that the Steady-State concentration of a species has to be within a
certain range that can b specified by the user. The widget for
specifying these constraints can be found under the tab called
Constraints and the constraints are specified in
the same way as the parameters to be scanned. Each constrained
consists of an object that is to be constrained and an upper and lower
bound that define the constraint for the object. Just like for the
parameters, several constraints can be specified.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/29/2008MacOS screenshot that shows the progress dialog during an optimization task run
Optimization Progress Dialog
Once you have set up all the parameters, you are ready to run the
optimization task by clicking on Run. COPASI
will now display a progress dialog which informs you about the
progress of the calculation and about the best (smallest) value found
for the objective function up to this step. Since this progress dialog
will close once the optimization task has run, you probably also want
to define a report to be written during the calculation. In many cases
using the default report name "Optimization" is sufficient. The
default report outputs a description of all the settings you provided
for the optimization run. It prints intermediate results during the
calculation every time the target value has improved. In the end it
prints a summary of the result. The easiest way to define a customized
report is to use the output
assistant. Alternatively, you can create a report manually as
described in the section. Once you
have created a report definition for the optimization task, you click
on the report button at the bottom of the
dialog. In the dialog that opens, you select the report you just
created from the drop down list labeled Report
Definitions and then you select a filename where the report
is to be stored in the field labeled Target. You
can either type a filename manually, or you can select one by clicking
on the browse button. When you are finished,
you click the Confirm button. Now the next time
you run the optimization, a report will be stored in the location you
specified.
Parameter Estimation
Parameter estimation is the process of trying to calculate model
parameters based on a dataset. This dataset can be the result of
time course or steady-state experiments or both. COPASI reads a
dataset, which may be comprised of several files each including
possibly multiple experiments. After the load of the dataset COPASI
tries to fit one or more parameters that are specified by the user to
that dataset. The methods COPASI uses to estimate good parameter
values are the same as in the optimization task. For a description of
the different methods, you should read the methods section of this
document.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/29/2008MacOS screenshot that shows COPASI Parameter Estimation dialog
Parameter Estimation Dialog
The dialog for the parameter estimation task can be activated by
selecting the branch called Parameter Estimation
under the Multiple Tasks branch of the tree view
on the left side of the user interface.
First you can define which parameters COPASI shall try to fit. Each
parameter to be fitted can be added like in the Optimization. To do
this, click on the button beside the line edit labeled
Object, this will open a selection dialog where
you can choose the parameter. Additionally you can specify an upper
and a lower bound for the parameter. COPASI will only try to fit the
parameter within those bounds. Per default, the upper and lower bound
are + Infinity and - Infinity respectively.
If you want to set your own bounds, disable the check boxes and enter
your own value in the edit field. The value for the lower bound goes
into the correspondingly labeled edit field, likewise for the upper
bound. As a matter of convenience you may enter -X% or +X% as the
lower and upper limits. This instructs COPASI to calculate the limits
based on the start value.
You can also specify other objects from the model as bounds for the
parameter. To choose the value of another object as a bound for the
parameter, click on the button beside the edit field and choose the
object from the tree. The start value is the initial parameter
value used by COPASI in any fitting attempt. Per default COPASI
selects the current model value of the parameter to be estimated as
the starting value. You may manually override this default or use the
... to reset it to model values, randomize it, or
set it to the last estimated values. Please note, if the start value of a parameter is outside the boundaries specified, COPASI will force it to the nearest boundary during th parameter estimation. Additionally, you can restrict
the effect of a parameter to a subset of the experiments you are
attempting to fit. To do this select the ... to
the right of Affected Experiments. A possible
application is to fit different initial values for each time course
experiment. To help you in such a case the Duplicate for
each Experiment button will create a copy of the current
parameter for each specified experiment.
Experimental Data
Before you can execute a parameter estimation task you need to specify
the dataset which COPASI will use to fit the parameters you have
specified. Each experiment of your dataset contributes to the objective
function with the following weighted sum of squares:
E(P)=Σi,jωj(xi,j-yi,j(P))2
Where
P
is the currently tested parameter set,
xi,j
is a point in the dataset, and
yi,j(P) the corresponding simulated value. The indices
i and
j
denote rows and columns in the dataset.
The weight for each data column is given by
ωj. COPASI provides 3 methods shown in the
table below to calculate the weights for you. After applying the
method chosen COPASI scales the weights so that for each
experiment the maximal occurring weight is 1. In case that the weights
calculated are not satisfactory you are able to manually override them
individually.
To specify the experimental data you click on the Experimental
Data button at the top right of the parameter estimation
dialog. A new dialog opens that lets you enter experimental data.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/29/2008MacOS screenshot that shows COPASI Experimental Data dialog
Experimental Data Dialog
To read a data file,
click on the open button beside the label File at
the top of the dialog and choose a file that contains experimental
data from the file dialog. The data file should contain experimental
data grouped in experiments. To support automatic detection of
experiments these must be separated by one or more empty lines. But
manually definition of experiments is allowed. The data for an
experiment must be a table of values. The columns of the table are
separated by a user specifiable separation character. The default and
recommended character is the <tab>-character. The first line of
each experiment is treated as the row containing the column
headings. However, this is only a default and the header row can be
specified by the user. The header row may be anywhere in the file the
data is contained. The purpose of the header row is to ease the
interface to the data file and may be omitted. To tell COPASI that
no header row is included uncheck the box next to the header. Once
COPASI has read a file, you have to specify some information for each
experiment included in the file. To select an experiment you choose it
from the right selection box. The first thing you need to specify is
whether the data belongs to a Steady-State analysis or to a time
course simulation. You also have to associate the individual columns of
input data to elements of the model. For this, you click on the
... button in each row and select the
corresponding object in the selection dialog. It is mandatory that
COPASI knows about the meaning of each data column. The data in a
column can have four different types, which are:
ignored
Values in columns marked ignored are not taken into account during
parameter fitting. Columns of this type may not be associated with
elements of the model.
independent
Independent data is data which needs to be set for the correct
simulation of the experiment row. Possible model elements are initial
concentrations or kinetic parameters. Note, for a time course
experiment only the independent data in the first data row is set
before the start of the simulation. Columns of this type must be
associated with elements of the model.
dependent
The dependent data is the data, which COPASI tries to fit by
minimizing the sum of squares between the simulated data and the
experimental data. Columns of this type must be associated with
elements of the model.
Time
This column type is only available for time course
experiments. Obviously only one column with this data type may
exist. COPASI attempts to automatically identify the column containing
the time by looking at the column headers. You may correct COPASI's
guess. This column may not be mapped to any model elements.
If you don't want COPASI to use the whole dataset of an experiment,
but only a subset, you can specify the start and end line for this
subset. You also may delete experiments completely. If you do so, you
may notice that the New Document will be
enabled. Pressing it will add the first not used experiment of the
currently active file. Since it is commonly the case that all
experimental data within one file has the same format, COPASI allows you
to copy information of experimental data from the previous to the
current or form the current to the
next experiment within a file by selecting from
previous and to next. If COPASI
detects that experimental data descriptions are identical it will
automatically set the from previous check box
and disable editing the current experiment. Should you want to modify
it you will have to unmark the check box first.
If you have more than one file, you can load additional data files and
process them in the same manner. Once you are finished defining your
datasets for the fitting, you close the data dialog with the
OK button. Before you can start the parameter
estimation process, you have to choose the method by which the fitting
will be done and maybe set some method parameters. Most of the time,
the default parameter values should do. The method choosing is done at
the bottom of the dialog by selecting the method from the drop down
list. For an explanation of the individual methods, please consult the
methods section.
Result
If you want to have output from the parameter estimation task, you
have to create an output definition as described in the section or you choose the default report
named "Parameter Fitting". The default reports prints a description of
the settings you provided for this parameter fitting run, intermediate
results every time the target function improves, and a detailed result
at the end. The easiest way to get a customized output is probably to
use the output assistant which you activate via the Output
Assistant button. This is described in the section. All that is left to do in order
to write the output to a specific file is to connect an output
definition with a file. This can be achieved by clicking on the
Report button. This opens a dialog that lets
you connect the report for a specific task to a file on your hard
disk. First we choose a report that is suitable for the parameter
estimation task from the drop down list at the top of the
dialog. Next, we specify a file that will be used to store the report
by clicking on the browse button and selecting
the destination in the file dialog that opens. Per default, COPASI
creates a new file or overwrites an existing file with the same
name. Alternatively, you can tell COPASI to append the report to the
end of an existing file by selecting the corresponding check box
labeled Append at the bottom of the dialog. Once
you are finished, you click on the Confirm
button. If you now run the task, COPASI will write the output to the
file you specified.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/29/2008MacOS screenshot that shows COPASI Parameter Estimation Results
Parameter Estimation Results
After running a Parameter Estimation task the result may be viewed by
selecting the Result widget. This result widget
contains multiple tabs.
The overall fit and performance statistic are displayed in the
Main and detailed information about parameters,
experiments, and fitted values can be found under the corresponding
tabs. In addition, you may look at the correlation matrix of the
parameters or the Fisher information matrix.
Sensitivity AnalysisProduced with COPASI 4.3 (Build 25) on Leopard on 02/29/2008MacOS screenshot that shows the sensitivity analysis task
Sensitivity Analysis
Importing and Exporting
COPASI is one modeling and simulation tool among many and often people
use more than one tool to create, investigate and simulate their
models. In order to make it easier to exchange model files with other
programs, COPASI supports reading and writing of several model file
formats. Naturally COPASI can read and write it's own file format and
it can read Gepasi files just as well although it will not write
Gepasi files.
In addition to those two file formats, COPASI can import SBML Level 1
and 2 files and it can export models as SBML Level 2 files as well as
C source code, XPPaut, or Berkeley Madonna files.
Importing and Exporting SBML filesCOPASI is able to import SBML level 1 and level 2 files as well as export SBML level 2 files through the corresponding entries in the File menu. For the import and export the SBML Model is read with libsbml and converted to the COPASI model structure and vice versa.On exporting, COPASI converts its native model structure to an SBML model that is again written out using libsbml. Since the SBML model structure is converted into the COPASI model structure upon import, some of the information in the SBML file gets lost because COPASI does not support the corresponding model elements. Examples of data that gets lost are certain rules and events.
Notes and Annotations from the original SBML file should be preserved when you import and reexport an SBML file as long as you do not delete the objects that contain the annotation in COPASI. But still if you have important annotations or notes in your SBML file make a backup of the file before you open it in COPASI since we can not guarantee that they will survive an import/export cycle.
Likewise, SBML does not support all of the elements of a COPASI model so some information from the COPASI model also gets lost when exporting an SBML file. For example tasks, reports and plot definitions are not exported to the SBML file.This is normally not a big problem since the essential parts of a model normally get imported or exported. A consequence however one should keep in mind is that if you import an SBML file into COPASI and later export it again, it might have lost some of the original information. So if your SBML model depends on rules on species and compartments and events, it is not suitable for import into COPASI. This will change in future versions of COPASI.
We hope that we will be able to support even more different file
formats in the future.
Current versions of COPASI use libsbml version 3 which supports SBML files up to Level 2 Version 3. Libsbml 3 also has a lot of built-in tests to check the validity of a model. Upon import COPASI will display most of those errors to the user. Libsbml 3 also gives a lot of warnings, especially concerning units in SBML files, which should help the user in generating better, more consistent models. Even so this is a good thing, it can happen that the real errors are hidden by the large amount of warnings. COPASI now uses a new error message dialog that splits the messages in filtered and unfiltered messages. The unfiltered messages are what the user sees when the dialog comes up. In order the see the filtered messages the second tab in the message dialog has to be selected. If there are no filtered messages, this tab is disabled. In the labels of the individual tabs, COPASI also shows you the number of messages that for the corresponding tab.
Produced with COPASI 4.3 (Build 25) on Leopard on 02/29/2008Error Message Dialog after import of an SBML file
SBML Import Error Messages
In the current version, the errors that are filtered are hard coded and they are all warnings that have to do with unit inconsistencies within the model. In future version of COPASI, we will have a mechanism that will let the user manage which error messages should be filtered.
Although COPASI now uses libsbml 3, not all features found in the different versions of SBML are currently supported. If an unsupported feature is encountered during import, COPASI will usually notify the user. Depending on which parts of the model have been ignored, ignored, the result of time course simulations and other tasks might not be what you expect.
This is still very rudimentary and we hope to improve this function recognition in the future so that also functions exported from other programs can be recognized.
Exporting C Source files
Sometimes it is of advantage to have the differential equations that
make up your model in the form of source code for some programming
language. This allows you to integrate your model into some
experimental analysis software that you might have written, or some
analysis software that expect the input as C source code like Auto2000.
So far COPASI only supports the export of C source code, source code
for other programming languages might follow if there is need for it.
The C source file COPASI exports is split into several smaller parts
which are encapsulated in #ifdef structures for the C
preprocessor. The file consists of ten such sections which can be
included in other files by defining the corresponding preprocessor
constants at the place of inclusion. Example:
#define SIZE_DEFINITIONS
#include "SOURCE FILE"
#undef SIZE_DEFINITIONS
The file contains the following sections:
Preprocessor DefinesNameDescriptionSIZE_DEFINITIONSContains size definitions for the individual model elements,
e.g. N_COMPARTMENTS for the number of compartments or N_REACTIONS
for the number of reactions. All definitions are declared with
preprocessor #define statements.SPECIESContains assignments for the species initial
concentrations. The assignments are of the form y[INDEX]=VALUE
where INDEX is the index of the species and VALUE is the initial
concentration. This assumes that the including code has generated
an array of double values of size N_METABS called y. N_METABS is
part of the SIZE_DEFINITIONS section (see SIZE_DEFINITIONS
above).INDEP_SPECIESContains assignments for the independent species initial
concentrations. The assignments are of the form x[INDEX]=VALUE
where INDEX is the index of the independent species and VALUE is
the initial concentration. This assumes that the including code has
generated an array of double values of size N_INDEP_METABS called
x. N_INDEP_METABS is part of the SIZE_DEFINITIONS section (see
SIZE_DEFINITIONS above).MOIETYContains assignments for the moieties. The assignments are
of the form y[INDEX]=RSIDE where INDEX is the index of the
species and RSIDE is the calculated value for the moiety,
e.g. 0.2 - y[INDEX2]. y is the vector of species (see
SPECIES above).COMPARTMENTSContains assignments for the compartments initial
volumes. The assignments are of the form c[INDEX]=VALUE where INDEX
is the index of the compartment and VALUE is the initial
volume. This assumes that the including code has generated an array
of double values of size N_COMPARTMENTS called c. N_COMPARTMENTS is
part of the SIZE_DEFINITIONS section (see SIZE_DEFINITIONS
above).GLOBAL_PARAMETERSContains assignments for the values of global kinetic
parameters. The assignments are of the form gk[INDEX]=VALUE where
INDEX is the index of the global parameter and VALUE is the
value. This assumes that the including code has generated an array
of double values of size N_GLOBAL_PARAMS called k. N_GLOBALPARAMS
is part of the SIZE_DEFINITIONS section (see SIZE_DEFINITIONS
above).KINETIC_PARAMETERSContains assignments for the values of local kinetic
parameters. The assignments are of the form k[INDEX]=VALUE where
INDEX is the index of the local parameter and VALUE is the
value. This assumes that the including code has generated an array
of double values of size N_KIN_PARAMS called k. N_KIN_PARAMS is
part of the SIZE_DEFINITIONS section (see SIZE_DEFINITIONS
above).KINETIC_FUNCTIONS_HEADERThis section contains the declarations of function
definitions. The section has to be included before the function
definitions section itself and before the differential equations
section is included.KINETIC_FUNCTIONSThis section contains the implementation of the function
definitions.DIFFERENTIAL_EQUATIONSThis section contains the set of differential equations. The
result of the right hand side of each differential equation is
stored in a variable dxdt[INDEX]. This assumes that the including
program has created an array of double values called dxdt of size
N_INDEP_METABS. N_INDEP_METABS is part of the SIZE_DEFINITIONS
section (see SIZE_DEFINITIONS above).
Some models may contains constants or functions that are not included
in the ANSI C standard. In order to be able to use exported C source
code files with those constants and functions, the user has to provide
them, e.g. by including a separate header file that defines those
constants and/or functions. Currently those are the constants for pi,
Euler's number, TRUE, FALSE and infinity as well as the functions
"asinh", "acosh", "atanh", "sec", "csc", "cot", "sech", "csch",
"coth", "arcsec", "arccsc", "arccot", "asech", "acsch", "acoth",
"factorial" and logical "xor".
In order to export the set of differential equations to a C source
code file, you select the Export ODEs menu
entry from COPASI's File menu. In the save dialog
that shows up, you select C Files (*.c) from the
File type drop down and specify the name of the
file you want to write the ODEs to. After clicking on the
Save the ODEs will be saved to the specified
file.Exporting Berkeley Madonna filesBerkeley
Madonna is a widely used commercial modeling and
simulation tool for the Windows and Mac OS
X operating systems. The input to Berkeley
Madonna is a file that basically consists of a set of
parameters, initial values, function definitions and ordinary
differential equations. COPASI can generate these ordinary
differential equations from the reactions of the model and export them
together with the needed parameters in a format suitable to be read
into Berkeley Madonna.
Since the way ordinary differential equations are specified is similar
between different programs that take such input, it should be rather
easy to adjust the exported file for import in other programs as for
example the free XPPaut
program or even Mathematica.
Berkeley Madonna does not support all mathematical functions available
in COPASI if such a function is used in a model, COPASI will write the
string "ILLEGAL FUNCTION" to the exported file instead of the name of
the function. Naturally this will lead to an error message when one
tries to load the file in Berkeley Madonna. Functions currently not
supported by Berkeley Madonna are: sec, csc, cot, sech, csch, coth,
arcsec, arccsc, arccot, arcsech, arccsch, arccoth, floor, ceil,
factorial, modulus and logical xor.
The Constants for TRUE, FALSE, and Euler's number will be exported as
numerical values where FALSE will be exported as 0 and TRUE will be
exported as 1. Likewise infinity and "not a number" are exported as
the strings "inf" and "nan" respectively.
COPASI adds comments to variables in the ODE by using the semicolon to
separate the comment from the actual code. Since this feature has been
added to Berkeley Madonna in Version 7.0 the exported code cannot be
used with older versions of Berkeley Madonna.
In order to export the set of differential equations to a Berkeley
Madonna file, you select the Export
ODEs menu entry from COPASI's File
menu. In the save dialog that shows up, you select Berkeley
Madonna Files (*.mmd) from the File
type drop down and specify the name of the file you want to
write the ODEs to. After clicking on the Save
the ODEs will be saved to the specified file.
Exporting XPPAUT filesXPPAUT is a
program to to solve differential equations. It is freely available for
Windows, MacOS X, Linux/Unix and probably others. Its input format is
very similar to the one from Madonna and COPASI starting from Version
4.1 Build21 can export models as a set of differential equations for
use in XPPAUT.
In order to export the set of differential equations to an XPPAUT
file, you select the Export ODEs menu entry
from COPASI's File menu. In the save dialog that
shows up, you select XPPAUT (*.ode) from the
File type drop down and specify the name of the
file you want to write the ODEs to. After clicking on the
Save the ODEs will be saved to the specified
file.
Just as in Berkeley Madonna, XPPAUT does not support all functions
supported by COPASI. Functions that are not supported are exported as
@. Among the unsupported functions are
sec, csc,
cot, sech,
csch, coth,
arcsec, arccsc,
arccot, arcsech,
arccsch, arccoth,
factorial, modulus and
logical xor.
The values of TRUE and FALSE
are converted to 1 and 0
respectively upon export. INFINITY and
NAN are exported as INF and
NAN. Since both INF and
NAN are not supported keywords in XPPAUT, those
files have to be modified before they can be used in XPPAUT.
We also noted that also ceil was mentioned in the
XPPAUT documentation, files containing this function could not be
loaded in XPPAUT.
DiagramsStarting with version 4.4.28, COPASI has the possibility to read and display layout information from COPASI and SBML files. An additional feature that comes with the diagram display is the possibility to display animations of time course data from simulations.Currently there is no way to create new diagrams within COPASI, but we hope to change that in the future.The layout information can either be obtained in the form of the SBML layout extension (see the SBML Layout Extension Specification for further information) or from a COPASI file that includes layout information.Since there is no way to create new diagrams in COPASI, the only way to come up with a COPASI file that includes layout information is to create an SBML file with layout information and convert it to a COPASI file. The layout in COPASI files is also stored in the form of the SBML layout extension. Only that the SBML object ids are replaced by the corresponding COPASI keys.
There are several ways to create layout information for an SBML model. The Sycamore webapplication allows you to load SBML files, create layout information for the model in the file and save the model with the layout information back to file. It provides different methods for generating the layout and the layout can be modified manually as well.
SABIO-RK is a reaction kinetics database that allows you to create SBML models from the entries in the database. The model can be saved as an SBML file and it can also create layout information for the model.
Another web application that allows the user to add layout information to an SBML file is Frank Bergmanns SBML Layout Viewer. It allows the user to influence the layout creation by setting some parameters.
Franks Bermanns layout creation tool is also part of SBW and since the latest Versions of COPASI do include some SBW support, it is possible to send a model from COPASI to the layout tool and get back a model with layout information.
If the model file you loaded contains layout information, the diagram table contains an entry for every layout that is contained in the file. In order to display a specific layout, you have to either click on the show button beside the layout or double click on the layout entry in the table.Produced with COPASI 4.4 (Build 29) on Leopard on 12/15/2008Diagram table with one diagram entry.
diagram table
In the layout window that comes up, you can see some controls on the left side and on the right side you see the actual layout. When the layout is first openend, all species are displayed as rectangles.
Produced with COPASI 4.4 (Build 29) on Leopard on 12/15/2008Diagram before loading simulation data. Some controls are disabled.
diagram window with some controls disabled due to missing simulation data
Currently the menu bar at the top contains two control elements. The first one is a button that allows you to read time course data from COPASI if any has been calculated. If a time course has already been calculated when the laoyut window is openend, this time course data is imported automatically. Each time you rerun the time course simulation in COPASI, you have to reimport it to the layout if you want to display it.
Since the time course data is copied when it is imported to the layout, you have to take care that you have enough memory in your machine if you either have very large simulations or if you want to animate the data in many different layout windows. In the future we will try to handle this more intelligently.
The second control element in the toolbar is for zooming in and out of the layout view.
If there is no time course data yet, many of the controls on the right side are disabled since they only make sense in the context of animating simulation data. Once simulation data has been loaded via the button in the toolbar, those controls are enabled.
If you don't need the controls, but just want to look at the diagram, the individual controls can be hidden via the View menu in the menu bar.
In order to animate your simulation data, you can use the player controls at the bottom of the screen. The controls look like the controls on a CD player and it should be easy to figure out what the individual buttons do. There are buttons to start and stop the animation, as well as buttons to forward and rewind or sngle step through the animation. You can also drag the slider beside the buttons to go to a certain time point within the animation.
During the animation, the species are displayed as colored balls. The speed of the animation can be controlled by the Frame rate element at the top of the controls.
Produced with COPASI 4.4 (Build 29) on Leopard on 12/15/2008Diagram window with paused animation in size mode. Individual species are displayed as red balls, all controls are enabled.
diagram window with paused animation in size mode
Depending on the Mapping mode that is controled by the radio button group with the same name, either the size of the balls or the color changes to reflect the concentration of the species at a given time point.
The radio button group above the Mapping group, called Scheduling Mode determines how the size or color of a species is determined during an animation.
If the control is set to Individual Scaling, the size (or color) of a species is determined by the minimum and maximum value of that species. If the control is set to Global Scaling, the size or color is determined by the minimum and maximum values of all species in the model.
The last control element is the table with the names and concentrations of all species contained in the layout. The concentration displayed is the concentration of the species at the given time point of the simulation. All species that are checked vary their size or color during the animation, species tha are unchecked don't.
There is also the possibility to export the current layout as a bitmap. In order to do this, you select the Create Image menu item from the View menu.
Currently, this only allows you the create a bitmap of the layout as it is displayed. Parts that are not displayed because the window is to small are not written to the bitmap. So in order to make a bitmap from large layouts, you might have to hide the controls as described above, make the layout window as large as possible and change the zoom factor until the full layout is displayed in the layout window. We also hope to make this more convenient in the future.
Since this is an early version of the diagram display, there certainly are still many issues, but we hope that it might be helpful nevertheless. If you have suggestions or complaints, please tell us, preferably via the COPASI user forum or if you think it is a bug via our issue tracking system.