roadrunner  2.6.0
Fast simulator for SBML models
Public Member Functions | Static Public Member Functions | List of all members
rr::NOMSupport Class Reference

Methods to query various information from an SBML document. More...

#include <rrNOMSupport.h>

Public Member Functions

Model * getModel ()
 
SBMLDocument * getSBMLDocument ()
 
StringListContainer getDerivedUnitDefinition (const std::string &sId)
 
StringListContainer getListOfBoundarySpeciesIds ()
 
StringListContainer getListOfErrors ()
 
StringListContainer getListOfFloatingSpecies ()
 
StringListContainer getListOfFloatingSpeciesIds ()
 
StringListContainer getListOfParameters ()
 
StringListContainer getNthError (const int &nIndex)
 
StringListContainer getNthEvent (const int &arg)
 
StringListContainer getNthFunctionDefinition (const int &arg)
 
StringListContainer getNthListOfModifiers (const int &nIndex)
 
StringListContainer getNthListOfProducts (const int &nIndex)
 
StringListContainer getNthListOfReactants (const int &nIndex)
 
ASTNode replaceSymbol (ASTNode *node, const std::string &oldId, const std::string &newId)
 
bool exists (const std::string &sId)
 
bool getNthParameterHasValue (const int &nReactionIndex, const int &nParameterIndex)
 
bool getNthUseValuesFromTriggerTime (const int &arg)
 
bool hasInitialAmount (const std::string &sId)
 
bool hasInitialConcentration (const std::string &sId)
 
bool hasSBOTerm (const std::string &sId)
 
bool hasValue (const std::string &sId)
 
bool isBoundary (const std::string &sId)
 Checks whether the element for the given SBML id is a boundary species. More...
 
bool isCompartment (const std::string &sId)
 Checks whether the element for the given SBML id is a compartment. More...
 
bool isConstantImpl (const std::string &sId)
 
bool isFloating (const std::string &sId)
 
bool isReactionReversible (const int &nIndex)
 
bool isSpecies (const std::string &sId)
 
bool multiplyCompartment (const std::string &sbmlId, std::string &compartmentId)
 
bool needEmptySetNode (Model model)
 
bool needSinkNode (Model model)
 
bool needSourceNode (Model model)
 
double getNthParameterValue (const int &nReactionIndex, const int &nParameterIndex)
 
double getNthProductStoichiometryDouble (const int &nIndex, const int &nProduct)
 
double getNthReactantStoichiometryDouble (const int &nIndex, const int &nReactant)
 
double getValue (const std::string &sId)
 
int checkConsistency ()
 
int getNthProductStoichiometry (const int &nIndex, const int &nProduct)
 
int getNthReactantStoichiometry (const int &nIndex, const int &nReactant)
 
int getNumBoundarySpecies ()
 
int getNumCompartments ()
 
int getNumConstraints ()
 
int getNumErrors ()
 
int getNumEvents ()
 
int getNumFloatingSpecies ()
 
int getNumFunctionDefinitions ()
 
int getNumGlobalParameters ()
 
int getNumInitialAssignments ()
 
int getNumParameters (int reaction)
 
int getNumProducts (const int &var0)
 
int getNumReactants (const int &var0)
 
int getNumReactions ()
 
int getNumRules ()
 
int getSBOTerm (const std::string &sId)
 
std::pair< std::string, std::string > getNthInitialAssignmentPair (const int &nIndex)
 
SBase * getElement (const std::string &sId)
 
std::string addEmptySetNode (const std::string &sbml)
 
std::string addEmptySetNodes (const std::string &sbml)
 
std::string addMissingModifiers (const std::string &sModel)
 
std::string addSourceSinkNodes (const std::string &sbml)
 
std::string convertLevel1ToLevel2Impl (const std::string &sSBML)
 
std::string convertLevel2ToLevel1Impl (const std::string &sSBML)
 
std::string convertPowImpl (const std::string &sSBML)
 
std::string convertSBML (const std::string &sModel, const int &nLevel, const int &nVersion)
 
std::string convertSBML (const std::string &sModel, const int &nLevel, const int &nVersion, bool throwError)
 
std::string convertTimeToCSymbol (const std::string &sArg, const std::string &sTimeSymbol)
 
std::string fixCommonIssues (const std::string &sbml)
 
std::string fixCommonIssues (const std::string &sbml, const std::string &programName, const std::string &programVersion)
 
std::string fetAnnotatedModel (const std::string &targetSBML, const std::string &sourceSBML, bool checkModelId)
 
std::string getAnnotation (const std::string &sId)
 
std::string getCompartmentIdBySpeciesId (const std::string &sId)
 
std::string getKineticLaw (const int &index)
 gets the kinetic law math formula for the i'th reaction. More...
 
std::string getMetaId (const std::string &sId)
 
std::string getModelId ()
 
std::string getModelName () const
 
std::string getNotes (const std::string &sId)
 
std::string getNthBoundarySpeciesId (const int &nIndex)
 
std::string getNthBoundarySpeciesName (const int &nIndex)
 
std::string getNthCompartmentId (const int &nIndex)
 
std::string getNthCompartmentName (const int &nIndex)
 
std::string getNthConstraint (const int &nIndex, std::string &sMessage)
 
std::string getNthFloatingSpeciesId (const int &nIndex)
 
std::string getNthFloatingSpeciesName (const int &nIndex)
 
std::string getNthGlobalParameterId (const int &nIndex)
 
std::string getNthGlobalParameterName (const int &nIndex)
 
std::string getNthInitialAssignment (const int &nIndex)
 
std::string getNthParameterId (const int &nReactionIndex, const int &nParameterIndex)
 
std::string getNthParameterName (const int &nReactionIndex, const int &nParameterIndex)
 
