NEURON
kschan.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <math.h>
4 #include "nrnoc2iv.h"
5 #include "ivocvect.h"
6 #include "nrnunits.h"
7 
8 #include "spmatrix.h"
9 
10 // extern double dt;
11 extern double celsius;
12 
13 class KSState;
14 class KSChan;
15 class KSSingle;
16 struct NrnThread;
17 
19  public:
21  virtual ~KSChanFunction();
22  virtual int type() {
23  return 0;
24  }
25  virtual double f(double v) {
26  return 1.;
27  }
28  void f(int cnt, double* v, double* val) {
29  int i;
30  for (i = 0; i < cnt; ++i) {
31  val[i] = f(v[i]);
32  }
33  }
34  static KSChanFunction* new_function(int type, Vect*, double, double);
35  Vect* gp_; // gate parameters
36  double c(int i) {
37  return gp_->elem(i);
38  }
39  static double Exp(double x) {
40  if (x > 700.) {
41  return exp(700.);
42  } else if (x < -700.) {
43  return exp(-700.);
44  } else {
45  return exp(x);
46  }
47  }
48 };
49 
50 class KSChanConst: public KSChanFunction {
51  public:
52  virtual int type() {
53  return 1;
54  }
55  virtual double f(double v) {
56  return c(0);
57  }
58 };
59 
60 class KSChanExp: public KSChanFunction {
61  public:
62  virtual int type() {
63  return 2;
64  }
65  virtual double f(double v) {
66  return c(0) * Exp(c(1) * (v - c(2)));
67  }
68 };
69 
71  public:
72  virtual int type() {
73  return 3;
74  }
75  virtual double f(double v) {
76  double x = c(1) * (v - c(2));
77  if (fabs(x) > 1e-6) {
78  return c(0) * x / (1 - Exp(-x));
79  } else {
80  return c(0) * (1 + x / 2.);
81  }
82  }
83 };
84 
86  public:
87  virtual int type() {
88  return 4;
89  }
90  virtual double f(double v) {
91  return c(0) / (1. + Exp(c(1) * (v - c(2))));
92  }
93 };
94 
95 
96 #define ebykt (_e_over_k_codata2018 / (273.15 + celsius))
97 
98 // from MODELING NEURONAL BIOPHYSICS Lyle J Graham
99 // A Chapter in the Handbook of Brain Theory and Neural Networks, Volume 2
100 // a' = K*exp(z*gam*(v-vhalf)*F/RT)
101 // b' = K*exp(-z*(1-gam)*(v-vhalf)*F/RT)
102 // but tau = 1/(a' + b') + tau0
103 // and inf = a'/(a' + b')
104 // so there is no fast way to get either a,b or inf,tau individually
105 
107  public:
108  virtual int type() {
109  return 5;
110  }
111  virtual double f(double v) {
112  double x = ebykt * c(2) * (v - c(1));
113  double ap = c(0) * Exp(c(3) * x);
114  double bp = c(0) * Exp((c(3) - 1.) * x);
115  tau = 1 / (ap + bp);
116  double inf = ap * tau;
117  tau += c(4);
118  return inf;
119  }
120  double tau; // may avoid duplicate call to KSChanBGtau
121 };
122 
124  public:
125  virtual int type() {
126  return 6;
127  }
128  virtual double f(double v) {
129  double x = ebykt * c(2) * (v - c(1));
130  double ap = c(0) * Exp(c(3) * x);
131  double bp = c(0) * Exp((c(3) - 1.) * x);
132  double tau = 1 / (ap + bp);
133  inf = ap * tau;
134  tau += c(4);
135  return tau;
136  }
137  double inf; // may avoid duplicate call to KSChanBGinf
138 };
139 
141  public:
142  KSChanTable(Vect*, double vmin, double vmax);
143  virtual int type() {
144  return 7;
145  }
146  virtual double f(double v);
147  double vmin_, vmax_;
148 
149  private:
150  double dvinv_;
151 };
152 
154  public:
155  KSTransition();
156  virtual ~KSTransition();
157  // vmin, vmax only for type KSChanTable
158  void setf(int direction, int type, Vect* vec, double vmin, double vmax);
159  // only voltage gated for now
160  double alpha(double v) {
161  return type_ == 0 ? f0->f(v) : f0->f(v) / f1->f(v);
162  }
163  double beta(double v) {
164  return type_ == 0 ? f1->f(v) : (1. - f0->f(v)) / f1->f(v);
165  }
166  double inf(double v) {
167  return type_ == 1 ? f0->f(v) : f0->f(v) / (f0->f(v) + f1->f(v));
168  }
169  double tau(double v) {
170  return type_ == 1 ? f1->f(v) : 1. / (f0->f(v) + f1->f(v));
171  }
172  void ab(double v, double& a, double& b);
173  void ab(Vect* v, Vect* a, Vect* b);
174  void inftau(double v, double& inf, double& tau);
175  void inftau(Vect* v, Vect* inf, Vect* tau);
176  // hh tables
177  // easily out of date!!
178  // in anything about f0 or f1 changes then must call hh_table_make;
179  void hh_table_make(double dt, int size = 200, double vmin = -100., double vmax = 50.);
180  bool usehhtable() {
181  return (size1_ > 0);
182  }
183  void inftau_hh_table(int i, double& inf, double& tau) {
184  inf = inftab_[i];
185  tau = tautab_[i];
186  }
187  void inftau_hh_table(int i, double x, double& inf, double& tau) {
188  inf = inftab_[i] + (inftab_[i + 1] - inftab_[i]) * x;
189  tau = tautab_[i] + (tautab_[i + 1] - tautab_[i]) * x;
190  }
191  // the agent style
192  virtual double alpha(Datum*);
193  virtual double beta();
194  void lig2pd(int pdoff);
195 
196  public:
198  int index_; // into trans_ array
199  int src_;
200  int target_;
204  int type_; // 0-ab,voltage gated; 1-inftau voltage gated
205  // 2-ligand outside; 3-ligand inside
209 
210  private:
211  // for hh tables.
212  double* inftab_;
213  double* tautab_;
214  int size1_;
215 };
216 
218  public:
219  KSGateComplex();
220  virtual ~KSGateComplex();
221  double conductance(Memb_list* ml, std::size_t instance, std::size_t offset, KSState* st);
222 
223  public:
226  int index_; // into gc_ array
227  int sindex_; // starting state index for this complex
228  int nstate_; // number of states
229  int power_; // eg. n^4, or m^3
230 };
231 
232 struct KSIv {
233  virtual ~KSIv() = default;
234  // this one for ionic ohmic and nernst.
235  virtual double cur(double g,
236  Datum* pd,
237  double v,
238  Memb_list* ml,
239  std::size_t instance,
240  std::size_t offset);
241  virtual double jacob(Datum* pd,
242  double v,
243  Memb_list* ml,
244  std::size_t instance,
245  std::size_t offset);
246 };
247 struct KSIvghk: KSIv {
248  // this one for ionic Goldman-Hodgkin-Katz
249  double cur(double g,
250  Datum* pd,
251  double v,
252  Memb_list* ml,
253  std::size_t instance,
254  std::size_t offset) override;
255  double jacob(Datum* pd,
256  double v,
257  Memb_list* ml,
258  std::size_t instance,
259  std::size_t offset) override;
260  double z;
261 };
262 struct KSIvNonSpec: KSIv {
263  // this one for non-specific ohmic. There will be a PARAMETER e_suffix at p[1]
264  double cur(double g,
265  Datum* pd,
266  double v,
267  Memb_list* ml,
268  std::size_t instance,
269  std::size_t offset) override;
270  double jacob(Datum* pd,
271  double v,
272  Memb_list* ml,
273  std::size_t instance,
274  std::size_t offset) override;
275 };
276 
277 struct KSPPIv: KSIv {
278  // this one for POINT_PROCESS ionic ohmic and nernst.
279  double cur(double g,
280  Datum* pd,
281  double v,
282  Memb_list* ml,
283  std::size_t instance,
284  std::size_t offset) override;
285  double jacob(Datum* pd,
286  double v,
287  Memb_list* ml,
288  std::size_t instance,
289  std::size_t offset) override;
290  int ppoff_;
291 };
292 struct KSPPIvghk: KSPPIv {
293  // this one for POINT_PROCESS ionic Goldman-Hodgkin-Katz
294  double cur(double g,
295  Datum* pd,
296  double v,
297  Memb_list* ml,
298  std::size_t instance,
299  std::size_t offset) override;
300  double jacob(Datum* pd,
301  double v,
302  Memb_list* ml,
303  std::size_t instance,
304  std::size_t offset) override;
305  double z;
306 };
308  // this one for POINT_PROCESS non-specific ohmic. There will be a PARAMETER e_suffix at p[1]
309  double cur(double g,
310  Datum* pd,
311  double v,
312  Memb_list* ml,
313  std::size_t instance,
314  std::size_t offset) override;
315  double jacob(Datum* pd,
316  double v,
317  Memb_list* ml,
318  std::size_t instance,
319  std::size_t offset) override;
320 };
321 
322 class KSState {
323  public:
324  KSState();
325  virtual ~KSState();
326  const char* string() {
327  return name_.c_str();
328  }
329  double f_; // normalized conductance
330  std::string name_;
331  int index_; // into state_ array
334 };
335 
336 class KSChan {
337  public:
338  KSChan(Object*, bool is_point = false);
339  virtual ~KSChan() {}
340  virtual void alloc(Prop*);
341  virtual void init(NrnThread*, Memb_list*);
342  virtual void state(NrnThread*, Memb_list*);
343  virtual void cur(NrnThread*, Memb_list*);
344  virtual void jacob(NrnThread*, Memb_list*);
345  void add_channel(const char**);
346  // for cvode
347  virtual int count();
348  virtual void map(Prop*,
349  int,
352  double*);
353  virtual void spec(Memb_list*);
354  virtual void matsol(NrnThread*, Memb_list*);
355  virtual void cv_sc_update(NrnThread*, Memb_list*);
356  double conductance(double gmax, Memb_list* ml, std::size_t instance, std::size_t offset);
357 
358  public:
359  // hoc accessibilty
360  const char* state(int index);
361  int trans_index(int src, int target); // index of the transition
362  int gate_index(int state_index); // index of the gate
363  bool is_point() {
364  return is_point_;
365  }
366  bool is_single() {
367  return is_single_;
368  }
369  void set_single(bool, bool update = true);
370  void destroy_pnt(Point_process*);
371  int nsingle(Point_process*);
372  void nsingle(Point_process*, int);
373  double alpha(double v, int, int) {
374  return 0.;
375  }
376  double beta(double v, int, int) {
377  return 0.;
378  }
379  void setstructure(Vect*);
380  void setname(const char*);
381  void setsname(int, const char*);
382  void setion(const char*);
383  void settype(KSTransition*, int type, const char*);
384  void setivrelation(int);
385  // hoc incremental management
386  KSState* add_hhstate(const char*);
387  KSState* add_ksstate(int igate, const char*);
388  void remove_state(int);
389  // these are only for kinetic scheme transitions since an hh
390  // always has one and only one transition.
391  KSTransition* add_transition(int src, int target);
392  void remove_transition(int);
393  void setcond();
394  void power(KSGateComplex*, int);
395  void usetable(bool, int size, double vmin, double vmax);
396  void usetable(bool);
397  int usetable(double* vmin, double* vmax); // get info
398  bool usetable() {
399  return usetable_;
400  }
402 
403  private:
404  void free1();
405  void setupmat();
406  void fillmat(double v, Datum* pd);
407  void mat_dt(double dt, Memb_list* ml, std::size_t instance, std::size_t offset);
408  void solvemat(Memb_list*, std::size_t instance, std::size_t offset);
409  void mulmat(Memb_list* ml, std::size_t instance, std::size_t offset_s, std::size_t offset_ds);
410  void ion_consist();
411  void ligand_consist(int, int, Prop*, Node*);
412  Prop* needion(Symbol*, Node*, Prop*);
413  void sname_install();
414  Symbol* looksym(const char*, Symbol* tmplt = NULL);
415  Symbol* installsym(const char*, int, Symbol* tmplt = NULL);
416  void freesym(Symbol*, Symbol* tmplt = NULL);
417  Symbol** newppsym(int);
418  void delete_schan_node_data();
419  void alloc_schan_node_data();
420  void update_prop(); // can add and remove Nsingle and SingleNodeData
421  void err_if_has_instances() const;
422  void register_data_fields();
423 
424  KSState* state_insert(int i, const char* name, double frac);
425  void state_remove(int i);
426  KSGateComplex* gate_insert(int ig, int is, int power);
427  void gate_remove(int i);
428  KSTransition* trans_insert(int i, int src, int target);
429  void trans_remove(int i);
430  void check_struct();
434  bool is_point_;
436  // for point process
439 
440  public:
441  std::string name_; // name of channel
442  std::string ion_; // name of ion , "" means non-specific
443  double gmax_deflt_;
444  double erev_deflt_;
445  void parm_default_fill();
448  int ngate_; // number of gating complexes
449  int ntrans_; // total number of transitions
450  int ivkstrans_; // index of beginning of voltage sensitive ks transitions
451  int iligtrans_; // index of beginning of ligand sensitive ks transitions
452  // 0 to ivkstrans_ - 1 are the hh transitions
453  int nhhstate_; // total number of hh states, does not include ks states
454  int nksstate_; // total number of kinetic scheme states.
455  int nstate_; // total number of all states, nhhstate_ to nstate_ - 1
456  // are kinetic scheme states. The nhhstate_ are first
457  // and the nhhstate_ = ivkstrans_
458  KSState* state_; // the state names
460  KSTransition* trans_; // array of transitions
461  Symbol* ion_sym_; // if NULL then non-specific and e_suffix is a parameter
462  int nligand_;
466 
467  private:
469  Symbol* mechsym_; // the top level symbol (insert sym or new sym)
470  Symbol* rlsym_; // symbol with the range list (= mechsym_ when density)
471  char* mat_;
472  double** elms_;
473  double** diag_;
474  int dsize_; // size of prop->dparam
475  int psize_; // size of prop->param
476  int soffset_; // STATE begins here in the p array.
477  int gmaxoffset_; // gmax is here in the p array, normally 0 but if
478  // there is an Nsingle then it is 1.
479  int ppoff_; // 2 or 3 for point process since area and Point_process* are
480  // first two elements and there may be a KSSingleNodeData*
481  // for hh rate tables
484  bool usetable_;
485 
486  std::vector<double> parm_default{};
487 };
double & elem(int n)
Definition: ivocvect.h:26
double tau
Definition: kschan.h:120
virtual int type()
Definition: kschan.h:108
virtual double f(double v)
Definition: kschan.h:111
double inf
Definition: kschan.h:137
virtual int type()
Definition: kschan.h:125
virtual double f(double v)
Definition: kschan.h:128
virtual int type()
Definition: kschan.h:52
virtual double f(double v)
Definition: kschan.h:55
virtual double f(double v)
Definition: kschan.h:65
virtual int type()
Definition: kschan.h:62
virtual int type()
Definition: kschan.h:22
static double Exp(double x)
Definition: kschan.h:39
Vect * gp_
Definition: kschan.h:35
static KSChanFunction * new_function(int type, Vect *, double, double)
Definition: kschan.cpp:3051
double c(int i)
Definition: kschan.h:36
virtual ~KSChanFunction()
Definition: kschan.cpp:3045
virtual double f(double v)
Definition: kschan.h:25
void f(int cnt, double *v, double *val)
Definition: kschan.h:28
Definition: kschan.h:336
int mechtype_
Definition: kschan.h:438
void add_channel(const char **)
Definition: kschan.cpp:826
Object * obj_
Definition: kschan.h:464
char * mat_
Definition: kschan.h:471
std::string name_
Definition: kschan.h:441
void ligand_consist(int, int, Prop *, Node *)
Definition: kschan.cpp:2464
void register_data_fields()
Definition: kschan.cpp:2249
void alloc_schan_node_data()
Definition: kschan.cpp:2486
int nsingle(Point_process *)
Definition: kssingle.cpp:426
void state_remove(int i)
Definition: kschan.cpp:1770
int soffset_
Definition: kschan.h:476
void mulmat(Memb_list *ml, std::size_t instance, std::size_t offset_s, std::size_t offset_ds)
Definition: kschan.cpp:2216
virtual void alloc(Prop *)
Definition: kschan.cpp:2303
void set_single(bool, bool update=true)
Definition: kschan.cpp:998
void check_struct()
Definition: kschan.cpp:1681
Symbol * ion_sym_
Definition: kschan.h:461
double gmax_deflt_
Definition: kschan.h:443
int ntrans_
Definition: kschan.h:449
void setupmat()
Definition: kschan.cpp:2120
void fillmat(double v, Datum *pd)
Definition: kschan.cpp:2155
int nligand_
Definition: kschan.h:462
KSState * state_
Definition: kschan.h:458
virtual void jacob(NrnThread *, Memb_list *)
Definition: kschan.cpp:2601
int gate_size_
Definition: kschan.h:432
int trans_size_
Definition: kschan.h:433
int trans_index(int src, int target)
Definition: kschan.cpp:1035
void delete_schan_node_data()
Definition: kschan.cpp:2472
int nstate_
Definition: kschan.h:455
int hh_tab_size_
Definition: kschan.h:483
double dvinv_
Definition: kschan.h:482
KSState * add_hhstate(const char *)
Definition: kschan.cpp:1523
virtual ~KSChan()
Definition: kschan.h:339
KSTransition * trans_
Definition: kschan.h:460
KSGateComplex * gate_insert(int ig, int is, int power)
Definition: kschan.cpp:1800
void gate_remove(int i)
Definition: kschan.cpp:1831
KSState * state_insert(int i, const char *name, double frac)
Definition: kschan.cpp:1730
bool usetable()
Definition: kschan.h:398
virtual void cv_sc_update(NrnThread *, Memb_list *)
Definition: kschan.cpp:3028
void setname(const char *)
Definition: kschan.cpp:943
virtual void map(Prop *, int, neuron::container::data_handle< double > *, neuron::container::data_handle< double > *, double *)
Definition: kschan.cpp:2962
int ngate_
Definition: kschan.h:448
void setivrelation(int)
int pointtype_
Definition: kschan.h:437
double erev_deflt_
Definition: kschan.h:444
virtual void init(NrnThread *, Memb_list *)
Definition: kschan.cpp:2497
int ppoff_
Definition: kschan.h:479
virtual void state(NrnThread *, Memb_list *)
Definition: kschan.cpp:2533
void check_table_thread(NrnThread *)
Definition: kschan.cpp:3195
KSChan(Object *, bool is_point=false)
Definition: kschan.cpp:863
void update_prop()
Definition: kschan.cpp:1053
bool is_point()
Definition: kschan.h:363
void mat_dt(double dt, Memb_list *ml, std::size_t instance, std::size_t offset)
Definition: kschan.cpp:2179
void setstructure(Vect *)
Definition: kschan.cpp:1913
bool is_point_
Definition: kschan.h:434
double dtsav_
Definition: kschan.h:482
KSSingle * single_
Definition: kschan.h:465
int state_size_
Definition: kschan.h:431
double vmin_
Definition: kschan.h:482
double conductance(double gmax, Memb_list *ml, std::size_t instance, std::size_t offset)
Definition: kschan.cpp:2763
std::vector< double > parm_default
Definition: kschan.h:486
Prop * needion(Symbol *, Node *, Prop *)
Definition: kschan.cpp:2367
void remove_state(int)
Definition: kschan.cpp:1589
double alpha(double v, int, int)
Definition: kschan.h:373
double ** elms_
Definition: kschan.h:472
void power(KSGateComplex *, int)
Definition: kschan.cpp:991
double vmax_
Definition: kschan.h:482
Symbol * mechsym_
Definition: kschan.h:469
void ion_consist()
Almost obsolete: No longer allow KSChan structure changes when instances exist.
Definition: kschan.cpp:2408
void trans_remove(int i)
Definition: kschan.cpp:1887
void sname_install()
Definition: kschan.cpp:2007
void destroy_pnt(Point_process *)
Definition: kschan.cpp:138
void setcond()
Definition: kschan.cpp:1298
int dsize_
Definition: kschan.h:474
void remove_transition(int)
Definition: kschan.cpp:1667
void setion(const char *)
Definition: kschan.cpp:1155
virtual void spec(Memb_list *)
Definition: kschan.cpp:2973
int cvode_ieq_
Definition: kschan.h:468
KSTransition * trans_insert(int i, int src, int target)
Definition: kschan.cpp:1851
Symbol * installsym(const char *, int, Symbol *tmplt=NULL)
Definition: kschan.cpp:2084
double ** diag_
Definition: kschan.h:473
virtual void cur(NrnThread *, Memb_list *)
Definition: kschan.cpp:2587
void solvemat(Memb_list *, std::size_t instance, std::size_t offset)
Definition: kschan.cpp:2190
int psize_
Definition: kschan.h:475
void setsname(int, const char *)
Definition: kschan.cpp:1247
Symbol ** newppsym(int)
Definition: kschan.cpp:2094
KSState * add_ksstate(int igate, const char *)
Definition: kschan.cpp:1551
int nksstate_
Definition: kschan.h:454
int ivkstrans_
Definition: kschan.h:450
void freesym(Symbol *, Symbol *tmplt=NULL)
Definition: kschan.cpp:2100
Symbol * rlsym_
Definition: kschan.h:470
Symbol ** ligands_
Definition: kschan.h:463
void err_if_has_instances() const
Error if instances exist.
Definition: kschan.cpp:2239
bool usetable_
Definition: kschan.h:484
KSIv * iv_relation_
Definition: kschan.h:447
int nhhstate_
Definition: kschan.h:453
virtual int count()
Definition: kschan.cpp:2958
double beta(double v, int, int)
Definition: kschan.h:376
void parm_default_fill()
Definition: kschan.cpp:809
bool is_single_
Definition: kschan.h:435
void free1()
Definition: kschan.cpp:1253
int gmaxoffset_
Definition: kschan.h:477
std::string ion_
Definition: kschan.h:442
KSGateComplex * gc_
Definition: kschan.h:459
int cond_model_
Definition: kschan.h:446
virtual void matsol(NrnThread *, Memb_list *)
Definition: kschan.cpp:3001
KSTransition * add_transition(int src, int target)
Definition: kschan.cpp:1653
int iligtrans_
Definition: kschan.h:451
bool is_single()
Definition: kschan.h:366
int gate_index(int state_index)
Definition: kschan.cpp:1044
void settype(KSTransition *, int type, const char *)
Definition: kschan.cpp:1348
Symbol * looksym(const char *, Symbol *tmplt=NULL)
Definition: kschan.cpp:2066
virtual int type()
Definition: kschan.h:72
virtual double f(double v)
Definition: kschan.h:75
virtual int type()
Definition: kschan.h:87
virtual double f(double v)
Definition: kschan.h:90
virtual int type()
Definition: kschan.h:143
double dvinv_
Definition: kschan.h:150
KSChanTable(Vect *, double vmin, double vmax)
Definition: kschan.cpp:3084
virtual double f(double v)
Definition: kschan.cpp:3092
double vmax_
Definition: kschan.h:147
double vmin_
Definition: kschan.h:147
KSChan * ks_
Definition: kschan.h:225
Object * obj_
Definition: kschan.h:224
int index_
Definition: kschan.h:226
int sindex_
Definition: kschan.h:227
int nstate_
Definition: kschan.h:228
double conductance(Memb_list *ml, std::size_t instance, std::size_t offset, KSState *st)
Definition: kschan.cpp:2924
virtual ~KSGateComplex()
Definition: kschan.cpp:2923
int power_
Definition: kschan.h:229
int index_
Definition: kschan.h:331
const char * string()
Definition: kschan.h:326
KSChan * ks_
Definition: kschan.h:332
virtual ~KSState()
Definition: kschan.cpp:2956
std::string name_
Definition: kschan.h:330
KSState()
Definition: kschan.cpp:2951
Object * obj_
Definition: kschan.h:333
double f_
Definition: kschan.h:329
virtual double beta()
Definition: kschan.cpp:2914
KSChanFunction * f0
Definition: kschan.h:202
KSChan * ks_
Definition: kschan.h:201
double * inftab_
Definition: kschan.h:212
int stoichiom_
Definition: kschan.h:208
double alpha(double v)
Definition: kschan.h:160
double tau(double v)
Definition: kschan.h:169
double * tautab_
Definition: kschan.h:213
int pd_index_
Definition: kschan.h:207
double inf(double v)
Definition: kschan.h:166
Object * obj_
Definition: kschan.h:197
void lig2pd(int pdoff)
Definition: kschan.cpp:2809
int index_
Definition: kschan.h:198
void inftau_hh_table(int i, double &inf, double &tau)
Definition: kschan.h:183
double beta(double v)
Definition: kschan.h:163
int src_
Definition: kschan.h:199
void ab(double v, double &a, double &b)
Definition: kschan.cpp:2820
void inftau(double v, double &inf, double &tau)
Definition: kschan.cpp:2858
int ligand_index_
Definition: kschan.h:206
KSChanFunction * f1
Definition: kschan.h:203
void inftau_hh_table(int i, double x, double &inf, double &tau)
Definition: kschan.h:187
void hh_table_make(double dt, int size=200, double vmin=-100., double vmax=50.)
Definition: kschan.cpp:3107
int target_
Definition: kschan.h:200
void setf(int direction, int type, Vect *vec, double vmin, double vmax)
Definition: kschan.cpp:2794
bool usehhtable()
Definition: kschan.h:180
virtual ~KSTransition()
Definition: kschan.cpp:2784
int size1_
Definition: kschan.h:214
int type_
Definition: kschan.h:204
#define cnt
Definition: tqueue.hpp:44
#define v
Definition: md1redef.h:11
#define i
Definition: md1redef.h:19
double celsius
Definition: init.cpp:110
#define ebykt
Definition: kschan.h:96
exp
Definition: extdef.h:5
fabs
Definition: extdef.h:3
const char * name
Definition: init.cpp:16
void update(NrnThread *_nt)
short index
Definition: cabvars.h:11
short type
Definition: cabvars.h:10
static void * vmin(NrnThread *nt)
#define NULL
Definition: spdefs.h:105
Definition: kschan.h:232
virtual ~KSIv()=default
virtual double jacob(Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset)
Definition: kschan.cpp:2626
virtual double cur(double g, Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset)
Definition: kschan.cpp:2612
double jacob(Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset) override
Definition: kschan.cpp:2673
double cur(double g, Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset) override
Definition: kschan.cpp:2660
double jacob(Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset) override
Definition: kschan.cpp:2647
double cur(double g, Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset) override
Definition: kschan.cpp:2632
double z
Definition: kschan.h:260
Definition: kschan.h:277
double cur(double g, Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset) override
Definition: kschan.cpp:2681
double jacob(Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset) override
Definition: kschan.cpp:2698
int ppoff_
Definition: kschan.h:290
double jacob(Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset) override
Definition: kschan.cpp:2754
double cur(double g, Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset) override
Definition: kschan.cpp:2740
double cur(double g, Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset) override
Definition: kschan.cpp:2706
double z
Definition: kschan.h:305
double jacob(Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset) override
Definition: kschan.cpp:2724
A view into a set of mechanism instances.
Definition: nrnoc_ml.h:34
Definition: section.h:105
Represent main neuron object computed by single thread.
Definition: multicore.h:58
Definition: hocdec.h:173
A point process is computed just like regular mechanisms.
Definition: section_fwd.hpp:77
Definition: section.h:231
Definition: model.h:47
Non-template stable handle to a generic value.