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

PC12RapMinusMinimizableDirector.cpp

Go to the documentation of this file.
00001 #include "PC12RapMinusMinimizableDirector.h"
00002 
00003 CPC12RapMinusMinimizableDirector::CPC12RapMinusMinimizableDirector(void)
00004 {
00005         // create networks,experiments,observers,movers,minimizables
00006         double maxSimTime = 91.0;
00007         double stepSize = 0.0001;
00008         double frequency = 1.0;
00009         int nCells = 1;
00010         double moveTol = 1.0e-06;
00011 
00012         m_dGammaSquared = 0.0;
00013         
00014         // flags for all minimizables
00015         bool rateFlag = true;
00016         bool chemFlag = false;
00017         bool logsFlag = false;
00018         double timeWeight = 1.0;
00019         double rateWeight = 0.0;
00020         double chemWeight = 0.0;
00021         
00022         int cnt = 0;
00023 
00024         // expt. 1 - EGF at 100 ng/ml, Traverse 1994 data
00025         // networks and data
00026         _networkList.push_back(new CPC12RapMinusNetwork());
00027         _experimentList.push_back(new Experiment(_networkList[cnt],"EGF Stimulation 100 ng/ml - Traverse 1994"));
00028         // put data files here
00029         _experimentList[cnt]->AddDataFileToList("../DataFiles/TimeSeries/ErkMekTraverse2EGF.dat");
00030         _experimentList[cnt]->AddDataFileToList("../DataFiles/TimeSeries/Raf1LandrethEGF.dat");
00031         // mover and plotter
00032         _moverList.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00033         // minimizable
00034         _minimizableList.push_back(new SingleNetworkMinimizable());
00035         // parameters
00036         _minimizableList[cnt]->Initialize(_experimentList[cnt],_moverList[cnt],nCells,rateFlag,chemFlag,logsFlag,timeWeight,rateWeight,chemWeight);
00037         _minimizableList[cnt]->SetRateConstantsWeight(0.0);
00038         // attach observer
00039         _plotterList.push_back(new GnuPlotterTimeSeriesObserver());
00040         _plotterList[cnt]->SetTitle("Rap1 Minus Network:EGF Stimulation (100 ng/ml, T 1994):ODE");
00041         _minimizableList[cnt]->Attach(_plotterList[cnt]);
00042         cnt++;
00043 
00044         // expt. 2 - EGF at 100 ng/ml, Yao 1995 data
00045         // networks and data
00046         _networkList.push_back(new CPC12RapMinusNetwork());
00047         _experimentList.push_back(new Experiment(_networkList[cnt],"EGF Stimulation 100 ng/ml - Yao 1995"));
00048         // put data files here
00049         _experimentList[cnt]->AddDataFileToList("../DataFiles/TimeSeries/Erk1HYaoEGF.dat");
00050         // mover and plotter
00051         _moverList.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00052         // minimizable
00053         _minimizableList.push_back(new SingleNetworkMinimizable());
00054         // parameters
00055         _minimizableList[cnt]->Initialize(_experimentList[cnt],_moverList[cnt],nCells,rateFlag,chemFlag,logsFlag,timeWeight,rateWeight,chemWeight);
00056         _minimizableList[cnt]->SetRateConstantsWeight(0.0);
00057         // attach observer
00058         _plotterList.push_back(new GnuPlotterTimeSeriesObserver());
00059         _plotterList[cnt]->SetTitle("Rap1 Minus Network:EGF Stimulation (100 ng/ml, Y 1995):ODE");
00060         _minimizableList[cnt]->Attach(_plotterList[cnt]);
00061         cnt++;
00062 
00063         // expt. 3 - NGF at 50 ng/ml, Traverse 1994 data
00064         // networks and data
00065         _networkList.push_back(new CPC12RapMinusNetwork());
00066         _experimentList.push_back(new Experiment(_networkList[cnt],"NGF Stimulation 50 ng/ml - T 1994"));
00067         // data
00068         _experimentList[cnt]->AddDataFileToList("../DataFiles/TimeSeries/ErkMekTraverse2NGF.dat");
00069         _experimentList[cnt]->AddDataFileToList("../DataFiles/TimeSeries/RasGreen1NGF.dat");
00070         // mover and plotter
00071         _moverList.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00072         // minimizable
00073         _minimizableList.push_back(new SingleNetworkMinimizable());
00074         // parameters
00075         _minimizableList[cnt]->Initialize(_experimentList[cnt],_moverList[cnt],nCells,rateFlag,chemFlag,logsFlag,timeWeight,rateWeight,chemWeight);
00076         // one scaling factor is fixed
00077         _minimizableList[cnt]->GetConversionFactor(11)->SetFactorFixed(true);
00078         _minimizableList[cnt]->GetConversionFactor(11)->SetFactorValue(1.0/(0.2*600000*0.1));
00079         _minimizableList[cnt]->SetRateConstantsWeight(0.0);
00080         // attach observer
00081         _plotterList.push_back(new GnuPlotterTimeSeriesObserver());
00082         _plotterList[cnt]->SetTitle("Rap1 Minus Network:NGF Stimulation (50 ng/ml, T 1994):ODE");
00083         _minimizableList[cnt]->Attach(_plotterList[cnt]);
00084         cnt++;
00085         
00086         // expt. 4 - NGF at 50 ng/ml, Yao 1995 data
00087         // networks and data
00088         _networkList.push_back(new CPC12RapMinusNetwork());
00089         _experimentList.push_back(new Experiment(_networkList[cnt],"NGF Stimulation 50 ng/ml - Yao 1995"));
00090         // data
00091         _experimentList[cnt]->AddDataFileToList("../DataFiles/TimeSeries/Erk1HYaoNGF.dat");
00092         _moverList.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00093         // minimizable
00094         _minimizableList.push_back(new SingleNetworkMinimizable());
00095         // parameters
00096         _minimizableList[cnt]->Initialize(_experimentList[cnt],_moverList[cnt],nCells,rateFlag,chemFlag,logsFlag,timeWeight,rateWeight,chemWeight);
00097         _minimizableList[cnt]->SetRateConstantsWeight(0.0);
00098         // attach observer
00099         _plotterList.push_back(new GnuPlotterTimeSeriesObserver());
00100         _plotterList[cnt]->SetTitle("Rap1 Minus Network:NGF Stimulation (50 ng/ml, Y 1995):ODE");
00101         _minimizableList[cnt]->Attach(_plotterList[3]);
00102         cnt++;
00103 
00104         // expt. 3 - EGF at 30 ng/ml
00105         // networks and data
00106         _networkList.push_back(new CPC12RapMinusNetwork());
00107         _experimentList.push_back(new Experiment(_networkList[cnt],"EGF Stimulation 30 ng/ml"));
00108         // put data files here
00109         _experimentList[cnt]->AddDataFileToList("../DataFiles/TimeSeries/RasGreen1EGF.dat");
00110         // mover and plotter
00111         _moverList.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00112         // minimizable
00113         _minimizableList.push_back(new SingleNetworkMinimizable());
00114         // parameters
00115         _minimizableList[cnt]->Initialize(_experimentList[cnt],_moverList[cnt],nCells,rateFlag,chemFlag,logsFlag,timeWeight,rateWeight,chemWeight);
00116         _minimizableList[cnt]->GetConversionFactor(11)->SetFactorFixed(true);
00117         _minimizableList[cnt]->GetConversionFactor(11)->SetFactorValue(1.0/(0.2*600000*0.1));
00118         _minimizableList[cnt]->SetRateConstantsWeight(0.0);
00119         // attach observer
00120         _plotterList.push_back(new GnuPlotterTimeSeriesObserver());
00121         _plotterList[cnt]->SetTitle("Rap1 Minus Network:EGF Stimulation (30 ng/ml):ODE");
00122         _minimizableList[cnt]->Attach(_plotterList[cnt]);
00123         cnt++;
00124         
00125         
00126         // expt. 4 - NGF at 100 ng/ml
00127         // networks and data
00128         _networkList.push_back(new CPC12RapMinusNetwork());
00129         _experimentList.push_back(new Experiment(_networkList[cnt],"NGF Stimulation 100 ng/ml"));
00130         // data
00131         _experimentList[cnt]->AddDataFileToList("../DataFiles/TimeSeries/Raf1LandrethNGF.dat");
00132         // mover and plotter
00133         _moverList.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00134         // minimizable
00135         _minimizableList.push_back(new SingleNetworkMinimizable());
00136         // parameters
00137         _minimizableList[cnt]->Initialize(_experimentList[cnt],_moverList[cnt],nCells,rateFlag,chemFlag,logsFlag,timeWeight,rateWeight,chemWeight);
00138         _minimizableList[cnt]->SetRateConstantsWeight(0.0);
00139         // attach observer
00140         _plotterList.push_back(new GnuPlotterTimeSeriesObserver());
00141         _plotterList[cnt]->SetTitle("Rap1 Minus Network:NGF Stimulation (100 ng/ml):ODE");
00142         _minimizableList[cnt]->Attach(_plotterList[cnt]);
00143         cnt++;
00144         
00145         // expt. 5 - EGF at 100 ng/ml + 50-fold overexpression of HER
00146         // networks and data
00147         _networkList.push_back(new CPC12RapMinusNetwork());
00148         _experimentList.push_back(new Experiment(_networkList[cnt],"EGF at 100 ng/ml, 50-fold HER Overexpression"));
00149         // data
00150         _experimentList[cnt]->AddDataFileToList("../DataFiles/TimeSeries/ErkMekTraverseHERover.dat");
00151         _moverList.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00152         // minimizable
00153         _minimizableList.push_back(new SingleNetworkMinimizable());
00154         // parameters
00155         _minimizableList[cnt]->Initialize(_experimentList[cnt],_moverList[cnt],nCells,rateFlag,chemFlag,logsFlag,timeWeight,rateWeight,chemWeight);
00156         _minimizableList[cnt]->SetRateConstantsWeight(0.0);
00157         // attach observer
00158         _plotterList.push_back(new GnuPlotterTimeSeriesObserver());
00159         _plotterList[cnt]->SetTitle("Rap1 Minus Network:NGF Stimulation (100 ng/ml):ODE");
00160         _minimizableList[cnt]->Attach(_plotterList[cnt]);
00161         cnt++;
00162         
00163 
00164         // allocate the master residuals list
00165         int masterResidualsSize = 0;
00166         for(int i = 0; i < _minimizableList.size(); i++)
00167         {
00168                 int subRes = _minimizableList[i]->GetNResiduals();
00169                 masterResidualsSize += subRes;
00170                 cout << subRes << " residuals in minimizable " << i << endl;
00171         }
00172         if(m_dGammaSquared > 0.0)
00173         {
00174                 masterResidualsSize += 1;
00175         }
00176         Allocate(masterResidualsSize);
00177 
00178         cout << "Master Residuals size : " << masterResidualsSize << endl;
00179 
00180         // define the experiments
00181         DefineExperiments();
00182 
00183         // dump info about residuals
00184         //DumpResidualInfo();
00185 }
00186 
00187 CPC12RapMinusMinimizableDirector::~CPC12RapMinusMinimizableDirector(void)
00188 {
00189         for(int i = 0; i < _minimizableList.size(); i++)
00190         {
00191                 if(_plotterList.size() > i)
00192                 {
00193                         _minimizableList[i]->Detach(_plotterList[i]);
00194                 }
00195         }
00196         for(i = 0; i < _plotterList.size(); i++)
00197         {
00198                 delete _plotterList[i];
00199         }
00200 }
00201 
00202 void CPC12RapMinusMinimizableDirector::DefineExperiments()
00203 {
00204         // 100 ng/ml EGF, 0 NGF
00205         _minimizableList[0]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(10002000.0);
00206         _minimizableList[0]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->Reset();
00207         _minimizableList[0]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->SetInitialAmount(0.0);
00208         _minimizableList[0]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->Reset();    
00209         
00210         // 100 ng/ml EGF, 0 NGF
00211         _minimizableList[1]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(10002000.0);
00212         _minimizableList[1]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->Reset();
00213         _minimizableList[1]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->SetInitialAmount(0.0);
00214         _minimizableList[1]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->Reset();    
00215 
00216         // 0 EGF, 50 ng/ml NGF
00217         _minimizableList[2]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(0.0);
00218         _minimizableList[2]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->Reset();
00219         _minimizableList[2]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->SetInitialAmount(228000.0);
00220         _minimizableList[2]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->Reset();    
00221         
00222         // 0 EGF, 50 ng/ml NGF
00223         _minimizableList[3]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(0.0);
00224         _minimizableList[3]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->Reset();
00225         _minimizableList[3]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->SetInitialAmount(228000.0);
00226         _minimizableList[3]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->Reset();    
00227 
00228         // 30 ng/ml EGF, 0 NGF
00229         _minimizableList[4]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(3000600);
00230         _minimizableList[4]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->Reset();
00231         _minimizableList[4]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->SetInitialAmount(0.0);
00232         _minimizableList[4]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->Reset();    
00233         
00234         // 0 EGF, 100 ng/ml NGF
00235         _minimizableList[5]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(0.0);
00236         _minimizableList[5]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->Reset();
00237         _minimizableList[5]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->SetInitialAmount(456000.0);
00238         _minimizableList[5]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->Reset();
00239         
00240         // 100 ng/ml EGF, 0 ng/ml NGF, 50-fold HER overexpression
00241         _minimizableList[6]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(10002000.0);
00242         _minimizableList[6]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->Reset();
00243         _minimizableList[6]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->SetInitialAmount(0.0);
00244         _minimizableList[6]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->Reset();    
00245         double EGFR = _minimizableList[6]->GetExperiment()->GetReactionNetwork()->GetChemical(2)->GetInitialAmount();
00246         _minimizableList[6]->GetExperiment()->GetReactionNetwork()->GetChemical(2)->SetInitialAmount(50*EGFR);
00247         _minimizableList[6]->GetExperiment()->GetReactionNetwork()->GetChemical(2)->Reset();
00248         
00249         
00250 }
00251 
00252 double CPC12RapMinusMinimizableDirector::GetParameter(int parIndex)
00253 {
00254         // for this director, everyone has the same parameters so any set 
00255         // can be returned
00256         return _minimizableList[0]->GetParameter(parIndex);
00257 }
00258 
00259 int CPC12RapMinusMinimizableDirector::GetNParameters()
00260 {
00261         // ditto as for GetParameters()
00262         return _minimizableList[0]->GetNParameters();
00263 }

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