COPASI API  4.40.278
CMetab Class Reference

#include <CMetab.h>

Inheritance diagram for CMetab:

Public Member Functions

virtual bool applyData (const CData &data, CUndoData::CChangeSet &changes) override
virtual void calculate () override
void cleanup ()
 CMetab (const CMetab &src, const CDataContainer *pParent)
 CMetab (const std::string &name="NoName", const CDataContainer *pParent=NO_PARENT)
virtual CIssue compile () override
void compileIsInitialValueChangeAllowed ()
virtual void createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const override
virtual std::string getChildObjectUnits (const CDataObject *pObject) const override
const CCompartmentgetCompartment () const
const C_FLOAT64getConcentration () const
C_FLOAT64 getConcentrationRate () const
CDataObjectgetConcentrationRateReference () const
CDataObjectgetConcentrationReference () const
size_t getCountOfDependentReactions () const
const C_FLOAT64getInitialConcentration () const
CDataObjectgetInitialConcentrationReference () const
CDataObjectgetIntensiveNoiseReference () const
const CMoietygetMoiety () const
virtual std::string getObjectDisplayName () const override
const C_FLOAT64getTransitionTime () const
CDataObjectgetTransitionTimeReference () const
virtual const std::string getUnits () const override
virtual const CDataObjectgetValueObject () const override
virtual void * getValuePointer () const override
void initCompartment (const CCompartment *pCompartment=NULL)
bool isDependent () const
const bool & isInitialValueChangeAllowed (CCore::Framework framework) const
C_INT32 load (CReadConfig &configbuffer)
CMetaboperator= (const CMetabOld &rhs)
bool setCompartment (const std::string &compName)
void setConcentration (const C_FLOAT64 concentration)
void setDependsOnMoiety (const CMoiety *pMoiety)
void setInitialConcentration (const C_FLOAT64 &initialConcentration)
virtual bool setObjectParent (const CDataContainer *pParent) override
void setTransitionTime (const C_FLOAT64 &transitionTime)
virtual CData toData () const override
 ~CMetab ()
- Public Member Functions inherited from CModelEntity
 CModelEntity (const CModelEntity &src, const CDataContainer *pParent)
 CModelEntity (const std::string &name="NoName", const CDataContainer *pParent=NO_PARENT, const std::string &type="ModelEntity", const CFlags< Flag > &flag=CFlags< Flag >::None)
std::string getDefaultNoiseExpression () const
std::string getExpression () const
CExpressiongetExpressionPtr ()
const CExpressiongetExpressionPtr () const
std::string getInitialExpression () const
CExpressiongetInitialExpressionPtr ()
const CExpressiongetInitialExpressionPtr () const
const C_FLOAT64getInitialValue () const
CDataObjectgetInitialValueReference () const
virtual const std::string & getKey () const override
CModelgetModel () const
std::string getNoiseExpression () const
CExpressiongetNoiseExpressionPtr ()
const CExpressiongetNoiseExpressionPtr () const
CDataObjectgetNoiseReference () const
const C_FLOAT64getRate () const
CDataObjectgetRateReference () const
const std::string & getSBMLId () const
const CModelEntity::StatusgetStatus () const
virtual const std::string & getUnitExpression () const
const C_FLOAT64getValue () const
CDataObjectgetValueReference () const
const bool & hasNoise () const
bool isFixed () const
const bool & isUsed () const
CIssue setExpression (const std::string &expression)
bool setExpressionPtr (CExpression *pExpression)
void setHasNoise (const bool &hasNoise)
CIssue setInitialExpression (const std::string &expression)
bool setInitialExpressionPtr (CExpression *pExpression)
virtual void setInitialValue (const C_FLOAT64 &initialValue)
bool setNoiseExpression (const std::string &expression)
bool setNoiseExpressionPtr (CExpression *pExpression)
void setRate (const C_FLOAT64 &rate)
void setSBMLId (const std::string &id) const
bool setStatus (const CModelEntity::Status &status)
virtual CIssue setUnitExpression (std::string unitExpression)
void setUsed (const bool &used)
virtual void setValue (const C_FLOAT64 &value)
 ~CModelEntity ()
- 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 const CObjectInterfacegetObject (const CCommonName &cn) const override
virtual objectMapgetObjects ()
virtual const objectMapgetObjects () const
virtual CUndoObjectInterfaceinsert (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 CDataObjectgetDataObject () const override
CDataContainergetObjectAncestor (const std::string &type) const
CDataModelgetObjectDataModel () const
const CObjectInterfacegetObjectFromCN (const CCommonName &cn) const
const std::string & getObjectName () const
CDataContainergetObjectParent () const
const std::string & getObjectType () const
virtual const CObjectInterface::ObjectSetgetPrerequisites () const override
virtual const CValiditygetValidity () 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
UnsupportedAnnotationgetUnsupportedAnnotations ()
const UnsupportedAnnotationgetUnsupportedAnnotations () 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 &notes)
CData toData () const
virtual ~CAnnotation ()

