NEURON
kschan.h
Go to the documentation of this file.
1 #ifndef kschan_h
2 #define kschan_h
3 
4 #include <math.h>
5 #include <OS/string.h>
6 #include "nrnoc2iv.h"
7 #include "ivocvect.h"
8 #include "nrnunits_modern.h"
9 
10 #include "spmatrix.h"
11 
12 // extern double dt;
13 extern double celsius;
14 
15 class KSState;
16 class KSChan;
17 class KSSingle;
18 struct NrnThread;
19 
21  public:
23  virtual ~KSChanFunction();
24  virtual int type() {
25  return 0;
26  }
27  virtual double f(double v) {
28  return 1.;
29  }
30  void f(int cnt, double* v, double* val) {
31  int i;
32  for (i = 0; i < cnt; ++i) {
33  val[i] = f(v[i]);
34  }
35  }
36  static KSChanFunction* new_function(int type, Vect*, double, double);
37  Vect* gp_; // gate parameters
38  double c(int i) {
39  return gp_->elem(i);
40  }
41  static double Exp(double x) {
42  if (x > 700.) {
43  return exp(700.);
44  } else if (x < -700.) {
45  return exp(-700.);
46  } else {
47  return exp(x);
48  }
49  }
50 };
51 
52 class KSChanConst: public KSChanFunction {
53  public:
54  virtual int type() {
55  return 1;
56  }
57  virtual double f(double v) {
58  return c(0);
59  }
60 };
61 
62 class KSChanExp: public KSChanFunction {
63  public:
64  virtual int type() {
65  return 2;
66  }
67  virtual double f(double v) {
68  return c(0) * Exp(c(1) * (v - c(2)));
69  }
70 };
71 
73  public:
74  virtual int type() {
75  return 3;
76  }
77  virtual double f(double v) {
78  double x = c(1) * (v - c(2));
79  if (fabs(x) > 1e-6) {
80  return c(0) * x / (1 - Exp(-x));
81  } else {
82  return c(0) * (1 + x / 2.);
83  }
84  }
85 };
86 
88  public:
89  virtual int type() {
90  return 4;
91  }
92  virtual double f(double v) {
93  return c(0) / (1. + Exp(c(1) * (v - c(2))));
94  }
95 };
96 
97 
98 // e/(kT) e/k=11.604589 from hoc's FARADAY and R values (legacy units)
99 #define _e_over_k _e_over_k_[_nrnunit_use_legacy_]
100 static double _e_over_k_[2] = {_e_over_k_codata2018, 11.604589}; /* K/mV */
101 #define ebykt (_e_over_k / (273.15 + celsius))
102 
103 // from MODELING NEURONAL BIOPHYSICS Lyle J Graham
104 // A Chapter in the Handbook of Brain Theory and Neural Networks, Volume 2
105 // a' = K*exp(z*gam*(v-vhalf)*F/RT)
106 // b' = K*exp(-z*(1-gam)*(v-vhalf)*F/RT)
107 // but tau = 1/(a' + b') + tau0
108 // and inf = a'/(a' + b')
109 // so there is no fast way to get either a,b or inf,tau individually
110 
112  public:
113  virtual int type() {
114  return 5;
115  }
116  virtual double f(double v) {
117  double x = ebykt * c(2) * (v - c(1));
118  double ap = c(0) * Exp(c(3) * x);
119  double bp = c(0) * Exp((c(3) - 1.) * x);
120  tau = 1 / (ap + bp);
121  double inf = ap * tau;
122  tau += c(4);
123  return inf;
124  }
125  double tau; // may avoid duplicate call to KSChanBGtau
126 };
127 
129  public:
130  virtual int type() {
131  return 6;
132  }
133  virtual double f(double v) {
134  double x = ebykt * c(2) * (v - c(1));
135  double ap = c(0) * Exp(c(3) * x);
136  double bp = c(0) * Exp((c(3) - 1.) * x);
137  double tau = 1 / (ap + bp);
138  inf = ap * tau;
139  tau += c(4);
140  return tau;
141  }
142  double inf; // may avoid duplicate call to KSChanBGinf
143 };
144 
146  public:
147  KSChanTable(Vect*, double vmin, double vmax);
148  virtual int type() {
149  return 7;
150  }
151  virtual double f(double v);
152  double vmin_, vmax_;
153 
154  private:
155  double dvinv_;
156 };
157 
159  public:
160  KSTransition();
161  virtual ~KSTransition();
162  // vmin, vmax only for type KSChanTable
163  void setf(int direction, int type, Vect* vec, double vmin, double vmax);
164  // only voltage gated for now
165  double alpha(double v) {
166  return type_ == 0 ? f0->f(v) : f0->f(v) / f1->f(v);
167  }
168  double beta(double v) {
169  return type_ == 0 ? f1->f(v) : (1. - f0->f(v)) / f1->f(v);
170  }
171  double inf(double v) {
172  return type_ == 1 ? f0->f(v) : f0->f(v) / (f0->f(v) + f1->f(v));
173  }
174  double tau(double v) {
175  return type_ == 1 ? f1->f(v) : 1. / (f0->f(v) + f1->f(v));
176  }
177  void ab(double v, double& a, double& b);
178  void ab(Vect* v, Vect* a, Vect* b);
179  void inftau(double v, double& inf, double& tau);
180  void inftau(Vect* v, Vect* inf, Vect* tau);
181  // hh tables
182  // easily out of date!!
183  // in anything about f0 or f1 changes then must call hh_table_make;
184  void hh_table_make(double dt, int size = 200, double vmin = -100., double vmax = 50.);
185  bool usehhtable() {
186  return (size1_ > 0);
187  }
188  void inftau_hh_table(int i, double& inf, double& tau) {
189  inf = inftab_[i];
190  tau = tautab_[i];
191  }
192  void inftau_hh_table(int i, double x, double& inf, double& tau) {
193  inf = inftab_[i] + (inftab_[i + 1] - inftab_[i]) * x;
194  tau = tautab_[i] + (tautab_[i + 1] - tautab_[i]) * x;
195  }
196  // the agent style
197  virtual double alpha(Datum*);
198  virtual double beta();
199  void lig2pd(int pdoff);
200 
201  public:
203  int index_; // into trans_ array
204  int src_;
205  int target_;
209  int type_; // 0-ab,voltage gated; 1-inftau voltage gated
210  // 2-ligand outside; 3-ligand inside
214 
215  private:
216  // for hh tables.
217  double* inftab_;
218  double* tautab_;
219  int size1_;
220 };
221 
223  public:
224  KSGateComplex();
225  virtual ~KSGateComplex();
226  double conductance(double* state, KSState* st);
227 
228  public:
231  int index_; // into gc_ array
232  int sindex_; // starting state index for this complex
233  int nstate_; // number of states
234  int power_; // eg. n^4, or m^3
235 };
236 
237 class KSIv {
238  public:
239  virtual ~KSIv() = default;
240  // this one for ionic ohmic and nernst.
241  virtual double cur(double g, double* p, Datum* pd, double v);
242  virtual double jacob(double* p, Datum* pd, double v);
243 };
244 class KSIvghk: public KSIv {
245  public:
246  // this one for ionic Goldman-Hodgkin-Katz
247  virtual double cur(double g, double* p, Datum* pd, double v);
248  virtual double jacob(double* p, Datum* pd, double v);
249  double z;
250 };
251 class KSIvNonSpec: public KSIv {
252  // this one for non-specific ohmic. There will be a PARAMETER e_suffix at p[1]
253  virtual double cur(double g, double* p, Datum* pd, double v);
254  virtual double jacob(double* p, Datum* pd, double v);
255 };
256 
257 class KSPPIv: public KSIv {
258  public:
259  // this one for POINT_PROCESS ionic ohmic and nernst.
260  virtual double cur(double g, double* p, Datum* pd, double v);
261  virtual double jacob(double* p, Datum* pd, double v);
262  int ppoff_;
263 };
264 class KSPPIvghk: public KSPPIv {
265  public:
266  // this one for POINT_PROCESS ionic Goldman-Hodgkin-Katz
267  virtual double cur(double g, double* p, Datum* pd, double v);
268  virtual double jacob(double* p, Datum* pd, double v);
269  double z;
270 };
271 class KSPPIvNonSpec: public KSPPIv {
272  // this one for POINT_PROCESS non-specific ohmic. There will be a PARAMETER e_suffix at p[1]
273  virtual double cur(double g, double* p, Datum* pd, double v);
274  virtual double jacob(double* p, Datum* pd, double v);
275 };
276 
277 class KSState {
278  public:
279  KSState();
280  virtual ~KSState();
281  const char* string() {
282  return name_.string();
283  }
284  double f_; // normalized conductance
286  int index_; // into state_ array
289 };
290 
291 class KSChan {
292  public:
293  KSChan(Object*, bool is_point = false);
294  virtual ~KSChan();
295  virtual void alloc(Prop*);
296  virtual void init(int, Node**, double**, Datum**, NrnThread*);
297  virtual void cur(int, Node**, double**, Datum**);
298  virtual void jacob(int, Node**, double**, Datum**);
299  virtual void state(int, Node**, double**, Datum**, NrnThread*);
300 #if CACHEVEC != 0
301  virtual void cur(int, int*, double**, Datum**, NrnThread*);
302  virtual void jacob(int, int*, double**, Datum**, NrnThread*);
303  virtual void state(int, int*, Node**, double**, Datum**, NrnThread*);
304 #endif /* CACHEVEC */
305  void add_channel(const char**);
306  // for cvode
307  virtual int count();
308  virtual void map(int, double**, double**, double*, Datum*, double*);
309  virtual void spec(int, Node**, double**, Datum**);
310  virtual void matsol(int, Node**, double**, Datum**, NrnThread*);
311  virtual void cv_sc_update(int, Node**, double**, Datum**, NrnThread*);
312  double conductance(double gmax, double* state);
313 
314  public:
315  // hoc accessibilty
316  int state(const char* name);
317  const char* state(int index);
318  int trans_index(const char* src, const char* target); // index of the transition
319  int trans_index(int src, int target); // index of the transition
320  int gate_index(int state_index); // index of the gate
321  bool is_point() {
322  return is_point_;
323  }
324  bool is_single() {
325  return is_single_;
326  }
327  void set_single(bool, bool update = true);
328  void destroy_pnt(Point_process*);
329  int nsingle(Point_process*);
330  void nsingle(Point_process*, int);
331  double alpha(double v, int, int) {
332  return 0.;
333  }
334  double beta(double v, int, int) {
335  return 0.;
336  }
337  void setstructure(Vect*);
338  void setname(const char*);
339  void setsname(int, const char*);
340  void setion(const char*);
341  void setligand(int i, const char*);
342  void settype(KSTransition*, int type, const char*);
343  void setivrelation(int);
344  // hoc incremental management
345  KSState* add_hhstate(const char*);
346  KSState* add_ksstate(int igate, const char*);
347  void remove_state(int);
348  // these are only for kinetic scheme transitions since an hh
349  // always has one and only one transition.
350  KSTransition* add_transition(int src, int target, const char* ligand);
351  void remove_transition(int);
352  void setcond();
353  void power(KSGateComplex*, int);
354  void usetable(bool, int size, double vmin, double vmax);
355  void usetable(bool);
356  int usetable(double* vmin, double* vmax); // get info
357  bool usetable() {
358  return usetable_;
359  }
361 
362  private:
363  void free1();
364  void build();
365  void setupmat();
366  void fillmat(double v, Datum* pd);
367  void mat_dt(double dt, double* p);
368  void solvemat(double*);
369  void mulmat(double*, double*);
370  void ion_consist();
371  void ligand_consist(int, int, Prop*, Node*);
372  Prop* needion(Symbol*, Node*, Prop*);
373  void state_consist(int shift = 0);
374  void sname_install();
375  Symbol* looksym(const char*, Symbol* tmplt = NULL);
376  Symbol* installsym(const char*, int, Symbol* tmplt = NULL);
377  void freesym(Symbol*, Symbol* tmplt = NULL);
378  Symbol** newppsym(int);
379  void delete_schan_node_data();
380  void alloc_schan_node_data();
381  void update_prop(); // can add and remove Nsingle and SingleNodeData
382 
383  KSState* state_insert(int i, const char* name, double frac);
384  void state_remove(int i);
385  KSGateComplex* gate_insert(int ig, int is, int power);
386  void gate_remove(int i);
387  KSTransition* trans_insert(int i, int src, int target);
388  void trans_remove(int i);
389  void check_struct();
393  bool is_point_;
395  // for point process
398 
399  public:
400  CopyString name_; // name of channel
401  CopyString ion_; // name of ion , "" means non-specific
402  double gmax_deflt_;
403  double erev_deflt_;
406  int ngate_; // number of gating complexes
407  int ntrans_; // total number of transitions
408  int ivkstrans_; // index of beginning of voltage sensitive ks transitions
409  int iligtrans_; // index of beginning of ligand sensitive ks transitions
410  // 0 to ivkstrans_ - 1 are the hh transitions
411  int nhhstate_; // total number of hh states, does not include ks states
412  int nksstate_; // total number of kinetic scheme states.
413  int nstate_; // total number of all states, nhhstate_ to nstate_ - 1
414  // are kinetic scheme states. The nhhstate_ are first
415  // and the nhhstate_ = ivkstrans_
416  KSState* state_; // the state names
418  KSTransition* trans_; // array of transitions
419  Symbol* ion_sym_; // if NULL then non-specific and e_suffix is a parameter
420  int nligand_;
424 
425  private:
427  Symbol* mechsym_; // the top level symbol (insert sym or new sym)
428  Symbol* rlsym_; // symbol with the range list (= mechsym_ when density)
429  char* mat_;
430  double** elms_;
431  double** diag_;
432  int dsize_; // size of prop->dparam
433  int psize_; // size of prop->param
434  int soffset_; // STATE begins here in the p array.
435  int gmaxoffset_; // gmax is here in the p array, normally 0 but if
436  // there is an Nsingle then it is 1.
437  int ppoff_; // 2 or 3 for point process since area and Point_process* are
438  // first two elements and there may be a KSSingleNodeData*
439  // for hh rate tables
442  bool usetable_;
443 };
444 
445 #endif
short index
Definition: cabvars.h:10
short type
Definition: cabvars.h:9
double tau
Definition: kschan.h:125
virtual int type()
Definition: kschan.h:113
virtual double f(double v)
Definition: kschan.h:116
double inf
Definition: kschan.h:142
virtual int type()
Definition: kschan.h:130
virtual double f(double v)
Definition: kschan.h:133
virtual int type()
Definition: kschan.h:54
virtual double f(double v)
Definition: kschan.h:57
virtual double f(double v)
Definition: kschan.h:67
virtual int type()
Definition: kschan.h:64
virtual int type()
Definition: kschan.h:24
static double Exp(double x)
Definition: kschan.h:41
Vect * gp_
Definition: kschan.h:37
static KSChanFunction * new_function(int type, Vect *, double, double)
Definition: kschan.cpp:3031
double c(int i)
Definition: kschan.h:38
virtual ~KSChanFunction()
Definition: kschan.cpp:3025
virtual double f(double v)
Definition: kschan.h:27
void f(int cnt, double *v, double *val)
Definition: kschan.h:30
Definition: kschan.h:291
int trans_index(const char *src, const char *target)
Definition: kschan.cpp:1057
int mechtype_
Definition: kschan.h:397
void add_channel(const char **)
Definition: kschan.cpp:826
Object * obj_
Definition: kschan.h:422
char * mat_
Definition: kschan.h:429
void ligand_consist(int, int, Prop *, Node *)
Definition: kschan.cpp:2376
void alloc_schan_node_data()
Definition: kschan.cpp:2439
void mulmat(double *, double *)
Definition: kschan.cpp:2225
int nsingle(Point_process *)
Definition: kssingle.cpp:424
void state_remove(int i)
Definition: kschan.cpp:1793
int soffset_
Definition: kschan.h:434
virtual void alloc(Prop *)
Definition: kschan.cpp:2229
void set_single(bool, bool update=true)
Definition: kschan.cpp:1024
virtual void state(int, Node **, double **, Datum **, NrnThread *)
Definition: kschan.cpp:2488
void check_struct()
Definition: kschan.cpp:1709
Symbol * ion_sym_
Definition: kschan.h:419
double gmax_deflt_
Definition: kschan.h:402
int ntrans_
Definition: kschan.h:407
void setupmat()
Definition: kschan.cpp:2139
void fillmat(double v, Datum *pd)
Definition: kschan.cpp:2174
double conductance(double gmax, double *state)
Definition: kschan.cpp:2746
int nligand_
Definition: kschan.h:420
KSState * state_
Definition: kschan.h:416
int gate_size_
Definition: kschan.h:391
int trans_size_
Definition: kschan.h:392
void delete_schan_node_data()
Definition: kschan.cpp:2426
int nstate_
Definition: kschan.h:413
int hh_tab_size_
Definition: kschan.h:441
double dvinv_
Definition: kschan.h:440
KSState * add_hhstate(const char *)
Definition: kschan.cpp:1557
virtual ~KSChan()
Definition: kschan.cpp:898
CopyString name_
Definition: kschan.h:400
KSTransition * trans_
Definition: kschan.h:418
KSGateComplex * gate_insert(int ig, int is, int power)
Definition: kschan.cpp:1818
void gate_remove(int i)
Definition: kschan.cpp:1849
KSState * state_insert(int i, const char *name, double frac)
Definition: kschan.cpp:1758
bool usetable()
Definition: kschan.h:357
void setname(const char *)
Definition: kschan.cpp:958
int ngate_
Definition: kschan.h:406
void setivrelation(int)
virtual void jacob(int, Node **, double **, Datum **)
Definition: kschan.cpp:2619
virtual void spec(int, Node **, double **, Datum **)
Definition: kschan.cpp:2952
int pointtype_
Definition: kschan.h:396
double erev_deflt_
Definition: kschan.h:403
int ppoff_
Definition: kschan.h:437
virtual void map(int, double **, double **, double *, Datum *, double *)
Definition: kschan.cpp:2942
void check_table_thread(NrnThread *)
Definition: kschan.cpp:3175
KSChan(Object *, bool is_point=false)
Definition: kschan.cpp:860
void update_prop()
Definition: kschan.cpp:1088
void build()
Definition: kschan.cpp:900
bool is_point()
Definition: kschan.h:321
void setstructure(Vect *)
Definition: kschan.cpp:1931
bool is_point_
Definition: kschan.h:393
double dtsav_
Definition: kschan.h:440
KSSingle * single_
Definition: kschan.h:423
int state_size_
Definition: kschan.h:390
void state_consist(int shift=0)
Definition: kschan.cpp:2384
double vmin_
Definition: kschan.h:440
Prop * needion(Symbol *, Node *, Prop *)
Definition: kschan.cpp:2293
void remove_state(int)
Definition: kschan.cpp:1621
double alpha(double v, int, int)
Definition: kschan.h:331
double ** elms_
Definition: kschan.h:430
void power(KSGateComplex *, int)
Definition: kschan.cpp:1017
double vmax_
Definition: kschan.h:440
Symbol * mechsym_
Definition: kschan.h:427
void ion_consist()
Definition: kschan.cpp:2322
void trans_remove(int i)
Definition: kschan.cpp:1905
void sname_install()
Definition: kschan.cpp:2027
void destroy_pnt(Point_process *)
Definition: kschan.cpp:149
void setcond()
Definition: kschan.cpp:1311
int dsize_
Definition: kschan.h:432
KSTransition * add_transition(int src, int target, const char *ligand)
Definition: kschan.cpp:1684
void remove_transition(int)
Definition: kschan.cpp:1697
void setion(const char *)
Definition: kschan.cpp:1169
virtual void cv_sc_update(int, Node **, double **, Datum **, NrnThread *)
Definition: kschan.cpp:3010
int cvode_ieq_
Definition: kschan.h:426
KSTransition * trans_insert(int i, int src, int target)
Definition: kschan.cpp:1869
Symbol * installsym(const char *, int, Symbol *tmplt=NULL)
Definition: kschan.cpp:2103
double ** diag_
Definition: kschan.h:431
virtual void cur(int, Node **, double **, Datum **)
Definition: kschan.cpp:2596
int psize_
Definition: kschan.h:433
void setsname(int, const char *)
Definition: kschan.cpp:1261
Symbol ** newppsym(int)
Definition: kschan.cpp:2113
KSState * add_ksstate(int igate, const char *)
Definition: kschan.cpp:1584
int nksstate_
Definition: kschan.h:412
int ivkstrans_
Definition: kschan.h:408
void freesym(Symbol *, Symbol *tmplt=NULL)
Definition: kschan.cpp:2119
Symbol * rlsym_
Definition: kschan.h:428
Symbol ** ligands_
Definition: kschan.h:421
bool usetable_
Definition: kschan.h:442
KSIv * iv_relation_
Definition: kschan.h:405
int nhhstate_
Definition: kschan.h:411
virtual int count()
Definition: kschan.cpp:2938
double beta(double v, int, int)
Definition: kschan.h:334
bool is_single_
Definition: kschan.h:394
void free1()
Definition: kschan.cpp:1266
int gmaxoffset_
Definition: kschan.h:435
virtual void matsol(int, Node **, double **, Datum **, NrnThread *)
Definition: kschan.cpp:2985
void mat_dt(double dt, double *p)
Definition: kschan.cpp:2198
void solvemat(double *)
Definition: kschan.cpp:2209
void setligand(int i, const char *)
Definition: kschan.cpp:1360
virtual void init(int, Node **, double **, Datum **, NrnThread *)
Definition: kschan.cpp:2450
KSGateComplex * gc_
Definition: kschan.h:417
int cond_model_
Definition: kschan.h:404
int iligtrans_
Definition: kschan.h:409
bool is_single()
Definition: kschan.h:324
CopyString ion_
Definition: kschan.h:401
int gate_index(int state_index)
Definition: kschan.cpp:1078
void settype(KSTransition *, int type, const char *)
Definition: kschan.cpp:1380
Symbol * looksym(const char *, Symbol *tmplt=NULL)
Definition: kschan.cpp:2085
virtual int type()
Definition: kschan.h:74
virtual double f(double v)
Definition: kschan.h:77
virtual int type()
Definition: kschan.h:89
virtual double f(double v)
Definition: kschan.h:92
virtual int type()
Definition: kschan.h:148
double dvinv_
Definition: kschan.h:155
KSChanTable(Vect *, double vmin, double vmax)
Definition: kschan.cpp:3064
virtual double f(double v)
Definition: kschan.cpp:3072
double vmax_
Definition: kschan.h:152
double vmin_
Definition: kschan.h:152
KSChan * ks_
Definition: kschan.h:230
Object * obj_
Definition: kschan.h:229
int index_
Definition: kschan.h:231
int sindex_
Definition: kschan.h:232
int nstate_
Definition: kschan.h:233
double conductance(double *state, KSState *st)
Definition: kschan.cpp:2907
virtual ~KSGateComplex()
Definition: kschan.cpp:2906
int power_
Definition: kschan.h:234
Definition: kschan.h:237
virtual double cur(double g, double *p, Datum *pd, double v)
Definition: kschan.cpp:2636
virtual ~KSIv()=default
virtual double jacob(double *p, Datum *pd, double v)
Definition: kschan.cpp:2646
virtual double cur(double g, double *p, Datum *pd, double v)
Definition: kschan.cpp:2672
virtual double jacob(double *p, Datum *pd, double v)
Definition: kschan.cpp:2680
virtual double cur(double g, double *p, Datum *pd, double v)
Definition: kschan.cpp:2651
double z
Definition: kschan.h:249
virtual double jacob(double *p, Datum *pd, double v)
Definition: kschan.cpp:2662
Definition: kschan.h:257
virtual double cur(double g, double *p, Datum *pd, double v)
Definition: kschan.cpp:2684
virtual double jacob(double *p, Datum *pd, double v)
Definition: kschan.cpp:2697
int ppoff_
Definition: kschan.h:262
virtual double jacob(double *p, Datum *pd, double v)
Definition: kschan.cpp:2741
virtual double cur(double g, double *p, Datum *pd, double v)
Definition: kschan.cpp:2732
double z
Definition: kschan.h:269
virtual double jacob(double *p, Datum *pd, double v)
Definition: kschan.cpp:2719
virtual double cur(double g, double *p, Datum *pd, double v)
Definition: kschan.cpp:2705
int index_
Definition: kschan.h:286
CopyString name_
Definition: kschan.h:285
const char * string()
Definition: kschan.h:281
KSChan * ks_
Definition: kschan.h:287
virtual ~KSState()
Definition: kschan.cpp:2936
KSState()
Definition: kschan.cpp:2931
Object * obj_
Definition: kschan.h:288
double f_
Definition: kschan.h:284
virtual double beta()
Definition: kschan.cpp:2897
KSChanFunction * f0
Definition: kschan.h:207
KSChan * ks_
Definition: kschan.h:206
double * inftab_
Definition: kschan.h:217
int stoichiom_
Definition: kschan.h:213
double alpha(double v)
Definition: kschan.h:165
double tau(double v)
Definition: kschan.h:174
double * tautab_
Definition: kschan.h:218
int pd_index_
Definition: kschan.h:212
double inf(double v)
Definition: kschan.h:171
Object * obj_
Definition: kschan.h:202
void lig2pd(int pdoff)
Definition: kschan.cpp:2792
int index_
Definition: kschan.h:203
void inftau_hh_table(int i, double &inf, double &tau)
Definition: kschan.h:188
double beta(double v)
Definition: kschan.h:168
int src_
Definition: kschan.h:204
void ab(double v, double &a, double &b)
Definition: kschan.cpp:2803
void inftau(double v, double &inf, double &tau)
Definition: kschan.cpp:2841
int ligand_index_
Definition: kschan.h:211
KSChanFunction * f1
Definition: kschan.h:208
void inftau_hh_table(int i, double x, double &inf, double &tau)
Definition: kschan.h:192
void hh_table_make(double dt, int size=200, double vmin=-100., double vmax=50.)
Definition: kschan.cpp:3087
int target_
Definition: kschan.h:205
void setf(int direction, int type, Vect *vec, double vmin, double vmax)
Definition: kschan.cpp:2777
bool usehhtable()
Definition: kschan.h:185
virtual ~KSTransition()
Definition: kschan.cpp:2767
int size1_
Definition: kschan.h:219
int type_
Definition: kschan.h:209
const char * string() const
Definition: string.h:139
double dt
Definition: netcvode.cpp:76
static void update(NrnThread *)
Definition: fadvance.cpp:597
#define Vect
Definition: ivocvect.h:14
double celsius
Definition: init.cpp:99
static double _e_over_k_[2]
Definition: kschan.h:100
#define ebykt
Definition: kschan.h:101
#define v
Definition: md1redef.h:4
#define i
Definition: md1redef.h:12
exp
Definition: extdef.h:5
fabs
Definition: extdef.h:3
char * name
Definition: init.cpp:16
size_t p
#define _e_over_k_codata2018
static void * vmin(NrnThread *nt)
#define g
Definition: passive0.cpp:21
#define e
Definition: passive0.cpp:22
#define cnt
Definition: spt2queue.cpp:19
#define NULL
Definition: sptree.h:16
Definition: section.h:133
Represent main neuron object computed by single thread.
Definition: multicore.h:58
Definition: hocdec.h:227
Definition: section.h:214
Definition: model.h:57
Definition: hocdec.h:177