forked from ecell/ecell3-spatiocyte
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PolymerizationProcess.hpp
116 lines (111 loc) · 3.91 KB
/
PolymerizationProcess.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
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
// This file is part of E-Cell Simulation Environment package
//
// Copyright (C) 2006-2009 Keio University
//
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
//
// E-Cell 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 2 of the License, or (at your option) any later version.
//
// E-Cell 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 E-Cell -- see the file COPYING.
// If not, write to the Free Software Foundation, Inc.,
// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
//END_HEADER
//
// written by Satya Arjunan <satya.arjunan@gmail.com>
// E-Cell Project, Institute for Advanced Biosciences, Keio University.
//
#ifndef __PolymerizationProcess_hpp
#define __PolymerizationProcess_hpp
#include "DiffusionInfluencedReactionProcess.hpp"
#include "PolymerFragmentationProcess.hpp"
#include "SpatiocytePolymer.hpp"
LIBECS_DM_CLASS(PolymerizationProcess, DiffusionInfluencedReactionProcess)
{
public:
LIBECS_DM_OBJECT(PolymerizationProcess, Process)
{
INHERIT_PROPERTIES(DiffusionInfluencedReactionProcess);
PROPERTYSLOT_SET_GET(Real, BendAngle);
PROPERTYSLOT_SET_GET(Real, CylinderYaw);
PROPERTYSLOT_SET_GET(Real, SphereYaw);
}
SIMPLE_SET_GET_METHOD(Real, BendAngle);
SIMPLE_SET_GET_METHOD(Real, CylinderYaw);
SIMPLE_SET_GET_METHOD(Real, SphereYaw);
PolymerizationProcess():
BendAngle(0),
CylinderYaw(0),
SphereYaw(0),
theMonomerLength(1) {}
virtual ~PolymerizationProcess() {}
virtual void initialize()
{
DiffusionInfluencedReactionProcess::initialize();
}
virtual void initializeThird();
virtual bool react(Voxel*, Voxel**);
virtual bool isInterrupting(Process*);
virtual void finalizeReaction();
void resetSubunit(Subunit*);
void removeContPoint(Subunit*, Point*);
protected:
void initSubunits(Species*);
void initSubunit(Voxel*, Species*);
void initJoinSubunit(Voxel*, Species*, Subunit*);
void addContPoint(Subunit*, Point*);
void updateSharedLipidsID(Voxel*);
void removeLipid(Subunit*, unsigned int);
double setImmediateTargetVoxel(Subunit*, unsigned int);
bool setExtendedTargetVoxel(Subunit*, unsigned int, double);
int setExistingTargetVoxel(Subunit*, unsigned int);
bool setTargetVoxels(Subunit*);
Voxel* getTargetVoxel(Subunit*);
void removeUnboundTargetVoxels(Subunit*);
Voxel* setNewTargetVoxel(Subunit*, unsigned int);
unsigned int sortNearestTargetVoxels(Subunit*, unsigned int, std::vector<Voxel*>&,
std::vector<double>&, std::vector<int>&);
int getLocation(double x)
{
if(x > theMinX && x < theMaxX)
{
return CYLINDER;
}
return ELLIPSOID;
}
virtual void pushNewBend(Subunit*, double);
virtual void pushJoinBend(Subunit*, Subunit*, unsigned int);
virtual Bend* getNewReverseBend(Point*, Point*, Bend*);
virtual Bend* getReverseBend(Bend*);
virtual Point getNextPoint(Point*, Bend*);
virtual void getCylinderDcm(double, double, double*);
virtual void getSphereDcm(double, double, double*);
virtual void initSphereDcm();
virtual void pinStep(double*, double*, double*, double*);
protected:
unsigned int theBendIndexA;
unsigned int theBendIndexB;
double BendAngle;
double CylinderYaw;
double SphereYaw;
double theInitSphereDcm[9];
double theRadius;
double theMinX;
double theMaxX;
double theOriY;
double theOriZ;
double theMonomerLength;
};
#endif /* __PolymerizationProcess_hpp */