NFcore::TransformationSet Class Reference

#include <transformationSet.hh>

List of all members.


Detailed Description

Maintains a set of Transformation objects for a ReactionClass.

This class is one of the core pieces of a ReactionClass. It maintains the set of Transformation objects for each of the reactants in the ReactionClass. Therefore, it knows about the TemplateMolecules of the ReactionClass; it knows how to generate MappingSet objects for the ReactantLists; it knows how to create MappingGenerator objects for TemplateMolecules; it knows how to execute the set of Transformations; and finally, it knows how to generate the list of product molecules that are generated from firing a reaction rule. To use this class, first create your TemplateMolecule objects for your ReactionClass. Create a TransformationSet from the TemplateMolecule vector (the vector should be created such that each element of the vector is a reactant in the ReactionClass). Add as many Transformations to the set as you like using the TransformationSet static functions. Finally, call the finalize() function to finish setting upt the TransformationSet. Then you can use this TransformationSet to create a ReactionClass with ease. Really, this is all easier than it sounds! (see simple_system.hh and simple_system.cpp )

Author:
Michael Sneddon

Public Member Functions

 TransformationSet (vector< TemplateMolecule * > reactantTemplates)
 ~TransformationSet ()
int getNumOfReactants () const
bool addStateChangeTransform (TemplateMolecule *t, string cName, int finalStateValue)
bool addStateChangeTransform (TemplateMolecule *t, string cName, string finalStateValue)
bool addIncrementStateTransform (TemplateMolecule *t, string cName)
bool addDecrementStateTransform (TemplateMolecule *t, string cName)
bool addBindingTransform (TemplateMolecule *t1, string bSiteName1, TemplateMolecule *t2, string bSiteName2)
bool addBindingSeparateComplexTransform (TemplateMolecule *t1, string bSiteName1, TemplateMolecule *t2, string bSiteName2)
bool addUnbindingTransform (TemplateMolecule *t, string bSiteName, TemplateMolecule *t2, string bSiteName2)
bool addDeleteMolecule (TemplateMolecule *t, int deletionType)
bool addAddMolecule (SpeciesCreator *sc)
bool addLocalFunctionReference (TemplateMolecule *t, string PointerName, int scope)
bool transform (MappingSet **mappingSets)
MappingSetgenerateBlankMappingSet (unsigned int reactantIndex, unsigned int mappingSetId)
TemplateMoleculegetTemplateMolecule (unsigned int reactantIndex) const
unsigned int getNreactants () const
void finalize ()
bool isFinalized () const
bool getListOfProducts (MappingSet **mappingSets, list< Molecule * > &products, int traversalLimit)
bool hasSymUnbindingTransform () const
bool hasSymBindingTransform () const
int getNumOfTransformations (int reactantIndex) const
TransformationgetTransformation (int reactantIndex, int index) const

Protected Member Functions

int find (TemplateMolecule *t)

Protected Attributes

bool finalized
unsigned int n_reactants
TemplateMolecule ** reactants
vector< Transformation * > * transformations
vector< Transformation * > addMoleculeTransformations
bool hasSymUnbinding
bool hasSymBinding

Static Protected Attributes

static list< Molecule * > deleteList
static list< Molecule * > updateAfterDeleteList
static list< Molecule * >::iterator it

Constructor & Destructor Documentation

TransformationSet::TransformationSet ( vector< TemplateMolecule * >  reactantTemplates  ) 

Creates a new TransformationSet from the given vector of TemplateMolecules. This takes care of setting everything up in the TemplateMolecules (such as adding MappingGenerators). Be sure to call finalize() before using this in a ReactionClass!

Author:
Michael Sneddon

TransformationSet::~TransformationSet (  ) 

Destroys the TransformationSet and associated Transformation objects.

Author:
Michael Sneddon


Member Function Documentation

int NFcore::TransformationSet::getNumOfReactants (  )  const [inline]

bool TransformationSet::addStateChangeTransform ( TemplateMolecule t,
string  cName,
int  finalStateValue 
)

Adds a state change transformation on the given TemplateMolecule (that must have been included in the original vector of TemplateMolecules) along with the stateName and final value of the state to be transformed.

Author:
Michael Sneddon

bool TransformationSet::addStateChangeTransform ( TemplateMolecule t,
string  cName,
string  finalStateValue 
)

Adds a state change transformation on the given TemplateMolecule (that must have been included in the original vector of TemplateMolecules) along with the stateName and final value of the state to be transformed.

Author:
Michael Sneddon

bool TransformationSet::addIncrementStateTransform ( TemplateMolecule t,
string  cName 
)

Adds an increment state change to the given templateMolecule

Author:
Michael Sneddon

bool TransformationSet::addDecrementStateTransform ( TemplateMolecule t,
string  cName 
)

Adds an decrement state change to the given templateMolecule

Author:
Michael Sneddon

bool TransformationSet::addBindingTransform ( TemplateMolecule t1,
string  bSiteName1,
TemplateMolecule t2,
string  bSiteName2 
)

Adds a binding reaction between the two given TemplateMolecules at the specified binding sites.

Author:
Michael Sneddon

bool TransformationSet::addBindingSeparateComplexTransform ( TemplateMolecule t1,
string  bSiteName1,
TemplateMolecule t2,
string  bSiteName2 
)

Adds a binding reaction between the two given TemplateMolecules at the specified binding sites with the constraint that the two molecules are not connected. Note: This only stops the binding transform! It does not prevent the entire reaction! That is not programmed in yet!

Author:
Michael Sneddon

