VPTissue Reference Manual
PINFlux.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2011-2016 Universiteit Antwerpen
3  *
4  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
5  * the European Commission - subsequent versions of the EUPL (the "Licence");
6  * You may not use this work except in compliance with the Licence.
7  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the Licence is distributed on an "AS IS" basis,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the Licence for the specific language governing
13  * permissions and limitations under the Licence.
14  */
20 #include "PINFlux.h"
21 
22 #include "bio/Cell.h"
23 #include "bio/ReduceCellWalls.h"
24 
25 #include <functional>
26 using namespace std;
27 using boost::property_tree::ptree;
28 
29 namespace SimPT_Default {
30 namespace CellChemistry {
31 
32 PINFlux::PINFlux(const CoreData& cd)
33 {
34  Initialize(cd);
35 }
36 
37 void PINFlux::Initialize(const CoreData& cd)
38 {
39  m_cd = cd;
40  const auto& p = m_cd.m_parameters->get_child("auxin_transport");
41 
42  m_k1 = p.get<double>("k1");
43  m_k2 = p.get<double>("k2");
44  m_km = p.get<double>("km");
45  m_kr = p.get<double>("kr");
46  m_r = p.get<double>("r");
47 }
48 
49 void PINFlux::operator()(Cell* cell, double* dchem)
50 {
51  // sum all incoming fluxes of PINs
52  dchem[1] = -SumFluxFromWalls(cell);
53 }
54 
55 double PINFlux::SumFluxFromWalls(Cell* cell)
56 {
57  using std::placeholders::_1;
58  using std::placeholders::_2;
59  using std::placeholders::_3;
60 
61  function<double(Cell*, Cell*, Wall*)> f = bind(&PINFlux::Flux, this, _1, _2, _3);
62  double const sum = ReduceCellWalls<double>(cell, f);
63  return sum;
64 }
65 
66 double PINFlux::Flux(Cell* this_cell, Cell* adjacent_cell, Wall* w)
67 {
68  // PIN1 localization at wall
69  // Note: chemical 0 is Auxin (intracellular storage only)
70  // PIN1 is Chemical 1 (both in walls and intracellular storage)
72  // Note that Pij is measured in term of concentration (mol/L)
73  // Pi in terms of quantity (mol)
74  // Equations as in Merks et al., Trends in Plant Science 2007
75 
76  // calculate PIN translocation rate from cell to membrane
77  double const adj_auxin = adjacent_cell->GetChemical(0);
78  double const receptor = adj_auxin * m_r / (m_kr + adj_auxin);
79 
80  // pick the correct side of the Wall
81  double pin_atwall;
82  if (w->GetC1() == this_cell) {
83  pin_atwall = w->GetTransporters1(1);
84  } else {
85  pin_atwall = w->GetTransporters2(1);
86  }
87 
88  // note: pin_flux is net flux from endosome to wall
89  double const chem = this_cell->GetChemical(1);
90  double const pin_flux = m_k1 * chem * receptor / (m_km + chem) - m_k2 * pin_atwall;
91  return pin_flux;
92 }
93 
94 } // namespace
95 } // namespace
Core data with mesh, parameters, random engine and time data.
Definition: CoreData.h:38
STL namespace.
A cell contains walls and nodes.
Definition: Cell.h:48
CellChemistry::PINFlux header file.
Namespace for components of the Default model group.
Interface for Cell.
Interface/Implementation for ReduceCellWalls.
A cell wall, runs between cell corner points and consists of wall elements.
Definition: Wall.h:48