NFinput Namespace Reference


Detailed Description

Functionality to handle input from XML files or command line arguments.

This is a very straightforward set of functions and simple classes that together parse and handle all the major input into NFsim. The raw XML parsing code comes from the TinyXML project and can be found in its unedited form in the TinyXML directory. Thanks TinyXML! You perform great and you are definitely tiny!

Author:
Michael Sneddon


Classes

class  component
 Maintains information about a component of a TemplateMolecule. More...

Functions

bool parseArguments (int argc, const char *argv[], map< string, string > &argMap)
 Parses command line arguments from the console nicely.
int parseAsInt (map< string, string > &argMap, string argName, int defaultValue)
 Looks up the argument in the argMap and tries to parse the value as an integer.
void parseAsCommaSeparatedSequence (map< string, string > &argMap, string argName, vector< int > &sequence)
 Looks up the argument in the argMap and tries to parse the value as a comma delimited sequence of ints.
double parseAsDouble (map< string, string > &argMap, string argName, double defaultValue)
 Looks up the argument in the argMap and tries to parse the value as a double.
bool parseSequence (string numString, vector< double > &outputTimes)
 Parses a matlab style sequence (ie startValue:step:endValue) into the vector.
bool createSystemDumper (string paramStr, System *s, bool verbose)
 Parses the cmd line arg that specifies system dumps, and schedules them.
SysteminitializeFromXML (string filename, bool blockSameComplexBinding, int globalMoleculeLimit, bool verbose, int &suggestedTraversalLimit)
 Maintains information about a component of a TemplateMolecule.
bool initParameters (TiXmlElement *pListOfParameters, System *s, map< string, double > &parameter, bool verbose)
 Reads the parameter XML block and puts them in the parameter map.
bool initMoleculeTypes (TiXmlElement *pListOfMoleculeTypes, System *system, map< string, int > &allowedStates, bool verbose)
 Reads the MoleculeType XML block and adds the MoleculeTypes to the system.
bool initStartSpecies (TiXmlElement *pListOfSpecies, System *system, map< string, double > &parameter, map< string, int > &allowedStates, bool verbose)
 Reads a Species XML block, creates the molecules and adds them to the system.
bool initReactionRules (TiXmlElement *pListOfReactionRules, System *system, map< string, double > &parameter, map< string, int > &allowedStates, bool blockSameComplexBinding, bool verbose, int &suggestedTraversalLimit)
 Reads a reactionRule XML block and adds the rules to the system.
bool readObservableForTemplateMolecules (TiXmlElement *pObs, string observableName, vector< TemplateMolecule * > &tmList, vector< string > &stochRelation, vector< int > &stochQuantity, System *s, map< string, double > &parameter, map< string, int > &allowedStates, int obsType, bool verbose, int &suggestedTraversalLimit)
bool initObservables (TiXmlElement *pListOfObservables, System *system, map< string, double > &parameter, map< string, int > &allowedStates, bool verbose, int &suggestedTraversalLimit)
 Reads an observable XML block and adds the new observables to the system.
TemplateMoleculereadPattern (TiXmlElement *pListOfMol, System *s, map< string, double > &parameter, map< string, int > &allowedStates, string patternName, map< string, TemplateMolecule * > &templates, map< string, component > &comps, map< string, component > &symMap, bool verbose, int &suggestedTraversalLimit)
 Reads a pattern XML block and returns the set of new TemplateMolecule objects.
bool readProductPattern (TiXmlElement *pListOfMol, System *s, map< string, double > &parameter, map< string, int > &allowedStates, string patternName, vector< MoleculeType * > &productMoleculeTypes, vector< vector< int > > &stateInformation, vector< vector< int > > &bindingSiteInformation, bool verbose)
 Reads a pattern XML block and returns the set of new TemplateMolecule objects.
bool initFunctions (TiXmlElement *pListOfFunctions, System *system, map< string, double > &parameter, TiXmlElement *pListOfObservables, map< string, int > &allowedStates, bool verbose)
 Reads the Function XML block and adds the Functions to the system.
bool FindReactionRuleSymmetry (TiXmlElement *pRxnRule, System *s, map< string, double > &parameter, map< string, int > &allowedStates, map< string, component > &symComps, map< string, component > &symRxnCenter, bool verbose)
bool readPatternForSymmetry (TiXmlElement *pListOfMol, System *s, string patternName, map< string, component > &comps, map< string, component > &symComps, bool verbose)
bool generateRxnPermutations (vector< map< string, component > > &permutations, map< string, component > &symComps, map< string, component > &symRxnCenter, bool verbose)
bool lookup (component *&c, string id, map< string, component > &comps, map< string, component > &symMap)
void walk (System *s)
 Allows the user to walk through the system with an interactive text-based program.
bool readRNFfile (map< string, string > &argMap, vector< string > &commands, bool verbose)
bool runRNFcommands (System *s, map< string, string > &argMap, vector< string > &commands, bool verbose)


Function Documentation

bool NFinput::createSystemDumper ( string  paramStr,
System s,
bool  verbose 
)

Parses the cmd line arg that specifies system dumps, and schedules them.

This method works by parsing the argument, initializing the class DumpSystem defined in the file NFoutput.hh, and adding the DumpSystem to the System.

Author:
Michael Sneddon

bool NFinput::FindReactionRuleSymmetry ( TiXmlElement pRxnRule,
System s,
map< string, double > &  parameter,
map< string, int > &  allowedStates,
map< string, component > &  symComps,
map< string, component > &  symRxnCenter,
bool  verbose 
)

