EcoliSimulator  2.0.1a
CV_rExp_tExp Class Reference

Celani Vergassola Kernel Model Class for a bacterium: More...

#include <CV_rExp_tExp.h>

Inheritance diagram for CV_rExp_tExp:
ParameterEstimation_E_coli E_coli CV_rIG_tExp ParameterEstimation_CV_rExp_tExp CV_rExpIG_tExp ParameterEstimation_CV_rIG_tExp

Public Member Functions

 CV_rExp_tExp ()
 
 CV_rExp_tExp (const CV_rExp_tExp &modello)
 
void change_par (int change)
 
void change_lambda_par ()
 
virtual double f_lambda ()
 
void stationary_dyn (double dt, std::vector< double > &m0, int changed_pos)
 
int agg_dyn (double dt, double t)
 
void agg_dyint (double dt, double t)
 
void save_dyn (std::ofstream &file_, double t)
 
void gnuplot_single (std::string *names_files_Ecoli_mod, std::string &names_indice_mod, std::string *names_files_tau_mod, std::string &names_file_dyn_mod, std::string *names_info_mod, double T_f, Funz_C *f, int save_, int con_gen_sim)
 
int saveIntDyn (std::string nameFile)
 
void reset_par ()
 
void print_info (std::ofstream &file_save)
 
void debugFunction ()
 
- Public Member Functions inherited from ParameterEstimation_E_coli
 ParameterEstimation_E_coli ()
 
 ParameterEstimation_E_coli (const E_coli &modello)
 
void s_F_lambda_r (vector< Q_tau_stat > vector_lambda, int n_vect)
 
void set_GoodnessFit (int Good, double D_n, double cumD_n)
 
- Public Member Functions inherited from E_coli
 E_coli ()
 
 E_coli (const E_coli &modello)
 
int initial_position_ec (int j, std::array< double, 2 > x0, double Raggio, int num_dist, int &cont_dist_5, int delta_dist_cont, double Delta_delta_dist)
 
int dist_iniz_ec (std::array< double, 2 > x0, double R, unsigned int num_dist)
 
std::array< double, 2 > X ()
 
double V ()
 
int N_dyn_var ()
 
double C ()
 
double C_iniziale ()
 
double Production_rate ()
 
void setProductionRate (double _prodRate)
 
void Tau_t (double tt_)
 
void Get_tipo_response_c (int T_r)
 
void Get_RC_0 (double Rc0)
 
void Get_RC_1 (double Rc1)
 
void Get_RC_q (int Rcq)
 
int F_tipo_response_c ()
 
double F_RC_0 ()
 
double F_RC_1 ()
 
double F_RC_q ()
 
void set_response (int ftipo_response_c, double fRC_0, double fRC_1, int fRC_q)
 
void agg_ligand (double t, Funz_C *f)
 
void aggiornamento (double dt, double t, Funz_C *f, int &sign_p, ofstream *file_tau, std::ofstream &file_theta)
 
void start_simulation (Funz_C *f)
 
void response_function ()
 
void save_E_coli (ofstream *file, double t)
 
void save_E_coli_initial (std::ofstream *file_, double t)
 
void save_run (double t, ofstream &file_salto, double dt)
 
void save_tumble (double t, ofstream &file_tumble, double dt)
 
void save_theta (double t, double theta, std::ofstream &file_run)
 
virtual void produce (Funz_C *f_i, double dt)
 
virtual double reset_barrier ()
 
virtual double reset_barrier_t ()
 
virtual void save_dyn (ofstream &file, double t)
 
virtual void gnuplot_single_film (std::string *names_files_Ecoli_mod, std::string &names_indice_mod, std::string *names_files_tau_mod, std::string &names_file_dyn_mod, std::string *names_info_mod, double T_f, Funz_C *f, int cont_sim)
 
virtual void gnuplot_single_film_gif (std::string *names_files_Ecoli_mod, std::string &names_indice_mod, std::string *names_files_tau_mod, std::string &names_file_dyn_mod, std::string *names_info_mod, double T_f, Funz_C *f, int cont_sim)
 produce the .gif film More...
 
virtual void gnuplotFunzInternalDynalmic (std::string buffer, int save_, int con_gen_sim)
 
virtual void gnuplot_response (std::string names_info_mod, int save_, int con_gen_sim)
 
virtual void s_F_lambda_r (std::vector< Q_tau_stat > vector_lambda, int n_vect)
 
void statF_lambda_r (s_lambda &vector_lambda)
 

Protected Member Functions

int writeScriptgnuplotSingle (std::string tipo, std::string *names_files_Ecoli_mod, std::string *names_files_tau_mod, std::string *names_info_mod, std::string &names_file_dyn_mod, double T_f, int con_gen_sim, int save_)
 
- Protected Member Functions inherited from E_coli
void setSeed_ec (unsigned int *seed_thread)
 
virtual int writeScriptLunchgnuplotSingle (std::string tipo, int save_, int con_gen_sim)
 
double Exp_dist_ec ()
 