bool TransformationSet::addUnbindingTransform ( TemplateMolecule t,
string  bSiteName,
TemplateMolecule t2,
string  bSiteName2 
)

Adds an unbinding reaction at the given site of the given TemplateMolecule

Author:
Michael Sneddon

bool TransformationSet::addDeleteMolecule ( TemplateMolecule t,
int  deletionType 
)

Adds a delete rule to the given TemplateMolecule. This has not been implemented yet, so it may take other parameters.

Author:
Michael Sneddon
Adds a delete rule to the given TemplateMolecule.
Author:
Michael Sneddon

bool TransformationSet::addAddMolecule ( SpeciesCreator sc  ) 

Adds a create molecule rule, but has not been implemented yet.

Author:
Michael Sneddon

bool TransformationSet::addLocalFunctionReference ( TemplateMolecule t,
string  PointerName,
int  scope 
)

Adds a create molecule rule, but has not been implemented yet.

Author:
Michael Sneddon

bool TransformationSet::transform ( MappingSet **  mappingSets  ) 

Call this (in a ReactionClass) to transform the array of MappingSets (one MappingSet per reactant in the correct position in the array, please!).

Author:
Michael Sneddon

MappingSet * TransformationSet::generateBlankMappingSet ( unsigned int  reactantIndex,
unsigned int  mappingSetId 
)

Generates a blank MappingSet (blank in the sense that it is not mapped to any Molecules yet) from the list of Transformations. This function is called by ReactantList and ReactantTree to populate the lists of MappingSets that are created at the beginning of a simulation.

Author:
Michael Sneddon

TemplateMolecule* NFcore::TransformationSet::getTemplateMolecule ( unsigned int  reactantIndex  )  const [inline]

Returns the TemplateMolecule of a given reactant. This function is primarily used for initial initializations of a ReactionClass.

Author:
Michael Sneddon

unsigned int NFcore::TransformationSet::getNreactants (  )  const [inline]

Get the number of reactants in the rule governed by this TransformationSet. This function is really only used for initial initializations of a ReactionClass.

Author:
Michael Sneddon

void TransformationSet::finalize (  ) 

This function sets up the actual array of Transformation objects for this TransformationSet and makes sure that no one adds additional Transformations once this TransformationSet is in use. TransformationSets also do not allow you to do certain things (like add it to a ReactionClass) until the Set is finalized by a call to this function.

Author:
Michael Sneddon

bool NFcore::TransformationSet::isFinalized (  )  const [inline]

Check whether or not the finalize() function has been called.

Author:
Michael Sneddon

bool TransformationSet::getListOfProducts ( MappingSet **  mappingSets,
list< Molecule * > &  products,
int  traversalLimit 
)

From an array of MappingSet objects, this function populates the list of Molecules with all the Molecules that can be affected by this Transformation. The traversalLimit parameters sets the depth at which the Molecules should be searched (starting at the original TemplateMolecules given in the initial vector of TemplateMolecules). So giving a value of 1 will only give you the immediate reactant Molecules. Setting this to two will explore down one level of bonds, and so on.

Author:
Michael Sneddon

bool NFcore::TransformationSet::hasSymUnbindingTransform (  )  const [inline]

Called by reaction class to determine if the rate of a rule must be adjusted to account for a symmetric unbinding event. Symmetry of the rule is checked when you add an unbinding transform.

Author:
Michael Sneddon

bool NFcore::TransformationSet::hasSymBindingTransform (  )  const [inline]

Called by reaction class to determine if the rate of a rule must be adjusted to account for a symmetric binding event. Symmetry of the rule is checked when you add a binding transform.

Author:
Michael Sneddon

int NFcore::TransformationSet::getNumOfTransformations ( int  reactantIndex  )  const [inline]

Returns the number of transformations that the template at reactantIndex given has.

Author:
Michael Sneddon

Transformation* NFcore::TransformationSet::getTransformation ( int  reactantIndex,
int  index 
) const [inline]

Returns the transformation object at the given index for the given reactant position

Author:
Michael Sneddon

int TransformationSet::find ( TemplateMolecule t  )  [protected]

Used for error checking when setting up a TransformationSet. This finds a TemplateMolecule in the TemplateMolecule vector given in the constructor and finds the reactant index under which it was found. This makes sure a particular TemplateMolecule that you are trying to add a transformation to exists and does not exist in multiple places.

Author:
Michael Sneddon


Member Data Documentation

bool NFcore::TransformationSet::finalized [protected]

Remembers if the finalize function has been called

unsigned int NFcore::TransformationSet::n_reactants [protected]

Keeps track of the number of reactants in the rule monitored by this TransformationSet

TemplateMolecule** NFcore::TransformationSet::reactants [protected]

The array of TemplateMolecules that represent the reactants

vector<Transformation *>* NFcore::TransformationSet::transformations [protected]

A vector that holds the actual Transformation objects

vector<Transformation *> NFcore::TransformationSet::addMoleculeTransformations [protected]

A vector that holds the addMolecule Transformations, because they are handled separately

list< Molecule * > TransformationSet::deleteList [static, protected]

List to keep track of the molecules that we are going to delete when a transformation is applied

list< Molecule * > TransformationSet::updateAfterDeleteList [static, protected]

List to keep track of the molecules that we have to update as a result of a deletion

list< Molecule * >::iterator TransformationSet::it [static, protected]

iterator for the deleteList and updateAfterDeleteList

bool NFcore::TransformationSet::hasSymUnbinding [protected]

keeps track if this set has a symmetric unbinding reaction

bool NFcore::TransformationSet::hasSymBinding [protected]

keeps track if this set has a symmetric binding reaction


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