-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomposants.hpp
155 lines (130 loc) · 3.75 KB
/
composants.hpp
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
/*
* Copyright (C) 2005-2011 Hervé Rouault <[email protected]>
*
* This file is part of Genherite.
*
* Genherite is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Genherite is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Genherite. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef Composants_H
#define Composants_H
#include <vector>
#include <string>
using namespace std;
#include "const.hpp"
#include "genherite.hpp"
class Composant;
class Arn;
class Reaction;
class Protein;
class Cellule;
class Espece {
//type Espece chimique: protéïne, gène ou arn
public:
double qtite;
Espece *copie;
string label;
bool contain(Protein * prot, Cellule * cell);
};
class Phosphosite {
};
class Protein:public Espece {
//type Protéïne : constante de dégradation et composants (null si un seul)
public:
double cste;
vector < Composant * >composants;
Phosphosite *phosphosite;
double meanc;
int dirinit;
Protein(double c = frand2(), double q = frand2());
~Protein();
void modifdegrad(double ampli = defampli);
void addcomposant(Protein * prot);
void modifqtite(double ampli = defampli);
void clivage(Protein & prot1, Protein & prot2);
bool eqprot(Protein * prot);
Protein *addphospho();
Protein *copyprot();
bool contain(Protein * prot);
void mutinit();
};
class Composant {
public:
Protein * protein;
int nb;
Composant(Protein * prot, int n = 1);
};
class Gene:public Espece {
public:
Arn * arn;
double transrate;
Gene();
void modiftrans(double ampli = defampli);
};
class Arn:public Espece {
public:
double cste;
Gene *gene;
Protein *protein;
Reaction *translation;
Arn(Gene * gen, double c = frand2(), double q = frand2());
void modifdegrad(double ampli = defampli);
void modifqtite(double ampli = defampli);
};
class Reaction {
//Reaction chimique:Une constante, deux reactifs,deux produits; null s'ils manquent
public:
double cste;
Espece *reactif1;
Espece *reactif2;
Espece *produit1;
Espece *produit2;
Reaction *copie;
Reaction(Espece * react1, Espece * react2, Espece * prod1, Espece * prod2,
double constante = frand2());
void modifcinetique(double ampli = defampli);
};
class Promoter:public Espece {
public:
Gene * gene;
Protein *protein;
double eqcte;
double transrate;
Promoter(Gene * gen, Protein * prot);
void modifeq(double ampli = defampli);
void modiftrans(double ampli = defampli);
};
class Recepteur {
public:
double cste;
double a0;
Protein *protsource;
Protein *protcible;
Protein *protphospho;
Recepteur(Protein * prots, Protein * protc, Protein * protp, double c =
frand2(), double eqcte = frand2());
void modifcinetique(double ampli = frand2());
};
typedef vector < Gene * >vgene;
typedef vector < Arn * >varn;
typedef vector < Protein * >vprotein;
typedef vector < Reaction * >vreaction;
typedef vector < Promoter * >vpromoter;
typedef vector < Recepteur * >vrecept;
typedef vgene::iterator ivgene;
typedef varn::iterator ivarn;
typedef vprotein::iterator ivprotein;
typedef vreaction::iterator ivreaction;
typedef vpromoter::iterator ivpromoter;
typedef vrecept::iterator ivrecept;
#endif /* Composants_H */