Skip to content

Commit 8a0bd8e

Browse files
author
Dilawar Singh
committed
- If nml user has set id of the gate to be 'x', 'y' or 'z' then load the dynamics into HHChannels's gateX, gateY, or gateZ dyamics.
- removed temp changes made to CaConcBase. It is not needed.
1 parent 1af4b64 commit 8a0bd8e

File tree

9 files changed

+758
-209
lines changed

9 files changed

+758
-209
lines changed

biophysics/CaConc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
* without diffusion. It uses a simple exponential return of Ca
1717
* to baseline, with influxes from ion channels. It solves the
1818
* equation:
19-
* dC/dt = B*Ik - C/tau
20-
* where Ca = Ca_base + C.
19+
*
20+
* dC/dt = B*Ik - C/tau, where Ca = Ca_base + C.
2121
*
2222
* From the GENESIS notes:
2323
* In SI units, where concentration is moles/m^3

biophysics/CaConcBase.cpp

Lines changed: 32 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -33,58 +33,49 @@ SrcFinfo1< double >* CaConcBase::concOut()
3333

3434
const Cinfo* CaConcBase::initCinfo()
3535
{
36-
///////////////////////////////////////////////////////
3736
// Shared message definitions
38-
///////////////////////////////////////////////////////
39-
static DestFinfo process( "process",
40-
"Handles process call",
41-
new ProcOpFunc< CaConcBase >( &CaConcBase::process ) );
42-
static DestFinfo reinit( "reinit",
43-
"Handles reinit call",
44-
new ProcOpFunc< CaConcBase >( &CaConcBase::reinit ) );
37+
static DestFinfo process("process",
38+
"Handles process call",
39+
new ProcOpFunc< CaConcBase >( &CaConcBase::process )
40+
);
41+
42+
static DestFinfo reinit("reinit",
43+
"Handles reinit call",
44+
new ProcOpFunc< CaConcBase >( &CaConcBase::reinit )
45+
);
4546

4647
static Finfo* processShared[] =
4748
{
4849
&process, &reinit
4950
};
5051

51-
static SharedFinfo proc( "proc",
52-
"Shared message to receive Process message from scheduler",
53-
processShared, sizeof( processShared ) / sizeof( Finfo* ) );
52+
static SharedFinfo proc("proc",
53+
"Shared message to receive Process message from scheduler",
54+
processShared, sizeof( processShared ) / sizeof( Finfo* )
55+
);
5456

55-
///////////////////////////////////////////////////////
5657
// Field definitions
57-
///////////////////////////////////////////////////////
5858
static ElementValueFinfo< CaConcBase, double > Ca( "Ca",
5959
"Calcium concentration.",
6060
&CaConcBase::setCa,
6161
&CaConcBase::getCa);
6262

63-
// NOTE: alias for Ca. NeuroML2 expect conc available on all
64-
// ConncentrationModel.
65-
// FIXME: If it is not needed after neuroml2 is fully supported, remove it
66-
// else remove this fixme.
67-
static ElementValueFinfo< CaConcBase, double > conc( "conc",
68-
"Calcium concentration (alias for Ca)",
69-
&CaConcBase::setCa,
70-
&CaConcBase::getCa);
71-
72-
static ElementValueFinfo< CaConcBase, double > CaBasal( "CaBasal",
63+
static ElementValueFinfo< CaConcBase, double > CaBasal("CaBasal",
7364
"Basal Calcium concentration.",
7465
&CaConcBase::setCaBasal,
7566
&CaConcBase::getCaBasal);
7667

77-
static ElementValueFinfo< CaConcBase, double > Ca_base( "Ca_base",
68+
static ElementValueFinfo< CaConcBase, double > Ca_base("Ca_base",
7869
"Basal Calcium concentration, synonym for CaBasal",
7970
&CaConcBase::setCaBasal,
8071
&CaConcBase::getCaBasal);
8172

82-
static ElementValueFinfo< CaConcBase, double > tau( "tau",
73+
static ElementValueFinfo< CaConcBase, double > tau("tau",
8374
"Settling time for Ca concentration",
8475
&CaConcBase::setTau,
8576
&CaConcBase::getTau);
8677

87-
static ElementValueFinfo< CaConcBase, double > B( "B",
78+
static ElementValueFinfo< CaConcBase, double > B("B",
8879
"Volume scaling factor. "
8980
"Deprecated. This is a legacy field from GENESIS and exposes "
9081
"internal calculations. Please do not use. \n"
@@ -127,36 +118,35 @@ const Cinfo* CaConcBase::initCinfo()
127118
///////////////////////////////////////////////////////
128119

129120
static DestFinfo current( "current",
130-
"Calcium Ion current, due to be converted to conc.",
131-
new EpFunc1< CaConcBase, double >( &CaConcBase::current )
132-
);
121+
"Calcium Ion current, due to be converted to conc.",
122+
new EpFunc1< CaConcBase, double >( &CaConcBase::current )
123+
);
133124

134125
static DestFinfo currentFraction( "currentFraction",
135-
"Fraction of total Ion current, that is carried by Ca2+.",
136-
new EpFunc2< CaConcBase, double, double >( &CaConcBase::currentFraction )
137-
);
126+
"Fraction of total Ion current, that is carried by Ca2+.",
127+
new EpFunc2< CaConcBase, double, double >( &CaConcBase::currentFraction )
128+
);
138129

139130
static DestFinfo increase( "increase",
140-
"Any input current that increases the concentration.",
141-
new EpFunc1< CaConcBase, double >( &CaConcBase::increase )
142-
);
131+
"Any input current that increases the concentration.",
132+
new EpFunc1< CaConcBase, double >( &CaConcBase::increase )
133+
);
143134

144135
static DestFinfo decrease( "decrease",
145-
"Any input current that decreases the concentration.",
146-
new EpFunc1< CaConcBase, double >( &CaConcBase::decrease )
147-
);
136+
"Any input current that decreases the concentration.",
137+
new EpFunc1< CaConcBase, double >( &CaConcBase::decrease )
138+
);
148139

149140
static DestFinfo basal( "basal",
150-
"Synonym for assignment of basal conc.",
151-
new EpFunc1< CaConcBase, double >( &CaConcBase::setCaBasal )
152-
);
141+
"Synonym for assignment of basal conc.",
142+
new EpFunc1< CaConcBase, double >( &CaConcBase::setCaBasal )
143+
);
153144

154145
static Finfo* CaConcBaseFinfos[] =
155146
{
156147
&proc, // Shared
157148
concOut(), // Src
158149
&Ca, // Value
159-
&conc, // Value
160150
&CaBasal, // Value
161151
&Ca_base, // Value
162152
&tau, // Value

biophysics/CaConcBase.h

Lines changed: 78 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -37,91 +37,91 @@
3737

3838
class CaConcBase
3939
{
40-
public:
41-
CaConcBase();
42-
///////////////////////////////////////////////////////////////
43-
// Message handling functions
44-
///////////////////////////////////////////////////////////////
45-
void reinit( const Eref&, ProcPtr info );
46-
void process( const Eref&, ProcPtr info );
40+
public:
41+
CaConcBase();
42+
///////////////////////////////////////////////////////////////
43+
// Message handling functions
44+
///////////////////////////////////////////////////////////////
45+
void reinit( const Eref&, ProcPtr info );
46+
void process( const Eref&, ProcPtr info );
4747

48-
void current( const Eref& e, double I );
49-
void currentFraction( const Eref& e, double I, double fraction );
50-
void increase( const Eref& e, double I );
51-
void decrease( const Eref& e, double I );
52-
///////////////////////////////////////////////////////////////
53-
// Virtual Message handling functions
54-
///////////////////////////////////////////////////////////////
55-
virtual void vReinit( const Eref&, ProcPtr info ) = 0;
56-
virtual void vProcess( const Eref&, ProcPtr info ) = 0;
48+
void current( const Eref& e, double I );
49+
void currentFraction( const Eref& e, double I, double fraction );
50+
void increase( const Eref& e, double I );
51+
void decrease( const Eref& e, double I );
52+
///////////////////////////////////////////////////////////////
53+
// Virtual Message handling functions
54+
///////////////////////////////////////////////////////////////
55+
virtual void vReinit( const Eref&, ProcPtr info ) = 0;
56+
virtual void vProcess( const Eref&, ProcPtr info ) = 0;
5757

58-
virtual void vCurrent( const Eref& e, double I ) = 0;
59-
virtual void vCurrentFraction( const Eref& e, double I, double fraction ) = 0;
60-
virtual void vIncrease( const Eref& e, double I ) = 0;
61-
virtual void vDecrease( const Eref& e, double I ) = 0;
62-
///////////////////////////////////////////////////////////////
63-
// Field handling functions
64-
///////////////////////////////////////////////////////////////
65-
void setCa( const Eref& e, double val );
66-
double getCa( const Eref& e ) const;
67-
void setCaBasal( const Eref& e, double val );
68-
double getCaBasal( const Eref& e ) const;
69-
void setTau( const Eref& e, double val );
70-
double getTau( const Eref& e ) const;
71-
void setB( const Eref& e, double val );
72-
double getB( const Eref& e ) const;
73-
void setCeiling( const Eref& e, double val );
74-
double getCeiling( const Eref& e ) const;
75-
void setFloor( const Eref& e, double val );
76-
double getFloor( const Eref& e ) const;
77-
void setThickness( const Eref& e, double val );
78-
double getThickness( const Eref& e ) const;
79-
void setLength( const Eref& e, double val );
80-
double getLength( const Eref& e ) const;
81-
void setDiameter( const Eref& e, double val );
82-
double getDiameter( const Eref& e ) const;
83-
///////////////////////////////////////////////////////////////
84-
// Virtual Field handling functions
85-
///////////////////////////////////////////////////////////////
86-
virtual void vSetCa( const Eref& e, double val ) = 0;
87-
virtual double vGetCa( const Eref& e ) const = 0;
88-
virtual void vSetCaBasal( const Eref& e, double val ) = 0;
89-
virtual double vGetCaBasal( const Eref& e ) const = 0;
90-
virtual void vSetTau( const Eref& e, double val ) = 0;
91-
virtual double vGetTau( const Eref& e ) const = 0;
92-
virtual void vSetB( const Eref& e, double val ) = 0;
93-
virtual double vGetB( const Eref& e ) const = 0;
94-
virtual void vSetCeiling( const Eref& e, double val ) = 0;
95-
virtual double vGetCeiling( const Eref& e ) const = 0;
96-
virtual void vSetFloor( const Eref& e, double val ) = 0;
97-
virtual double vGetFloor( const Eref& e ) const = 0;
58+
virtual void vCurrent( const Eref& e, double I ) = 0;
59+
virtual void vCurrentFraction( const Eref& e, double I, double fraction ) = 0;
60+
virtual void vIncrease( const Eref& e, double I ) = 0;
61+
virtual void vDecrease( const Eref& e, double I ) = 0;
62+
///////////////////////////////////////////////////////////////
63+
// Field handling functions
64+
///////////////////////////////////////////////////////////////
65+
void setCa( const Eref& e, double val );
66+
double getCa( const Eref& e ) const;
67+
void setCaBasal( const Eref& e, double val );
68+
double getCaBasal( const Eref& e ) const;
69+
void setTau( const Eref& e, double val );
70+
double getTau( const Eref& e ) const;
71+
void setB( const Eref& e, double val );
72+
double getB( const Eref& e ) const;
73+
void setCeiling( const Eref& e, double val );
74+
double getCeiling( const Eref& e ) const;
75+
void setFloor( const Eref& e, double val );
76+
double getFloor( const Eref& e ) const;
77+
void setThickness( const Eref& e, double val );
78+
double getThickness( const Eref& e ) const;
79+
void setLength( const Eref& e, double val );
80+
double getLength( const Eref& e ) const;
81+
void setDiameter( const Eref& e, double val );
82+
double getDiameter( const Eref& e ) const;
83+
///////////////////////////////////////////////////////////////
84+
// Virtual Field handling functions
85+
///////////////////////////////////////////////////////////////
86+
virtual void vSetCa( const Eref& e, double val ) = 0;
87+
virtual double vGetCa( const Eref& e ) const = 0;
88+
virtual void vSetCaBasal( const Eref& e, double val ) = 0;
89+
virtual double vGetCaBasal( const Eref& e ) const = 0;
90+
virtual void vSetTau( const Eref& e, double val ) = 0;
91+
virtual double vGetTau( const Eref& e ) const = 0;
92+
virtual void vSetB( const Eref& e, double val ) = 0;
93+
virtual double vGetB( const Eref& e ) const = 0;
94+
virtual void vSetCeiling( const Eref& e, double val ) = 0;
95+
virtual double vGetCeiling( const Eref& e ) const = 0;
96+
virtual void vSetFloor( const Eref& e, double val ) = 0;
97+
virtual double vGetFloor( const Eref& e ) const = 0;
9898

99-
///////////////////////////////////////////////////////////////
100-
// Utility function in case length, dia or thickness is updated
101-
void updateDimensions( const Eref& e );
99+
///////////////////////////////////////////////////////////////
100+
// Utility function in case length, dia or thickness is updated
101+
void updateDimensions( const Eref& e );
102102

103-
/// Used to set up the solver. Dummy for regular classes.
104-
virtual void vSetSolver( const Eref& e, Id hsolve );
103+
/// Used to set up the solver. Dummy for regular classes.
104+
virtual void vSetSolver( const Eref& e, Id hsolve );
105105

106-
/**
107-
* Swaps Cinfos in order to make Zombies.
108-
*/
109-
static void zombify( Element* orig, const Cinfo* zClass,
110-
Id hsolve );
106+
/**
107+
* Swaps Cinfos in order to make Zombies.
108+
*/
109+
static void zombify( Element* orig, const Cinfo* zClass,
110+
Id hsolve );
111111

112-
/*
113-
* This Finfo is used to send out Ca concentration to channels.
114-
*
115-
* It is exposed here so that HSolve can also use it to send out
116-
* Ca concentration to the recipients.
117-
*/
118-
static SrcFinfo1< double >* concOut();
112+
/*
113+
* This Finfo is used to send out Ca concentration to channels.
114+
*
115+
* It is exposed here so that HSolve can also use it to send out
116+
* Ca concentration to the recipients.
117+
*/
118+
static SrcFinfo1< double >* concOut();
119119

120-
static const Cinfo* initCinfo();
121-
private:
122-
double thickness_;
123-
double diameter_;
124-
double length_;
120+
static const Cinfo* initCinfo();
121+
private:
122+
double thickness_;
123+
double diameter_;
124+
double length_;
125125
};
126126

127127

0 commit comments

Comments
 (0)