ReadKkit Class Reference

#include <ReadKkit.h>

Collaboration diagram for ReadKkit:
Collaboration graph
[legend]

List of all members.

Public Types

enum  ParseMode { DATA, INIT, COMMENT, LINE_CONTINUE }

Public Member Functions

 ReadKkit ()
double getMaxTime () const
double getPlotDt () const
double getDefaultVol () const
string getBasePath () const
unsigned int getVersion () const
bool getMoveOntoCompartment () const
void setMoveOntoCompartment (bool v)
void innerRead (ifstream &fin)
ParseMode readInit (const string &line)
Id read (const string &filename, const string &cellname, Id parent, const string &solverClass="Stoich")
void readData (const string &line)
void undump (const vector< string > &args)
void run ()
void dumpPlots (const string &filename)
Id buildCompartment (const vector< string > &args)
Id buildPool (const vector< string > &args)
Id buildReac (const vector< string > &args)
Id buildEnz (const vector< string > &args)
Id buildPlot (const vector< string > &args)
Id buildTable (const vector< string > &args)
unsigned int loadTab (const vector< string > &args)
Id buildGroup (const vector< string > &args)
Id buildText (const vector< string > &args)
Id buildGraph (const vector< string > &args)
Id buildGeometry (const vector< string > &args)
Id buildStim (const vector< string > &args)
Id buildChan (const vector< string > &args)
Id buildInfo (Id parent, map< string, int > &m, const vector< string > &args)
void buildSumTotal (const string &src, const string &dest)
Id findSumTotSrc (const string &src)
void addmsg (const vector< string > &args)
void setupSlaveMsg (const string &src, const string &dest)
void innerAddMsg (const string &src, const map< string, Id > &m1, const string &srcMsg, const string &dest, const map< string, Id > &m2, const string &destMsg, bool isBackward=0)
void call (const vector< string > &args)
void objdump (const vector< string > &args)
void textload (const vector< string > &args)
void separateVols (Id pool, double vol)
void assignPoolCompartments ()
void assignReacCompartments ()
void assignEnzCompartments ()
void assignMMenzCompartments ()
void convertParametersToConcUnits ()
void convertPoolAmountToConcUnits ()
 Convert pool amounts. Initially given in n, but scaling issue.
void convertReacRatesToConcUnits ()
 Convert Reac rates, initially in n units.
void convertMMenzRatesToConcUnits ()
void convertEnzRatesToConcUnits ()
string pathTail (const string &path, string &head) const
string cleanPath (const string &path) const

Detailed Description

Loads in a kkit.g model. It makes a separate compartment for each distinct volume it finds in the system. The largest volume gets set to /model/kinetics. The next volume is in /model/compartment_1. The next volume is in /model/compartment_2. And so on. Has two options for handling compartments and solvers. By default, it puts the entire reaction system on /kinetics and makes just one solver. If the moveOntoCompartments_ flag is set it will put each model entity onto the appropriate compartment. It will create separate solvers for each compartment.


Member Enumeration Documentation

Enumerator:
DATA 
INIT 
COMMENT 
LINE_CONTINUE 

Constructor & Destructor Documentation

ReadKkit::ReadKkit (  ) 

Member Function Documentation

void ReadKkit::addmsg ( const vector< string > &  args  ) 
void ReadKkit::assignEnzCompartments (  ) 

Goes through all Enzs and connects them up to each of the compartments in which one or more of their reactants resides. Thus, if any of these compartments changes volume, the Enz will be informed.

void ReadKkit::assignMMenzCompartments (  ) 

Goes through all MMenzs and connects them up to each of the compartments in which one or more of their reactants resides. Thus, if any of these compartments changes volume, the MMenz will be informed.

void ReadKkit::assignPoolCompartments (  ) 

References Neutral::child(), Shell::doCreate(), Shell::doMove(), Id::eref(), findVolOrder(), getCompt(), and ObjId::id.

Here is the call graph for this function:

void ReadKkit::assignReacCompartments (  ) 

Goes through all Reacs and connects them up to each of the compartments in which one or more of their reactants resides. Thus, if any of these compartments changes volume, the Reac will be informed.

References Shell::doMove(), findParentComptOfReac(), getCompt(), and ObjId::id.

Here is the call graph for this function:

