copasi API  0.1
Public Member Functions | Friends
CReaction Class Reference

#include <CReaction.h>

Inheritance diagram for CReaction:
CCopasiContainer CAnnotation CCopasiObject

List of all members.

Public Member Functions

 CReaction (const std::string &name="NoName", const CCopasiContainer *pParent=NULL)
 CReaction (const CReaction &src, const CCopasiContainer *pParent=NULL)
 ~CReaction ()
virtual std::string getChildObjectUnits (const CCopasiObject *pObject) const
void cleanup ()
virtual std::string getObjectDisplayName (bool regular=true, bool richtext=false) const
C_INT32 load (CReadConfig &configbuffer)
virtual bool setObjectParent (const CCopasiContainer *pParent)
virtual std::set< const
CCopasiObject * > 
getDeletedObjects () const
virtual const std::string & getKey () const
const CChemEqgetChemEq () const
CChemEqgetChemEq ()
const CFunctiongetFunction () const
const C_FLOAT64 & getFlux () const
const C_FLOAT64 & getParticleFlux () const
bool isReversible () const
bool addSubstrate (const std::string &metabKey, const C_FLOAT64 &multiplicity=1.0)
bool addProduct (const std::string &metabKey, const C_FLOAT64 &multiplicity=1.0)
bool addModifier (const std::string &metabKey, const C_FLOAT64 &multiplicity=1.0)
bool setFunction (const std::string &functionName)
bool setFunction (CFunction *pFunction)
void setParameterValue (const std::string &parameterName, const C_FLOAT64 &value, const bool &updateStatus=true)
const C_FLOAT64 & getParameterValue (const std::string &parameterName) const
void setParameterMapping (const C_INT32 &index, const std::string &key)
void addParameterMapping (const C_INT32 &index, const std::string &key)
void setParameterMapping (const std::string &parameterName, const std::string &key)
void addParameterMapping (const std::string &parameterName, const std::string &key)
void setParameterMappingVector (const std::string &parameterName, const std::vector< std::string > &keys)
void clearParameterMapping (const std::string &parameterName)
void clearParameterMapping (const C_INT32 &index)
const std::vector< std::vector
< std::string > > & 
getParameterMappings () const
std::vector< std::vector
< std::string > > & 
getParameterMappings ()
const std::vector< std::string > & getParameterMapping (const std::string &parameterName) const
const CCopasiParameterGroupgetParameters () const
CCopasiParameterGroupgetParameters ()
bool isLocalParameter (const C_INT32 &index) const
bool isLocalParameter (const std::string &parameterName) const
const CFunctionParametersgetFunctionParameters () const
void setReversible (bool reversible)
void compile ()
const C_FLOAT64 & calculateFlux ()
const C_FLOAT64 & calculateParticleFlux ()
CCopasiObjectgetParticleFluxReference ()
C_FLOAT64 calculatePartialDerivative (C_FLOAT64 *pXi, const C_FLOAT64 &derivationFactor, const C_FLOAT64 &resolution)
unsigned C_INT32 getCompartmentNumber () const
const CCompartmentgetLargestCompartment () const
bool setFunctionFromExpressionTree (CEvaluationTree *tree, std::map< CCopasiObject *, SBase * > &copasi2sbmlmap, CFunctionDB *pFunctionDB)
CEvaluationNodegetExpressionTree ()
void setSBMLId (const std::string &id)
const std::string & getSBMLId () const
void printDebug () const

Friends

std::ostream & operator<< (std::ostream &os, const CReaction &d)

Constructor & Destructor Documentation

CReaction::CReaction ( const std::string &  name = "NoName",
const CCopasiContainer pParent = NULL 
)

Default constructor

Parameters:
conststd::string & name (default: "NoName")
constCCopasiContainer * pParent (default: NULL)
CReaction::CReaction ( const CReaction src,
const CCopasiContainer pParent = NULL 
)

Copy constructor

Parameters:
const CReaction &src
constCCopasiContainer * pParent (default: NULL)
CReaction::~CReaction ( )

Destructor


Member Function Documentation

bool CReaction::addModifier ( const std::string &  metabKey,
const C_FLOAT64 &  multiplicity = 1.0 
)

Add a modifier to the reaction

