COPASI API
4.40.278
|
#include <CReaction.h>
Public Types | |
enum class | KineticLawUnit { Default , AmountPerTime , ConcentrationPerTime , __SIZE } |
Public Types inherited from CDataContainer | |
typedef CDataObjectMap | objectMap |
Public Types inherited from CDataObject | |
typedef std::set< const CDataObject * > | DataObjectSet |
enum | Flag { Container , Vector , Matrix , NameVector , Reference , ValueBool , ValueInt , ValueInt64 , ValueDbl , NonUniqueName , StaticString , ValueString , Separator , DisplayName , ModelEntity , Array , DataModel , Root , Gui , __SIZE } |
Public Types inherited from CObjectInterface | |
typedef std::vector< const CDataContainer * > | ContainerList |
typedef std::set< const CObjectInterface * > | ObjectSet |
Public Types inherited from CAnnotation | |
typedef std::map< std::string, std::string > | UnsupportedAnnotation |
Public Member Functions | |
bool | addModifier (const std::string &metabKey, const C_FLOAT64 &multiplicity=1.0) |
bool | addParameterObject (const size_t &index, const CDataObject *object) |
bool | addParameterObject (const std::string &name, const CDataObject *object) |
bool | addProduct (const std::string &metabKey, const C_FLOAT64 &multiplicity=1.0) |
bool | addSubstrate (const std::string &metabKey, const C_FLOAT64 &multiplicity=1.0) |
virtual bool | applyData (const CData &data, CUndoData::CChangeSet &changes) |
CIssue | compile () |
CReaction (const CReaction &src, const CDataContainer *pParent) | |
CReaction (const std::string &name="NoName", const CDataContainer *pParent=NO_PARENT) | |
CFunction * | createFunctionFromExpression (const std::string &infix) |
virtual void | createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const |
const CCallParameters< C_FLOAT64 > & | getCallParameters () const |
CChemEq & | getChemEq () |
const CChemEq & | getChemEq () const |
virtual std::string | getChildObjectUnits (const CDataObject *pObject) const |
size_t | getCompartmentNumber () const |
std::string | getDefaultNoiseExpression () const |
KineticLawUnit | getEffectiveKineticLawUnitType () const |
CEvaluationNode * | getExpressionTree () |
const C_FLOAT64 & | getFlux () const |
CDataObject * | getFluxReference () |
const CDataObject * | getFluxReference () const |
const CFunction * | getFunction () const |
const CFunctionParameters & | getFunctionParameters () const |
virtual const std::string & | getKey () const |
std::string | getKineticLawUnit () const |
const KineticLawUnit & | getKineticLawUnitType () const |
const CCompartment * | getLargestCompartment () const |
const CFunctionParameterMap & | getMap () const |
std::string | getNoiseExpression () const |
CExpression * | getNoiseExpressionPtr () |
const CExpression * | getNoiseExpressionPtr () const |
const CDataObject * | getNoiseReference () const |
virtual const CObjectInterface * | getObject (const CCommonName &cn) const |
virtual std::string | getObjectDisplayName () const |
const std::vector< std::vector< CRegisteredCommonName > > & | getParameterCNs () const |
const std::vector< CRegisteredCommonName > & | getParameterCNs (const size_t &index) const |
const std::vector< CRegisteredCommonName > & | getParameterCNs (const std::string &name) const |
size_t | getParameterIndex (const std::string ¶meterName, const CFunctionParameter **ppFunctionParameter=NULL) const |
const std::vector< std::vector< const CDataObject * > > & | getParameterObjects () const |
const std::vector< const CDataObject * > & | getParameterObjects (const size_t &index) const |
const std::vector< const CDataObject * > & | getParameterObjects (const std::string &name) const |
CCopasiParameterGroup & | getParameters () |
const CCopasiParameterGroup & | getParameters () const |
const C_FLOAT64 & | getParameterValue (const std::string ¶meterName) const |
const C_FLOAT64 & | getParticleFlux () const |
CDataObject * | getParticleFluxReference () |
const CDataObject * | getParticleFluxReference () const |
const CDataObject * | getParticleNoiseReference () const |
CDataObject * | getPropensityReference () |
const CDataObject * | getPropensityReference () const |
std::string | getReactionScheme () const |
const std::string & | getSBMLId () const |
const CCompartment * | getScalingCompartment () const |
const CCommonName & | getScalingCompartmentCN () const |
const bool & | hasNoise () const |
const bool & | isFast () const |
bool | isLocalParameter (const size_t &index) const |
bool | isLocalParameter (const std::string ¶meterName) const |
bool | isReversible () const |
C_INT32 | load (CReadConfig &configbuffer) |
void | printDebug () const |
void | setFast (const bool &fast) |
bool | setFunction (CFunction *pFunction) |
bool | setFunction (const std::string &functionName) |
CFunction * | setFunctionFromExpressionTree (const CExpression &tree, std::map< const CDataObject *, SBase * > &copasi2sbmlmap) |
void | setHasNoise (const bool &hasNoise) |
void | setKineticLawUnitType (const KineticLawUnit &kineticLawUnitType) |
bool | setNoiseExpression (const std::string &expression) |
bool | setNoiseExpressionPtr (CExpression *pExpression) |
virtual bool | setObjectParent (const CDataContainer *pParent) |
bool | setParameterCNs (const size_t &index, const std::vector< CRegisteredCommonName > &CNs) |
bool | setParameterCNs (const std::string &name, const std::vector< CRegisteredCommonName > &CNs) |
bool | setParameterObject (const size_t &index, const CDataObject *object) |
bool | setParameterObject (const std::string &name, const CDataObject *object) |
bool | setParameterObjects (const size_t &index, const std::vector< const CDataObject * > &objects) |
bool | setParameterObjects (const std::string &name, const std::vector< const CDataObject * > &objects) |
void | setParameterValue (const std::string ¶meterName, const C_FLOAT64 &value) |
bool | setReactionScheme (const std::string &scheme, const std::string &newFunction="", bool createMetabolites=true, bool createOther=true) |
void | setReversible (bool reversible) |
void | setSBMLId (const std::string &id) const |
void | setScalingCompartment (const CCompartment *pCompartment) |
void | setScalingCompartmentCN (const std::string &compartmentCN) |
virtual CData | toData () const |
virtual | ~CReaction () |
Public Member Functions inherited from CDataContainer | |
virtual bool | add (CDataObject *pObject, const bool &adopt=true) |
virtual bool | appendDeletedDependentData (CUndoData &undoData) const |
CDataContainer (const CDataContainer &src, const CDataContainer *pParent) | |
CDataContainer (const std::string &name, const CDataContainer *pParent=NO_PARENT, const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None) | |
void | getDescendants (CDataObject::DataObjectSet &descendants, const bool &recursive=false) const |
virtual size_t | getIndex (const CDataObject *pObject) const |
virtual objectMap & | getObjects () |
virtual const objectMap & | getObjects () const |
virtual const std::string | getUnits () const override |
virtual const CDataObject * | getValueObject () const override |
virtual CUndoObjectInterface * | insert (const CData &data) override |
void | objectRenamed (CDataObject *pObject, const std::string &oldName) |
virtual bool | remove (CDataObject *pObject) |
virtual | ~CDataContainer () |
Public Member Functions inherited from CDataObject | |
void | addIssue (const CIssue &issue) |
void | addReference (const CDataContainer *pReference) |
virtual void | calculateValue () override |
CDataObject (const CDataObject &src, const CDataContainer *pParent=NULL) | |
virtual void | destruct () override |
virtual CCommonName | getCN () const override |
virtual const CDataObject * | getDataObject () const override |
CDataContainer * | getObjectAncestor (const std::string &type) const |
CDataModel * | getObjectDataModel () const |
const CObjectInterface * | getObjectFromCN (const CCommonName &cn) const |
const std::string & | getObjectName () const |
CDataContainer * | getObjectParent () const |
const std::string & | getObjectType () const |
virtual const CObjectInterface::ObjectSet & | getPrerequisites () const override |
virtual const CValidity & | getValidity () const override |
virtual void * | getValuePointer () const override |
bool | hasFlag (const Flag &flag) const |
virtual bool | isPrerequisiteForContext (const CObjectInterface *pObject, const CCore::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const override |
bool | prerequisitsContains (const DataObjectSet &objects) const |
virtual void | print (std::ostream *ostream) const override |
void | removeIssue (const CIssue &issue) |
void | removeReference (const CDataContainer *pReference) |
bool | setObjectName (const std::string &name) |
void | validityChanged (const CValidity &changedValidity) override |
void | validityRemoved (const CValidity &changedValidity) |
virtual | ~CDataObject () |
Public Member Functions inherited from CObjectInterface | |
CObjectInterface () | |
CObjectInterface (const CObjectInterface &src) | |
virtual | ~CObjectInterface () |
Public Member Functions inherited from CUndoObjectInterface | |
CUndoObjectInterface () | |
CUndoObjectInterface (const CUndoObjectInterface &src) | |
bool | generateUuid () |
const xg::Guid & | getUuid () const |
bool | setUuid (const std::string &uuid) |
bool | setUuid (const xg::Guid &uuid) |
virtual void | updateIndex (const size_t &index, const CUndoObjectInterface *pUndoObject) |
virtual | ~CUndoObjectInterface () |
Public Member Functions inherited from CAnnotation | |
bool | addUnsupportedAnnotation (const std::string &name, const std::string &xml) |
bool | applyData (const CData &data, CUndoData::CChangeSet &changes) |
CAnnotation () | |
CAnnotation (const CAnnotation &src) | |
void | createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const |
const std::string & | getMiriamAnnotation () const |
const std::string & | getNotes () const |
UnsupportedAnnotation & | getUnsupportedAnnotations () |
const UnsupportedAnnotation & | getUnsupportedAnnotations () const |
void | initMiriamAnnotation (const std::string &newId) |
bool | operator== (const CAnnotation &rhs) const |
bool | removeUnsupportedAnnotation (const std::string &name) |
bool | replaceUnsupportedAnnotation (const std::string &name, const std::string &xml) |
void | setMiriamAnnotation (const std::string &miriamAnnotation, const std::string &newId, const std::string &oldId) |
void | setNotes (const std::string ¬es) |
CData | toData () const |
virtual | ~CAnnotation () |
Static Public Member Functions | |
static CReaction * | fromData (const CData &data, CUndoObjectInterface *pParent) |
Static Public Member Functions inherited from CDataContainer | |
static CDataContainer * | fromData (const CData &data, CUndoObjectInterface *pParent) |
Static Public Member Functions inherited from CDataObject | |
static CDataObject * | fromData (const CData &data, CUndoObjectInterface *pParent) |
static void | sanitizeObjectName (std::string &name) |
Static Public Member Functions inherited from CObjectInterface | |
static const CDataObject * | DataObject (const CObjectInterface *pInterface) |
static CObjectInterface * | GetObjectFromCN (const ContainerList &listOfContainer, const CCommonName &objName) |
Static Public Member Functions inherited from CUndoObjectInterface | |
template<class CType > | |
static CType * | fromData (const CData &, CUndoObjectInterface *) |
Static Public Member Functions inherited from CAnnotation | |
static CMIRIAMInfo * | allocateMiriamInfo (CDataContainer *pParent) |
static CAnnotation * | castObject (CDataObject *pObject) |
static const CAnnotation * | castObject (const CDataObject *pObject) |
static void | freeMiriamInfo (CDataContainer *pParent) |
Static Public Attributes | |
static CEnumAnnotation< std::string, KineticLawUnit > | KineticLawUnitTypeName |
Static Public Attributes inherited from CDataContainer | |
static const CObjectInterface::ContainerList | EmptyList |
Private Member Functions | |
void | calculate () |
CIssue | compileFunctionParameters (std::set< const CDataObject * > &Dependencies) |
std::string | escapeId (const std::string &id) |
const CModel * | getFirstCModelOrDefault (std::map< const CDataObject *, SBase * > &copasi2sbmlmap) |
void | initializeParameterMapping () |
void | initializeParameters () |
void | initObjects () |
C_INT32 | loadOld (CReadConfig &configbuffer) |
bool | loadOneRole (CReadConfig &configbuffer, CFunctionParameter::Role role, C_INT32 n, const std::string &prefix) |
CEvaluationNodeVariable * | object2variable (const CEvaluationNodeObject *objectNode, std::map< std::string, std::pair< CDataObject *, CFunctionParameter * > > &replacementMap, std::map< const CDataObject *, SBase * > &copasi2sbmlmap) |
CEvaluationNode * | objects2variables (const CEvaluationNode *expression, std::map< std::string, std::pair< CDataObject *, CFunctionParameter * > > &replacementMap, std::map< const CDataObject *, SBase * > &copasi2sbmlmap) |
CReaction & | operator= (const CReaction &) |
CDataObject * | resolveCN (const CModel *pModel, CCommonName cn) |
void | setScalingFactor () |
CEvaluationNodeObject * | variable2object (CEvaluationNodeVariable *pVariableNode) |
CEvaluationNode * | variables2objects (CEvaluationNode *expression) |
Static Private Member Functions | |
static std::string | sanitizeSBMLId (const std::string &id) |
Private Attributes | |
CChemEq | mChemEq |
bool | mFast |
C_FLOAT64 | mFlux |
bool | mHasNoise |
KineticLawUnit | mKineticLawUnit |
CFunctionParameterMap | mMap |
C_FLOAT64 | mNoise |
std::vector< std::vector< CRegisteredCommonName > > | mParameterIndexToCNs |
std::vector< std::vector< const CDataObject * > > | mParameterIndexToObjects |
std::map< std::string, size_t > | mParameterNameToIndex |
CCopasiParameterGroup | mParameters |
C_FLOAT64 | mParticleFlux |
C_FLOAT64 | mParticleNoise |
CDataObjectReference< C_FLOAT64 > * | mpFluxReference |
CFunction * | mpFunction |
CExpression * | mpNoiseExpression |
CDataObjectReference< C_FLOAT64 > * | mpNoiseReference |
CDataObjectReference< C_FLOAT64 > * | mpParticleFluxReference |
CDataObjectReference< C_FLOAT64 > * | mpParticleNoiseReference |
CDataObjectReference< C_FLOAT64 > * | mpPropensityReference |
C_FLOAT64 | mPropensity |
const CCompartment * | mpScalingCompartment |
std::string | mSBMLId |
CRegisteredCommonName | mScalingCompartmentCN |
Friends | |
std::ostream & | operator<< (std::ostream &os, const CReaction &d) |
Additional Inherited Members | |
Protected Member Functions inherited from CDataContainer | |
template<class CType > | |
CDataMatrixReference< CType > * | addMatrixReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
template<class CType > | |
CDataObjectReference< CType > * | addObjectReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
template<class CType > | |
CDataVectorReference< CType > * | addVectorReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
CDataContainer (const CDataContainer &src) | |
void | initObjects () |
Protected Member Functions inherited from CDataObject | |
CDataObject () | |
CDataObject (const std::string &name, const CDataContainer *pParent=static_cast< CDataContainer * >((void *) 0), const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None) | |
Protected Attributes inherited from CDataContainer | |
objectMap | mObjects |
Protected Attributes inherited from CDataObject | |
ObjectSet | mPrerequisits |
std::set< CDataContainer * > | mReferences |
Protected Attributes inherited from CObjectInterface | |
CValidity | mValidity |
Protected Attributes inherited from CAnnotation | |
std::string | mKey |
|
strong |
CReaction::CReaction | ( | const std::string & | name = "NoName" , |
const CDataContainer * | pParent = NO_PARENT |
||
) |
Default constructor
const | std::string & name (default: "NoName") |
const | CDataContainer * pParent (default: NULL) |
References CKeyFactory::add(), CONSTRUCTOR_TRACE, CRootContainer::getKeyFactory(), CDataObject::getObjectType(), CRootContainer::getUndefinedFunction(), CAnnotation::initMiriamAnnotation(), initObjects(), CAnnotation::mKey, and setFunction().
Referenced by fromData().
CReaction::CReaction | ( | const CReaction & | src, |
const CDataContainer * | pParent | ||
) |
Copy constructor
const CReaction & | src |
const | CDataContainer * pParent (default: NULL) |
References CKeyFactory::add(), CONSTRUCTOR_TRACE, CRootContainer::getKeyFactory(), CAnnotation::getMiriamAnnotation(), CDataObject::getObjectType(), initObjects(), CAnnotation::mKey, mpFunction, mScalingCompartmentCN, CAnnotation::setMiriamAnnotation(), and setScalingCompartmentCN().
|
virtual |
Destructor
References CRootContainer::getKeyFactory(), CDataObject::getObjectAncestor(), CAnnotation::mKey, CKeyFactory::remove(), and CModel::setCompileFlag().
bool CReaction::addModifier | ( | const std::string & | metabKey, |
const C_FLOAT64 & | multiplicity = 1.0 |
||
) |
Add a modifier to the reaction
std::string | & metabKey |
const | C_FLOAT64 & multiplicity (Default 1.0) |
References CChemEq::addMetabolite(), mChemEq, and CChemEq::MODIFIER.
Referenced by CModelAdd::addReactions(), CModel::convert2NonReversible(), SBMLImporter::createCReactionFromReaction(), CModelExpansion::duplicateReaction(), and ModifierHandler::processStart().
bool CReaction::addParameterObject | ( | const size_t & | index, |
const CDataObject * | object | ||
) |
References CDataObject::getCN(), CDataObject::getObjectAncestor(), mParameterIndexToCNs, mParameterIndexToObjects, and CModel::setCompileFlag().
Referenced by addParameterObject().
bool CReaction::addParameterObject | ( | const std::string & | name, |
const CDataObject * | object | ||
) |
References addParameterObject(), and mParameterNameToIndex.
bool CReaction::addProduct | ( | const std::string & | metabKey, |
const C_FLOAT64 & | multiplicity = 1.0 |
||
) |
Add a product to the reaction
std::string | & metabKey |
const | C_FLOAT64 & multiplicity (Default 1.0) |
References CChemEq::addMetabolite(), mChemEq, and CChemEq::PRODUCT.
Referenced by CModelAdd::addReactions(), CModel::convert2NonReversible(), SBMLImporter::createCReactionFromReaction(), CModelExpansion::createDiffusionReaction(), CModelExpansion::duplicateReaction(), and ProductHandler::processStart().
bool CReaction::addSubstrate | ( | const std::string & | metabKey, |
const C_FLOAT64 & | multiplicity = 1.0 |
||
) |
Add a substrate to the reaction
std::string | & metabKey |
const | C_FLOAT64 & multiplicity (Default 1.0) |
References CChemEq::addMetabolite(), mChemEq, and CChemEq::SUBSTRATE.
Referenced by CModelAdd::addReactions(), CModel::convert2NonReversible(), SBMLImporter::createCReactionFromReaction(), CModelExpansion::createDiffusionReaction(), CModelExpansion::duplicateReaction(), and SubstrateHandler::processStart().
|
virtual |
Apply the provided data to the object
const | CData & data |
Reimplemented from CDataContainer.
References CData::ADD_NOISE, CAnnotation::applyData(), CDataContainer::applyData(), CCopasiParameter::applyData(), CData::CHEMICAL_EQUATION, CChemEqInterface::fromDataValue(), CDataObject::getObjectAncestor(), CCopasiParameterGroup::getParameter(), CData::getProperty(), CChemEqInterface::init(), CData::isSetProperty(), CData::KINETIC_LAW, CData::KINETIC_LAW_UNIT_TYPE, CData::KINETIC_LAW_VARIABLE_MAPPING, KineticLawUnitTypeName, CData::LOCAL_REACTION_PARAMETERS, mChemEq, mHasNoise, mParameterNameToIndex, mParameters, CData::NOISE_EXPRESSION, CData::OBJECT_NAME, CData::PARAMETER_VALUE, CData::SCALING_COMPARTMENT, CModel::setCompileFlag(), setFunction(), setKineticLawUnitType(), setNoiseExpression(), setParameterCNs(), setScalingCompartmentCN(), CDataValue::toBool(), toData(), CDataValue::toDataVector(), toEnum(), CDataValue::toString(), and CChemEqInterface::writeToChemEq().
|
private |
Calculate the kinetic function
CIssue 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).
References CValidity::add(), CFlags< Enum >::All, CDataVector< CType >::begin(), CExpression::compile(), compileFunctionParameters(), CDataVector< CType >::end(), CChemEq::getModifiers(), CDataObject::getObjectAncestor(), CDataObject::getObjectName(), CChemEq::getProducts(), CChemEq::getSubstrates(), CRootContainer::getUndefinedFunction(), CReactionInterface::init(), CIssue::KineticsUndefined, mChemEq, mFlux, mHasNoise, mParticleFlux, mpFunction, mpNoiseExpression, CDataObject::mPrerequisits, CObjectInterface::mValidity, CIssue::ObjectNotFound, CValidity::remove(), CReactionInterface::setFunctionAndDoMapping(), setScalingFactor(), CIssue::VariablesMismatch, CIssue::Warning, and CReactionInterface::writeBackToReaction().
Referenced by CModel::convert2NonReversible(), CModelExpansion::replaceInReaction(), and setNoiseExpressionPtr().
|
private |
References CValidity::add(), CFunctionParameterMap::addCallParameter(), CFlags< Enum >::All, CFunctionParameterMap::clearCallParameter(), CObjectInterface::DataObject(), CIssue::Error, CFunctionParameterMap::getFunctionParameters(), getFunctionParameters(), CDataObject::getObjectAncestor(), CDataObject::getObjectFromCN(), CDataObject::getObjectName(), CDataObject::getValueObject(), CUndoObjectInterface::insert(), mMap, mParameterIndexToCNs, mParameterIndexToObjects, CObjectInterface::mValidity, CIssue::ObjectNotFound, CFunctionParameterMap::pUnmappedObject, CValidity::remove(), resolveCN(), CFunctionParameterMap::setCallParameter(), CFunctionParameters::size(), CIssue::VariablesMismatch, and CFunctionParameter::VINT32.
Referenced by compile().
CFunction * CReaction::createFunctionFromExpression | ( | const std::string & | infix | ) |
Creates a kinetic function and sets it for the reaction
const | string & infix |
References CFunctionDB::addAndAdaptName(), CDataVector< CType >::begin(), CFunctionParameters::begin(), CDataVector< CType >::end(), CFunctionParameters::end(), CCopasiMessage::ERROR, CChemEq::getCompartments(), CRootContainer::getFunctionList(), CChemEq::getModifiers(), CMetab::getObjectDisplayName(), CDataObject::getObjectName(), CChemEq::getProducts(), CChemEq::getSubstrates(), CFunction::getVariables(), mChemEq, MCReaction, CFunctionParameter::MODIFIER, CFunctionParameter::PARAMETER, CFunctionParameter::PRODUCT, CFunction::setInfix(), CDataObject::setObjectName(), CFunctionParameter::SUBSTRATE, CFunctionParameter::TIME, CFunctionParameter::VARIABLE, and CFunctionParameter::VOLUME.
|
virtual |
Create the undo data which represents the changes recording the differences between the provided oldData and the current data.
CUndoData | & undoData |
const | CUndoData::Type & type |
const | CData & oldData (default: empty data) |
const | CCore::Framework & framework (default: CCore::Framework::ParticleNumbers) |
Reimplemented from CDataContainer.
References CData::ADD_NOISE, CUndoData::addProperty(), CData::addProperty(), CFunctionParameters::begin(), CCopasiParameterGroup::beginName(), C_FLOAT64, CUndoData::CHANGE, CData::CHEMICAL_EQUATION, CAnnotation::createUndoData(), CDataContainer::createUndoData(), CCopasiParameterGroup::endName(), CEvaluationTree::getInfix(), CDataObject::getObjectName(), CData::getProperty(), CFunction::getVariables(), CChemEqInterface::init(), CData::KINETIC_LAW, CData::KINETIC_LAW_UNIT_TYPE, CData::KINETIC_LAW_VARIABLE_MAPPING, KineticLawUnitTypeName, CData::LOCAL_REACTION_PARAMETERS, mChemEq, mHasNoise, mKineticLawUnit, mParameterIndexToCNs, mParameters, mpFunction, mpNoiseExpression, mScalingCompartmentCN, CData::NOISE_EXPRESSION, CData::OBJECT_NAME, CData::PARAMETER_VALUE, CData::SCALING_COMPARTMENT, CChemEqInterface::toDataValue(), and CDataValue::toDataVector().
|
private |
Escapes double quotes and backslashes in a string and puts strings with tabs and spaces in double quotes.
Referenced by object2variable().
|
static |
Static method to create a CDataObject based on the provided data
const | CData & data |
References CReaction(), CData::getProperty(), NO_PARENT, CData::OBJECT_NAME, and CDataValue::toString().
const CCallParameters< C_FLOAT64 > & CReaction::getCallParameters | ( | ) | const |
Retrieve the call parameter given to the kinetic function.
References CFunctionParameterMap::getPointers(), and mMap.
Referenced by CMathObject::compileFlux().
CChemEq & CReaction::getChemEq | ( | ) |
const CChemEq & CReaction::getChemEq | ( | ) | const |
Retrieves the chemical equation of the reaction
References mChemEq.
Referenced by CModelAdd::addReactions(), CModelAnalyzer::checkReaction(), CMathObject::compilePropensity(), CModel::convert2NonReversible(), SBMLImporter::createCReactionFromReaction(), CSBMLExporter::createKineticLaw(), CSBMLExporter::createReaction(), CLayoutInitializer::createReactionGlyph(), SBMLImporter::doMapping(), CModelExpansion::duplicateReaction(), CODEExporter::exportKineticFunction(), SBMLImporter::findCorrespondingFunction(), CChemEqInterface::getChemEqString(), CEFMTask::getNetReactionData(), CEFMTask::getSpeciesChanges(), CReactionInterface::init(), CMathReaction::initialize(), CODEExporterC::KineticFunction2ODEmember(), CModelMerging::mergeMetabolites(), object2variable(), CModelAdd::reactionInvolvesCompartment(), CModelExpansion::replaceInReaction(), CCopasiXML::saveModel(), CChemEqInterface::setChemEqFromString(), SBMLImporter::setCorrectUsage(), CLLayoutRenderer::setDeduceSpeciesReferenceRoles(), CLLayoutRenderer::update_associations(), CReactionInterface::writeBackToReaction(), and CMMLOutput::writeRHS().
|
virtual |
Retrieve the units of the child object.
Reimplemented from CDataContainer.
References CDataObject::getObjectAncestor(), CDataObject::getObjectName(), CModel::getQuantityUnit(), and CModel::getTimeUnit().
size_t CReaction::getCompartmentNumber | ( | ) | const |
Retrieves the number of compartments the reaction is acting in.
References CChemEq::getCompartmentNumber(), and mChemEq.
std::string CReaction::getDefaultNoiseExpression | ( | ) | const |
Retrieve the default expression for the noise.
References CDataObject::getCN(), and mpParticleFluxReference.
Referenced by CReactionInterface::setHasNoise().
CReaction::KineticLawUnit CReaction::getEffectiveKineticLawUnitType | ( | ) | const |
Retrieve the effective kinetic law unit type
References AmountPerTime, ConcentrationPerTime, Default, CChemEq::getCompartmentNumber(), mChemEq, and mKineticLawUnit.
Referenced by CMathObject::compileFlux(), CMathObject::compileReactionNoise(), CSBMLExporter::createKineticLaw(), CODEExporter::exportReacParamsAndFuncs(), getKineticLawUnit(), setScalingFactor(), and CMMLOutput::writeRHS().
CEvaluationNode * CReaction::getExpressionTree | ( | ) |
Converts the function tree into the corresponding expression tree. All variable nodes are replaced by object nodes.
References getFunction(), and variables2objects().
|
private |
References CDataObject::getObjectDataModel().
Referenced by object2variable().
const C_FLOAT64 & CReaction::getFlux | ( | ) | const |
CDataObject * CReaction::getFluxReference | ( | ) |
Retrieve object referencing the flux
References mpFluxReference.
Referenced by CMathObject::compileParticleFlux(), CModel::convert2NonReversible(), SBMLImporter::createCModelFromSBMLDocument(), CDataModel::findObjectByDisplayName(), CMathContainer::getMathReaction(), CModelParameterGroup::getObjectUnit(), and CMathReaction::initialize().
const CDataObject * CReaction::getFluxReference | ( | ) | const |
Retrieve const object referencing the flux
References mpFluxReference.
const CFunction * CReaction::getFunction | ( | ) | const |
Retrieves the rate function of the reaction
References mpFunction.
Referenced by CModelAdd::addReactions(), CSBMLExporter::checkForPiecewiseFunctions(), CModelAnalyzer::checkReaction(), CMathObject::compileFlux(), CModel::convert2NonReversible(), CSBMLExporter::createKineticLaw(), CMMLOutput::createParameterMapping(), CSBMLExporter::createReaction(), SBMLImporter::doMapping(), CModelExpansion::duplicateReaction(), CODEExporter::exportKineticFunction(), CODEExporterC::exportKineticFunctionGroup(), CReactionInterface::getDeletedParameters(), getExpressionTree(), CReactionInterface::init(), CODEExporterC::KineticFunction2ODEmember(), CModel::prepareElasticity(), CCopasiXML::saveModel(), SBMLImporter::setCorrectUsage(), and CMMLOutput::writeRHS().
const CFunctionParameters & CReaction::getFunctionParameters | ( | ) | const |
Gets the description of what parameters the function expects.
References fatalError, CFunctionParameterMap::getFunctionParameters(), mMap, and mpFunction.
Referenced by CModelAdd::addReactions(), CModelAnalyzer::checkReaction(), compileFunctionParameters(), CFunctionAnalyzer::constructCallParametersActualValues(), CModel::convert2NonReversible(), CSBMLExporter::createKineticLaw(), CMMLOutput::createParameterMapping(), CModelExpansion::duplicateReaction(), CODEExporterC::exportTitleData(), CODEExporterC::KineticFunction2ODEmember(), CModelMerging::mergeMetabolites(), CModelExpansion::replaceInReaction(), and CCopasiXML::saveModel().
|
virtual |
Retrieves the key of the reaction
Reimplemented from CAnnotation.
References CAnnotation::getKey().
Referenced by CLayoutInitializer::createReactionGlyph(), CModelExpansion::duplicateReaction(), CODEExporter::exportKineticFunction(), CODEExporter::exportSingleFunction(), SBMLImporter::importMIRIAM(), CODEExporterBM::KineticFunction2ODEmember(), CODEExporterXPPAUT::KineticFunction2ODEmember(), ReactionHandler::processEnd(), ReactionGlyphHandler::processStart(), TextGlyphHandler::processStart(), and CCopasiXML::saveModel().
std::string CReaction::getKineticLawUnit | ( | ) | const |
Retrieve the effective kinetic law unit
References AmountPerTime, getEffectiveKineticLawUnitType(), CDataObject::getObjectAncestor(), CModel::getQuantityUnit(), CModel::getTimeUnit(), and CModel::getVolumeUnit().
Referenced by CModelParameter::getUnit().
const CReaction::KineticLawUnit & CReaction::getKineticLawUnitType | ( | ) | const |
Retrieve the kinetic law unit type
References mKineticLawUnit.
Referenced by CModelExpansion::duplicateReaction(), CReactionInterface::init(), and CCopasiXML::saveModel().
const CCompartment * CReaction::getLargestCompartment | ( | ) | const |
Retrieve the largest compartment that the reaction touches. This is time dependent it can only be called after update initial values has been called. Note for an empty reaction a NULL pointer is returned.
References CChemEq::getLargestCompartment(), and mChemEq.
const CFunctionParameterMap & CReaction::getMap | ( | ) | const |
References mMap.
Referenced by CModel::prepareElasticity().
std::string CReaction::getNoiseExpression | ( | ) | const |
Retrieve the expression for the noise.
References CEvaluationTree::getInfix(), mpNoiseExpression, and CExpression::updateInfix().
Referenced by CModelExpansion::duplicateReaction(), CReactionInterface::init(), and CCopasiXML::saveModel().
CExpression * CReaction::getNoiseExpressionPtr | ( | ) |
Retrieve the pointer to the expression for ODE model values.
References mpNoiseExpression, and CExpression::updateInfix().
const CExpression * CReaction::getNoiseExpressionPtr | ( | ) | const |
Retrieve the pointer to the expression for ODE model values.
References mpNoiseExpression, and CExpression::updateInfix().
Referenced by CMathObject::compileReactionParticleNoise(), and CModelExpansion::duplicateReaction().
const CDataObject * CReaction::getNoiseReference | ( | ) | const |
Retrieve object referencing the noise
References mpNoiseReference.
|
virtual |
We are hiding local reaction parameter which are covered by global quantities.
const | CCommonName & cn |
Reimplemented from CDataContainer.
References CDataContainer::getObject(), CDataObject::getObjectName(), CDataObject::getObjectParent(), CDataObject::hasFlag(), isLocalParameter(), mParameters, and CDataObject::StaticString.
Referenced by SBMLImporter::sbmlId2CopasiCN().
|
virtual |
Overload display name. Special treatment for reaction to provide a shorter display
Reimplemented from CDataObject.
References CDataObject::getObjectAncestor(), CDataObject::getObjectDisplayName(), and CDataObject::getObjectName().
const std::vector< std::vector< CRegisteredCommonName > > & CReaction::getParameterCNs | ( | ) | const |
References mParameterIndexToCNs.
Referenced by getParameterCNs().
const std::vector< CRegisteredCommonName > & CReaction::getParameterCNs | ( | const size_t & | index | ) | const |
References mParameterIndexToCNs.
Referenced by CModel::convert2NonReversible().
const std::vector< CRegisteredCommonName > & CReaction::getParameterCNs | ( | const std::string & | name | ) | const |
References getParameterCNs(), and mParameterNameToIndex.
size_t CReaction::getParameterIndex | ( | const std::string & | parameterName, |
const CFunctionParameter ** | ppFunctionParameter = NULL |
||
) | const |
Retrieve the index of the given parameter name in the function call. If pType is not NULL the type of the parameter is returned
const | std::string & parameterName |
const | CFunctionParameter ** ppFunctionParameter (default: NULL) |
Retrieve the index of the given parameter name in the function call
const | std::string & parameterName |
References CFunctionParameterMap::findParameterByName(), and mMap.
Referenced by SBMLImporter::findCorrespondingFunction(), CDataModel::findObjectByDisplayName(), CModelParameterGroup::getObjectUnit(), initializeParameters(), and variable2object().
const std::vector< std::vector< const CDataObject * > > & CReaction::getParameterObjects | ( | ) | const |
References mParameterIndexToObjects.
Referenced by getParameterObjects().
const std::vector< const CDataObject * > & CReaction::getParameterObjects | ( | const size_t & | index | ) | const |
References mParameterIndexToObjects.
Referenced by CModelAnalyzer::checkReaction(), CFunctionAnalyzer::constructCallParametersActualValues(), CModel::convert2NonReversible(), CSBMLExporter::createKineticLaw(), CMMLOutput::createParameterMapping(), CModelExpansion::duplicateReaction(), CODEExporter::exportKineticFunction(), CDataModel::findObjectByDisplayName(), CODEExporterC::KineticFunction2ODEmember(), CReactionInterface::loadMappingAndValues(), CModelExpansion::replaceInReaction(), and CCopasiXML::saveModel().
const std::vector< const CDataObject * > & CReaction::getParameterObjects | ( | const std::string & | name | ) | const |
References C_INVALID_INDEX, getParameterObjects(), and mParameterNameToIndex.
CCopasiParameterGroup & CReaction::getParameters | ( | ) |
Gets the list of kinetic parameter objects of the reaction/function
References mParameters.
const CCopasiParameterGroup & CReaction::getParameters | ( | ) | const |
Gets the list of kinetic parameter objects of the reaction/function
References mParameters.
Referenced by CModelAnalyzer::checkReaction(), CModel::convert2NonReversible(), SBMLImporter::createCReactionFromReaction(), CReactionInterface::createUndoData(), CModelExpansion::duplicateReaction(), CODEExporter::exportReacParamsAndFuncs(), CReactionInterface::getDeletedParameters(), CReactionInterface::init(), CReactionInterface::loadMappingAndValues(), ConstantHandler::processStart(), CCopasiXML::saveModel(), and CReactionInterface::writeBackToReaction().
const C_FLOAT64 & CReaction::getParameterValue | ( | const std::string & | parameterName | ) | const |
Retrieves a parameter value
References C_FLOAT64, CCopasiParameterGroup::getParameter(), CCopasiParameter::getValue(), and mParameters.
Referenced by CModelAdd::addReactions(), CModel::convert2NonReversible(), CSBMLExporter::createKineticLaw(), CMMLOutput::createParameterMapping(), and CModelExpansion::duplicateReaction().
const C_FLOAT64 & CReaction::getParticleFlux | ( | ) | const |
Retrieves the scaled flux of the reaction
References mParticleFlux.
CDataObject * CReaction::getParticleFluxReference | ( | ) |
Retrieve object referencing the particle flux
References mpParticleFluxReference.
Referenced by CMathObject::compilePropensity(), CModel::convert2NonReversible(), CDataModel::findObjectByDisplayName(), and CMathReaction::initialize().
const CDataObject * CReaction::getParticleFluxReference | ( | ) | const |
Retrieve const object referencing the particle flux
References mpParticleFluxReference.
const CDataObject * CReaction::getParticleNoiseReference | ( | ) | const |
Retrieve object referencing the particle noise
References mpParticleNoiseReference.
Referenced by CMathObject::compileReactionNoise().
CDataObject * CReaction::getPropensityReference | ( | ) |
Retrieve object referencing the propensity
References mpPropensityReference.
Referenced by CMathReaction::initialize().
const CDataObject * CReaction::getPropensityReference | ( | ) | const |
Retrieve object referencing the propensity
References mpPropensityReference.
std::string CReaction::getReactionScheme | ( | ) | const |
References CReactionInterface::getChemEqString(), CDataObject::getObjectDataModel(), and CReactionInterface::init().
const std::string & CReaction::getSBMLId | ( | ) | const |
Returns a reference to the SBML Id.
References mSBMLId.
Referenced by SBMLImporter::applyStoichiometricExpressions(), CSBMLExporter::collectIds(), SBMLImporter::createCModelFromSBMLDocument(), CSBMLExporter::createReaction(), SEDMLUtils::getXPathForObjectAndType(), object2variable(), SBMLImporter::replaceObjectNames(), CCopasiXML::saveModel(), CEvaluationNodeObject::toAST(), and VariableInfo::VariableInfo().
const CCompartment * CReaction::getScalingCompartment | ( | ) | const |
Retrieve the compartment used for scaling the kinetic function
References mpScalingCompartment.
Referenced by CMathObject::compile(), CMathObject::compileReactionNoise(), CSBMLExporter::createKineticLaw(), CModelExpansion::duplicateReaction(), CReactionInterface::init(), CCopasiXML::saveModel(), and CMMLOutput::writeRHS().
const CCommonName & CReaction::getScalingCompartmentCN | ( | ) | const |
Retrieve the CN of the scaling compartment.
References mScalingCompartmentCN.
const bool & CReaction::hasNoise | ( | ) | const |
Check whether noise is added to the reaction rate
References mHasNoise.
Referenced by CMathObject::compileReactionNoise(), CMathObject::compileReactionParticleNoise(), CModelExpansion::duplicateReaction(), CReactionInterface::init(), CCopasiXML::saveModel(), and setHasNoise().
|
private |
Initializes the mMetabNameMap vectors to the right size.
References fatalError, CFunctionParameterMap::getFunctionParameters(), CDataObject::getObjectName(), CFunctionParameter::getType(), mMap, mParameterIndexToCNs, mParameterIndexToObjects, mParameterNameToIndex, mpFunction, CFunctionParameters::size(), and CFunctionParameter::VINT32.
Referenced by setFunction().
|
private |
creates the mParamters List of CParameter objects. mMap needs to be initialized before.
References CCopasiParameterGroup::addParameter(), CCopasiParameterGroup::beginIndex(), C_FLOAT64, C_INVALID_INDEX, CCopasiParameter::DOUBLE, CCopasiParameterGroup::endIndex(), fatalError, CCopasiParameter::getCN(), CFunctionParameterMap::getFunctionParameters(), CFunctionParameters::getNumberOfParametersByUsage(), CDataObject::getObjectName(), CCopasiParameterGroup::getParameter(), CFunctionParameters::getParameterByUsage(), getParameterIndex(), mMap, mParameterIndexToCNs, mParameterIndexToObjects, mParameterNameToIndex, mParameters, mpFunction, CFunctionParameter::PARAMETER, and CCopasiParameterGroup::removeParameter().
Referenced by setFunction().
|
private |
References CDataContainer::addObjectReference(), mFlux, mNoise, mParticleFlux, mParticleNoise, mpFluxReference, mpNoiseReference, mpParticleFluxReference, mpParticleNoiseReference, mpPropensityReference, mPropensity, and CDataObject::ValueDbl.
Referenced by CReaction().
const bool & CReaction::isFast | ( | ) | const |
Check whether the reaction needs to be treated as fast @ return const bool & fast
References mFast.
Referenced by CModelExpansion::duplicateReaction(), CMathReaction::isFast(), and CCopasiXML::saveModel().
bool CReaction::isLocalParameter | ( | const size_t & | index | ) | const |
Check whether the indexed parameter is a local parameter.
const | size_t & index |
References C_INVALID_INDEX, CDataObject::getObjectParent(), mParameterIndexToObjects, and mParameters.
Referenced by CModelAdd::addReactions(), CFixLocalReactionParameters::changeModel(), CModel::convert2NonReversible(), CSBMLExporter::createKineticLaw(), CMMLOutput::createParameterMapping(), CModelExpansion::duplicateReaction(), CODEExporter::exportKineticFunction(), CODEExporter::exportReacParamsAndFuncs(), CODEExporterC::exportTitleData(), CReactionInterface::getDeletedParameters(), getObject(), CModelParameterGroup::getObjectUnit(), isLocalParameter(), CODEExporterC::KineticFunction2ODEmember(), CReactionInterface::loadMappingAndValues(), and toData().
bool CReaction::isLocalParameter | ( | const std::string & | parameterName | ) | const |
Check whether the named parameter is a local parameter.
const | std::string & parameterName |
References isLocalParameter(), and mParameterNameToIndex.
bool CReaction::isReversible | ( | ) | const |
Retrieves whether the reaction is reversible
References CChemEq::getReversibility(), and mChemEq.
Referenced by CModelAdd::addReactions(), CModelAnalyzer::checkReaction(), CMathObject::compilePropensity(), SBMLImporter::createCReactionFromReaction(), CSBMLExporter::createReaction(), SBMLImporter::doMapping(), CModelExpansion::duplicateReaction(), SBMLImporter::findCorrespondingFunction(), CEFMTask::getReactionEquation(), CModel::prepareElasticity(), CCopasiXML::saveModel(), CLLayoutRenderer::setDeduceSpeciesReferenceRoles(), and setFunctionFromExpressionTree().
C_INT32 CReaction::load | ( | CReadConfig & | configbuffer | ) |
Loads an object with data coming from a CReadConfig object. (CReadConfig object reads an input stream)
pconfigbuffer | reference to a CReadConfig object. |
References C_INT32, CReadConfig::getVariable(), loadOld(), mChemEq, mpFunction, CReadConfig::SEARCH, CChemEqInterface::setChemEqFromString(), setFunction(), CDataObject::setObjectName(), and CChemEq::setReversibility().
|
private |
Loads a reaction from a Gepasi file
References C_FLOAT64, C_INT32, fatalError, CFunctionParameter::FLOAT64, CFunctionParameterMap::getFunctionParameters(), CFunctionParameters::getNumberOfParametersByUsage(), CDataObject::getObjectName(), CFunctionParameters::getParameterByUsage(), CFunctionParameter::getType(), CReadConfig::getVariable(), loadOneRole(), mMap, CFunctionParameter::MODIFIER, CFunctionParameter::PARAMETER, CFunctionParameter::PRODUCT, setParameterValue(), StringPrint(), and CFunctionParameter::SUBSTRATE.
Referenced by load().
|
private |
Used for loading Gepasi files. Loads the mapping for one role
References CChemEq::addMetabolite(), C_INT32, fatalError, CModel::findMetabByName(), CDataObject::getCN(), CFunctionParameterMap::getFunctionParameters(), CModelEntity::getKey(), CFunctionParameters::getNumberOfParametersByUsage(), CDataObject::getObjectAncestor(), CDataObject::getObjectDataModel(), CDataObject::getObjectName(), CFunctionParameters::getParameterByUsage(), CFunctionParameter::getType(), CReadConfig::getVariable(), CFunctionParameters::isVector(), mChemEq, mMap, CFunctionParameter::MODIFIER, CChemEq::MODIFIER, mParameterIndexToCNs, mParameterIndexToObjects, mParameterNameToIndex, CDataModel::pOldMetabolites, StringPrint(), and CFunctionParameter::VINT32.
Referenced by loadOld().
|
private |
Converts a single object node to a variable node. The usage term of the variable nodes is recorded in terms of CFunctionParameters that are stored in the replacementMap. On failure a NULL pointer is returned.
References CEvaluationNode::DEFAULT, CCopasiMessage::ERROR, escapeId(), CCopasiMessage::EXCEPTION, CFunctionParameter::FLOAT64, getChemEq(), CEvaluationNodeObject::getData(), getFirstCModelOrDefault(), CChemEq::getModifiers(), CChemEq::getProducts(), getSBMLId(), CChemEq::getSubstrates(), MCReaction, MCSBML, CFunctionParameter::MODIFIER, CFunctionParameter::PARAMETER, CFunctionParameter::PRODUCT, resolveCN(), sanitizeSBMLId(), CDataVector< CType >::size(), CFunctionParameter::SUBSTRATE, CFunctionParameter::TIME, and CFunctionParameter::VOLUME.
Referenced by objects2variables().
|
private |
Replaces all object nodes in an expression tree by variable nodes. The usage term of the variable nodes is recorded in terms of CFunctionParameters that are stored in the replacementMap. On failure a NULL pointer is returned.
References CEvaluationNode::AVOGADRO, CNodeContextIterator< Node, Context >::context(), CNodeContextIterator< Node, Context >::end(), CCopasiMessage::ERROR, fatalError, CEvaluationNode::INVALID, MCReaction, CEvaluationNode::MV_FUNCTION, CNodeContextIterator< Node, Context >::next(), CEvaluationNode::OBJECT, object2variable(), CNodeContextIterator< Node, Context >::parentContextPtr(), CEvaluationNode::STRUCTURE, and CEvaluationNode::VARIABLE.
Referenced by setFunctionFromExpressionTree().
void CReaction::printDebug | ( | ) | const |
|
private |
pModel | the model in which to resolve the cn |
cn | the common name, primary parts before model will be dropped |
References CObjectInterface::DataObject(), CDataContainer::getObject(), CCommonName::getObjectName(), CCommonName::getObjectType(), and CCommonName::getRemainder().
Referenced by compileFunctionParameters(), and object2variable().
|
staticprivate |
Convert SBML to a valid COPASI infix identifier
const | std::string & id |
Referenced by object2variable().
void CReaction::setFast | ( | const bool & | fast | ) |
Set whether the reaction is to be treated as fast
const | bool & fast |
References mFast.
Referenced by CModelExpansion::duplicateReaction(), and ReactionHandler::processStart().
bool CReaction::setFunction | ( | CFunction * | pFunction | ) |
Sets the rate function of the reaction
CFunction | * pFunction |
References CRootContainer::getUndefinedFunction(), CFunction::getVariables(), CFunctionParameterMap::initializeFromFunctionParameters(), initializeParameterMapping(), initializeParameters(), mMap, mpFunction, and CDataObject::mPrerequisits.
bool CReaction::setFunction | ( | const std::string & | functionName | ) |
Sets the rate function of the reaction
const | string & functionName |
References CCopasiMessage::ERROR, CFunctionDB::findLoadFunction(), CRootContainer::getFunctionList(), and MCReaction.
Referenced by CModelAdd::addReactions(), applyData(), CModel::convert2NonReversible(), CReaction(), SBMLImporter::createCReactionFromReaction(), CModelExpansion::createDiffusionReaction(), CModelExpansion::duplicateReaction(), load(), KineticLawHandler::processEnd(), setFunctionFromExpressionTree(), and CReactionInterface::writeBackToReaction().
CFunction * CReaction::setFunctionFromExpressionTree | ( | const CExpression & | tree, |
std::map< const CDataObject *, SBase * > & | copasi2sbmlmap | ||
) |
Converts an expression tree into a CFunction object and sets the mapping for the reaction.
References CDataContainer::add(), CFunction::addVariable(), SBMLImporter::areEqualFunctions(), CEvaluationTree::compile(), CEvaluationNode::copyBranch(), CCopasiMessage::ERROR_FILTERED, findFunction(), CRootContainer::getFunctionList(), CDataObject::getObjectName(), CEvaluationTree::getRoot(), CFunctionParameter::getType(), CFunctionParameter::getUsage(), CFunction::getVariables(), CFunction::isReversible(), isReversible(), mParameterIndexToCNs, mParameterIndexToObjects, mParameterNameToIndex, mpFunction, objects2variables(), pdelete, setFunction(), CDataObject::setObjectName(), CFunction::setReversible(), CEvaluationTree::setRoot(), TriFalse, and TriTrue.
Referenced by SBMLImporter::createCReactionFromReaction().
void CReaction::setHasNoise | ( | const bool & | hasNoise | ) |
Set whether to add noise to the reaction rate
const | bool & hasNoise |
References CDataObject::getObjectAncestor(), hasNoise(), mHasNoise, and CModel::setCompileFlag().
Referenced by CModelExpansion::duplicateReaction(), ReactionHandler::processStart(), and CReactionInterface::writeBackToReaction().
void CReaction::setKineticLawUnitType | ( | const KineticLawUnit & | kineticLawUnitType | ) |
Set the kinetic law unit type;
const | KineticLawUnit & kineticLawUnit |
References mKineticLawUnit.
Referenced by applyData(), CModelExpansion::duplicateReaction(), KineticLawHandler::processStart(), and CReactionInterface::writeBackToReaction().
bool CReaction::setNoiseExpression | ( | const std::string & | expression | ) |
Set the expression expression for the noise
const | std::string & expression |
References CEvaluationTree::getInfix(), CDataObject::getObjectAncestor(), mpNoiseExpression, CModel::setCompileFlag(), and CExpression::setInfix().
Referenced by applyData(), CModelExpansion::duplicateReaction(), ReactionHandler::processEnd(), and CReactionInterface::writeBackToReaction().
bool CReaction::setNoiseExpressionPtr | ( | CExpression * | pExpression | ) |
Set the noise expression for ODE model values
CExpression* |
References CDataContainer::add(), compile(), CDataObject::getObjectAncestor(), mpNoiseExpression, pdelete, CDataContainer::remove(), CModel::setCompileFlag(), CDataObject::setObjectName(), and CDataObject::setObjectParent().
|
virtual |
Sets the parent of the metabolite;
const | CDataContainer * pParent |
Reimplemented from CDataObject.
References CDataObject::setObjectParent().
bool CReaction::setParameterCNs | ( | const size_t & | index, |
const std::vector< CRegisteredCommonName > & | CNs | ||
) |
bool CReaction::setParameterCNs | ( | const std::string & | name, |
const std::vector< CRegisteredCommonName > & | CNs | ||
) |
References mParameterNameToIndex, and setParameterCNs().
bool CReaction::setParameterObject | ( | const size_t & | index, |
const CDataObject * | object | ||
) |
References setParameterObjects().
bool CReaction::setParameterObject | ( | const std::string & | name, |
const CDataObject * | object | ||
) |
References setParameterObjects().
bool CReaction::setParameterObjects | ( | const size_t & | index, |
const std::vector< const CDataObject * > & | objects | ||
) |
References CDataObject::getObjectAncestor(), mParameterIndexToCNs, mParameterIndexToObjects, and CModel::setCompileFlag().
Referenced by CFixLocalReactionParameters::changeModel(), CModelExpansion::createDiffusionReaction(), SBMLImporter::doMapping(), CModelExpansion::duplicateReaction(), KineticLawHandler::processEnd(), CModelExpansion::replaceInReaction(), setParameterObject(), setParameterObjects(), CModelParameter::updateModel(), and CReactionInterface::writeBackToReaction().
bool CReaction::setParameterObjects | ( | const std::string & | name, |
const std::vector< const CDataObject * > & | objects | ||
) |
References mParameterNameToIndex, and setParameterObjects().
void CReaction::setParameterValue | ( | const std::string & | parameterName, |
const C_FLOAT64 & | value | ||
) |
Sets a parameter value
const | std::string & parameterName |
const | C_FLOAT64 & value |
References fatalError, CFunctionParameters::findParameterByName(), CFunctionParameter::FLOAT64, CCopasiParameter::getCN(), CCopasiParameterGroup::getParameter(), CFunctionParameter::getType(), CFunction::getVariables(), mParameterIndexToCNs, mParameterNameToIndex, mParameters, mpFunction, and CCopasiParameter::setValue().
Referenced by CModelAdd::addReactions(), CModel::convert2NonReversible(), CModelExpansion::duplicateReaction(), loadOld(), and CReactionInterface::writeBackToReaction().
bool CReaction::setReactionScheme | ( | const std::string & | scheme, |
const std::string & | newFunction = "" , |
||
bool | createMetabolites = true , |
||
bool | createOther = true |
||
) |
Initializes this reaction from the specified reaction scheme
scheme | the new reaction scheme to be used |
newFunction | a candidate function to be used |
createMetaboliets | if true, new metabolites will be created |
createOther | if true, additional elements will be created as well |
Initializes this reaction from the specified reaction scheme
References CModel::compileIfNecessary(), CReactionInterface::createMetabolites(), CReactionInterface::createOtherObjects(), CDataModel::getModel(), CDataObject::getObjectDataModel(), CReactionInterface::init(), CReactionInterface::setChemEqString(), and CReactionInterface::writeBackToReaction().
void CReaction::setReversible | ( | bool | reversible | ) |
Sets whether the reaction is reversible
bool | reversible |
References mChemEq, and CChemEq::setReversibility().
Referenced by CModelAdd::addReactions(), CModel::convert2NonReversible(), SBMLImporter::createCReactionFromReaction(), CModelExpansion::createDiffusionReaction(), CModelExpansion::duplicateReaction(), and ReactionHandler::processStart().
void CReaction::setSBMLId | ( | const std::string & | id | ) | const |
Sets the SBMLId.
References mSBMLId.
Referenced by SBMLImporter::createCReactionFromReaction(), CSBMLExporter::createReaction(), ReactionHandler::processStart(), and SBMLMapHandler::processStart().
void CReaction::setScalingCompartment | ( | const CCompartment * | pCompartment | ) |
Set the compartment used for scaling the kinetic function
const | CCompartment * pCompartment |
References CDataObject::getCN(), mpScalingCompartment, and mScalingCompartmentCN.
Referenced by CModelExpansion::duplicateReaction().
void CReaction::setScalingCompartmentCN | ( | const std::string & | compartmentCN | ) |
Set the CN of the compartment used for scaling the kinetic function
const | std::string & compartmentCN |
References CDataObject::getObjectDataModel(), CObjectInterface::GetObjectFromCN(), mpScalingCompartment, and mScalingCompartmentCN.
Referenced by applyData(), CReaction(), KineticLawHandler::processStart(), and CReactionInterface::writeBackToReaction().
|
private |
Sets the scaling factor of the for the fluxes
References ConcentrationPerTime, Default, CDataObject::getCN(), CMetab::getCompartment(), getEffectiveKineticLawUnitType(), CDataObject::getObjectDataModel(), CObjectInterface::GetObjectFromCN(), CChemEq::getProducts(), CChemEq::getSubstrates(), mChemEq, mKineticLawUnit, mpScalingCompartment, mScalingCompartmentCN, and CDataVector< CType >::size().
Referenced by compile().
|
virtual |
Retrieve the data describing the object
Reimplemented from CDataContainer.
References CData::ADD_NOISE, CData::addProperty(), CData::appendData(), CFunctionParameters::begin(), CCopasiParameterGroup::beginName(), CData::CHEMICAL_EQUATION, CCopasiParameterGroup::endName(), CEvaluationTree::getInfix(), CDataObject::getObjectName(), CFunction::getVariables(), CChemEqInterface::init(), isLocalParameter(), CData::KINETIC_LAW, CData::KINETIC_LAW_UNIT_TYPE, CData::KINETIC_LAW_VARIABLE_MAPPING, KineticLawUnitTypeName, CData::LOCAL_REACTION_PARAMETERS, mChemEq, mHasNoise, mKineticLawUnit, mParameterIndexToCNs, mParameters, mpFunction, mpNoiseExpression, mScalingCompartmentCN, CData::NOISE_EXPRESSION, CData::OBJECT_NAME, CData::PARAMETER_VALUE, CData::SCALING_COMPARTMENT, CAnnotation::toData(), CDataContainer::toData(), and CChemEqInterface::toDataValue().
Referenced by applyData(), and CReactionInterface::createUndoData().
|
private |
Converts a single variable node to an object node. On failure a NULL pointer is returned.
References C_INVALID_INDEX, CEvaluationNode::CN, CObjectInterface::DataObject(), CCopasiMessage::EXCEPTION, CDataObject::getCN(), CCopasiNode< _Data >::getData(), CDataObject::getObjectFromCN(), getParameterIndex(), CFunctionParameter::getType(), MCReaction, mParameterIndexToCNs, CFunctionParameter::VFLOAT64, and CFunctionParameter::VINT32.
Referenced by variables2objects().
|
private |
Replaces all variable nodes in a function tree by object nodes. On failure a NULL pointer is returned.
References CCopasiNode< _Data >::addChild(), CEvaluationNode::CALL, CEvaluationNode::CHOICE, CEvaluationNode::CONSTANT, CCopasiMessage::ERROR, CEvaluationNode::FUNCTION, CCopasiNode< _Data >::getChild(), CCopasiNode< _Data >::getData(), CCopasiNode< _Data >::getSibling(), CEvaluationNode::INVALID, CEvaluationNode::LOGICAL, CEvaluationNode::mainType(), MCReaction, CEvaluationNode::MV_FUNCTION, CEvaluationNode::NUMBER, CEvaluationNode::OBJECT, CEvaluationNode::OPERATOR, CEvaluationNode::STRUCTURE, CEvaluationNode::subType(), CEvaluationNode::VARIABLE, variable2object(), and CEvaluationNode::WHITESPACE.
Referenced by getExpressionTree().
|
friend |
Friend declaration for ostream operator
std::ostream | & os |
const | CReaction & d |
|
static |
|
private |
The chemical equation
Referenced by addModifier(), addProduct(), addSubstrate(), applyData(), compile(), createFunctionFromExpression(), createUndoData(), getChemEq(), getCompartmentNumber(), getEffectiveKineticLawUnitType(), getLargestCompartment(), isReversible(), load(), loadOneRole(), setReversible(), setScalingFactor(), and toData().
|
private |
|
private |
The flux of the reaction, as amount of substance/time
Referenced by compile(), getFlux(), and initObjects().
|
private |
A Boolean flag indicating whether to add noise to the reaction
Referenced by applyData(), compile(), createUndoData(), hasNoise(), setHasNoise(), and toData().
|
private |
This indicates what the units of the kinetic law are
Referenced by createUndoData(), getEffectiveKineticLawUnitType(), getKineticLawUnitType(), setKineticLawUnitType(), setScalingFactor(), and toData().
|
private |
This describes the mapping of the species and parameters to the function parameters. Here are the pointers to the actual objects and values.
Referenced by compileFunctionParameters(), getCallParameters(), getFunctionParameters(), getMap(), getParameterIndex(), initializeParameterMapping(), initializeParameters(), loadOld(), loadOneRole(), and setFunction().
|
private |
The noise of the reaction
Referenced by initObjects().
|
private |
|
private |
|
private |
This describes the mapping of the species to the function parameters. Here the keys of the metabolites (as in the chemical equation) are stored.
Referenced by addParameterObject(), applyData(), getParameterCNs(), getParameterObjects(), initializeParameterMapping(), initializeParameters(), isLocalParameter(), loadOneRole(), setFunctionFromExpressionTree(), setParameterCNs(), setParameterObjects(), and setParameterValue().
|
private |
This is a list of parameter objects.
Referenced by applyData(), createUndoData(), getObject(), getParameters(), getParameterValue(), initializeParameters(), isLocalParameter(), setParameterValue(), and toData().
|
private |
The scaled flux of the reaction, as particle number/time
Referenced by compile(), getParticleFlux(), and initObjects().
|
private |
The particle noise
Referenced by initObjects().
|
private |
Referenced by getFluxReference(), and initObjects().
|
private |
A pointer to the rate function of the reaction
Referenced by compile(), CReaction(), createUndoData(), getFunction(), getFunctionParameters(), initializeParameterMapping(), initializeParameters(), load(), setFunction(), setFunctionFromExpressionTree(), setParameterValue(), and toData().
|
private |
Optional noise term
Referenced by compile(), createUndoData(), getNoiseExpression(), getNoiseExpressionPtr(), setNoiseExpression(), setNoiseExpressionPtr(), and toData().
|
private |
Referenced by getNoiseReference(), and initObjects().
|
private |
Referenced by getDefaultNoiseExpression(), getParticleFluxReference(), and initObjects().
|
private |
Referenced by getParticleNoiseReference(), and initObjects().
|
private |
Referenced by getPropensityReference(), and initObjects().
|
private |
The propensity of the reaction
Referenced by initObjects().
|
private |
Referenced by getScalingCompartment(), setScalingCompartment(), setScalingCompartmentCN(), and setScalingFactor().
|
mutableprivate |
The id of the corresponding reaction in an SBML file. This value is either set upon importing an SBML file, or when the object is first exported to an SBML file.
Referenced by getSBMLId(), and setSBMLId().
|
private |