Id ReadKkit::buildChan ( const vector< string > &  args  ) 
Id ReadKkit::buildCompartment ( const vector< string > &  args  ) 
Id ReadKkit::buildEnz ( const vector< string > &  args  ) 
Id ReadKkit::buildGeometry ( const vector< string > &  args  ) 
Id ReadKkit::buildGraph ( const vector< string > &  args  ) 
Id ReadKkit::buildGroup ( const vector< string > &  args  ) 
Id ReadKkit::buildInfo ( Id  parent,
map< string, int > &  m,
const vector< string > &  args 
)
Id ReadKkit::buildPlot ( const vector< string > &  args  ) 
Id ReadKkit::buildPool ( const vector< string > &  args  ) 
Id ReadKkit::buildReac ( const vector< string > &  args  ) 
Id ReadKkit::buildStim ( const vector< string > &  args  ) 
void ReadKkit::buildSumTotal ( const string &  src,
const string &  dest 
)
Id ReadKkit::buildTable ( const vector< string > &  args  ) 
Id ReadKkit::buildText ( const vector< string > &  args  ) 
void ReadKkit::call ( const vector< string > &  args  ) 
string ReadKkit::cleanPath ( const string &  path  )  const

Utility function. Cleans up path strings. In most cases, it replaces things with underscores. Replaces square braces with underscores. Replaces '*' with 'p' as it is usually there to indicate phosphorylation Replaces '-' with underscore Replaces '@' with underscore Replaces ' ' with underscore

void ReadKkit::convertEnzRatesToConcUnits (  ) 

Convert regular Enz rates. Binding step k1 has similar issues as reac rates. k2 and k3 are both in units of 1/time, so OK.

References NA.

Referenced by convertParametersToConcUnits().

void ReadKkit::convertMMenzRatesToConcUnits (  ) 

Convert MMEnz rates. Km should be in conc units. Actually rates stored as k1, k2, k3 in num units, so this has to be computed and then converted.

References NA.

Referenced by convertParametersToConcUnits().

void ReadKkit::convertParametersToConcUnits (  ) 

We have a slight problem because MOOSE has a more precise value for NA than does kkit. Also, at the time the model is loaded, the volume relationships are unknown. So we need to fix up conc units of all pools reacs post-facto. Here we assume that the conc units from Kkit are meant to be OK, so they override the #/cell (lower case k) units. So we convert all the Kfs and Kbs in the entire system after the model has been created, once we know the order of each reac.

References convertEnzRatesToConcUnits(), convertMMenzRatesToConcUnits(), convertPoolAmountToConcUnits(), and convertReacRatesToConcUnits().

Here is the call graph for this function:

void ReadKkit::convertPoolAmountToConcUnits (  ) 

Convert pool amounts. Initially given in n, but scaling issue.

References NA.

Referenced by convertParametersToConcUnits().

void ReadKkit::convertReacRatesToConcUnits (  ) 

Convert Reac rates, initially in n units.

References NA.

Referenced by convertParametersToConcUnits().

void ReadKkit::dumpPlots ( const string &  filename  ) 

Referenced by testReadKkit().

Id ReadKkit::findSumTotSrc ( const string &  src  ) 

Finds the source pool for a SumTot. It also deals with cases where the source is an enz-substrate complex

string ReadKkit::getBasePath (  )  const
double ReadKkit::getDefaultVol (  )  const
double ReadKkit::getMaxTime (  )  const
bool ReadKkit::getMoveOntoCompartment (  )  const
double ReadKkit::getPlotDt (  )  const
unsigned int ReadKkit::getVersion (  )  const
void ReadKkit::innerAddMsg ( const string &  src,
const map< string, Id > &  m1,
const string &  srcMsg,
const string &  dest,
const map< string, Id > &  m2,
const string &  destMsg,
bool  isBackward = 0 
)
void ReadKkit::innerRead ( ifstream &  fin  ) 
unsigned int ReadKkit::loadTab ( const vector< string > &  args  ) 
void ReadKkit::objdump ( const vector< string > &  args  ) 
string ReadKkit::pathTail ( const string &  path,
string &  head 
) const

Splits up kkit path into head and tail portions, tail is returned. Note that this prepends the basePath to the head.

Id ReadKkit::read ( const string &  filename,
const string &  cellname,
Id  parent,
const string &  solverClass = "Stoich" 
)

Referenced by testReadKkit().

void ReadKkit::readData ( const string &  line  ) 
ParseMode ReadKkit::readInit ( const string &  line  ) 
void ReadKkit::run (  ) 

This function sets up the kkit model for a run using the GSL, which means numerical integration using the GSL, all the plots specified by the kkit file, and the timestep for plots as specified by the kkit file.

References Shell::doReinit(), Shell::doSetClock(), and Shell::doStart().

Referenced by testReadKkit().

Here is the call graph for this function:

void ReadKkit::separateVols ( Id  pool,
double  vol 
)
void ReadKkit::setMoveOntoCompartment ( bool  v  ) 
void ReadKkit::setupSlaveMsg ( const string &  src,
const string &  dest 
)
void ReadKkit::textload ( const vector< string > &  args  ) 
void ReadKkit::undump ( const vector< string > &  args  ) 

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

Generated on 1 Jul 2015 for MOOSE by  doxygen 1.6.1