The BioCro C++ Library
song_flowering.h
Go to the documentation of this file.
1#ifndef SONG_FLOWERING_H
2#define SONG_FLOWERING_H
3
4#include "../framework/module.h"
5#include "../framework/state_map.h"
6
7// This module is based on the photoperiodic flowering model described in
8// Song, Y. H., Smith, R. W., To, B. J., Millar, A. J. & Imaizumi, T. FKF1 Conveys Timing Information for CONSTANS Stabilization in Photoperiodic Flowering. Science 336, 1045–1049 (2012).
9// The Song model is not the most up-to-date photoperiod model, but is considerably simpler than the newer one described in
10// Seaton, D. D. et al. Linked circadian outputs control elongation growth and flowering in response to photoperiod and temperature. Molecular Systems Biology 11, 776 (2015).
11// The Song model also has the advantage of not requiring a "phase advanced" component
12// The Song model uses the outputs from the Locke (2005) circadian clock model described in
13// Locke, J. C. W. et al. Extension of a genetic network model by iterative experimentation and mathematical analysis. Molecular Systems Biology 1, 2005.0013 (2005).
14// The Locke model is included here in this module
15// The models were implented in C++ by translating from the following files:
16// "Structured data 1" in the supplement to Locke (2005) as viewed with an online SBML viewer (https://sv.insysbio.com/online/)
17//
18
19namespace standardBML
20{
21class song_flowering : public differential_module
22{
23 public:
24 song_flowering(state_map const& input_quantities, state_map* output_quantities)
25 : differential_module{},
26
27 // Get pointers to input quantities
28 solar_ip{get_ip(input_quantities, "solar")},
29 cLm_ip{get_ip(input_quantities, "cLm")},
30 cLc_ip{get_ip(input_quantities, "cLc")},
31 cLn_ip{get_ip(input_quantities, "cLn")},
32 cTm_ip{get_ip(input_quantities, "cTm")},
33 cTc_ip{get_ip(input_quantities, "cTc")},
34 cTn_ip{get_ip(input_quantities, "cTn")},
35 cXm_ip{get_ip(input_quantities, "cXm")},
36 cXc_ip{get_ip(input_quantities, "cXc")},
37 cXn_ip{get_ip(input_quantities, "cXn")},
38 cYm_ip{get_ip(input_quantities, "cYm")},
39 cYc_ip{get_ip(input_quantities, "cYc")},
40 cYn_ip{get_ip(input_quantities, "cYn")},
41 cPn_ip{get_ip(input_quantities, "cPn")},
42
43 // Get pointers to output quantities
44 cLm_op{get_op(output_quantities, "cLm")},
45 cLc_op{get_op(output_quantities, "cLc")},
46 cLn_op{get_op(output_quantities, "cLn")},
47 cTm_op{get_op(output_quantities, "cTm")},
48 cTc_op{get_op(output_quantities, "cTc")},
49 cTn_op{get_op(output_quantities, "cTn")},
50 cXm_op{get_op(output_quantities, "cXm")},
51 cXc_op{get_op(output_quantities, "cXc")},
52 cXn_op{get_op(output_quantities, "cXn")},
53 cYm_op{get_op(output_quantities, "cYm")},
54 cYc_op{get_op(output_quantities, "cYc")},
55 cYn_op{get_op(output_quantities, "cYn")},
56 cPn_op{get_op(output_quantities, "cPn")}
57 {
58 }
59 static string_vector get_inputs();
60 static string_vector get_outputs();
61 static std::string get_name() { return "song_flowering"; }
62
63 private:
64 // Pointers to input quantities
65 const double* solar_ip;
66 const double* cLm_ip;
67 const double* cLc_ip;
68 const double* cLn_ip;
69 const double* cTm_ip;
70 const double* cTc_ip;
71 const double* cTn_ip;
72 const double* cXm_ip;
73 const double* cXc_ip;
74 const double* cXn_ip;
75 const double* cYm_ip;
76 const double* cYc_ip;
77 const double* cYn_ip;
78 const double* cPn_ip;
79
80 // Pointers to output quantities
81 double* cLm_op;
82 double* cLc_op;
83 double* cLn_op;
84 double* cTm_op;
85 double* cTc_op;
86 double* cTn_op;
87 double* cXm_op;
88 double* cXc_op;
89 double* cXn_op;
90 double* cYm_op;
91 double* cYc_op;
92 double* cYn_op;
93 double* cPn_op;
94
95 // Main operation
96 void do_operation() const;
97};
98
100{
101 return {
102 "solar",
103 "cLm",
104 "cLc",
105 "cLn",
106 "cTm",
107 "cTc",
108 "cTn",
109 "cXm",
110 "cXc",
111 "cXn",
112 "cYm",
113 "cYc",
114 "cYn",
115 "cPn"};
116}
117
119{
120 return {
121 "cLm",
122 "cLc",
123 "cLn",
124 "cTm",
125 "cTc",
126 "cTn",
127 "cXm",
128 "cXc",
129 "cXn",
130 "cYm",
131 "cYc",
132 "cYn",
133 "cPn"};
134}
135
136void song_flowering::do_operation() const
137{
139 // Collect inputs and make calculations //
141
142 // Unpack the solar radiantion
143 double solar = *solar_ip;
144
145 // Unpack the circadian clock components
146 double cLm = *cLm_ip;
147 double cLc = *cLc_ip;
148 double cLn = *cLn_ip;
149 double cTm = *cTm_ip;
150 double cTc = *cTc_ip;
151 double cTn = *cTn_ip;
152 double cXm = *cXm_ip;
153 double cXc = *cXc_ip;
154 double cXn = *cXn_ip;
155 double cYm = *cYm_ip;
156 double cYc = *cYc_ip;
157 double cYn = *cYn_ip;
158 double cPn = *cPn_ip;
159
160 // Define the circadian clock parameters
161 double a = 3.3064;
162 double b = 1.0258;
163 double c = 1.0258;
164 double d = 1.4422;
165 double e = 3.6064;
166 double f = 1.0237;
167 double g1 = 0.876738488;
168 double g2 = 0.036805783;
169 double g3 = 0.26593318;
170 double g4 = 0.538811228;
171 double g5 = 1.17803247;
172 double g6 = 0.064455137;
173 double k1 = 1.817;
174 double k10 = 1.7303;
175 double k11 = 1.8258;
176 double k12 = 1.8066;
177 double k13 = 1.2;
178 double k2 = 1.5644;
179 double k3 = 1.2765;
180 double k4 = 2.5734;
181 double k5 = 2.7454;
182 double k6 = 0.4033;
183 double k7 = 6.5585;
184 double k8 = 0.6632;
185 double k9 = 17.1111;
186 double m1 = 1.5283;
187 double m10 = 0.2179;
188 double m11 = 3.3442;
189 double m12 = 4.297;
190 double m13 = 0.1347;
191 double m14 = 0.6114;
192 double m15 = 1.2;
193 double m2 = 20.44;
194 double m3 = 3.6888;
195 double m4 = 3.8231;
196 double m5 = 0.0013;
197 double m6 = 3.1741;
198 double m7 = 0.0492;
199 double m8 = 4.0424;
200 double m9 = 10.1132;
201 double n1 = 5.1694;
202 double n2 = 3.0087;
203 double n3 = 0.2431;
204 double n4 = 0.0857;
205 double n5 = 0.1649;
206 double p1 = 0.8295;
207 double p2 = 4.324;
208 double p3 = 2.147;
209 double p4 = 0.2485;
210 double p5 = 0.5;
211 double q1 = 2.4514;
212 double q2 = 2.40178;
213 double q3 = 1;
214 double r1 = 16.8363;
215 double r2 = 0.1687;
216 double r3 = 0.3166;
217 double r4 = 2.1509;
218 double r5 = 1.0352;
219 double r6 = 3.3017;
220 double r7 = 2.2123;
221 double r8 = 0.2002;
222
223 // Check whether the plant is illuminated
224 // Rather than basing L(t) on specified values for dusk and dawn
225 // as in the original Locke (2005) model, we use a logistic function
226 // based on solar radiation to determine when light is present.
227 // This function is 0 for no sunlight and saturates to 1 when
228 // solar reaches ~150, which is well below the max on a typical day
229 double L = 1.0 / (1.0 + exp(-0.058 * (solar - 100.0)));
230
232 // Update the output quantity list //
234
235 // Define some helpful lambdas
236 auto hill = [](double s, double km, double n) { return pow(s, n) / (pow(km, n) + pow(s, n)); };
237 auto mm = [](double s, double km) { return s / (km + s); };
238
239 // Return the clock component derivatives
240 update(cLm_op, L * q1 * cPn + n1 * hill(cXn, g1, a) - m1 * mm(cLm, k1));
241 update(cLc_op, p1 * cLm - r1 * cLc + r2 * cLn - m2 * mm(cLc, k2));
242 update(cLn_op, r1 * cLc - r2 * cLn - m3 * mm(cLn, k3));
243 update(cTm_op, n2 * hill(cYn, g2, b) * hill(g3, cLn, c) - m4 * mm(cTm, k4));
244 update(cTc_op, p2 * cTm - r3 * cTc + r4 * cTn - ((1.0 - L) * m5 + m6) * mm(cTc, k5));
245 update(cTn_op, r3 * cTc - r4 * cTn - ((1.0 - L) * m7 + m8) * mm(cTn, k6));
246 update(cXm_op, n3 * hill(cTn, g4, d) - m9 * mm(cXm, k7));
247 update(cXc_op, p3 * cXm - r5 * cXc + r6 * cXn - m10 * mm(cXc, k8));
248 update(cXn_op, r5 * cXc - r6 * cXn - m11 * mm(cXn, k9));
249 update(cYm_op, (L * q2 * cPn + (L * n4 + n5) * hill(g5, cTn, e)) * hill(g6, cLn, f) - m12 * mm(cYm, k10));
250 update(cYc_op, p4 * cYm - r7 * cYc + r8 * cYn - m13 * mm(cYc, k11));
251 update(cYn_op, r7 * cYc - r8 * cYn - m14 * mm(cYn, k12));
252 update(cPn_op, (1.0 - L) * p5 - m15 * mm(cPn, k13) - q3 * L * cPn);
253}
254
255} // namespace standardBML
256#endif
song_flowering(state_map const &input_quantities, state_map *output_quantities)
static string_vector get_outputs()
static string_vector get_inputs()
static std::string get_name()
This is the standard BioCro module library; it includes the essential modules used in typical BioCro ...
Definition: aba_decay.h:8