NFcore::System Class Reference

#include <NFcore.hh>

List of all members.

Detailed Description

The main class that begins and runs simulations.

This class is what runs the actual simulation. It keeps lists of all MoleculeTypes that exist and all Reactions that can operate on those moleculeTypes. It also contains the function (named sim) which runs the main simulation loop. To create a new System, first add all MoleculeTypes, all reactions, then call the function prepareForSimulation(). Then call the sim function as many times as you like. Output is printed to the given output file and lists all observables per time according to how often you want values recorded.

Michael Sneddon

Public Member Functions

 System (string name)
 System (string name, bool useComplex)
 System (string name, bool useComplex, int globalMoleculeLimit)
 ~System ()
string getName () const
bool isUsingComplex ()
bool isOutputtingBinary ()
double getCurrentTime () const
int getGlobalMoleculeLimit () const
int getMolObsCount (int moleculeTypeIndex, int observableIndex) const
ObservablegetObservableByName (string obsName)
double getAverageGroupValue (string groupName, int valIndex)
ReactionClassgetReaction (int rIndex)
MoleculeTypegetMoleculeType (int mtIndex)
MoleculeTypegetMoleculeTypeByName (string name)
int getNumOfMoleculeTypes ()
MoleculegetMoleculeByUid (int uid)
int getNumOfMolecules ()
int addMoleculeType (MoleculeType *moleculeType)
void addReaction (ReactionClass *reaction)
void addNecessaryUpdateReaction (ReactionClass *reaction)
bool addGlobalFunction (GlobalFunction *gf)
GlobalFunctiongetGlobalFunctionByName (string fName)
bool addCompositeFunction (CompositeFunction *cf)
CompositeFunctiongetCompositeFunctionByName (string fName)
void finalizeCompositeFunctions ()
void printAllFunctions ()
LocalFunctiongetLocalFunctionByName (string fName)
void prepareForSimulation ()
void setUniversalTraversalLimit (int utl)
void setOutputToBinary ()
void registerOutputFileLocation (string filename)
void setDumpOutputter (DumpSystem *ds)
void tryToDump ()
void turnOnGlobalFuncOut ()
void turnOffGlobalFuncOut ()
void tagReaction (int rID)
void addLocalFunction (LocalFunction *lf)
void getLocalFunction (string funcName) const
void outputAllObservableNames ()
void outputAllObservableCounts ()
void outputAllObservableCounts (double cSampleTime)
void outputAllObservableCounts (double cSampleTime, int eventCounter)
int getNumOfSpeciesObs () const
ObservablegetSpeciesObs (int index) const
void printAllReactions ()
void printIndexAndNames ()
void printAllMoleculeTypes ()
void printAllObservableCounts ()
void printAllObservableCounts (double cSampleTime)
void printAllObservableCounts (double cSampleTime, int eventCounter)
void update_A_tot (ReactionClass *r, double old_a, double new_a)
void evaluateAllLocalFunctions ()
void addObservableForOutput (Observable *o)
void addOutputter (Outputter *op)
void dumpOutputters ()
double sim (double time, long int sampleTimes)
double sim (double time, long int sampleTimes, bool verbose)
double stepTo (double stoppingTime)
void singleStep ()
void equilibrate (double duration)
void equilibrate (double duration, int statusReports)
void registerRxnIndex (int rxnId, int rxnPos, int rxnIndex)
int getRxnIndex (int rxnId, int rxnPos) const
void turnOff_OnTheFlyObs ()
void turnOnOutputEventCounter ()
void addParameter (string name, double value)
double getParameter (string name)
void setParameter (string name, double value)
void updateSystemWithNewParameters ()
void printAllParameters ()
NFstreamgetOutputFileStream ()
ComplexListgetAllComplexes ()
void turnOnCSVformat ()

Static Public Attributes

static int NULL_EVENT_COUNTER = 0

Protected Member Functions

double get_A_tot () const
double recompute_A_tot ()
double getNextRxn ()
void outputGroupDataHeader ()
void outputAllPropensities (double time, int rxnFired)

Protected Attributes

