-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathComputeLengthDynamic7.h
More file actions
40 lines (37 loc) · 2.15 KB
/
Copy pathComputeLengthDynamic7.h
File metadata and controls
40 lines (37 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef DEF_COMPUTE_LENGTH_DYNAMIC
#define DEF_COMPUTE_LENGTH_DYNAMIC
#include <iostream>
#include <fstream>
#include <sstream>
#include <cstdlib>
#include <chrono>
#include <iomanip>
#include <string>
#include <random>
#include <cmath>
//#include "pcg_random.hpp"
#include <gsl/gsl_rng.h>
#include <vector>
#include "Filament4.h"
/*
* C++ function that compute the length dynamic of a microtubule linear model in which the subunits can be in three different state (GTP, GTPX, GDP) with molecular motors
* by using an adapted version of the Gillespie algorithm.
*
* The MT switches between a phase in which it grows by adding subunits at rate k_a at the plus end and another phase in which it shrinks by detaching subunits at rate k_d at the
* plus end.
* The catastroph (growing to shrinking) events happen stochastically at rate k_cat.
* A rescue can happen with probability p_res if the subunit at the tip is an exchanged one (GTPX)
*
* Subunits are added in the T state. They hydrolize (T to D) at rate k_hyd. D-Subunits can be exchanged spontaneously with T-Subunits at rate k_rep. These subunits are defined to be
* in the state TX. TX-Subunits hydrolize at a rate k_hydx.
*
* Molecular motors can attach anywhere on the lattice at rate k_ma. They walk toward the plus end by hopping to the nearest neighbor at rate k_mhop if it's not already occupied
* by another motor. When they hop, motors can induce a subunit exchange at the site they are hopping from with a probability p_x. Motors detach from the lattice at rate k_md.
*
* The length at definite times given by dtw, the growing/shrinking times/lengths and the number of Catastroph/rescue/total shrinkages/ spontaneous exchanges/ motor induced
* exchanges are saved in files.
*
* The simulation starts at time t and ends at time T
* */
int ComputeLengthDynamic7(int run, double k_a, double k_d, double k_cat, double p_res, double k_hyd, double k_hydx, double k_rep, double k_ma, double k_md, double k_mhop, double p_x, long double t, double T, double dtwmax, std::string const dirName, int tm0, int tmf, int dtm, int ts0, int tsf, int dts, int load, double savetime, double ssTime, double motorTime, int Lmax);
#endif