Lattice Microbes 2.5
This is for whole cell modeling
Loading...
Searching...
No Matches
TwoStateHillSwitch.h
Go to the documentation of this file.
1/*
2 * University of Illinois Open Source License
3 * Copyright 2010-2018 Luthey-Schulten Group,
4 * All rights reserved.
5 *
6 * Developed by: Luthey-Schulten Group
7 * University of Illinois at Urbana-Champaign
8 * http://www.scs.uiuc.edu/~schulten
9 *
10 * Permission is hereby granted, free of charge, to any person obtaining a copy of
11 * this software and associated documentation files (the Software), to deal with
12 * the Software without restriction, including without limitation the rights to
13 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
14 * of the Software, and to permit persons to whom the Software is furnished to
15 * do so, subject to the following conditions:
16 *
17 * - Redistributions of source code must retain the above copyright notice,
18 * this list of conditions and the following disclaimers.
19 *
20 * - Redistributions in binary form must reproduce the above copyright notice,
21 * this list of conditions and the following disclaimers in the documentation
22 * and/or other materials provided with the distribution.
23 *
24 * - Neither the names of the Luthey-Schulten Group, University of Illinois at
25 * Urbana-Champaign, nor the names of its contributors may be used to endorse or
26 * promote products derived from this Software without specific prior written
27 * permission.
28 *
29 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
32 * THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
33 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
34 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
35 * OTHER DEALINGS WITH THE SOFTWARE.
36 *
37 * Author(s): Elijah Roberts
38 */
39
40#ifndef LM_CME_TWOSTATEHILLSWITCH_H_
41#define LM_CME_TWOSTATEHILLSWITCH_H_
42
43#include <cmath>
44#include <map>
45#include <string>
46
47using std::string;
48using std::map;
49
50namespace lm {
51namespace cme {
52
54{
55protected:
57 {
58 KHillPropensityArgs(uint si, uint xi, double kmin, double kmax, double x50, double h) :si(si),xi(xi),kmin(kmin),kmax(kmax),dk(kmax-kmin),x50ph(pow(x50,h)),h(h) {}
62 double kmin;
63 double kmax;
64 double dk;
65 double x50ph;
66 double h;
67 };
68
69public:
71 virtual ~TwoStateHillSwitch();
72 virtual bool needsReactionModel() {return false;}
73 virtual bool needsDiffusionModel() {return false;}
74 virtual void generateTrajectory();
75 virtual void runConstantProtein();
76 virtual void runGeometricProtein();
77
78protected:
79 static double kHillPropensity(double time, uint * speciesCounts, void * pargs);
80 static double negativeKHillPropensity(double time, uint * speciesCounts, void * pargs);
81};
82
83}
84}
85
86#endif
unsigned int uint
Definition Types.h:52
uint * speciesCounts
Definition CMESolver.h:275
GillespieDSolver()
Definition GillespieDSolver.cpp:79
virtual bool needsReactionModel()
Tells whether the solver needs a reaction model.
Definition TwoStateHillSwitch.h:72
virtual ~TwoStateHillSwitch()
Definition TwoStateHillSwitch.cpp:68
virtual bool needsDiffusionModel()
Tells whether the solver needs a reaction model.
Definition TwoStateHillSwitch.h:73
TwoStateHillSwitch()
Definition TwoStateHillSwitch.cpp:63
static double negativeKHillPropensity(double time, uint *speciesCounts, void *pargs)
Definition TwoStateHillSwitch.cpp:156
virtual void runGeometricProtein()
Definition TwoStateHillSwitch.cpp:689
virtual void generateTrajectory()
Actually run the simulation.
Definition TwoStateHillSwitch.cpp:72
virtual void runConstantProtein()
Definition TwoStateHillSwitch.cpp:473
static double kHillPropensity(double time, uint *speciesCounts, void *pargs)
Definition TwoStateHillSwitch.cpp:144
Definition CMESolver.cpp:72
Definition Capsule.cpp:46
uint si
Definition TwoStateHillSwitch.h:60
double kmax
Definition TwoStateHillSwitch.h:63
~KHillPropensityArgs()
Definition TwoStateHillSwitch.h:59
double kmin
Definition TwoStateHillSwitch.h:62
double h
Definition TwoStateHillSwitch.h:66
double x50ph
Definition TwoStateHillSwitch.h:65
double dk
Definition TwoStateHillSwitch.h:64
uint xi
Definition TwoStateHillSwitch.h:61
KHillPropensityArgs(uint si, uint xi, double kmin, double kmax, double x50, double h)
Definition TwoStateHillSwitch.h:58