Parameters:
std::string& metabKey
constC_FLOAT64 & multiplicity (Default 1.0)
Returns:
bool success
void CReaction::addParameterMapping ( const C_INT32 &  index,
const std::string &  key 
)

Add a parameter mapping for the indexed parameter.

Parameters:
constC_INT32 & index
conststd::string & key
void CReaction::addParameterMapping ( const std::string &  parameterName,
const std::string &  key 
)

Add a parameter mapping for the named parameter.

Parameters:
conststd::string & parameterName
conststd::string & key
bool CReaction::addProduct ( const std::string &  metabKey,
const C_FLOAT64 &  multiplicity = 1.0 
)

Add a product to the reaction

Parameters:
std::string& metabKey
constC_FLOAT64 & multiplicity (Default 1.0)
Returns:
bool success
bool CReaction::addSubstrate ( const std::string &  metabKey,
const C_FLOAT64 &  multiplicity = 1.0 
)

Add a substrate to the reaction

Parameters:
std::string& metabKey
constC_FLOAT64 & multiplicity (Default 1.0)
Returns:
bool success
const C_FLOAT64 & CReaction::calculateFlux ( )

Calculate the kinetic function and returns the flux

Returns:
const C_FLOAT64 & Flux
C_FLOAT64 CReaction::calculatePartialDerivative ( C_FLOAT64 *  pXi,
const C_FLOAT64 &  derivationFactor,
const C_FLOAT64 &  resolution 
)

Calculate partial derivative of the flux

Parameters:
C_FLOAT64* pXi
constC_FLOAT64 & derivationFactor
constC_FLOAT64 & resolution (unscaled resolution)
Returns:
C_FLOAT64 partial
const C_FLOAT64 & CReaction::calculateParticleFlux ( )

Calculates the kinetic function and returns the particle flux

Returns:
const C_FLOAT64 & ParticleFlux
void CReaction::cleanup ( )

Delete

void CReaction::clearParameterMapping ( const std::string &  parameterName)

Clear the parameter mapping for the named parameter.

Parameters:
constC_INT32 & index
void CReaction::clearParameterMapping ( const C_INT32 &  index)

Clear the parameter mapping for the indexed parameter.

Parameters:
constC_INT32 & index
void CReaction::compile ( )

Compile the reaction, i.e., links the metabolites and parameters with the rate function. The connection of the reaction and the function parameter mapping to the actual metabolites is established (before compile() the chemical equation and the reaction only hold the names of the metabolites).

Parameters:
CCopasiVectorNS < CCompartment > &compartments
const CChemEq & CReaction::getChemEq ( ) const

Retrieves the chemical equation of the reaction

Returns:
const CChemEq & chemEq
CChemEq & CReaction::getChemEq ( )

Retrieves the chemical equation of the reaction

Returns:
CChemEq & chemEq
std::string CReaction::getChildObjectUnits ( const CCopasiObject pObject) const [virtual]

Retrieve the units of the child object.

Returns:
std::string units

Reimplemented from CCopasiContainer.

unsigned C_INT32 CReaction::getCompartmentNumber ( ) const

Retrieves the number of compartments the reaction is acting in.

Returns:
"unsigned C_INT32" the compartment number
std::set< const CCopasiObject * > CReaction::getDeletedObjects ( ) const [virtual]

Retrieve the list of deleted numeric child objects;

Returns:
std::set< const CCopasiObject * > deletedObjects
CEvaluationNode * CReaction::getExpressionTree ( )

Converts the function tree into the corresponding expression tree. All variable nodes are replaced by object nodes.

const C_FLOAT64 & CReaction::getFlux ( ) const

Retrieves the flux of the reaction

Returns:
const C_FLOAT64 & flux
const CFunction * CReaction::getFunction ( ) const

Retrieves the rate function of the reaction

Returns:
"CBaseFunction &"
const CFunctionParameters & CReaction::getFunctionParameters ( ) const

Gets the description of what parameters the function expects.

const std::string & CReaction::getKey ( ) const [virtual]

Retrieves the key of the reaction

Returns:
std::string key

Reimplemented from CCopasiObject.

const CCompartment & CReaction::getLargestCompartment ( ) const

get the largest (smallest) compartment that the reaction touches.

std::string CReaction::getObjectDisplayName ( bool  regular = true,
bool  richtext = false 
) const [virtual]