std::string getNthProductName (const int &nIndex, const int &nProduct)
 
std::string getNthReactantName (const int &nIndex, const int &nReactant)
 
std::string getNthReactionId (const int &nIndex)
 
std::string getNthReactionName (const int &nIndex)
 
std::string getNthRule (const int &nIndex)
 
std::string getNthRuleType (const int &arg)
 
std::string getOutsideCompartment (const std::string &var0)
 
std::string getSBML ()
 
std::string getSBOCapableSBML (const std::string &sModel)
 
std::string removeJD1Layout (const std::string &sSBML)
 
std::string removeJD2Layout (const std::string &sSBML)
 
std::string removeLayoutInformation (const std::string &sSBML)
 
std::string validateSBML (const std::string &sModel)
 
std::string validateWithConsistency (const std::string &sModel)
 
std::vector< std::string > getBuiltinFunctionInfo (const std::string &var0)
 
std::vector< std::string > getBuiltinFunctions ()
 
void changeConstantForRules (Model *model)
 
void loadFromFile (const std::string &fileName)
 
void loadParameterPromotedSBML (const std::string &var0, const std::string &sTimeSymbol)
 
void loadSBML (const std::string &var0)
 
void loadSBML (const std::string &var0, const std::string &sTimeSymbol)
 
void setAnnotation (const std::string &sId, const std::string &sAnnotation)
 
void setModelId (const std::string &sId)
 
void setNotes (const std::string &sId, const std::string &sNotes)
 
void setSBOTerm (const std::string &sId, const int &nSBOTerm)
 
void setValue (const std::string &sId, const double &dValue)
 
void setValue (Model *model, const std::string &id, const double &value, const bool &throwIfNotFound)
 
void testASTTime ()
 
std::string getNthBoundarySpeciesCompartmentName (const int &nIndex)
 
std::string getNthFloatingSpeciesCompartmentName (int index)
 gets the compartment name of the i'th species with boundary condition's compartment name. More...
 
StringListContainer getListOfBoundarySpecies ()
 
stack< std::string > getMatchForSymbol (const std::string &sbmlId)
 This should return an initialization for the given sbmlId that is sideeffect free.
 

Static Public Member Functions

static std::string getlibSBMLVersion ()
 
static std::string convertTime (const std::string &sArg, const std::string &sTimeSymbol)
 stateless utility functions, these obviously do not change the state of this NOM object.
 
static StringList getSymbols (const ASTNode *math)
 Returns the list of all names contained in the ASTNode. More...
 
static deque< Rule * > reorderAssignmentRules (deque< Rule * > &assignmentRules)
 Reorders assignment rules. More...
 
static void fillStack (stack< std::string > &stack, SBMLSymbol &symbol)
 
static void reorderRules (SBMLDocument &oc, Model &model)
 Reorders the Rules of the model in such a way, that AssignmentRules are calculated first, followed by Rate Rules and Algebraic Rules. More...
 
static std::string getParamPromotedSBML (const std::string &sArg)
 
static std::string getId (SBase &element)
 
static std::string convertMathMLToString (const std::string &sMathML)
 
static std::string convertStringToMathML (const std::string &var0)
 

Detailed Description

Methods to query various information from an SBML document.

This class provides a set of static method to query various items from sbml objects.

Member Function Documentation

◆ getKineticLaw()

std::string rr::NOMSupport::getKineticLaw ( const int &  index)

gets the kinetic law math formula for the i'th reaction.

This will be changed to return a KineticLaw object soon.

◆ getNthFloatingSpeciesCompartmentName()

std::string rr::NOMSupport::getNthFloatingSpeciesCompartmentName ( int  index)

gets the compartment name of the i'th species with boundary condition's compartment name.

So, say we have a model like: model { species{boundary = false} species{boundary = true} species{boundary = false} species{boundary = true} species{boundary = true} ... } Using 0 based indexing, if index = 0, we'd get the compartment name for species 1, index = 1 yields compartment name for species 3, index = 2 yields compartment name for species 4, and so forth.

◆ getNumParameters()

int rr::NOMSupport::getNumParameters ( int  reaction)
Returns
the number of parameters for the i'th reaction, if reaction is not a kinetic law, 0 otherwise.

◆ getNumReactions()

int rr::NOMSupport::getNumReactions ( )
Returns
the number of Reactions in this Model.

◆ getSymbols()

StringList rr::NOMSupport::getSymbols ( const ASTNode *  math)
static

Returns the list of all names contained in the ASTNode.

Parameters
mathASTNode
Returns
List of all symbols

◆ isBoundary()

bool rr::NOMSupport::isBoundary ( const std::string &  sId)

Checks whether the element for the given SBML id is a boundary species.

@ param name the id to check

◆ isCompartment()

bool rr::NOMSupport::isCompartment ( const std::string &  sId)

Checks whether the element for the given SBML id is a compartment.

Parameters
sIdthe id to check
Returns
true if element is a compartment, false otherwise

◆ reorderAssignmentRules()

deque< Rule * > rr::NOMSupport::reorderAssignmentRules ( deque< Rule * > &  assignmentRules)
static

Reorders assignment rules.

In SBML assignment rules does not have to appear in the correct order. That is you could have an assignment rule A = B, and a rule B = C. Now the result would differ, if the first rule is evaluated before the second. Thus the rules will be reordered such that this will be taken care of.

Parameters
assignmentRulesassignment rules in original ordering
Returns
assignment rules in independent order

◆ reorderRules()

void rr::NOMSupport::reorderRules ( SBMLDocument &  oc,
Model &  model 
)
static

Reorders the Rules of the model in such a way, that AssignmentRules are calculated first, followed by Rate Rules and Algebraic Rules.

Parameters
docthe document to use
namethe model to use

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