|
copasi API
0.1
|
#include "TC_structs.h"Go to the source code of this file.
Classes | |
| struct | copasi_model |
| this struct is used to contain a pointer to an instance of a COPASI class More... | |
| struct | copasi_reaction |
| this struct is used to contain a pointer to an instance of a COPASI class More... | |
| struct | copasi_compartment |
| this struct is used to contain a pointer to an instance of a COPASI class More... | |
Functions | |
| BEGIN_C_DECLS TCAPIEXPORT void | copasi_end () |
| initialize copasi -- MUST BE CALLED before calling any other functions | |
| TCAPIEXPORT copasi_model | cCreateModel (const char *name) |
| create a model | |
| TCAPIEXPORT void | cRemoveModel (copasi_model) |
| remove a model | |
| TCAPIEXPORT void | cCompileModel (copasi_model model, int substitute_nested_assignments) |
| clear all contents of a model | |
| TCAPIEXPORT copasi_model | cReadAntimonyFile (const char *filename) |
| create a model from an Antimony or SBML file | |
| TCAPIEXPORT copasi_model | cReadSBMLFile (const char *filename) |
| create a model from an SBML file | |
| TCAPIEXPORT copasi_model | cReadSBMLString (const char *sbml) |
| create a model from an SBML string | |
| TCAPIEXPORT void | cWriteSBMLFile (copasi_model model, const char *filename) |
| save a model as an SBML file | |
| TCAPIEXPORT tc_matrix | cGetScaledFluxControlCoeffs (copasi_model model) |
| add a compartment to the model | |
| TCAPIEXPORT copasi_compartment | cCreateCompartment (copasi_model model, const char *name, double volume) |
| create compartment | |
| TCAPIEXPORT void | cSetVolume (copasi_model, const char *compartment, double volume) |
| set a volume of compartment | |
| TCAPIEXPORT int | cSetValue (copasi_model, const char *name, double value) |
| set the concentration of a species, volume of a compartment, or value of a parameter The function will figure out which using the name (fast lookup using hashtables). If the name does not exist in the model, a new global parameter will be created. | |
| TCAPIEXPORT void | cCreateSpecies (copasi_compartment compartment, const char *name, double initialValue) |
| add a species to the model | |
| TCAPIEXPORT void | cSetBoundarySpecies (copasi_model model, const char *species, int isBoundary) |
| set a species as boundary or floating (will remove any assignment rules) | |
| TCAPIEXPORT void | cSetConcentration (copasi_model, const char *species, double value) |
| set a species as boundary or floating (will remove any assignment rules) | |
| TCAPIEXPORT int | cSetAssignmentRule (copasi_model model, const char *species, const char *formula) |
| set the assignment rule for a species (automatically assumes boundary species) | |
| TCAPIEXPORT int | cSetGlobalParameter (copasi_model model, const char *name, double value) |
| set the value of an existing global parameter or create a new global parameter | |
| TCAPIEXPORT int | cCreateVariable (copasi_model model, const char *name, const char *formula) |
| create a new variable that is not a constant by a formula | |
| TCAPIEXPORT int | cCreateEvent (copasi_model model, const char *name, const char *trigger, const char *variable, const char *formula) |
| add a trigger and a response, where the response is defined by a target variable and an assignment formula | |
| TCAPIEXPORT copasi_reaction | cCreateReaction (copasi_model model, const char *name) |
| add a species or set an existing species as fixed | |
| TCAPIEXPORT void | cAddReactant (copasi_reaction reaction, const char *species, double stoichiometry) |
| add a reactant to a reaction | |
| TCAPIEXPORT void | cAddProduct (copasi_reaction reaction, const char *species, double stoichiometry) |
| add a product to a reaction | |
| TCAPIEXPORT int | cSetReactionRate (copasi_reaction reaction, const char *formula) |
| set reaction rate equation | |
| TCAPIEXPORT tc_matrix | cSimulateDeterministic (copasi_model model, double startTime, double endTime, int numSteps) |
| simulate using LSODA numerical integrator | |
| TCAPIEXPORT tc_matrix | cSimulateStochastic (copasi_model model, double startTime, double endTime, int numSteps) |
| simulate using exact stochastic algorithm | |
| TCAPIEXPORT tc_matrix | cSimulateHybrid (copasi_model model, double startTime, double endTime, int numSteps) |
| simulate using Hybrid algorithm/deterministic algorithm | |
| TCAPIEXPORT tc_matrix | cSimulateTauLeap (copasi_model model, double startTime, double endTime, int numSteps) |
| simulate using Tau Leap stochastic algorithm | |
| TCAPIEXPORT tc_matrix | cGetSteadyState (copasi_model model) |
| bring the system to steady state | |
| TCAPIEXPORT tc_matrix | cGetSteadyState2 (copasi_model model, int iter) |
| bring the system to steady state using normal simulation | |
| TCAPIEXPORT tc_matrix | cGetJacobian (copasi_model model) |
| get the Jacobian at the current state | |
| TCAPIEXPORT tc_matrix | cGetEigenvalues (copasi_model model) |
| get the eigenvalues of the Jacobian at the current state | |
| TCAPIEXPORT tc_matrix | cGetUnscaledElasticities (copasi_model model) |
| unscaled elasticities | |
| TCAPIEXPORT tc_matrix | cGetUnscaledConcentrationControlCoeffs (copasi_model model) |
| unscaled elasticities | |
| TCAPIEXPORT tc_matrix | cGetUnscaledFluxControlCoeffs (copasi_model model) |
| unscaled flux control coefficients | |
| TCAPIEXPORT tc_matrix | cGetScaledElasticities (copasi_model model) |
| scaled elasticities | |
| TCAPIEXPORT tc_matrix | cGetScaledConcentrationConcentrationCoeffs (copasi_model model) |
| scaled concentration control coefficients | |
| TCAPIEXPORT tc_matrix | cGetFullStoichiometryMatrix (copasi_model model) |
| full stoichiometry matrix | |
| TCAPIEXPORT tc_matrix | cGetReducedStoichiometryMatrix (copasi_model model) |
| reduced stoichiometry matrix | |
| TCAPIEXPORT tc_matrix | cGetElementaryFluxModes (copasi_model model) |
| elementary flux modes | |
| TCAPIEXPORT tc_matrix | cGetGammaMatrix (copasi_model model) |
| get Gamma matrix (i.e. conservation laws) | |
| TCAPIEXPORT tc_matrix | cGetKMatrix (copasi_model model) |
| get K matrix (right nullspace) | |
| TCAPIEXPORT tc_matrix | cGetK0Matrix (copasi_model model) |
| get K0 matrix | |
| TCAPIEXPORT tc_matrix | cGetLinkMatrix (copasi_model model) |
| get L matrix (left nullspace) | |
| TCAPIEXPORT tc_matrix | cGetL0Matrix (copasi_model model) |
| get L0 matrix | |
| TCAPIEXPORT tc_matrix | cOptimize (copasi_model model, const char *objective, tc_matrix input) |
| fit the model parameters to time-series data | |
| TCAPIEXPORT void | cSetOptimizerIterations (int) |
| TCAPIEXPORT void | cSetOptimizerSize (int) |
| TCAPIEXPORT void | cSetOptimizerMutationRate (double) |
| TCAPIEXPORT void | cSetOptimizerCrossoverRate (double) |
| TCAPIEXPORT void cAddProduct | ( | copasi_reaction | reaction, |
| const char * | species, | ||
| double | stoichiometry | ||
| ) |
add a product to a reaction
| copasi_reaction | reaction |
| char | * product |
| double | stoichiometry |
| TCAPIEXPORT void cAddReactant | ( | copasi_reaction | reaction, |
| const char * | species, | ||
| double | stoichiometry | ||
| ) |
add a reactant to a reaction
| copasi_reaction | reaction |
| char | * reactant |
| double | stoichiometry |
| TCAPIEXPORT void cCompileModel | ( | copasi_model | model, |
| int | substitute_nested_assignments | ||
| ) |
clear all contents of a model
This function is only needed for calling COPASI methods not found in this library. This function compiles the COPASI model; it is called internally by the simulate and other anlysis functions.
| copasi_model | model |
| int | substitute nested assignments |
| TCAPIEXPORT copasi_compartment cCreateCompartment | ( | copasi_model | model, |
| const char * | name, | ||
| double | volume | ||
| ) |
create compartment
| char* | compartment name |
| double | volume |
| TCAPIEXPORT int cCreateEvent | ( | copasi_model | model, |
| const char * | name, | ||
| const char * | trigger, | ||
| const char * | variable, | ||
| const char * | formula | ||
| ) |
add a trigger and a response, where the response is defined by a target variable and an assignment formula
| copasi_model | model |
| char | * event name |
| char | * trigger |
| char | * response: name of variable or species |
| char* | response: assignment formula |
| TCAPIEXPORT copasi_model cCreateModel | ( | const char * | name | ) |
| TCAPIEXPORT copasi_reaction cCreateReaction | ( | copasi_model | model, |
| const char * | name | ||
| ) |
add a species or set an existing species as fixed
| copasi_model | model |
| char* | species name |
| TCAPIEXPORT void cCreateSpecies | ( | copasi_compartment | compartment, |
| const char * | name, | ||
| double | initialValue | ||
| ) |
add a species to the model
| copasi_compartment | model |
| char* | species name |
| double | initial value (concentration or count, depending on the model) |
| TCAPIEXPORT int cCreateVariable | ( | copasi_model | model, |
| const char * | name, | ||
| const char * | formula | ||
| ) |
create a new variable that is not a constant by a formula
| copasi_model | model |
| char* | name of new variable |
| char* | formula |
| TCAPIEXPORT tc_matrix cGetEigenvalues | ( | copasi_model | model | ) |
get the eigenvalues of the Jacobian at the current state
| copasi_model | model |
| TCAPIEXPORT tc_matrix cGetElementaryFluxModes | ( | copasi_model | model | ) |
elementary flux modes
| copasi_model | model |
| TCAPIEXPORT tc_matrix cGetFullStoichiometryMatrix | ( | copasi_model | model | ) |
| TCAPIEXPORT tc_matrix cGetGammaMatrix | ( | copasi_model | model | ) |
| TCAPIEXPORT tc_matrix cGetJacobian | ( | copasi_model | model | ) |
get the Jacobian at the current state
| copasi_model | model |
| TCAPIEXPORT tc_matrix cGetK0Matrix | ( | copasi_model | model | ) |
| TCAPIEXPORT tc_matrix cGetKMatrix | ( | copasi_model | model | ) |
| TCAPIEXPORT tc_matrix cGetL0Matrix | ( | copasi_model | model | ) |
| TCAPIEXPORT tc_matrix cGetLinkMatrix | ( | copasi_model | model | ) |
| TCAPIEXPORT tc_matrix cGetReducedStoichiometryMatrix | ( | copasi_model | model | ) |
| TCAPIEXPORT tc_matrix cGetScaledConcentrationConcentrationCoeffs | ( | copasi_model | model | ) |
| TCAPIEXPORT tc_matrix cGetScaledElasticities | ( | copasi_model | model | ) |
| TCAPIEXPORT tc_matrix cGetScaledFluxControlCoeffs | ( | copasi_model | model | ) |
add a compartment to the model
scaled flux control coefficients
| copasi_model | model/*! scaled flux control coefficients |
| copasi_model | model |
| copasi_model | model |
add a compartment to the model
| copasi_model | model |
| TCAPIEXPORT tc_matrix cGetSteadyState | ( | copasi_model | model | ) |
bring the system to steady state
| copasi_model | model |
| TCAPIEXPORT tc_matrix cGetSteadyState2 | ( | copasi_model | model, |
| int | iter | ||
| ) |
bring the system to steady state using normal simulation
| copasi_model | model |
| int | max iterations (each iteration doubles the time duration) |
| TCAPIEXPORT tc_matrix cGetUnscaledConcentrationControlCoeffs | ( | copasi_model | model | ) |
unscaled elasticities
unscaled concentration control coefficients
| copasi_model | model |
| TCAPIEXPORT tc_matrix cGetUnscaledElasticities | ( | copasi_model | model | ) |
| TCAPIEXPORT tc_matrix cGetUnscaledFluxControlCoeffs | ( | copasi_model | model | ) |
| BEGIN_C_DECLS TCAPIEXPORT void copasi_end | ( | ) |
initialize copasi -- MUST BE CALLED before calling any other functions
destroy copasi -- MUST BE CALLED at the end of program
| TCAPIEXPORT tc_matrix cOptimize | ( | copasi_model | model, |
| const char * | objective, | ||
| tc_matrix | input | ||
| ) |
fit the model parameters to time-series data
| copasi_model | model |
| char | * filename (tab separated) |
| tc_matrix | parameters to optimize. rownames should contain parameter names, column 1 contains parameter min-values, and column 2 contains parameter max values |
| char | * pick method. Use of of the following: "GeneticAlgorithm", "LevenbergMarquardt", "SimulatedAnnealing", "NelderMead", "SRES", "ParticleSwarm", "SteepestDescent", "RandomSearch" |
use genetic algorithms to generate a distribution of parameter values that satisfy an objective function or fit a data file
| copasi_model | model |
| char | * objective function or filename |
| tc_matrix | parameter initial values and min and max values (3 columns) |
| TCAPIEXPORT copasi_model cReadAntimonyFile | ( | const char * | filename | ) |
create a model from an Antimony or SBML file
| char* | file name |
| TCAPIEXPORT copasi_model cReadSBMLFile | ( | const char * | filename | ) |
| TCAPIEXPORT copasi_model cReadSBMLString | ( | const char * | sbml | ) |
create a model from an SBML string
| char* | SBML string |
| TCAPIEXPORT void cRemoveModel | ( | copasi_model | ) |
remove a model
| TCAPIEXPORT int cSetAssignmentRule | ( | copasi_model | model, |
| const char * | species, | ||
| const char * | formula | ||
| ) |
set the assignment rule for a species (automatically assumes boundary species)
| copasi_model | model |
| char | * species name |
| char* | formula, use 0 to remove assignment rule |
| TCAPIEXPORT void cSetBoundarySpecies | ( | copasi_model | model, |
| const char * | species, | ||
| int | isBoundary | ||
| ) |
set a species as boundary or floating (will remove any assignment rules)
| copasi_model | model |
| char | * name |
| int | boundary = 1, floating = 0 (default) |
| TCAPIEXPORT void cSetConcentration | ( | copasi_model | , |
| const char * | species, | ||
| double | value | ||
| ) |
set a species as boundary or floating (will remove any assignment rules)
| copasi_model | model |
| char | * species name |
| double | concentration or count |
| TCAPIEXPORT int cSetGlobalParameter | ( | copasi_model | model, |
| const char * | name, | ||
| double | value | ||
| ) |
set the value of an existing global parameter or create a new global parameter
| copasi_model | model |
| char* | parameter name |
| double | value |
| TCAPIEXPORT void cSetOptimizerCrossoverRate | ( | double | ) |
| TCAPIEXPORT void cSetOptimizerIterations | ( | int | ) |
| TCAPIEXPORT void cSetOptimizerMutationRate | ( | double | ) |
| TCAPIEXPORT void cSetOptimizerSize | ( | int | ) |
| TCAPIEXPORT int cSetReactionRate | ( | copasi_reaction | reaction, |
| const char * | formula | ||
| ) |
set reaction rate equation
| copasi_reaction | reaction |
| char* | custom formula |
| TCAPIEXPORT int cSetValue | ( | copasi_model | , |
| const char * | name, | ||
| double | value | ||
| ) |
set the concentration of a species, volume of a compartment, or value of a parameter The function will figure out which using the name (fast lookup using hashtables). If the name does not exist in the model, a new global parameter will be created.
| copasi_model | model |
| char | * name |
| double | value |
| TCAPIEXPORT void cSetVolume | ( | copasi_model | , |
| const char * | compartment, | ||
| double | volume | ||
| ) |
set a volume of compartment
| copasi_model | model |
| char | * compartment name |
| double | volume |
| TCAPIEXPORT tc_matrix cSimulateDeterministic | ( | copasi_model | model, |
| double | startTime, | ||
| double | endTime, | ||
| int | numSteps | ||
| ) |
simulate using LSODA numerical integrator
| copasi_model | model |
| double | start time |
| double | end time |
| int | number of steps in the output |
| TCAPIEXPORT tc_matrix cSimulateHybrid | ( | copasi_model | model, |
| double | startTime, | ||
| double | endTime, | ||
| int | numSteps | ||
| ) |
simulate using Hybrid algorithm/deterministic algorithm
| copasi_model | model |
| double | start time |
| double | end time |
| int | number of steps in the output |
| TCAPIEXPORT tc_matrix cSimulateStochastic | ( | copasi_model | model, |
| double | startTime, | ||
| double | endTime, | ||
| int | numSteps | ||
| ) |
simulate using exact stochastic algorithm
| copasi_model | model |
| double | start time |
| double | end time |
| int | number of steps in the output |
| TCAPIEXPORT tc_matrix cSimulateTauLeap | ( | copasi_model | model, |
| double | startTime, | ||
| double | endTime, | ||
| int | numSteps | ||
| ) |
simulate using Tau Leap stochastic algorithm
| copasi_model | model |
| double | start time |
| double | end time |
| int | number of steps in the output |
| TCAPIEXPORT void cWriteSBMLFile | ( | copasi_model | model, |
| const char * | filename | ||
| ) |
save a model as an SBML file
| copasi_model | copasi model |
| char* | file name |
1.7.5.1