double rand_normal_ec (double stddev)
 
double gamma_par_double_ec ()
 
double unifRand_ec ()
 
double deltaW_ec (double dt)
 
double newtheta_ec (double theta)
 
void setEngine_ec (std::mt19937_64 *engine_thread_theta, std::mt19937_64 *engine_thread_bar, std::mt19937_64 *engine_thread_altro)
 

Protected Attributes

double nu_
 
double beta_2
 
double beta_3
 
int tipo_lambda
 
double A_0
 
double A_1
 
double A_2
 
double A_3
 
double Q
 
vector< double > m
 
- Protected Attributes inherited from ParameterEstimation_E_coli
double s_lambda_t
 
int GoodFit
 
double KS_D_n
 
double KS_L1
 
string distribution_I_r
 
double I_tau_r [2]
 
string distribution_I_t
 
double I_tau_t [2]
 
- Protected Attributes inherited from E_coli
double production_rate
 
double v
 
std::array< double, 2 > x
 
double theta
 
double c
 
double D_theta
 
double lambda_r
 
double lambda_t
 
double tau_r
 
double tau_t
 
int n_dyn_var
 
double barriera_r
 
double barriera_t
 
int salto_
 
double t_t
 
double t_r
 
int sign_c
 
int up_down
 
double c_iniziale
 
int tipo_response_c
 
double RC_0
 
double RC_1
 
int RC_q
 
int tipoNewTheta
 
unsigned int * seed_ecoli
 pointer to a seed More...
 

Additional Inherited Members

- Public Attributes inherited from E_coli
std::mt19937_64 * engine_theta
 pointer to a engine (if I want to use std::uniform_real_distribution<double>) More...
 
std::mt19937_64 * engine_barrier
 
std::mt19937_64 * engine_altro
 
int simulation
 
std::string Tipo_batterio
 
int codice_batterio
 
s_lambda s_lambda_r
 

Detailed Description

Celani Vergassola Kernel Model Class for a bacterium:

Class implementing Celani Vergassola Kernel Model with exponential run and exponential tumble in the steady state

Constructor & Destructor Documentation

CV_rExp_tExp::CV_rExp_tExp ( )
CV_rExp_tExp::CV_rExp_tExp ( const CV_rExp_tExp modello)

Member Function Documentation

void CV_rExp_tExp::agg_dyint ( double  dt,
double  t 
)
virtual

update internal dynamic

Reimplemented from E_coli.

int CV_rExp_tExp::agg_dyn ( double  dt,
double  t 
)
virtual

update dynamic to control run/tumble
It controll the hitting time $\tau_{n+1}$ of the inernal variable lambda_[...] Heuristically we have:

  • if the distribution is exponential we have
    • $\int_{\tau_{n}}^{\tau_{n+1}}\Lambda^*(s)ds\sim Exp(1)$
  • if the distribution is IG we have
    • $\tau_{n+1}=\inf\{s>\tau_n:\Lambda(s)ds\geq const\}$
  • if the distribution is Exp_IG we have
    • $\tau_{n+1}=\inf\{s>\tau_n:\Lambda(s)ds\geq Exp(1)\}$

Where in general we can write: $d\Lambda(s)=\lambda(s)dt+\sigma(s)dW(t)$.
note $\sigma(s)=0$ in the first case above.

Reimplemented from E_coli.

Reimplemented in CV_rIG_tExp.

void CV_rExp_tExp::change_lambda_par ( )
void CV_rExp_tExp::change_par ( int  change)
virtual

set parameters model

Reimplemented from E_coli.

Reimplemented in CV_rIG_tExp.

void CV_rExp_tExp::debugFunction ( )
virtual

Reimplemented from E_coli.

Reimplemented in CV_rIG_tExp.

double CV_rExp_tExp::f_lambda ( )
virtual

probability mean rate to tumble
It uses the parameter Q

Returns
return the value $\lambda(Q)$

Reimplemented in ParameterEstimation_CV_rIG_tExp, and ParameterEstimation_CV_rExp_tExp.

void CV_rExp_tExp::gnuplot_single ( std::string *  names_files_Ecoli_mod,
std::string &  names_indice_mod,
std::string *  names_files_tau_mod,
std::string &  names_file_dyn_mod,
std::string *  names_info_mod,
double  T_f,
Funz_C f,
int  save_,
int  con_gen_sim 
)
virtual

plot via gnuplot trajectory and data for single tracking

Reimplemented from E_coli.

void CV_rExp_tExp::print_info ( std::ofstream &  file_save)
virtual

print info for LateX report

Reimplemented from E_coli.

Reimplemented in ParameterEstimation_CV_rExp_tExp, CV_rIG_tExp, and CV_rExpIG_tExp.

void CV_rExp_tExp::reset_par ( )
virtual

reset defolt parametes model

Reimplemented from E_coli.

Reimplemented in CV_rIG_tExp, and CV_rExpIG_tExp.

