COPASI API
4.40.278
|
#include <CReactionInterface.h>
Public Member Functions | |
void | clearChemEquation () |
CReactionInterface () | |
bool | createMetabolites () |
bool | createMetabolites (std::vector< std::string > &createdKeys) |
bool | createOtherObjects () const |
bool | createOtherObjects (std::vector< std::string > &createdKeys) const |
createOtherObjects More... | |
CUndoData | createUndoData (const CCore::Framework &framework) const |
std::string | getAmountRateUnit () const |
const CChemEqInterface & | getChemEqInterface () const |
std::string | getChemEqString () const |
std::string | getConcentrationRateUnit () const |
std::string | getDefaultScalingCompartment () const |
std::set< const CDataObject * > | getDeletedParameters () const |
std::string | getEffectiveKineticLawUnit () const |
CReaction::KineticLawUnit | getEffectiveKineticLawUnitType () const |
const CFunction & | getFunction () const |
std::string | getFunctionDescription () const |
std::string | getFunctionName () const |
const CReaction::KineticLawUnit & | getKineticLawUnitType () const |
const std::vector< std::string > & | getListOfMetabs (CFunctionParameter::Role role) const |
std::vector< std::string > | getListOfPossibleFunctions () const |
const C_FLOAT64 & | getLocalValue (size_t index) const |
const std::string & | getMapping (size_t index) const |
const std::vector< std::string > & | getMappings (size_t index) const |
const std::string & | getNoiseExpression () const |
std::string | getParameterName (size_t index) const |
const std::string & | getScalingCompartment () const |
std::string | getUnit (size_t index) const |
std::vector< std::string > | getUnitVector (size_t index) const |
CFunctionParameter::Role | getUsage (size_t index) const |
const bool & | hasNoise () const |
void | init (const CReaction &reaction) |
bool | isLocalValue (size_t index) const |
bool | isLocked (CFunctionParameter::Role usage) const |
bool | isLocked (size_t index) const |
bool | isMulticompartment () const |
bool | isReversible () const |
bool | isValid () const |
bool | isVector (size_t index) const |
void | reverse (bool rev, const std::string &newFunction) |
void | setChemEqString (const std::string &eq, const std::string &newFunction) |
void | setFunctionAndDoMapping (const std::string &fn) |
void | setFunctionWithEmptyMapping (const std::string &fn) |
void | setHasNoise (const bool &hasNoise) |
void | setKineticLawUnitType (const CReaction::KineticLawUnit &kineticLawUnitType) |
void | setLocal (size_t index) |
void | setLocalValue (size_t index, C_FLOAT64 value) |
void | setMapping (size_t index, std::string mn) |
bool | setNoiseExpression (const std::string &expression) |
void | setReversibility (bool rev, const std::string &newFunction) |
void | setScalingCompartment (const std::string &scalingCompartment) |
size_t | size () const |
bool | writeBackToReaction (CReaction *rea=NULL, bool compile=true) |
~CReactionInterface () | |
Private Member Functions | |
void | connectFromScratch (CFunctionParameter::Role role) |
void | connectNonMetabolites () |
void | copyMapping () |
void | findAndSetFunction (const std::string &newFunction) |
std::vector< std::string > | getExpandedMetabList (CFunctionParameter::Role role) const |
void | initMapping () |
bool | loadMappingAndValues () |
void | updateModifiersInChemEq () |
Private Attributes | |
CChemEqInterface | mChemEqI |
bool | mHasNoise |
std::vector< std::vector< std::string > * > | mIndexMap |
std::vector< bool > | mIsLocal |
CReaction::KineticLawUnit | mKineticLawUnitType |
CCopasiParameterGroup | mLocalParameters |
CFunction | mMassAction |
std::map< std::string, std::vector< std::string > > | mNameMap |
std::string | mNoiseExpression |
const CFunction * | mpFunction |
const CFunctionParameters * | mpFunctionParameters |
const CModel * | mpModel |
const CReaction * | mpReaction |
std::string | mScalingCompartment |
std::vector< C_FLOAT64 > | mValues |
This class provides an interface for dealing with reactions. For representing the parameter mappings it uses object names. A CReactionInterface allows editing a reaction while trying to keep everything consistent.
Note: Many of the methods need to be provided with a model. While handling of the metabolites is completely independent of the model (they are handled by name, and they don't need to exist), the mapping of Compartments and global parameters is done with the entities that exist in the model. This may seem inconsistent, but the idea is that metabolites can be created from the gui by entering them into the reaction equation. Compartments and global parameters can only be chosen from the list of existing objects.
CReactionInterface::CReactionInterface | ( | ) |
CReactionInterface::~CReactionInterface | ( | ) |
void CReactionInterface::clearChemEquation | ( | ) |
internal function that temporarily removes the equation
References CChemEqInterface::clearAll(), mChemEqI, and setFunctionWithEmptyMapping().
|
private |
guesses how to connect metabs with parameters for a specific usage
References fatalError, CFunctionParameter::FLOAT64, getExpandedMetabList(), CChemEqInterface::getListOfDisplayNames(), CFunctionParameters::getNumberOfParametersByUsage(), CDataObject::getObjectName(), CFunctionParameters::getParameterByUsage(), CFunctionParameter::getType(), mChemEqI, mNameMap, mpFunction, mpFunctionParameters, and CFunctionParameter::VFLOAT64.
Referenced by setFunctionAndDoMapping().
|
private |
tries to determine the mapping for PARAMETER, VOLUME, TIME only if the current mapping is "unknown". Is typically called after initMapping() and copyMapping()
References CChemEqInterface::getCompartment(), CModel::getModelValues(), CDataObject::getObjectName(), getParameterName(), getUsage(), isLocalValue(), mChemEqI, mIndexMap, CFunctionParameter::MODIFIER, mpModel, CFunctionParameter::PARAMETER, CFunctionParameter::PRODUCT, CDataVector< CType >::size(), size(), CFunctionParameter::SUBSTRATE, CFunctionParameter::TIME, and CFunctionParameter::VOLUME.
Referenced by setFunctionAndDoMapping().
|
private |
create new mapping, try to keep as much information from the current mapping. Calls initMapping().
References CFunctionParameters::findParameterByName(), getParameterName(), getUsage(), initMapping(), isVector(), mIsLocal, mNameMap, mpFunctionParameters, mValues, size(), and CFunctionParameter::VFLOAT64.
Referenced by setFunctionAndDoMapping().
bool CReactionInterface::createMetabolites | ( | ) |
create all metabolites that are needed by the reaction but do not exist in the model yet.
Referenced by CReaction::setReactionScheme().
bool CReactionInterface::createMetabolites | ( | std::vector< std::string > & | createdKeys | ) |
create all metabolites that are needed by the reaction but do not exist in the model yet.
createdKeys | vector, that will be filled with the keys of created elements |
References CChemEqInterface::createNonExistingMetabs(), getFunctionName(), mChemEqI, and setFunctionAndDoMapping().
bool CReactionInterface::createOtherObjects | ( | ) | const |
create all other objects that are needed by the reaction but do not exist in the model yet.
Referenced by CReaction::setReactionScheme().
bool CReactionInterface::createOtherObjects | ( | std::vector< std::string > & | createdKeys | ) | const |
createOtherObjects
createdKeys | vector that will be filled with created keys |
References CModel::createCompartment(), CModel::createModelValue(), CModelEntity::getKey(), getUsage(), CDataContainer::insert(), isLocalValue(), mIndexMap, mpModel, CFunctionParameter::PARAMETER, size(), and CFunctionParameter::VOLUME.
CUndoData CReactionInterface::createUndoData | ( | const CCore::Framework & | framework | ) | const |
Create the undo data which represents the changes recording the differences between the provided oldData and the current data.
const | CCore::Framework & framework |
References CData::ADD_NOISE, CCopasiParameterGroup::addParameter(), CUndoData::addPreProcessData(), CUndoData::addProperty(), CData::addProperty(), C_FLOAT64, C_INVALID_INDEX, CUndoData::CHANGE, CData::CHEMICAL_EQUATION, CCore::Concentration, CChemEqInterface::displayNameToNamePair(), CCopasiParameter::DOUBLE, CCommonName::escape(), CDataObject::getCN(), CCopasiParameter::getCN(), CModel::getCompartments(), CDataVector< CType >::getIndex(), CDataVectorN< CType >::getIndex(), CModel::getMetabolites(), CModel::getMetabolitesX(), CModel::getModelValues(), CModel::getNumber2QuantityFactor(), CDataObject::getObjectName(), CCopasiParameterGroup::getParameter(), getParameterName(), CReaction::getParameters(), CData::getProperty(), CModel::getQuantity2NumberFactor(), getUsage(), CUndoData::INSERT, CData::KINETIC_LAW, CData::KINETIC_LAW_UNIT_TYPE, CData::KINETIC_LAW_VARIABLE_MAPPING, CReaction::KineticLawUnitTypeName, CChemEqInterface::listOfNonExistingMetabNames(), CData::LOCAL_REACTION_PARAMETERS, mChemEqI, mHasNoise, mIndexMap, mIsLocal, mKineticLawUnitType, mNoiseExpression, CFunctionParameter::MODIFIER, mpFunction, mpModel, mpReaction, mScalingCompartment, mValues, CData::NOISE_EXPRESSION, CData::OBJECT_NAME, CData::OBJECT_PARENT_CN, CData::OBJECT_REFERENCE_CN, CData::OBJECT_REFERENCE_INDEX, CData::OBJECT_REFERENCES, CFunctionParameter::PARAMETER, CData::PARAMETER_VALUE, CCore::ParticleNumbers, CFunctionParameter::PRODUCT, CData::SCALING_COMPARTMENT, CMetab::setInitialConcentration(), CModelEntity::setInitialValue(), size(), CFunctionParameter::SUBSTRATE, CFunctionParameter::TIME, CReaction::toData(), CCopasiParameter::toData(), CChemEqInterface::toDataValue(), CDataValue::toDataVector(), and CFunctionParameter::VOLUME.
|
private |
checks if newFunction is an valid function for the reaction. If it is not or if newFunction="" another function is chosen.
References C_FLOAT64, fl(), getFunctionName(), CChemEqInterface::getListOfDisplayNames(), getListOfPossibleFunctions(), getLocalValue(), CChemEqInterface::getReversibility(), mChemEqI, CFunctionParameter::PRODUCT, setFunctionAndDoMapping(), and setLocalValue().
Referenced by reverse(), setChemEqString(), and setReversibility().
std::string CReactionInterface::getAmountRateUnit | ( | ) | const |
References CModel::getQuantityUnit(), CModel::getTimeUnit(), and mpModel.
Referenced by getEffectiveKineticLawUnit().
const CChemEqInterface & CReactionInterface::getChemEqInterface | ( | ) | const |
References mChemEqI.
std::string CReactionInterface::getChemEqString | ( | ) | const |
References CChemEqInterface::getChemEqString(), and mChemEqI.
Referenced by CReaction::getReactionScheme().
std::string CReactionInterface::getConcentrationRateUnit | ( | ) | const |
References C_INVALID_INDEX, CModel::getCompartments(), getDefaultScalingCompartment(), CDataVectorN< CType >::getIndex(), CModel::getQuantityUnit(), CModel::getTimeUnit(), CCompartment::getUnits(), CModel::getVolumeUnit(), and mpModel.
Referenced by getEffectiveKineticLawUnit().
std::string CReactionInterface::getDefaultScalingCompartment | ( | ) | const |
References CReaction::Default, CChemEqInterface::getDefaultCompartment(), mChemEqI, mKineticLawUnitType, and mScalingCompartment.
Referenced by getConcentrationRateUnit().
std::set< const CDataObject * > CReactionInterface::getDeletedParameters | ( | ) | const |
Retrieve the list of parameters which will be deleted
References CReaction::getFunction(), CDataObject::getObjectName(), CCopasiParameterGroup::getParameter(), getParameterName(), CReaction::getParameters(), CFunctionParameter::getUsage(), CFunction::getVariables(), CReaction::isLocalParameter(), mIsLocal, mpReaction, CFunctionParameter::PARAMETER, CFunctionParameters::size(), and size().
std::string CReactionInterface::getEffectiveKineticLawUnit | ( | ) | const |
References CReaction::AmountPerTime, CReaction::ConcentrationPerTime, getAmountRateUnit(), getConcentrationRateUnit(), and getEffectiveKineticLawUnitType().
CReaction::KineticLawUnit CReactionInterface::getEffectiveKineticLawUnitType | ( | ) | const |
References CReaction::AmountPerTime, CReaction::ConcentrationPerTime, CReaction::Default, isMulticompartment(), and mKineticLawUnitType.
Referenced by getEffectiveKineticLawUnit().
|
private |
returns a list of metabolites (from the chemical equation). Species can occur several times according to the multiplicity
References C_FLOAT64, CChemEqInterface::getListOfDisplayNames(), CChemEqInterface::getListOfMultiplicities(), mChemEqI, and CFunctionParameter::MODIFIER.
Referenced by connectFromScratch().
const CFunction & CReactionInterface::getFunction | ( | ) | const |
References CChemEqInterface::getMolecularity(), CDataObject::getObjectName(), CEvaluationTree::getType(), CRootContainer::getUndefinedFunction(), CFunction::isReversible(), mChemEqI, mMassAction, mpFunction, CFunctionParameter::PRODUCT, CFunction::setInfix(), CDataObject::setObjectName(), CFunctionParameter::SUBSTRATE, and TriTrue.
std::string CReactionInterface::getFunctionDescription | ( | ) | const |
References CEvaluationTree::getInfix(), and mpFunction.
std::string CReactionInterface::getFunctionName | ( | ) | const |
References CDataObject::getObjectName(), and mpFunction.
Referenced by createMetabolites(), and findAndSetFunction().
const CReaction::KineticLawUnit & CReactionInterface::getKineticLawUnitType | ( | ) | const |
References mKineticLawUnitType.
const std::vector< std::string > & CReactionInterface::getListOfMetabs | ( | CFunctionParameter::Role | role | ) | const |
This produces a list of metabolite names (from the chem eq) for use in the combo boxes. The role must be given like a usage, e.g. "SUBSTRATE".
References CChemEqInterface::getListOfDisplayNames(), and mChemEqI.
Referenced by setMapping().
std::vector< std::string > CReactionInterface::getListOfPossibleFunctions | ( | ) | const |
References CRootContainer::getFunctionList(), CChemEqInterface::getMolecularity(), isReversible(), mChemEqI, CFunctionParameter::PRODUCT, CFunctionParameter::SUBSTRATE, CFunctionDB::suitableFunctions(), TriFalse, and TriTrue.
Referenced by findAndSetFunction().
const double & CReactionInterface::getLocalValue | ( | size_t | index | ) | const |
Return the local parameter value of the parameter with given index
index | the index of the parameter |
References mValues.
Referenced by findAndSetFunction().
const std::string & CReactionInterface::getMapping | ( | size_t | index | ) | const |
return the first mapping for the given index
index | the index |
References mIndexMap.
Referenced by updateModifiersInChemEq().
const std::vector< std::string > & CReactionInterface::getMappings | ( | size_t | index | ) | const |
returns all mappings for the given index
index | the index |
References mIndexMap.
const std::string & CReactionInterface::getNoiseExpression | ( | ) | const |
Retrieve the expression for non FIXED model values.
References mNoiseExpression.
std::string CReactionInterface::getParameterName | ( | size_t | index | ) | const |
Returns the name of the parameter with given index
index | the index |
References mpFunctionParameters, and size().
Referenced by connectNonMetabolites(), copyMapping(), createUndoData(), getDeletedParameters(), initMapping(), loadMappingAndValues(), setMapping(), and writeBackToReaction().
const std::string & CReactionInterface::getScalingCompartment | ( | ) | const |
References mScalingCompartment.
std::string CReactionInterface::getUnit | ( | size_t | index | ) | const |
References C_INVALID_INDEX, CDataModel::findObjectByDisplayName(), CModel::getCompartments(), CMetab::getConcentrationReference(), CDataVectorN< CType >::getIndex(), CModel::getModelValues(), CDataObject::getObjectDataModel(), CModel::getQuantityUnit(), CDataObject::getUnits(), CModel::getUnits(), CDataContainer::getUnits(), getUsage(), CModel::getVolumeUnit(), isLocalValue(), isVector(), mIndexMap, CFunctionParameter::MODIFIER, mpModel, CFunctionParameter::PARAMETER, CUnit::prettyPrint(), CFunctionParameter::PRODUCT, CMetabNameInterface::splitDisplayName(), CFunctionParameter::SUBSTRATE, CFunctionParameter::TEMPORARY, CFunctionParameter::TIME, CFunctionParameter::VARIABLE, and CFunctionParameter::VOLUME.
std::vector< std::string > CReactionInterface::getUnitVector | ( | size_t | index | ) | const |
References C_INVALID_INDEX, CDataModel::findObjectByDisplayName(), CModel::getCompartments(), CMetab::getConcentrationReference(), CDataVectorN< CType >::getIndex(), CDataObject::getObjectDataModel(), CModel::getQuantityUnit(), CDataObject::getUnits(), CDataContainer::getUnits(), getUsage(), CModel::getVolumeUnit(), mIndexMap, CFunctionParameter::MODIFIER, mpModel, CFunctionParameter::PARAMETER, CUnit::prettyPrint(), CFunctionParameter::PRODUCT, CMetabNameInterface::splitDisplayName(), CFunctionParameter::SUBSTRATE, CFunctionParameter::TEMPORARY, CFunctionParameter::TIME, CFunctionParameter::VARIABLE, and CFunctionParameter::VOLUME.
CFunctionParameter::Role CReactionInterface::getUsage | ( | size_t | index | ) | const |
returns the function parameter role for the parameter with given index
index | the index |
References mpFunctionParameters, size(), and CFunctionParameter::VARIABLE.
Referenced by connectNonMetabolites(), copyMapping(), createOtherObjects(), createUndoData(), getUnit(), getUnitVector(), initMapping(), isLocked(), loadMappingAndValues(), setMapping(), updateModifiersInChemEq(), and writeBackToReaction().
const bool & CReactionInterface::hasNoise | ( | ) | const |
Check whether noise is added to the reaction rate
References mHasNoise.
Referenced by setHasNoise().
void CReactionInterface::init | ( | const CReaction & | reaction | ) |
References CReaction::getChemEq(), CReaction::getFunction(), CReaction::getKineticLawUnitType(), CReaction::getNoiseExpression(), CDataObject::getObjectAncestor(), CDataObject::getObjectName(), CReaction::getParameters(), CReaction::getScalingCompartment(), CReaction::hasNoise(), CChemEqInterface::init(), initMapping(), loadMappingAndValues(), mChemEqI, mHasNoise, mKineticLawUnitType, mLocalParameters, mNoiseExpression, mpFunction, mpModel, mpReaction, mScalingCompartment, setFunctionAndDoMapping(), and setFunctionWithEmptyMapping().
Referenced by CReaction::compile(), CReaction::getReactionScheme(), and CReaction::setReactionScheme().
|
private |
initialize mapping (resize vectors and set names to "unknown"). Also initializes mpParameters but doesn't delete the old mpParameters.
References getParameterName(), getUsage(), CFunction::getVariables(), isVector(), mIndexMap, mIsLocal, mNameMap, mpFunction, mpFunctionParameters, mValues, CFunctionParameter::PARAMETER, and size().
Referenced by copyMapping(), init(), and setFunctionWithEmptyMapping().
bool CReactionInterface::isLocalValue | ( | size_t | index | ) | const |
tests whether the parameter with given index is a local parameter
index | the index |
References mIsLocal.
Referenced by connectNonMetabolites(), createOtherObjects(), and getUnit().
bool CReactionInterface::isLocked | ( | CFunctionParameter::Role | usage | ) | const |
Is the mapping of this parameter locked? The behavior of this method is different for different roles: SUBSTRATE, PRODUCT: according to the chemical equation MODIFIER: always unlocked TIME: always locked VOLUME, PARAMETER: according to the model
The idea is that in the reaction GUI new species can be entered in the chemical equation that are then created automatically. Compartments and global parameters can only be chosen from those existing in the model.
usage | the usage of the parameter |
References CModel::getCompartments(), CChemEqInterface::getListOfDisplayNames(), CModel::getModelValues(), CFunctionParameters::getNumberOfParametersByUsage(), CFunctionParameters::getParameterByUsage(), isVector(), mChemEqI, CFunctionParameter::MODIFIER, mpFunctionParameters, mpModel, CFunctionParameter::PARAMETER, CFunctionParameter::PRODUCT, CDataVector< CType >::size(), CFunctionParameter::SUBSTRATE, CFunctionParameter::TIME, and CFunctionParameter::VOLUME.
bool CReactionInterface::isLocked | ( | size_t | index | ) | const |
Is the mapping of this parameter locked? The behavior of this method is different for different roles: SUBSTRATE, PRODUCT: according to the chemical equation MODIFIER: always unlocked TIME: always locked VOLUME, PARAMETER: according to the model
The idea is that in the reaction GUI new species can be entered in the chemical equation that are then created automatically. Compartments and global parameters can only be chosen from those existing in the model.
index | the index of the parameter |
References getUsage().
bool CReactionInterface::isMulticompartment | ( | ) | const |
this method tries to find out if the REACTION involves several compartments It only takes into account the metabolites that actually exist in the model. A non existing metabolite is assumed not to be in a different compartment
References CChemEqInterface::isMulticompartment(), and mChemEqI.
Referenced by getEffectiveKineticLawUnitType().
bool CReactionInterface::isReversible | ( | ) | const |
References CChemEqInterface::getReversibility(), and mChemEqI.
Referenced by getListOfPossibleFunctions().
bool CReactionInterface::isValid | ( | ) | const |
References mIndexMap, mIsLocal, and size().
Referenced by writeBackToReaction().
bool CReactionInterface::isVector | ( | size_t | index | ) | const |
Tests whether the parameter at the given index is of type vector
index | the index |
References mpFunctionParameters, size(), and CFunctionParameter::VFLOAT64.
Referenced by copyMapping(), getUnit(), initMapping(), isLocked(), loadMappingAndValues(), and setMapping().
|
private |
Loads mapping and values from the specified reaction
References C_FLOAT64, CMetabNameInterface::getDisplayName(), CModelEntity::getInitialValue(), CDataObject::getObjectName(), CCopasiParameterGroup::getParameter(), getParameterName(), CReaction::getParameterObjects(), CReaction::getParameters(), getUsage(), CCopasiParameter::getValue(), CReaction::isLocalParameter(), isVector(), mIndexMap, mIsLocal, mNameMap, CFunctionParameter::MODIFIER, mpModel, mpReaction, mValues, CFunctionParameter::PARAMETER, CFunctionParameter::PRODUCT, size(), CFunctionParameter::SUBSTRATE, CFunctionParameter::TIME, and CFunctionParameter::VOLUME.
Referenced by init().
void CReactionInterface::reverse | ( | bool | rev, |
const std::string & | newFunction | ||
) |
reverse the reaction and set the reversibility. newFunction suggests a new kinetic function which is only used if adequate.
References findAndSetFunction(), mChemEqI, CChemEqInterface::reverse(), and CChemEqInterface::setReversibility().
void CReactionInterface::setChemEqString | ( | const std::string & | eq, |
const std::string & | newFunction | ||
) |
set a new chemical equation. newFunction suggests a new kinetic function which is only used if adequate.
References findAndSetFunction(), mChemEqI, and CChemEqInterface::setChemEqString().
Referenced by CReaction::setReactionScheme().
void CReactionInterface::setFunctionAndDoMapping | ( | const std::string & | fn | ) |
set the function. a new mapping is created that tries to preserve as much information as possible from the old mapping. Then a default mapping is set from the chemical equation and the model (if possible).
References connectFromScratch(), connectNonMetabolites(), copyMapping(), CFunctionDB::findLoadFunction(), CRootContainer::getFunctionList(), CRootContainer::getUndefinedFunction(), CFunctionParameter::MODIFIER, mpFunction, CFunctionParameter::PRODUCT, and CFunctionParameter::SUBSTRATE.
Referenced by CReaction::compile(), createMetabolites(), findAndSetFunction(), and init().
void CReactionInterface::setFunctionWithEmptyMapping | ( | const std::string & | fn | ) |
set the function. an empty mapping is created
References CFunctionDB::findLoadFunction(), CRootContainer::getFunctionList(), CRootContainer::getUndefinedFunction(), initMapping(), mpFunction, and mpFunctionParameters.
Referenced by clearChemEquation(), and init().
void CReactionInterface::setHasNoise | ( | const bool & | hasNoise | ) |
Set whether to add noise to the reaction rate
const | bool & hasNoise |
References CReaction::getDefaultNoiseExpression(), hasNoise(), mHasNoise, mNoiseExpression, and mpReaction.
void CReactionInterface::setKineticLawUnitType | ( | const CReaction::KineticLawUnit & | kineticLawUnitType | ) |
Sets the kinetic law unit type
kineticLawUnitType | the type to set |
References mKineticLawUnitType.
void CReactionInterface::setLocal | ( | size_t | index | ) |
Specified that the parameter with given index should be a local parameter
index | the index |
References mIsLocal.
void CReactionInterface::setLocalValue | ( | size_t | index, |
C_FLOAT64 | value | ||
) |
Specifies that the parameter with given index should be a local parameter and specifies the value
index | the index of the parameter |
value | the new value of the parameter |
References mIsLocal, and mValues.
Referenced by findAndSetFunction().
void CReactionInterface::setMapping | ( | size_t | index, |
std::string | mn | ||
) |
Sets the mapping of the parameter with given index
index | the index |
mn | the mapping |
References CChemEqInterface::getListOfDisplayNames(), getListOfMetabs(), CFunctionParameters::getNumberOfParametersByUsage(), CFunctionParameters::getParameterByUsage(), getParameterName(), getUsage(), isVector(), mChemEqI, mIsLocal, mNameMap, CFunctionParameter::MODIFIER, mpFunctionParameters, CFunctionParameter::PARAMETER, CFunctionParameter::PRODUCT, CFunctionParameter::SUBSTRATE, CFunctionParameter::TIME, updateModifiersInChemEq(), and CFunctionParameter::VOLUME.
bool CReactionInterface::setNoiseExpression | ( | const std::string & | expression | ) |
Set the expression for non FIXED model values
const | std::string & expression |
References mNoiseExpression.
void CReactionInterface::setReversibility | ( | bool | rev, |
const std::string & | newFunction | ||
) |
set the reversibility. newFunction suggests a new kinetic function which is only used if adequate.
References findAndSetFunction(), mChemEqI, and CChemEqInterface::setReversibility().
void CReactionInterface::setScalingCompartment | ( | const std::string & | scalingCompartment | ) |
Sets the scaling compartment to be used for this reaction
scalingCompartment |
References mScalingCompartment.
size_t CReactionInterface::size | ( | ) | const |
References mpFunctionParameters, and CFunctionParameters::size().
Referenced by connectNonMetabolites(), copyMapping(), createOtherObjects(), createUndoData(), getDeletedParameters(), getParameterName(), getUsage(), initMapping(), isValid(), isVector(), loadMappingAndValues(), updateModifiersInChemEq(), and writeBackToReaction().
|
private |
updates the modifiers in the chemical equation according to the parameter mapping
References CChemEqInterface::addModifier(), CChemEqInterface::clearModifiers(), getMapping(), getUsage(), mChemEqI, CFunctionParameter::MODIFIER, and size().
Referenced by setMapping().
bool CReactionInterface::writeBackToReaction | ( | CReaction * | rea = NULL , |
bool | compile = true |
||
) |
writes the information back to a CReaction. createMetabolites() and createOtherObjects() should be called before.
bool | compile (default: true) |
References C_INVALID_INDEX, CReaction::getChemEq(), CDataObject::getCN(), CModel::getCompartments(), CDataVectorN< CType >::getIndex(), CMetabNameInterface::getMetabolite(), CModel::getModelValues(), CDataObject::getObjectAncestor(), CDataObject::getObjectName(), CCopasiParameterGroup::getParameter(), getParameterName(), CReaction::getParameters(), getUsage(), CFunction::getVariables(), isValid(), mChemEqI, mHasNoise, mIndexMap, mIsLocal, mKineticLawUnitType, mNoiseExpression, CFunctionParameter::MODIFIER, mpFunction, mpFunctionParameters, mpModel, mpReaction, mScalingCompartment, mValues, CFunctionParameter::PARAMETER, CFunctionParameter::PRODUCT, CReaction::setFunction(), CReaction::setHasNoise(), CReaction::setKineticLawUnitType(), CReaction::setNoiseExpression(), CReaction::setParameterObjects(), CReaction::setParameterValue(), CReaction::setScalingCompartmentCN(), size(), CMetabNameInterface::splitDisplayName(), CFunctionParameter::SUBSTRATE, CFunctionParameter::TIME, CFunctionParameter::VOLUME, and CChemEqInterface::writeToChemEq().
Referenced by CReaction::compile(), and CReaction::setReactionScheme().
|
private |
A copy of the chemical equation of the reaction
Referenced by clearChemEquation(), connectFromScratch(), connectNonMetabolites(), createMetabolites(), createUndoData(), findAndSetFunction(), getChemEqInterface(), getChemEqString(), getDefaultScalingCompartment(), getExpandedMetabList(), getFunction(), getListOfMetabs(), getListOfPossibleFunctions(), init(), isLocked(), isMulticompartment(), isReversible(), reverse(), setChemEqString(), setMapping(), setReversibility(), updateModifiersInChemEq(), and writeBackToReaction().
|
private |
Referenced by createUndoData(), hasNoise(), init(), setHasNoise(), and writeBackToReaction().
|
private |
|
private |
values of the kinetic parameters
Referenced by copyMapping(), createUndoData(), getDeletedParameters(), initMapping(), isLocalValue(), isValid(), loadMappingAndValues(), setLocal(), setLocalValue(), setMapping(), and writeBackToReaction().
|
private |
|
private |
Referenced by init().
|
mutableprivate |
Referenced by getFunction().
|
private |
what metabolite for what function parameter
Referenced by connectFromScratch(), copyMapping(), initMapping(), loadMappingAndValues(), and setMapping().
|
private |
Referenced by createUndoData(), getNoiseExpression(), init(), setHasNoise(), setNoiseExpression(), and writeBackToReaction().
|
private |
A pointer to the kinetic function of the reaction
Referenced by connectFromScratch(), createUndoData(), getFunction(), getFunctionDescription(), getFunctionName(), init(), initMapping(), setFunctionAndDoMapping(), setFunctionWithEmptyMapping(), and writeBackToReaction().
|
private |
A pointer of the function parameters
Referenced by connectFromScratch(), copyMapping(), getParameterName(), getUsage(), initMapping(), isLocked(), isVector(), setFunctionWithEmptyMapping(), setMapping(), size(), and writeBackToReaction().
|
mutableprivate |
|
private |
Referenced by createUndoData(), getDeletedParameters(), init(), loadMappingAndValues(), setHasNoise(), and writeBackToReaction().
|
private |
|
private |
values of the kinetic parameters
Referenced by copyMapping(), createUndoData(), getLocalValue(), initMapping(), loadMappingAndValues(), setLocalValue(), and writeBackToReaction().