bool NFinput::generateRxnPermutations ( vector< map< string, component > > &  permutations,
map< string, component > &  symComps,
map< string, component > &  symRxnCenter,
bool  verbose 
)

Output for debugging

Output for debugging

bool NFinput::initFunctions ( TiXmlElement pListOfFunctions,
System system,
map< string, double > &  parameter,
TiXmlElement pListOfObservables,
map< string, int > &  allowedStates,
bool  verbose 
)

Reads the Function XML block and adds the Functions to the system.

Author:
Michael Sneddon

System * NFinput::initializeFromXML ( string  filename,
bool  blockSameComplexBinding,
int  globalMoleculeLimit,
bool  verbose,
int &  suggestedTraversalLimit 
)

Maintains information about a component of a TemplateMolecule.

Author:
Michael Sneddon

bool NFinput::initMoleculeTypes ( TiXmlElement pListOfMoleculeTypes,
System s,
map< string, int > &  allowedStates,
bool  verbose 
)

Reads the MoleculeType XML block and adds the MoleculeTypes to the system.

The strategy is to look at one MoleculeType at a time, make sure that moleculeType contains valid information, then, and only then, create it.

Author:
Michael Sneddon

bool NFinput::initObservables ( TiXmlElement pListOfObservables,
System system,
map< string, double > &  parameter,
map< string, int > &  allowedStates,
bool  verbose,
int &  suggestedTraversalLimit 
)

Reads an observable XML block and adds the new observables to the system.

Author:
Michael Sneddon

bool NFinput::initParameters ( TiXmlElement pListOfParameters,
System s,
map< string, double > &  parameter,
bool  verbose 
)

Reads the parameter XML block and puts them in the parameter map.

Author:
Michael Sneddon

bool NFinput::initReactionRules ( TiXmlElement pListOfReactionRules,
System system,
map< string, double > &  parameter,
map< string, int > &  allowedStates,
bool  blockSameComplexBinding,
bool  verbose,
int &  suggestedTraversalLimit 
)

Reads a reactionRule XML block and adds the rules to the system.

Author:
Michael Sneddon

bool NFinput::initStartSpecies ( TiXmlElement pListOfSpecies,
System system,
map< string, double > &  parameter,
map< string, int > &  allowedStates,
bool  verbose 
)

Reads a Species XML block, creates the molecules and adds them to the system.

Author:
Michael Sneddon

bool NFinput::lookup ( component *&  c,
string  id,
map< string, component > &  comps,
map< string, component > &  symMap 
)

bool NFinput::parseArguments ( int  argc,
const char *  argv[],
map< string, string > &  argMap 
)

Parses command line arguments from the console nicely.

Author:
Michael Sneddon

void NFinput::parseAsCommaSeparatedSequence ( map< string, string > &  argMap,
string  argName,
vector< int > &  sequence 
)

Looks up the argument in the argMap and tries to parse the value as a comma delimited sequence of ints.

Author:
Michael Sneddon

double NFinput::parseAsDouble ( map< string, string > &  argMap,
string  argName,
double  defaultValue 
)

Looks up the argument in the argMap and tries to parse the value as a double.

Author:
Michael Sneddon

int NFinput::parseAsInt ( map< string, string > &  argMap,
string  argName,
int  defaultValue 
)

Looks up the argument in the argMap and tries to parse the value as an integer.

Author:
Michael Sneddon

bool NFinput::parseSequence ( string  numString,
vector< double > &  outputTimes 
)

Parses a matlab style sequence (ie startValue:step:endValue) into the vector.

Author:
Michael Sneddon

bool NFinput::readObservableForTemplateMolecules ( TiXmlElement pObs,
string  observableName,
vector< TemplateMolecule * > &  tmList,
vector< string > &  stochRelation,
vector< int > &  stochQuantity,
System s,
map< string, double > &  parameter,
map< string, int > &  allowedStates,
int  obsType,
bool  verbose,
int &  suggestedTraversalLimit 
)

TemplateMolecule * NFinput::readPattern ( TiXmlElement pListOfMol,
System s,
map< string, double > &  parameter,
map< string, int > &  allowedStates,
string  patternName,
map< string, TemplateMolecule * > &  templates,
map< string, component > &  comps,
map< string, component > &  symMap,
bool  verbose,
int &  suggestedTraversalLimit 
)

Reads a pattern XML block and returns the set of new TemplateMolecule objects.

Author:
Michael Sneddon

bool NFinput::readPatternForSymmetry ( TiXmlElement pListOfMol,
System s,
string  patternName,
map< string, component > &  comps,
map< string, component > &  symComps,
bool  verbose 
)

bool NFinput::readProductPattern ( TiXmlElement pListOfMol,
System s,
map< string, double > &  parameter,
map< string, int > &  allowedStates,
string  patternName,
vector< MoleculeType * > &  productMoleculeTypes,
vector< vector< int > > &  stateInformation,
vector< vector< int > > &  bindingSiteInformation,
bool  verbose 
)

Reads a pattern XML block and returns the set of new TemplateMolecule objects.

Author:
Michael Sneddon

bool NFinput::readRNFfile ( map< string, string > &  argMap,
vector< string > &  commands,
bool  verbose 
)

bool NFinput::runRNFcommands ( System s,
map< string, string > &  argMap,
vector< string > &  commands,
bool  verbose 
)

void NFinput::walk ( System s  ) 

Allows the user to walk through the system with an interactive text-based program.

Author:
Michael Sneddon


Generated on Thu Dec 9 11:02:49 2010 for NFsim by  doxygen 1.5.4