string name
bool useComplex
bool useBinaryOutput
int universalTraversalLimit
bool onTheFlyObservables
bool outputGlobalFunctionValues
int globalMoleculeLimit
bool outputEventCounter
int globalEventCounter
vector< MoleculeType * > allMoleculeTypes
vector< ReactionClass * > allReactions
vector< Outputter * > allOutputters
ComplexList allComplexes
vector< Observable * > obsToOutput
vector< Observable * > speciesObservables
vector< GlobalFunction * > globalFunctions
vector< LocalFunction * > localFunctions
vector< ReactionClass * > necessaryUpdateRxns
vector< CompositeFunction * > compositeFunctions
double a_tot
double current_time
NFstream outputFileStream
ofstream propensityDumpStream
bool csvFormat
int ** rxnIndexMap
map< string, double > paramMap


class Netgen

Constructor & Destructor Documentation

System::System ( string  name  ) 

creates a system with the given name that does not keep track dynamically of complex formation

System::System ( string  name,
bool  useComplex 

creates a system that keeps track of complex formation if the setComplex parameter is set to true

System::System ( string  name,
bool  useComplex,
int  globalMoleculeLimit 

creates a system that keeps track of complex formation if the setComplex parameter is set to true

System::~System (  ) 

destroys the system and cleans up all memory associated with it

Member Function Documentation

string NFcore::System::getName (  )  const [inline]

bool NFcore::System::isUsingComplex (  )  [inline]

bool NFcore::System::isOutputtingBinary (  )  [inline]

double NFcore::System::getCurrentTime (  )  const [inline]

int NFcore::System::getGlobalMoleculeLimit (  )  const [inline]

int System::getMolObsCount ( int  moleculeTypeIndex,
int  observableIndex 
) const

Observable * System::getObservableByName ( string  obsName  ) 

double NFcore::System::getAverageGroupValue ( string  groupName,
int  valIndex 

ReactionClass* NFcore::System::getReaction ( int  rIndex  )  [inline]

MoleculeType* NFcore::System::getMoleculeType ( int  mtIndex  )  [inline]

MoleculeType * System::getMoleculeTypeByName ( string  name  ) 

int NFcore::System::getNumOfMoleculeTypes (  )  [inline]

Molecule * System::getMoleculeByUid ( int  uid  ) 

int System::getNumOfMolecules (  ) 

int System::addMoleculeType ( MoleculeType moleculeType  ) 

void System::addReaction ( ReactionClass reaction  ) 

void System::addNecessaryUpdateReaction ( ReactionClass reaction  ) 

bool System::addGlobalFunction ( GlobalFunction gf  ) 

GlobalFunction * System::getGlobalFunctionByName ( string  fName  ) 

bool System::addCompositeFunction ( CompositeFunction cf  ) 

CompositeFunction * System::getCompositeFunctionByName ( string  fName  ) 

void System::finalizeCompositeFunctions (  ) 

void System::printAllFunctions (  ) 

LocalFunction * System::getLocalFunctionByName ( string  fName  ) 

void System::prepareForSimulation (  ) 

void System::setUniversalTraversalLimit ( int  utl  ) 

void System::setOutputToBinary (  ) 

void System::registerOutputFileLocation ( string  filename  ) 

void System::setDumpOutputter ( DumpSystem ds  ) 

void System::tryToDump (  ) 

void NFcore::System::turnOnGlobalFuncOut (  )  [inline]

void NFcore::System::turnOffGlobalFuncOut (  )  [inline]

void System::tagReaction ( int  rID  ) 

void System::addLocalFunction ( LocalFunction lf  ) 

void NFcore::System::getLocalFunction ( string  funcName  )  const [inline]

void System::outputAllObservableNames (  ) 

void System::outputAllObservableCounts (  ) 

void System::outputAllObservableCounts ( double  cSampleTime  ) 

void System::outputAllObservableCounts ( double  cSampleTime,
int  eventCounter 

int System::getNumOfSpeciesObs (  )  const

Observable * System::getSpeciesObs ( int  index  )  const

void System::printAllReactions (  ) 

void System::printIndexAndNames (  ) 

void System::printAllMoleculeTypes (  ) 

void System::printAllObservableCounts (  ) 

void System::printAllObservableCounts ( double  cSampleTime  ) 

void System::printAllObservableCounts ( double  cSampleTime,
int  eventCounter 

void System::update_A_tot ( ReactionClass r,
double  old_a,
double  new_a 

void System::evaluateAllLocalFunctions (  ) 

void System::addObservableForOutput ( Observable o  ) 

void System::addOutputter ( Outputter op  ) 

void System::dumpOutputters (  ) 

double System::sim ( double  time,
long int  sampleTimes 

double System::sim ( double  time,
long int  sampleTimes,
bool  verbose 

double System::stepTo ( double  stoppingTime  ) 

void System::singleStep (  ) 

void System::equilibrate ( double  duration  ) 

void System::equilibrate ( double  duration,
int  statusReports 

void NFcore::System::registerRxnIndex ( int  rxnId,
int  rxnPos,
int  rxnIndex 
) [inline]

int NFcore::System::getRxnIndex ( int  rxnId,
int  rxnPos 
) const [inline]

void System::turnOff_OnTheFlyObs (  ) 

void NFcore::System::turnOnOutputEventCounter (  )  [inline]

void System::addParameter ( string  name,
double  value 

double System::getParameter ( string  name  ) 

void System::setParameter ( string  name,
double  value 

void System::updateSystemWithNewParameters (  ) 

void System::printAllParameters (  ) 

NFstream & System::getOutputFileStream (  ) 

ComplexList& NFcore::System::getAllComplexes (  )  [inline]

void NFcore::System::turnOnCSVformat (  )  [inline]

turns on csv format, so that instead of a gdat file, a comma delimited file is generated.

double NFcore::System::get_A_tot (  )  const [inline, protected]

double System::recompute_A_tot (  )  [protected]

double System::getNextRxn (  )  [protected]

void NFcore::System::outputGroupDataHeader (  )  [protected]

void System::outputAllPropensities ( double  time,
int  rxnFired 
) [protected]

Friends And Related Function Documentation

friend class Netgen [friend]

Member Data Documentation

int System::NULL_EVENT_COUNTER = 0 [static]

keeps track of null events (ie binding events that have been rejected because molecules are on the same complex)

string NFcore::System::name [protected]

arbitrary name of the system

bool NFcore::System::useComplex [protected]

sets whether or not to dynamically track complexes

bool NFcore::System::useBinaryOutput [protected]

set to true to turn on binary output of data

int NFcore::System::universalTraversalLimit [protected]

sets depth to traverse molecules when updating reactant lists

bool NFcore::System::onTheFlyObservables [protected]

sets whether or not observables are calculated on the fly

bool NFcore::System::outputGlobalFunctionValues [protected]

int NFcore::System::globalMoleculeLimit [protected]

bool NFcore::System::outputEventCounter [protected]

int NFcore::System::globalEventCounter [protected]

vector<MoleculeType *> NFcore::System::allMoleculeTypes [protected]

container of all MoleculeTypes in the simulation

vector<ReactionClass *> NFcore::System::allReactions [protected]

container of all Reactions in the simulation

vector<Outputter *> NFcore::System::allOutputters [protected]

manages the outputters of the system

ComplexList NFcore::System::allComplexes [protected]

a container to track all complexes in the system

vector<Observable *> NFcore::System::obsToOutput [protected]

keeps ordered list of pointers to observables for output

vector<Observable *> NFcore::System::speciesObservables [protected]

DumpSystem* NFcore::System::ds [protected]

vector<GlobalFunction *> NFcore::System::globalFunctions [protected]

container of all global functions available to the system

vector<LocalFunction *> NFcore::System::localFunctions [protected]

container of all local functions available to the system

vector<ReactionClass *> NFcore::System::necessaryUpdateRxns [protected]

list of all reactions that need to update propensity after each step

vector<CompositeFunction *> NFcore::System::compositeFunctions [protected]

double NFcore::System::a_tot [protected]

double NFcore::System::current_time [protected]

ReactionClass* NFcore::System::nextReaction [protected]

NFstream NFcore::System::outputFileStream [protected]

ofstream NFcore::System::propensityDumpStream [protected]

bool NFcore::System::csvFormat [protected]

int** NFcore::System::rxnIndexMap [protected]

maps reaction index values to a reaction, used for MoleculeTypes to quickly lookup a reaction

map<string,double> NFcore::System::paramMap [protected]

ReactionSelector* NFcore::System::selector [protected]

The documentation for this class was generated from the following files:
Generated on Thu Dec 9 11:02:48 2010 for NFsim by  doxygen 1.5.4