void CV_rExp_tExp::save_dyn ( std::ofstream &  file_,
double  t 
)
int CV_rExp_tExp::saveIntDyn ( std::string  nameFile)
virtual

Reimplemented from E_coli.

Reimplemented in CV_rIG_tExp.

void CV_rExp_tExp::stationary_dyn ( double  dt,
std::vector< double > &  m0,
int  changed_pos 
)
virtual

calculate stationary dynamics for the initial condition

Parameters
m0are the initial condition for the internal variables: if changed_pos says that the initial condition are not changed, for example if the initial distribution for the population is a delta dirac, then we just use the old values, and do not recalculate them

Reimplemented from E_coli.

int CV_rExp_tExp::writeScriptgnuplotSingle ( std::string  tipo,
std::string *  names_files_Ecoli_mod,
std::string *  names_files_tau_mod,
std::string *  names_info_mod,
std::string &  names_file_dyn_mod,
double  T_f,
int  con_gen_sim,
int  save_ 
)
protectedvirtual

write the script for the gnuplot of single bacterium

Reimplemented from E_coli.

Member Data Documentation

double CV_rExp_tExp::A_0
protected

One of the parameter for the function lambda:

  • in tipo_lambda=2; -A_0; // estremo destro
double CV_rExp_tExp::A_1
protected

One of the parameter for the function lambda:

  • tipo_lambda=2;
    • A_1 // estremo sinistro (<0)
double CV_rExp_tExp::A_2
protected

One of the parameter for the function lambda:

  • tipo_lambda=2;
    • A_2 // moltiplicatore "Q>a1"
double CV_rExp_tExp::A_3
protected

One of the parameter for the function lambda:

  • tipo_lambda=2;
    • A_3 // moltiplicatore "Q<-a0"
double CV_rExp_tExp::beta_2
protected

parameter in the Celani Vergassola Model:

  • m[2]=m[2]+dt*(2*m[1]-nu_*m[2]);
  • m[1]=m[1]+dt*(m[0]-nu_*m[1]);
  • m[0]=m[0]+dt*(c-nu_*m[0]);
  • Q=pow(nu_,2)*beta_2*m[1]+pow(nu_,3)*beta_3*m[2];

    \begin{equation} \frac{d}{dt}m_{k}=-\nu\cdot m_{k} + \delta^{k}_{0} c + (1-\delta^{k}_{0})k\cdot m_{k-1}, \end{equation}

    \begin{equation} \mathcal{Q}(t)=\sum_{k=1}^{k_{N}}\beta_{k}\nu^{k+1}m_{k}(t) \end{equation}

double CV_rExp_tExp::beta_3
protected

parameter in the Celani Vergassola Model:

  • m[2]=m[2]+dt*(2*m[1]-nu_*m[2]);
  • m[1]=m[1]+dt*(m[0]-nu_*m[1]);
  • m[0]=m[0]+dt*(c-nu_*m[0]);
  • Q=pow(nu_,2)*beta_2*m[1]+pow(nu_,3)*beta_3*m[2];

    \begin{equation} \frac{d}{dt}m_{k}=-\nu\cdot m_{k} + \delta^{k}_{0} c + (1-\delta^{k}_{0})k\cdot m_{k-1}, \end{equation}

    \begin{equation} \mathcal{Q}(t)=\sum_{k=1}^{k_{N}}\beta_{k}\nu^{k+1}m_{k}(t) \end{equation}

vector<double> CV_rExp_tExp::m
protected

vector of the internal dynamic variables: they satisfy

\begin{equation} \frac{d}{dt}m_{k}=-\nu\cdot m_{k} + f_{k}, \end{equation}

featuring a relaxation term and a forcing term $f_{k} = k\cdot m_{k-1}$ for $k\geq1$ and $f_{0}= c$ for $k=0$.

double CV_rExp_tExp::nu_
protected

parameter in the Celani Vergassola Model:

  • m[2]=m[2]+dt*(2*m[1]-nu_*m[2]);
  • m[1]=m[1]+dt*(m[0]-nu_*m[1]);
  • m[0]=m[0]+dt*(c-nu_*m[0]);
  • Q=pow(nu_,2)*beta_2*m[1]+pow(nu_,3)*beta_3*m[2];

    \begin{equation} \frac{d}{dt}m_{k}=-\nu\cdot m_{k} + \delta^{k}_{0} c + (1-\delta^{k}_{0})k\cdot m_{k-1}, \end{equation}

    \begin{equation} \mathcal{Q}(t)=\sum_{k=1}^{k_{N}}\beta_{k}\nu^{k+1}m_{k}(t) \end{equation}

double CV_rExp_tExp::Q
protected

Memory term in celani vergassola Q=pow(nu_,2)*beta_2*m[1]+pow(nu_,3)*beta_3*m[2];

\begin{equation} \mathcal{Q}(t)=\sum_{k=1}^{k_{N}}\beta_{k}\nu^{k+1}m_{k}(t) \end{equation}

int CV_rExp_tExp::tipo_lambda
protected

type of function: if you want to add new function change the function f_lambda() accordingly


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