Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PC12EGFNGFRunDirector.cpp

Go to the documentation of this file.
00001 // PC12EGFNGFRunDirector.cpp: implementation of the CPC12EGFNGFRunDirector class.
00002 //
00004 
00005 #include "PC12EGFNGFRunDirector.h"
00006 
00008 // Construction/Destruction
00010 
00011 CPC12EGFNGFRunDirector::CPC12EGFNGFRunDirector()
00012 {
00013         double maxSimTime = 90.0;
00014         int intTime = (int) maxSimTime + 2;
00015         double stepSize = 0.001;
00016         double frequency = 1.0;
00017         double moveTol = 1.0e-06;
00018 
00019         // 100 ng/ml EGF
00020         m_vpRxnNetworks.push_back(new SmallErkSubnetwork());
00021         m_vpRxnMovers.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00022         int nChemicals = m_vpRxnNetworks[0]->GetNumberOfChemicals();
00023         m_vpCellObservers.push_back(new CellAverageObserver(nChemicals,intTime,1));
00024         m_vpRunnables.push_back(new CRunnable());
00025         m_vpRunnables[0]->SetComponents(m_vpRxnNetworks[0],m_vpRxnMovers[0],m_vpCellObservers[0]);
00026         // create an observer for the runnable
00027         m_vpGnuPlotters.push_back(new GnuPlotterRunnableObserver());
00028         m_vpGnuPlotters[0]->AddChemicalNumberToList(3);
00029         m_vpGnuPlotters[0]->AddChemicalNumberToList(7);
00030         m_vpGnuPlotters[0]->AddChemicalNumberToList(9);
00031         m_vpGnuPlotters[0]->AddChemicalNumberToList(11);
00032         m_vpGnuPlotters[0]->AddChemicalNumberToList(14);
00033         m_vpGnuPlotters[0]->AddChemicalNumberToList(18);
00034         m_vpGnuPlotters[0]->AddChemicalNumberToList(20);
00035         // attach the observer
00036         m_vpRunnables[0]->Attach(m_vpGnuPlotters[0]);
00037         
00038         // 50 ng/ml NGF
00039         m_vpRxnNetworks.push_back(new SmallErkSubnetwork());
00040         m_vpRxnMovers.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00041         nChemicals = m_vpRxnNetworks[1]->GetNumberOfChemicals();
00042         m_vpCellObservers.push_back(new CellAverageObserver(nChemicals,intTime,1));
00043         m_vpRunnables.push_back(new CRunnable());
00044         m_vpRunnables[1]->SetComponents(m_vpRxnNetworks[1],m_vpRxnMovers[1],m_vpCellObservers[1]);
00045         // create an observer for the runnable
00046         m_vpGnuPlotters.push_back(new GnuPlotterRunnableObserver());
00047         m_vpGnuPlotters[1]->AddChemicalNumberToList(5);
00048         m_vpGnuPlotters[1]->AddChemicalNumberToList(7);
00049         m_vpGnuPlotters[1]->AddChemicalNumberToList(9);
00050         m_vpGnuPlotters[1]->AddChemicalNumberToList(11);
00051         m_vpGnuPlotters[1]->AddChemicalNumberToList(14);
00052         m_vpGnuPlotters[1]->AddChemicalNumberToList(16);
00053         m_vpGnuPlotters[1]->AddChemicalNumberToList(18);
00054         m_vpGnuPlotters[1]->AddChemicalNumberToList(20);
00055         m_vpGnuPlotters[1]->AddChemicalNumberToList(26);
00056         m_vpGnuPlotters[1]->AddChemicalNumberToList(28);
00057         // attach the observer
00058         m_vpRunnables[1]->Attach(m_vpGnuPlotters[1]);
00059         /*
00060         // 100 ng/ml EGF
00061         m_vpRxnNetworks.push_back(new SmallErkSubnetwork());
00062         m_vpRxnMovers.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00063         int nChemicals = m_vpRxnNetworks[0]->GetNumberOfChemicals();
00064         m_vpCellObservers.push_back(new CellAverageObserver(nChemicals,intTime,1));
00065         m_vpRunnables.push_back(new CRunnable());
00066         m_vpRunnables[0]->SetComponents(m_vpRxnNetworks[0],m_vpRxnMovers[0],m_vpCellObservers[0]);
00067         // create an observer for the runnable
00068         m_vpGnuPlotters.push_back(new GnuPlotterRunnableObserver());
00069         m_vpGnuPlotters[0]->AddChemicalNumberToList(14);
00070         m_vpGnuPlotters[0]->AddChemicalNumberToList(18);
00071         m_vpGnuPlotters[0]->AddChemicalNumberToList(20);
00072         // attach the observer
00073         m_vpRunnables[0]->Attach(m_vpGnuPlotters[0]);
00074         
00075         // 50 ng/ml NGF
00076         m_vpRxnNetworks.push_back(new SmallErkSubnetwork());
00077         m_vpRxnMovers.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00078         nChemicals = m_vpRxnNetworks[1]->GetNumberOfChemicals();
00079         m_vpCellObservers.push_back(new CellAverageObserver(nChemicals,intTime,1));
00080         m_vpRunnables.push_back(new CRunnable());
00081         m_vpRunnables[1]->SetComponents(m_vpRxnNetworks[1],m_vpRxnMovers[1],m_vpCellObservers[1]);
00082         // create an observer for the runnable
00083         m_vpGnuPlotters.push_back(new GnuPlotterRunnableObserver());
00084         m_vpGnuPlotters[1]->AddChemicalNumberToList(11);
00085         m_vpGnuPlotters[1]->AddChemicalNumberToList(18);
00086         m_vpGnuPlotters[1]->AddChemicalNumberToList(20);
00087         m_vpGnuPlotters[1]->AddChemicalNumberToList(28);
00088         // attach the observer
00089         m_vpRunnables[1]->Attach(m_vpGnuPlotters[1]);
00090 
00091         // 30 ng/ml EGF
00092         m_vpRxnNetworks.push_back(new SmallErkSubnetwork());
00093         m_vpRxnMovers.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00094         nChemicals = m_vpRxnNetworks[2]->GetNumberOfChemicals();
00095         m_vpCellObservers.push_back(new CellAverageObserver(nChemicals,intTime,1));
00096         m_vpRunnables.push_back(new CRunnable());
00097         m_vpRunnables[2]->SetComponents(m_vpRxnNetworks[2],m_vpRxnMovers[2],m_vpCellObservers[2]);
00098         // create an observer for the runnable
00099         m_vpGnuPlotters.push_back(new GnuPlotterRunnableObserver());
00100         m_vpGnuPlotters[2]->AddChemicalNumberToList(11);
00101         // attach the observer
00102         m_vpRunnables[2]->Attach(m_vpGnuPlotters[2]);
00103         
00104         // 100 ng/ml NGF
00105         m_vpRxnNetworks.push_back(new SmallErkSubnetwork());
00106         m_vpRxnMovers.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00107         nChemicals = m_vpRxnNetworks[3]->GetNumberOfChemicals();
00108         m_vpCellObservers.push_back(new CellAverageObserver(nChemicals,intTime,1));
00109         m_vpRunnables.push_back(new CRunnable());
00110         m_vpRunnables[3]->SetComponents(m_vpRxnNetworks[3],m_vpRxnMovers[3],m_vpCellObservers[3]);
00111         // create an observer for the runnable
00112         m_vpGnuPlotters.push_back(new GnuPlotterRunnableObserver());
00113         m_vpGnuPlotters[3]->AddChemicalNumberToList(14);
00114         m_vpGnuPlotters[3]->AddChemicalNumberToList(16);
00115         // attach the observer
00116         m_vpRunnables[3]->Attach(m_vpGnuPlotters[3]);
00117 
00118         // 100 ng/ml EGF + 50-fold HER overexpression
00119         m_vpRxnNetworks.push_back(new SmallErkSubnetwork());
00120         m_vpRxnMovers.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00121         nChemicals = m_vpRxnNetworks[4]->GetNumberOfChemicals();
00122         m_vpCellObservers.push_back(new CellAverageObserver(nChemicals,intTime,1));
00123         m_vpRunnables.push_back(new CRunnable());
00124         m_vpRunnables[4]->SetComponents(m_vpRxnNetworks[4],m_vpRxnMovers[4],m_vpCellObservers[4]);
00125         // create an observer for the runnable
00126         m_vpGnuPlotters.push_back(new GnuPlotterRunnableObserver());
00127         m_vpGnuPlotters[4]->AddChemicalNumberToList(18);
00128         m_vpGnuPlotters[4]->AddChemicalNumberToList(20);
00129         // attach the observer
00130         m_vpRunnables[4]->Attach(m_vpGnuPlotters[4]);
00131         */
00132         /*
00133         // 100 ng/ml EGF
00134         m_vpRxnNetworks.push_back(new SmallErkSubnetwork());
00135         m_vpRxnMovers.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00136         int nChemicals = m_vpRxnNetworks[0]->GetNumberOfChemicals();
00137         m_vpCellObservers.push_back(new CellAverageObserver(nChemicals,intTime,1));
00138         m_vpRunnables.push_back(new CRunnable());
00139         m_vpRunnables[0]->SetComponents(m_vpRxnNetworks[0],m_vpRxnMovers[0],m_vpCellObservers[0]);
00140         // create an observer for the runnable
00141         m_vpGnuPlotters.push_back(new GnuPlotterRunnableObserver());
00142         //m_vpGnuPlotters[0]->AddChemicalNumberToList(11);
00143         m_vpGnuPlotters[0]->AddChemicalNumberToList(20);
00144         // attach the observer
00145         m_vpRunnables[0]->Attach(m_vpGnuPlotters[0]);
00146 
00147         // 50 ng/ml NGF
00148         m_vpRxnNetworks.push_back(new SmallErkSubnetwork());
00149         m_vpRxnMovers.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00150         nChemicals = m_vpRxnNetworks[1]->GetNumberOfChemicals();
00151         m_vpCellObservers.push_back(new CellAverageObserver(nChemicals,intTime,1));
00152         m_vpRunnables.push_back(new CRunnable());
00153         m_vpRunnables[1]->SetComponents(m_vpRxnNetworks[1],m_vpRxnMovers[1],m_vpCellObservers[1]);
00154         // create an observer for the runnable
00155         m_vpGnuPlotters.push_back(new GnuPlotterRunnableObserver());
00156         //m_vpGnuPlotters[0]->AddChemicalNumberToList(11);
00157         m_vpGnuPlotters[1]->AddChemicalNumberToList(20);
00158         // attach the observer
00159         m_vpRunnables[1]->Attach(m_vpGnuPlotters[1]);
00160 
00161         // 100 ng/ml EGF + 10 uM LY
00162         m_vpRxnNetworks.push_back(new SmallErkSubnetwork());
00163         m_vpRxnMovers.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00164         nChemicals = m_vpRxnNetworks[2]->GetNumberOfChemicals();
00165         m_vpCellObservers.push_back(new CellAverageObserver(nChemicals,intTime,1));
00166         m_vpRunnables.push_back(new CRunnable());
00167         m_vpRunnables[2]->SetComponents(m_vpRxnNetworks[2],m_vpRxnMovers[2],m_vpCellObservers[2]);
00168         // create an observer for the runnable
00169         m_vpGnuPlotters.push_back(new GnuPlotterRunnableObserver());
00170         //m_vpGnuPlotters[0]->AddChemicalNumberToList(11);
00171         m_vpGnuPlotters[2]->AddChemicalNumberToList(20);
00172         m_vpGnuPlotters[2]->AddChemicalNumberToList(22);
00173         m_vpGnuPlotters[2]->AddChemicalNumberToList(24);
00174         // attach the observer
00175         m_vpRunnables[2]->Attach(m_vpGnuPlotters[2]);
00176 
00177         // 50 ng/ml NGF + DN Rap1
00178         m_vpRxnNetworks.push_back(new SmallErkSubnetwork());
00179         m_vpRxnMovers.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00180         nChemicals = m_vpRxnNetworks[3]->GetNumberOfChemicals();
00181         m_vpCellObservers.push_back(new CellAverageObserver(nChemicals,intTime,1));
00182         m_vpRunnables.push_back(new CRunnable());
00183         m_vpRunnables[3]->SetComponents(m_vpRxnNetworks[3],m_vpRxnMovers[3],m_vpCellObservers[3]);
00184         // create an observer for the runnable
00185         m_vpGnuPlotters.push_back(new GnuPlotterRunnableObserver());
00186         m_vpGnuPlotters[3]->AddChemicalNumberToList(20);
00187         // NEXT LINE FOR PI3K+ 
00188         m_vpGnuPlotters[3]->AddChemicalNumberToList(26);
00189         m_vpGnuPlotters[3]->AddChemicalNumberToList(28);
00190         // NEXT LINE FOR PI3K-
00191         //m_vpGnuPlotters[3]->AddChemicalNumberToList(24);
00192         // attach the observer
00193         m_vpRunnables[3]->Attach(m_vpGnuPlotters[3]);
00194 
00195         // 100 ng/ml EGF + 50-fold HER overexpression
00196         m_vpRxnNetworks.push_back(new SmallErkSubnetwork());
00197         m_vpRxnMovers.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00198         nChemicals = m_vpRxnNetworks[4]->GetNumberOfChemicals();
00199         m_vpCellObservers.push_back(new CellAverageObserver(nChemicals,intTime,1));
00200         m_vpRunnables.push_back(new CRunnable());
00201         m_vpRunnables[4]->SetComponents(m_vpRxnNetworks[4],m_vpRxnMovers[4],m_vpCellObservers[4]);
00202         // create an observer for the runnable
00203         m_vpGnuPlotters.push_back(new GnuPlotterRunnableObserver());
00204         //m_vpGnuPlotters[0]->AddChemicalNumberToList(11);
00205         m_vpGnuPlotters[4]->AddChemicalNumberToList(20);
00206         // attach the observer
00207         m_vpRunnables[4]->Attach(m_vpGnuPlotters[4]);
00208 
00209         // 50 ng/ml NGF + DN Ras
00210         m_vpRxnNetworks.push_back(new SmallErkSubnetwork());
00211         m_vpRxnMovers.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00212         nChemicals = m_vpRxnNetworks[5]->GetNumberOfChemicals();
00213         m_vpCellObservers.push_back(new CellAverageObserver(nChemicals,intTime,1));
00214         m_vpRunnables.push_back(new CRunnable());
00215         m_vpRunnables[5]->SetComponents(m_vpRxnNetworks[5],m_vpRxnMovers[5],m_vpCellObservers[5]);
00216         // create an observer for the runnable
00217         m_vpGnuPlotters.push_back(new GnuPlotterRunnableObserver());
00218         m_vpGnuPlotters[5]->AddChemicalNumberToList(7);
00219         m_vpGnuPlotters[5]->AddChemicalNumberToList(11);
00220         m_vpGnuPlotters[5]->AddChemicalNumberToList(20);
00221         // attach the observer
00222         m_vpRunnables[5]->Attach(m_vpGnuPlotters[5]);
00223         */
00224         // define runs
00225         DefineRuns();
00226 
00227 }
00228 
00229 CPC12EGFNGFRunDirector::~CPC12EGFNGFRunDirector()
00230 {
00231 
00232 }
00233 
00234 void CPC12EGFNGFRunDirector::DefineRuns()
00235 {
00236         // set parameters in the runnables to those read from a previous
00237         // optimization pass; assumes all runnables have same number of 
00238         // rate constants
00239         ParameterReader *pReader = new ParameterReader("min5_wFinal.par");
00240         int nRC = m_vpRunnables[0]->GetReactionNetwork()->GetNumberOfRateConstants();
00241         for(int j = 0; j < nRC; j++)
00242         {
00243                 double rate = pReader->ReadParameter();
00244                 for(int i = 0; i < m_vpRunnables.size(); i++)
00245                 {
00246                         m_vpRunnables[i]->GetReactionNetwork()->GetRateConstant(j)->SetRateConstant(rate);
00247                 }
00248         }
00249         delete pReader;
00250 
00251         // EGF, 100 ng/ml
00252         m_vpRunnables[0]->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(10002000.0);
00253         m_vpRunnables[0]->GetReactionNetwork()->GetChemical(0)->Reset();
00254         m_vpGnuPlotters[0]->SetTitle("100 ng/ml EGF");
00255 
00256         // NGF, 50 ng/ml
00257         m_vpRunnables[1]->GetReactionNetwork()->GetChemical(1)->SetInitialAmount(228000.0);
00258         m_vpRunnables[1]->GetReactionNetwork()->GetChemical(1)->Reset();
00259         m_vpGnuPlotters[1]->SetTitle("50 ng/ml NGF");
00260 
00261         /*
00262         // specific to this simulation
00263         // EGF, 100 ng/ml
00264         m_vpRunnables[0]->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(10002000.0);
00265         m_vpRunnables[0]->GetReactionNetwork()->GetChemical(0)->Reset();
00266         m_vpGnuPlotters[0]->SetTitle("100 ng/ml EGF");
00267 
00268         // NGF, 50 ng/ml
00269         m_vpRunnables[1]->GetReactionNetwork()->GetChemical(1)->SetInitialAmount(228000.0);
00270         m_vpRunnables[1]->GetReactionNetwork()->GetChemical(1)->Reset();
00271         m_vpGnuPlotters[1]->SetTitle("50 ng/ml NGF");
00272         
00273         // EGF, 30 ng/ml
00274         m_vpRunnables[2]->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(0.3*10002000.0);
00275         m_vpRunnables[2]->GetReactionNetwork()->GetChemical(0)->Reset();
00276         m_vpGnuPlotters[2]->SetTitle("30 ng/ml EGF");
00277         
00278         // NGF, 100 ng/ml
00279         m_vpRunnables[3]->GetReactionNetwork()->GetChemical(1)->SetInitialAmount(2*228000.0);
00280         m_vpRunnables[3]->GetReactionNetwork()->GetChemical(1)->Reset();
00281         m_vpGnuPlotters[3]->SetTitle("50 ng/ml NGF");
00282         
00283         // 100 ng/ml EGF + 50-fold EGFR Overexpression
00284         m_vpRunnables[4]->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(10002000.0);
00285         m_vpRunnables[4]->GetReactionNetwork()->GetChemical(0)->Reset();
00286         m_vpRunnables[4]->GetReactionNetwork()->GetChemical(2)->SetInitialAmount(50*80000.0);
00287         m_vpRunnables[4]->GetReactionNetwork()->GetChemical(2)->Reset();
00288         m_vpGnuPlotters[4]->SetTitle("100 ng/ml EGF + 50-Fold EGFR Overexpression");
00289         */
00290         /*
00291         // EGF, 100 ng/ml
00292         m_vpRunnables[0]->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(10002000.0);
00293         m_vpRunnables[0]->GetReactionNetwork()->GetChemical(0)->Reset();
00294         m_vpGnuPlotters[0]->SetTitle("100 ng/ml EGF");
00295 
00296         // NGF, 50 ng/ml
00297         m_vpRunnables[1]->GetReactionNetwork()->GetChemical(1)->SetInitialAmount(228000.0);
00298         m_vpRunnables[1]->GetReactionNetwork()->GetChemical(1)->Reset();
00299         m_vpGnuPlotters[1]->SetTitle("50 ng/ml NGF");
00300 
00301         // EGF, 100 ng/ml + LY
00302         // PI3K can't be activated
00303         // Next two lines for PI3K+ 
00304         m_vpRunnables[2]->GetReactionNetwork()->RemoveReaction(17);
00305         m_vpRunnables[2]->GetReactionNetwork()->RemoveReaction(18);
00306         m_vpRunnables[2]->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(10002000.0);
00307         m_vpRunnables[2]->GetReactionNetwork()->GetChemical(0)->Reset();
00308         m_vpGnuPlotters[2]->SetTitle("100 ng/ml EGF + LY");
00309 
00310         // NGF, 50 ng/ml + DN Rap1
00311         // Next two lines for PI3K+ 
00312         m_vpRunnables[3]->GetReactionNetwork()->RemoveReaction(22);
00313         m_vpRunnables[3]->GetReactionNetwork()->GetChemical(1)->SetInitialAmount(228000.0);
00314         m_vpRunnables[3]->GetReactionNetwork()->GetChemical(1)->Reset();
00315         m_vpGnuPlotters[3]->SetTitle("50 ng/ml NGF + DN Rap1");
00316 
00317         // 100 ng/ml EGF + 50-fold EGFR Overexpression
00318         m_vpRunnables[4]->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(10002000.0);
00319         m_vpRunnables[4]->GetReactionNetwork()->GetChemical(0)->Reset();
00320         m_vpRunnables[4]->GetReactionNetwork()->GetChemical(2)->SetInitialAmount(50*80000.0);
00321         m_vpRunnables[4]->GetReactionNetwork()->GetChemical(2)->Reset();
00322         m_vpGnuPlotters[4]->SetTitle("100 ng/ml EGF + 50-Fold EGFR Overexpression");
00323 
00324         // NGF, 50 ng/ml + DN Ras
00325         // Next two lines for PI3K+
00326         m_vpRunnables[5]->GetReactionNetwork()->RemoveReaction(7);
00327         m_vpRunnables[5]->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(0.0);
00328         m_vpRunnables[5]->GetReactionNetwork()->GetChemical(0)->Reset();
00329         m_vpRunnables[5]->GetReactionNetwork()->GetChemical(1)->SetInitialAmount(228000.0);
00330         m_vpRunnables[5]->GetReactionNetwork()->GetChemical(1)->Reset();
00331         m_vpGnuPlotters[5]->SetTitle("50 ng/ml NGF + DN Ras");
00332         */
00333 }

Generated on Mon Nov 3 09:38:07 2003 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002