Overload display name. Special treatment for reaction to provide a shorter display

Reimplemented from CCopasiObject.

const std::vector< std::string > & CReaction::getParameterMapping ( const std::string &  parameterName) const
const std::vector< std::vector<std::string> >& CReaction::getParameterMappings ( ) const [inline]

Retrieve the mappings of kinetic function parameters.

std::vector< std::vector<std::string> >& CReaction::getParameterMappings ( ) [inline]
const CCopasiParameterGroup & CReaction::getParameters ( ) const

Gets the list of kinetic parameter objects of the reaction/function

CCopasiParameterGroup & CReaction::getParameters ( )

Gets the list of kinetic parameter objects of the reaction/function

const C_FLOAT64 & CReaction::getParameterValue ( const std::string &  parameterName) const

Retrieves a parameter value

const C_FLOAT64 & CReaction::getParticleFlux ( ) const

Retrieves the scaled flux of the reaction

Returns:
const C_FLOAT64 & scaledFlux
CCopasiObject * CReaction::getParticleFluxReference ( )

Retrieve object referencing the particle flux

Returns:
CCopasiObject * particleFluxReference
const std::string & CReaction::getSBMLId ( ) const

Returns a reference to the SBML Id.

bool CReaction::isLocalParameter ( const C_INT32 &  index) const

Check whether the indexed parameter is a local parameter.

Parameters:
constC_INT32 & index
Returns:
bool isLocal
bool CReaction::isLocalParameter ( const std::string &  parameterName) const

Check whether the named parameter is a local parameter.

Parameters:
conststd::string & parameterName
Returns:
bool isLocal
bool CReaction::isReversible ( ) const

Retrieves whether the reaction is reversible

Returns:
bool
C_INT32 CReaction::load ( CReadConfig configbuffer)

Loads an object with data coming from a CReadConfig object. (CReadConfig object reads an input stream)

Parameters:
pconfigbufferreference to a CReadConfig object.
Returns:
mFail
See also:
mFail
void CReaction::printDebug ( ) const
bool CReaction::setFunction ( const std::string &  functionName)

Sets the rate function of the reaction

Parameters:
conststring & functionName
Returns:
bool success
bool CReaction::setFunction ( CFunction pFunction)

Sets the rate function of the reaction

Parameters:
CFunction* pFunction
Returns:
bool success
bool CReaction::setFunctionFromExpressionTree ( CEvaluationTree tree,
std::map< CCopasiObject *, SBase * > &  copasi2sbmlmap,
CFunctionDB pFunctionDB 
)

Converts an expression tree into a CFunction object and sets the mapping for the reaction.

bool CReaction::setObjectParent ( const CCopasiContainer pParent) [virtual]

Sets the parent of the metabolite;

Parameters:
constCCopasiContainer * pParent
Returns:
bool success

Reimplemented from CCopasiObject.

void CReaction::setParameterMapping ( const C_INT32 &  index,
const std::string &  key 
)

Sets a parameter mapping for the indexed parameter.

Parameters:
constC_INT32 & index
conststd::string & key
void CReaction::setParameterMapping ( const std::string &  parameterName,
const std::string &  key 
)

Sets a parameter mapping for the named parameter.

Parameters:
conststd::string & parameterName
conststd::string & key
void CReaction::setParameterMappingVector ( const std::string &  parameterName,
const std::vector< std::string > &  keys 
)

Set the mapping for the name parameter which must be of type vector

Parameters:
conststd::string & parameterName
conststd::vector<std::string> & keys
void CReaction::setParameterValue ( const std::string &  parameterName,
const C_FLOAT64 &  value,
const bool &  updateStatus = true 
)

Sets a parameter value if updateStatus==true the status is also updated to make sure the value is actually used (instead of a global value that may have been used before). if updateStatus==false only the value of the local parameter is set, even if it is not used

Parameters:
conststd::string & parameterName
constC_FLOAT64 & value
constbool & updateStatus (default: true(
void CReaction::setReversible ( bool  reversible)

Sets whether the reaction is reversible

Parameters:
boolreversible
void CReaction::setSBMLId ( const std::string &  id)

Sets the SBMLId.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const CReaction d 
) [friend]

Friend declaration for ostream operator

Parameters:
std::ostream& os
constCReaction & d
Returns:
std::ostream & os

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines