00001 #ifndef TRANSFORMATIONSET_HH_
00002 #define TRANSFORMATIONSET_HH_
00003
00004
00005 #include "../NFreactions.hh"
00006
00007 using namespace std;
00008
00009 namespace NFcore
00010 {
00011
00012 class Transformation;
00013 class TemplateMolecule;
00014 class Molecule;
00015 class SpeciesCreator;
00016
00017
00019
00037 class TransformationSet
00038 {
00039 public:
00040
00048 TransformationSet(vector <TemplateMolecule *> reactantTemplates);
00049
00054 ~TransformationSet();
00055
00056
00057 int getNumOfReactants() const { return n_reactants; };
00058
00065 bool addStateChangeTransform(TemplateMolecule *t, string cName, int finalStateValue);
00066
00073 bool addStateChangeTransform(TemplateMolecule *t, string cName, string finalStateValue);
00074
00079 bool addIncrementStateTransform(TemplateMolecule *t, string cName);
00080
00085 bool addDecrementStateTransform(TemplateMolecule *t, string cName);
00086
00087
00093 bool addBindingTransform(TemplateMolecule *t1, string bSiteName1, TemplateMolecule *t2, string bSiteName2);
00094
00101 bool addBindingSeparateComplexTransform(TemplateMolecule *t1, string bSiteName1, TemplateMolecule *t2, string bSiteName2);
00102
00103
00104
00109 bool addUnbindingTransform(TemplateMolecule *t, string bSiteName, TemplateMolecule *t2, string bSiteName2);
00110
00111
00117 bool addDeleteMolecule(TemplateMolecule *t, int deletionType);
00118
00123 bool addAddMolecule(SpeciesCreator *sc);
00124
00125
00130 bool addLocalFunctionReference(TemplateMolecule *t, string PointerName, int scope);
00131
00132
00138 bool transform(MappingSet **mappingSets);
00139
00147 MappingSet *generateBlankMappingSet(unsigned int reactantIndex, unsigned int mappingSetId);
00148
00149
00155 TemplateMolecule * getTemplateMolecule(unsigned int reactantIndex) const { return reactants[reactantIndex]; };
00156
00162 unsigned int getNreactants() const {return n_reactants; };
00163
00171 void finalize();
00172
00177 bool isFinalized() const { return finalized; };
00178
00188 bool getListOfProducts(MappingSet **mappingSets, list<Molecule *> &products, int traversalLimit);
00189
00196 bool hasSymUnbindingTransform() const { return hasSymUnbinding; };
00197
00204 bool hasSymBindingTransform() const { return hasSymBinding; };
00205
00210 int getNumOfTransformations(int reactantIndex) const { return transformations[reactantIndex].size();};
00211
00212
00217 Transformation *getTransformation(int reactantIndex, int index) const { return transformations[reactantIndex].at(index); };
00218
00219
00220
00221
00222 protected:
00223
00231 int find(TemplateMolecule *t);
00232
00234 bool finalized;
00235
00237 unsigned int n_reactants;
00238
00240 TemplateMolecule ** reactants;
00241
00243 vector <Transformation *> *transformations;
00244
00246 vector <Transformation *> addMoleculeTransformations;
00247
00249 static list <Molecule *> deleteList;
00250
00251
00253 static list <Molecule *> updateAfterDeleteList;
00254
00255
00257 static list <Molecule *>::iterator it;
00258
00259
00261 bool hasSymUnbinding;
00262
00264 bool hasSymBinding;
00265 };
00266
00267 }
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280 #endif