Static Public Member Functions

static C_FLOAT64 convertToConcentration (const C_FLOAT64 &number, const CCompartment &compartment)
static C_FLOAT64 convertToNumber (const C_FLOAT64 &concentration, const CCompartment &compartment)
static CMetabfromData (const CData &data, CUndoObjectInterface *pParent)
- Static Public Member Functions inherited from CModelEntity
static CModelEntityfromData (const CData &data, CUndoObjectInterface *pParent)
- Static Public Member Functions inherited from CDataContainer
static CDataContainerfromData (const CData &data, CUndoObjectInterface *pParent)
- Static Public Member Functions inherited from CDataObject
static CDataObjectfromData (const CData &data, CUndoObjectInterface *pParent)
static void sanitizeObjectName (std::string &name)
- Static Public Member Functions inherited from CObjectInterface
static const CDataObjectDataObject (const CObjectInterface *pInterface)
static CObjectInterfaceGetObjectFromCN (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 CMIRIAMInfoallocateMiriamInfo (CDataContainer *pParent)
static CAnnotationcastObject (CDataObject *pObject)
static const CAnnotationcastObject (const CDataObject *pObject)
static void freeMiriamInfo (CDataContainer *pParent)

Protected Member Functions

 CMetab (const CMetab &src)
- Protected Member Functions inherited from CModelEntity
 CModelEntity (const CModelEntity &src)
- 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

CDataObjectReference< C_FLOAT64 > * mpConcRateReference
CDataObjectReference< C_FLOAT64 > * mpConcReference
CDataObjectReference< C_FLOAT64 > * mpIConcReference
CDataObjectReference< C_FLOAT64 > * mpIntensiveNoiseReference
CDataObjectReference< C_FLOAT64 > * mpTTReference
- Protected Attributes inherited from CModelEntity
bool mHasNoise
C_FLOAT64 mIValue
C_FLOAT64 mNoise
CDataObjectReference< C_FLOAT64 > * mpIValueReference
CDataObjectReference< C_FLOAT64 > * mpNoiseReference
CDataObjectReference< C_FLOAT64 > * mpRateReference
CDataObjectReference< C_FLOAT64 > * mpValueReference
C_FLOAT64 mRate
std::string mSBMLId
std::string mUnitExpression
C_FLOAT64 mValue
- 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

Private Member Functions

void initObjects ()

Private Attributes

C_FLOAT64 mConc
C_FLOAT64 mConcRate
C_FLOAT64 mIConc
C_FLOAT64 mIntensiveNoise
bool mIsInitialConcentrationChangeAllowed
bool mIsInitialParticleNumberChangeAllowed
const CCompartmentmpCompartment
const CMoietympMoiety


void CMoiety::add (C_FLOAT64 value, CMetab *pMetabolite)
std::ostream & operator<< (std::ostream &os, const CMetab &d)

Additional Inherited Members

- Public Types inherited from CModelEntity
enum class  Status {
- 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
- Static Public Attributes inherited from CModelEntity
static const CEnumAnnotation< std::string, StatusStatusName
static const CEnumAnnotation< std::string, StatusXMLStatus
- Static Public Attributes inherited from CDataContainer
static const CObjectInterface::ContainerList EmptyList

Constructor & Destructor Documentation

◆ CMetab() [1/3]

CMetab::CMetab ( const CMetab src)

Referenced by fromData().

◆ CMetab() [2/3]

CMetab::CMetab ( const std::string &  name = "NoName",
const CDataContainer pParent = NO_PARENT 

Default constructor

conststd::string & name (default: "NoName")
constCDataContainer * pParent (default: NULL)

References CONSTRUCTOR_TRACE, CDataObject::getObjectParent(), initCompartment(), initObjects(), CModelEntity::REACTIONS, setConcentration(), setInitialConcentration(), and CModelEntity::setStatus().

◆ CMetab() [3/3]

CMetab::CMetab ( const CMetab src,
const CDataContainer pParent 

Copy constructor

constCMetab & src
constCDataContainer * pParent (default: NULL)

References CONSTRUCTOR_TRACE, initCompartment(), initObjects(), and mpCompartment.

◆ ~CMetab()

Member Function Documentation

◆ applyData()

bool CMetab::applyData ( const CData data,
CUndoData::CChangeSet changes 

Apply the provided data to the object

constCData & data
bool success

Reimplemented from CModelEntity.

References CModelEntity::applyData(), CData::getProperty(), CData::INITIAL_INTENSIVE_VALUE, CData::isSetProperty(), mIConc, and CDataValue::toDouble().

◆ calculate()

◆ cleanup()

void CMetab::cleanup ( )


◆ compile()

◆ compileIsInitialValueChangeAllowed()

void CMetab::compileIsInitialValueChangeAllowed ( )

◆ convertToConcentration()

C_FLOAT64 CMetab::convertToConcentration ( const C_FLOAT64 number,
const CCompartment compartment 

Converts the number to concentration

constC_FLOAT64 & number
constCCompartment & compartment
constCModel & model
C_FLOAT64 concentration

References CModelEntity::getInitialValue(), CModelEntity::getModel(), and CModel::getNumber2QuantityFactor().

◆ convertToNumber()

C_FLOAT64 CMetab::convertToNumber ( const C_FLOAT64 concentration,
const CCompartment compartment 

Converts the concentration to number

constC_FLOAT64 & concentration
constCCompartment & compartment
constCModel & model
C_FLOAT64 number

References CModelEntity::getInitialValue(), CModelEntity::getModel(), and CModel::getQuantity2NumberFactor().

Referenced by compile(), and operator=().

◆ createUndoData()

void CMetab::createUndoData ( CUndoData undoData,
const CUndoData::Type type,
const CData oldData = CData(),
const CCore::Framework framework = CCore::Framework::ParticleNumbers 
) const

Create the undo data which represents the changes recording the differences between the provided oldData and the current data.

CUndoData& undoData
constCUndoData::Type & type
constCData & oldData (default: empty data)
constCCore::Framework & framework (default: CCore::Framework::ParticleNumbers)
CUndoData undoData

Reimplemented from CModelEntity.

References CUndoData::addProperty(), CUndoData::CHANGE, CModelEntity::createUndoData(), CData::getProperty(), CData::INITIAL_INTENSIVE_VALUE, CUndoData::isChangedProperty(), mIConc, and CData::OBJECT_PARENT_CN.

◆ fromData()

CMetab * CMetab::fromData ( const CData data,
CUndoObjectInterface pParent 

Static method to create a CDataObject based on the provided data

constCData & data
CMetab * pDataObject

References CMetab(), CData::getProperty(), NO_PARENT, CData::OBJECT_NAME, and CDataValue::toString().

◆ getChildObjectUnits()

std::string CMetab::getChildObjectUnits ( const CDataObject pObject) const

◆ getCompartment()

const CCompartment * CMetab::getCompartment ( ) const

◆ getConcentration()

const C_FLOAT64 & CMetab::getConcentration ( ) const

References mConc.

◆ getConcentrationRate()

C_FLOAT64 CMetab::getConcentrationRate ( ) const

Return rate of production of this metaboLite

References mConcRate.

◆ getConcentrationRateReference()

CDataObject * CMetab::getConcentrationRateReference ( ) const

Retrieve object referencing the concentration

CDataObject * concentrationRateReference

References mpConcRateReference.

Referenced by CDataModel::findObjectByDisplayName(), CMathContainer::initializeMathObjects(), and SEDMLUtils::resolveVariable().

◆ getConcentrationReference()

◆ getCountOfDependentReactions()

size_t CMetab::getCountOfDependentReactions ( ) const

Retrieve the count of structural dependent reactions

const size_t countOfDependentReactions

References CModel::appendDirectDependents(), and CModelEntity::mpModel.

◆ getInitialConcentration()

◆ getInitialConcentrationReference()

◆ getIntensiveNoiseReference()

CDataObject * CMetab::getIntensiveNoiseReference ( ) const

Retrieve object referencing the concentration

CDataObject * concentrationRateReference

References mpIntensiveNoiseReference.

Referenced by CMathContainer::initializeMathObjects().

◆ getMoiety()

const CMoiety * CMetab::getMoiety ( ) const

Retrieve a pointer to the moiety the species depends on

const CMoiety * pMoiety;

References mpMoiety.

Referenced by CMathObject::compileValue().

◆ getObjectDisplayName()

std::string CMetab::getObjectDisplayName ( ) const

Retrieve the display name of the object

boolregular (default: true)
boolrichtext (default: false)
std::string objectDisplayName

Reimplemented from CDataObject.

References CMetabNameInterface::getDisplayName(), CDataObject::getObjectAncestor(), and CDataObject::getObjectDisplayName().

Referenced by CReaction::createFunctionFromExpression(), CSBMLExporter::createMetabolite(), and CDataModel::findObjectByDisplayName().

◆ getTransitionTime()

const C_FLOAT64 & CMetab::getTransitionTime ( ) const

Retrieves the transition time

"const C_FLOAT64 &" transitionTime

References mTT.

◆ getTransitionTimeReference()

CDataObject * CMetab::getTransitionTimeReference ( ) const

Retrieve object referencing the Transition Time

CDataObject * transitionTimeReference

References mpTTReference.

Referenced by CModel::appendAllDependents(), and CMathContainer::initializeMathObjects().

◆ getUnits()

const std::string CMetab::getUnits ( ) const

Retrieve the units of the object.

std::string units

Reimplemented from CDataContainer.

◆ getValueObject()

const CDataObject * CMetab::getValueObject ( ) const

Retrieve the object representing the value;

Reimplemented from CModelEntity.

References mpConcReference.

◆ getValuePointer()

void * CMetab::getValuePointer ( ) const

Retrieve a pointer to the value;

Reimplemented from CModelEntity.

References C_FLOAT64, and mConc.

◆ initCompartment()

void CMetab::initCompartment ( const CCompartment pCompartment = NULL)

◆ initObjects()

◆ isDependent()

◆ isInitialValueChangeAllowed()

const bool & CMetab::isInitialValueChangeAllowed ( CCore::Framework  framework) const

Check whether changing the initial concentration is allowed

const bool & allowed

References CCore::Concentration, mIsInitialConcentrationChangeAllowed, and mIsInitialParticleNumberChangeAllowed.

◆ load()

C_INT32 CMetab::load ( CReadConfig configbuffer)

◆ operator=()

◆ setCompartment()

bool CMetab::setCompartment ( const std::string &  compName)

◆ setConcentration()

void CMetab::setConcentration ( const C_FLOAT64  concentration)

References CModelEntity::isFixed(), and mConc.

Referenced by CMetab(), and load().

◆ setDependsOnMoiety()

void CMetab::setDependsOnMoiety ( const CMoiety pMoiety)

Set whether the metabolite is dependent, i.e., calculated by a moiety

constCMoiety * pMoiety

References mpMoiety.

Referenced by CMoiety::add().

◆ setInitialConcentration()

void CMetab::setInitialConcentration ( const C_FLOAT64 initialConcentration)

◆ setObjectParent()

bool CMetab::setObjectParent ( const CDataContainer pParent)

◆ setTransitionTime()

void CMetab::setTransitionTime ( const C_FLOAT64 transitionTime)

Set transition time

const C_FLOAT64 &transitionTime

References mTT.

◆ toData()

CData CMetab::toData ( ) const

Retrieve the data describing the object

CData data

Reimplemented from CModelEntity.

References CData::addProperty(), CData::INITIAL_INTENSIVE_VALUE, mIConc, and CModelEntity::toData().

Friends And Related Function Documentation

◆ CMoiety::add

void CMoiety::add ( C_FLOAT64  value,
CMetab pMetabolite 

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const CMetab d 

ostream operator

Member Data Documentation

◆ mConc

C_FLOAT64 CMetab::mConc

Concentration of the metabolite as double.

Referenced by calculate(), getConcentration(), getValuePointer(), initObjects(), and setConcentration().

◆ mConcRate

C_FLOAT64 CMetab::mConcRate

The rate of concentration change

Referenced by compile(), getConcentrationRate(), initObjects(), and operator=().

◆ mIConc

C_FLOAT64 CMetab::mIConc

Initial concentration of the metabolite as double

Referenced by applyData(), compile(), createUndoData(), getInitialConcentration(), initObjects(), load(), setInitialConcentration(), and toData().

◆ mIntensiveNoise

C_FLOAT64 CMetab::mIntensiveNoise

The intensive noise

Referenced by compile(), and initObjects().

◆ mIsInitialConcentrationChangeAllowed

bool CMetab::mIsInitialConcentrationChangeAllowed

◆ mIsInitialParticleNumberChangeAllowed

bool CMetab::mIsInitialParticleNumberChangeAllowed

◆ mpCompartment

const CCompartment* CMetab::mpCompartment

pointer to the compartment the metabolite is located in. The metab needs to know about volumes.

Referenced by calculate(), CMetab(), compile(), compileIsInitialValueChangeAllowed(), getChildObjectUnits(), getCompartment(), initCompartment(), and operator=().

◆ mpConcRateReference

CDataObjectReference< C_FLOAT64 >* CMetab::mpConcRateReference

◆ mpConcReference

◆ mpIConcReference

◆ mpIntensiveNoiseReference

CDataObjectReference< C_FLOAT64 >* CMetab::mpIntensiveNoiseReference

◆ mpMoiety

const CMoiety* CMetab::mpMoiety

If dependent the moiety the metabolite is calculated from

Referenced by calculate(), getMoiety(), isDependent(), and setDependsOnMoiety().

◆ mpTTReference

CDataObjectReference< C_FLOAT64 >* CMetab::mpTTReference

◆ mTT

C_FLOAT64 CMetab::mTT

Transition time of the metabolite

Referenced by compile(), getTransitionTime(), initObjects(), operator=(), and setTransitionTime().

The documentation for this class was generated from the following files: