1 #include <../../nrnconf.h>
13 #define NSingleIndex 0
26 #define nt_dt nrn_threads->_dt
61 c->check_table_thread(vnt);
106 c->map(
prop, ieq, pv, pvdot, atol);
124 c->cv_sc_update(nt, ml);
162 c->nsingle(pp, (
int)
chkarg(1, 1, 1e9));
164 return (
double)
c->nsingle(pp);
215 return (
double) ks->
ngate_;
298 bool use = ((int)
chkarg(1, 0, 1)) ?
true :
false;
375 hoc_execerr_ext(
"no transition between state index %d and %d", src, target);
400 *ps = (
char*) ks->
name_.c_str();
401 return (
const char**) ps;
410 *ps = (
char*) ks->
ion_.c_str();
411 return (
const char**) ps;
418 return (
const char**) ps;
452 *ps = (
char*) kss->
string();
453 return (
const char**) ps;
469 return (
double) ksg->
power_;
481 return (
double) ksg->
index_;
505 return (
double) kst->
index_;
521 return (
double) kst->
type_;
528 if ((
int)
chkarg(1, 0, 1) == 0) {
534 return (
double) f->
type();
589 if ((
int)
chkarg(1, 0, 1) == 0) {
597 if (f->
type() == 7) {
616 if (kst->
type_ >= 2) {
618 s[strlen(
s) - 4] = (kst->
type_ == 3) ?
'i' :
'o';
619 s[strlen(
s) - 3] =
'\0';
623 return (
const char**) ps;
639 Printf(
"name=%s is_point_=%s ion_=%s cond_model_=%d\n",
641 (ks->
is_point() ?
"true" :
"false"),
644 Printf(
" ngate=%d nstate=%d nhhstate=%d nligand=%d ntrans=%d ivkstrans=%d iligtrans=%d\n",
654 Printf(
" gate %d index=%d nstate=%d power=%d\n",
666 Printf(
" f0 type=%d f1 type=%d\n",
672 Printf(
" trans %d src=%d target=%d type=%d ligindex=%d\n",
678 Printf(
" f0 type=%d f1 type=%d\n",
682 Printf(
" state names and fractional conductance\n");
769 isp = ((int)
chkarg(1, 0, 1)) != 0;
782 hoc_execerror(
"Cannot create a KSState except through KSChan", 0);
787 hoc_execerror(
"Cannot create a KSGate except through KSChan", 0);
792 hoc_execerror(
"Cannot create a KSTransition except through KSChan", 0);
822 static const char*
m_kschan_pat[] = {
"0",
"kschan",
"gmax", 0,
"g",
"i", 0, 0, 0};
891 ion_ =
"NonSpecific";
928 for (
int i = 0;
i < 9; ++
i)
948 char old_suffix[100];
951 Printf(
"KSChan::setname %s already in use\n",
name_.c_str());
972 char* cp = strstr(sp->
name, old_suffix);
974 int nbase = cp - sp->
name;
975 int n = nbase + strlen(
suffix) + 2;
978 strncpy(s1, sp->
name, nbase);
979 std::snprintf(s1 + nbase,
n - nbase,
"_%s",
suffix);
1005 "KSChan single channel mode implemented only for single ks gating complex to first "
1046 if (is <
gc_[
i].sindex_) {
1062 auto new_soffset = 3;
1063 auto new_gmaxoffset = 0;
1110 sym =
installsym(
"Nsingle", RANGEVAR, searchsym);
1132 for (
int i = old_soffset;
i < old_svarn; ++
i) {
1146 ppsym[
j]->
u.
rng.index =
j;
1157 if (strcmp(
ion_.c_str(),
s) == 0) {
1161 std::string new_ion{strlen(
s) == 0 ?
"NonSpecific" :
s};
1170 if (new_ion ==
"NonSpecific") {
1173 printf(
"switch from useion to non-specific\n");
1176 for (
int i = 0;
i <= io; ++
i) {
1192 ppsym[1 + io]->
u.
rng.index = 1 + io;
1195 ppsym[
i]->
u.
rng.index += 1;
1208 if (!sym || sym->
type != MECHANISM ||
1210 Printf(
"%s is not an ion mechanism", sym->
name);
1225 for (
int i = 0;
i <= io; ++
i) {
1231 ppsym[
i]->
u.
rng.index -= 1;
1352 if (type < 2 && t->type_ < 2) {
1360 if (
t->type_ >= 2) {
1361 iligold =
t->ligand_index_;
1368 if (
trans_[
i].ligand_index_ == iligold && iligold !=
i) {
1389 if (
trans_[
i].ligand_index_ > iligold) {
1401 t->ligand_index_ = -1;
1404 t->obj_->u.this_pointer =
t;
1422 strcpy(
buf + strlen(
buf) - 1,
"_ion");
1430 if (
s->type != MECHANISM ||
1442 bool add2list =
true;
1444 if (
t->type_ >= 2) {
1447 if (
trans_[
i].ligand_index_ == iligold &&
t->index_ !=
i) {
1473 t->ligand_index_ = ilig;
1478 if (iligold < 0 && ilig >= 0) {
1480 printf(
"old transition order\n");
1482 printf(
"i=%d index=%d type=%d ligand_index=%d %s<->%s\n",
i,
1503 t->obj_->u.this_pointer =
t;
1509 printf(
"new transition order\n");
1511 printf(
"i=%d index=%d type=%d ligand_index=%d %s<->%s %s\n",
i,
1633 if (is ==
gc_[
i].sindex_) {
1641 if (
gc_[
i].sindex_ > is) {
1702 if (
trans_[
i].ligand_index_ != -1) {
1703 printf(
"trans_ %d ligand_index_=%d\n",
i,
trans_[
i].ligand_index_);
1732 auto const new_nstate =
nstate_ + 1;
1772 auto const new_nstate =
nstate_ - 1;
1915 int const new_nstate = vec->
elem(2);
1917 int i,
j,
ii, idx, ns;
1951 if (
i < nstate_old) {
1960 for (
i = 0;
i < nstate_old; ++
i) {
1975 for (
ii = 0;
ii < ns; ++
ii) {
2024 for (
i = 0;
i < nnew; ++
i) {
2028 snew[
i]->
name[0] =
'\0';
2035 snew[
i]->
u.
rng.index =
i;
2039 for (
i = nnew;
i < nold; ++
i) {
2047 char buf[100], buf1[100];
2054 nrn_assert(snprintf(
buf, 100,
"%s%s", buf1, unsuffix) < 100);
2058 if (strlen(buf1) > 0) {
2068 if (top->
type != TEMPLATE) {
2109 if (
s->extra->parmlimits) {
2110 free(
s->extra->parmlimits);
2112 if (
s->extra->units) {
2113 free(
s->extra->units);
2183 double dt1 = -1. /
dt;
2186 ml->
data(instance, offset +
i) *= dt1;
2196 s[
j + 1] = ml->
data(instance, offset +
j);
2212 ml->
data(instance, offset +
j) =
s[
j + 1];
2217 std::size_t instance,
2218 std::size_t offset_s,
2219 std::size_t offset_ds) {
2220 std::vector<double>
s, ds;
2225 s[
j + 1] = ml->
data(instance, offset_s +
j);
2226 ds[
j + 1] = ml->
data(instance, offset_ds +
j);
2231 ml->
data(instance, offset_s +
j) =
s[
j + 1];
2232 ml->
data(instance, offset_ds +
j) = ds[
j + 1];
2241 if (mech_data.empty()) {
2244 std::string
s =
"KSChan:: Cannot change the names or number of mechanism variables while " +
2246 throw std::runtime_error(
s);
2254 std::vector<std::pair<std::string, int>> params{};
2256 params.emplace_back(
"Nsingle", 1);
2258 params.emplace_back(
"gmax", 1);
2260 params.emplace_back(
"e", 1);
2262 params.emplace_back(
"g", 1);
2263 params.emplace_back(
"i", 1);
2265 params.emplace_back(
state(
i), 1);
2270 params.emplace_back(d +
state(
i), 1);
2277 std::vector<std::pair<std::string, std::string>> dparams{};
2279 dparams.emplace_back(
"_nd_area",
"area");
2280 dparams.emplace_back(
"_pntproc",
"pntproc");
2283 dparams.emplace_back(
"singleptr",
"pointer");
2288 dparams.emplace_back(
name +
"_erev",
name);
2289 dparams.emplace_back(
name +
"_icur",
name);
2290 dparams.emplace_back(
name +
"_didv",
name);
2291 dparams.emplace_back(
name +
"_ci",
name);
2292 dparams.emplace_back(
name +
"_co",
name);
2296 dparams.emplace_back(
name +
"_ligo",
name);
2297 dparams.emplace_back(
name +
"_ligi",
name);
2332 prop->dparam[2] =
nullptr;
2369 int type =
s->subtype;
2370 for (
p = nd->
prop;
p;
p =
p->next) {
2371 if (
p->_type ==
type) {
2382 for (
p = pm;
p;
p =
p->next) {
2383 if (
p->next == pion) {
2384 p->next =
p->next->next;
2425 for (
i = 0;
i <
sec->nnode; ++
i) {
2428 for (
p = nd->
prop;
p;
p =
p->next) {
2429 if (
p->_type == mtype) {
2439 p->dparam[2] =
nullptr;
2477 if (pnt && pnt->
prop) {
2491 if (pnt && pnt->
prop) {
2502 for (
int i = 0;
i <
n; ++
i) {
2506 ml->
data(
i, offset +
j) = 0;
2509 ml->
data(
i, offset +
gc_[
j].sindex_) = 1;
2524 if (snd->nsingle_ > 0) {
2540 for (
int i = 0;
i <
n; ++
i) {
2545 double v = vec_v[ni[
i]];
2550 auto const y =
floor(x);
2551 auto const k =
static_cast<int>(y);
2556 ml->
data(
i, offset +
j) += (inf - ml->
data(
i, offset +
j)) * tau;
2561 ml->
data(
i, offset +
j) += (inf - ml->
data(
i, offset +
j)) * tau;
2566 ml->
data(
i, offset +
j) += (inf - ml->
data(
i, offset +
j)) * tau;
2574 ml->
data(
i, offset +
j) += (inf - ml->
data(
i, offset +
j)) * tau;
2593 for (
int i = 0;
i <
n; ++
i) {
2606 for (
int i = 0;
i <
n; ++
i) {
2616 std::size_t instance,
2617 std::size_t offset) {
2618 auto ena = *pd[0].
get<
double*>();
2619 ml->
data(instance, offset + 1) = g;
2620 double i = g * (
v - ena);
2621 ml->
data(instance, offset + 2) =
i;
2622 *pd[1].
get<
double*>() +=
i;
2627 auto v = ml->
data(instance, offset + 1);
2628 *pd[2].
get<
double*>() +=
v;
2636 std::size_t instance,
2637 std::size_t offset) {
2638 double ci = *pd[3].
get<
double*>();
2639 double co = *pd[4].
get<
double*>();
2640 ml->
data(instance, offset + 1) = g;
2642 ml->
data(instance, offset + 2) =
i;
2643 *pd[1].
get<
double*>() +=
i;
2650 std::size_t instance,
2651 std::size_t offset) {
2652 auto ci = *pd[3].
get<
double*>();
2653 auto co = *pd[4].
get<
double*>();
2654 double i1 = ml->
data(instance, offset + 1) *
nrn_ghk(
v + .001, ci, co,
z);
2655 double didv = (i1 - ml->
data(instance, offset + 2)) * 1000.;
2656 *pd[2].
get<
double*>() += didv;
2664 std::size_t instance,
2665 std::size_t offset) {
2667 ml->
data(instance, offset + 2) = g;
2668 i = g * (
v - ml->
data(instance, offset + 1));
2669 ml->
data(instance, offset + 3) =
i;
2676 std::size_t instance,
2677 std::size_t offset) {
2678 return ml->
data(instance, offset + 2);
2685 std::size_t instance,
2686 std::size_t offset) {
2687 double afac = 1.e2 / (*pd[0].
get<
double*>());
2689 double ena = *pd[0].
get<
double*>();
2690 ml->
data(instance, offset + 1) = g;
2691 double i = g * (
v - ena);
2692 ml->
data(instance, offset + 2) =
i;
2694 *pd[1].
get<
double*>() +=
i;
2699 double afac = 1.e2 / (*pd[0].
get<
double*>());
2701 double g = ml->
data(instance, offset + 1) * afac;
2702 *pd[2].
get<
double*>() += g;
2710 std::size_t instance,
2711 std::size_t offset) {
2712 double afac = 1.e2 / (*pd[0].
get<
double*>());
2714 auto ci = *pd[3].
get<
double*>();
2715 auto co = *pd[4].
get<
double*>();
2716 ml->
data(instance, offset + 1) = g;
2718 ml->
data(instance, offset + 2) =
i;
2720 *pd[1].
get<
double*>() +=
i;
2727 std::size_t instance,
2728 std::size_t offset) {
2729 double afac = 1.e2 / (*pd[0].
get<
double*>());
2731 auto ci = *pd[3].
get<
double*>();
2732 auto co = *pd[4].
get<
double*>();
2733 double i1 = ml->
data(instance, offset + 1) *
nrn_ghk(
v + .001, ci, co,
z) * 1e6;
2734 double didv = (i1 - ml->
data(instance, offset + 2)) * 1000.;
2736 *pd[2].
get<
double*>() += didv;
2744 std::size_t instance,
2745 std::size_t offset) {
2746 double afac = 1.e2 / (*pd[0].
get<
double*>());
2748 ml->
data(instance, offset + 2) = g;
2749 i = g * (
v - ml->
data(instance, offset + 1));
2750 ml->
data(instance, offset + 3) =
i;
2757 std::size_t instance,
2758 std::size_t offset) {
2759 double afac = 1.e2 / (*pd[0].
get<
double*>());
2760 return ml->
data(instance, offset + 2) * afac;
2813 }
else if (
type_ == 3) {
2835 int i,
n =
v->size();
2839 for (
i = 0;
i <
n; ++
i) {
2844 for (
i = 0;
i <
n; ++
i) {
2850 for (
i = 0;
i <
n; ++
i) {
2866 double t = 1. / (a + b);
2873 int i,
n =
v->size();
2877 for (
i = 0;
i <
n; ++
i) {
2882 for (
i = 0;
i <
n; ++
i) {
2888 for (
i = 0;
i <
n; ++
i) {
2900 return x *
f0->
c(0);
2902 return x * x *
f0->
c(0);
2904 return x * x * x *
f0->
c(0);
2907 return x * x *
f0->
c(0);
2925 std::size_t instance,
2933 g += ml->
data(instance, offset +
i) * st[
i].
f_;
2979 for (
i = 0;
i <
n; ++
i) {
2982 auto offset2 = offset1 +
nstate_;
2985 ml->
data(
i, offset2 +
j) = 0.;
2992 ml->
data(
i, offset2 +
j) = (inf - ml->
data(
i, offset1 +
j)) / tau;
3007 for (
i = 0;
i <
n; ++
i) {
3016 ml->
data(
i, offset +
j) /= (1 + nt->
_dt / tau);
3033 for (
int i = 0;
i <
n; ++
i) {
3102 x =
c(
i) + (
c(
i + 1) -
c(
i)) * x;
3110 if (size < 1 || vmin >= vmax || size -
size1_ != 1) {
3128 for (
i = 0;
i < size; ++
i) {
3154 if (tml->index ==
type) {
static double Exp(double x)
static KSChanFunction * new_function(int type, Vect *, double, double)
virtual ~KSChanFunction()
virtual double f(double v)
void add_channel(const char **)
void ligand_consist(int, int, Prop *, Node *)
void register_data_fields()
void alloc_schan_node_data()
void mulmat(Memb_list *ml, std::size_t instance, std::size_t offset_s, std::size_t offset_ds)
virtual void alloc(Prop *)
void set_single(bool, bool update=true)
void fillmat(double v, Datum *pd)
virtual void jacob(NrnThread *, Memb_list *)
void usetable(bool, int size, double vmin, double vmax)
int trans_index(int src, int target)
void delete_schan_node_data()
KSState * add_hhstate(const char *)
KSGateComplex * gate_insert(int ig, int is, int power)
KSState * state_insert(int i, const char *name, double frac)
virtual void cv_sc_update(NrnThread *, Memb_list *)
void setname(const char *)
virtual void map(Prop *, int, neuron::container::data_handle< double > *, neuron::container::data_handle< double > *, double *)
virtual void init(NrnThread *, Memb_list *)
virtual void state(NrnThread *, Memb_list *)
void check_table_thread(NrnThread *)
KSChan(Object *, bool is_point=false)
void mat_dt(double dt, Memb_list *ml, std::size_t instance, std::size_t offset)
void setstructure(Vect *)
double conductance(double gmax, Memb_list *ml, std::size_t instance, std::size_t offset)
std::vector< double > parm_default
Prop * needion(Symbol *, Node *, Prop *)
void power(KSGateComplex *, int)
void ion_consist()
Almost obsolete: No longer allow KSChan structure changes when instances exist.
void destroy_pnt(Point_process *)
void remove_transition(int)
void setion(const char *)
virtual void spec(Memb_list *)
KSTransition * trans_insert(int i, int src, int target)
Symbol * installsym(const char *, int, Symbol *tmplt=NULL)
virtual void cur(NrnThread *, Memb_list *)
void solvemat(Memb_list *, std::size_t instance, std::size_t offset)
void setsname(int, const char *)
KSState * add_ksstate(int igate, const char *)
void freesym(Symbol *, Symbol *tmplt=NULL)
void err_if_has_instances() const
Error if instances exist.
virtual void matsol(NrnThread *, Memb_list *)
KSTransition * add_transition(int src, int target)
int gate_index(int state_index)
void settype(KSTransition *, int type, const char *)
Symbol * looksym(const char *, Symbol *tmplt=NULL)
KSChanTable(Vect *, double vmin, double vmax)
virtual double f(double v)
double conductance(Memb_list *ml, std::size_t instance, std::size_t offset, KSState *st)
void alloc(Prop *, int sindex)
void state(Node *, Datum *, NrnThread *)
static unsigned int idum_
void init(double v, KSSingleNodeData *snd, NrnThread *, Memb_list *, std::size_t instance, std::size_t offset)
void cv_update(Node *, Datum *, NrnThread *)
void inftau_hh_table(int i, double &inf, double &tau)
void ab(double v, double &a, double &b)
void inftau(double v, double &inf, double &tau)
void hh_table_make(double dt, int size=200, double vmin=-100., double vmax=50.)
void setf(int direction, int type, Vect *vec, double vmin, double vmax)
void class2oc(const char *, ctor_f *cons, dtor_f *destruct, Member_func *, Member_ret_obj_func *, Member_ret_str_func *)
Symbol * hoc_table_lookup(const char *, Symlist *)
Datum * nrn_prop_datum_alloc(int type, int count, Prop *p)
void nrn_delete_mechanism_prop_datum(int type)
double chkarg(int, double low, double high)
void hoc_execerr_ext(const char *fmt,...)
printf style specification of hoc_execerror message.
Object ** hoc_temp_objvar(Symbol *symtemp, void *v)
Symbol * hoc_install(const char *, int, double, Symlist **)
int hoc_is_double_arg(int narg)
char ** hoc_temp_charptr(void)
IvocVect * vector_arg(int i)
void hoc_obj_ref(Object *obj)
char * hoc_object_name(Object *ob)
Object ** vector_temp_objvar(Vect *v)
double * hoc_pgetarg(int narg)
Symbol * hoc_lookup(const char *)
int hoc_is_pdouble_arg(int narg)
void hoc_obj_unref(Object *obj)
void hoc_unlink_symbol(Symbol *, Symlist *)
Object ** hoc_objgetarg(int)
Symlist * hoc_top_level_symlist
static double ks_gmax(void *v)
static double ks_setstructure(void *v)
static const char ** ks_ion(void *v)
static void nrn_state(neuron::model_sorted_token const &, NrnThread *nt, Memb_list *ml, int type)
static double kst_set_f(void *v)
static double hoc_nsingle(void *v)
static Symbol * ksgate_sym
static void ode_spec(neuron::model_sorted_token const &token, NrnThread *, Memb_list *ml, int type)
static void nrn_cur(neuron::model_sorted_token const &, NrnThread *nt, Memb_list *ml, int type)
static double ks_ngate(void *v)
static double ks_remove_transition(void *v)
static double ksg_nstate(void *v)
static void * kst_cons(Object *o)
static Object ** ks_state(void *v)
static Object ** ks_add_hhstate(void *v)
static double kst_index(void *v)
static double kst_ftype(void *v)
static int ode_count(int type)
static Object ** kst_src(void *v)
static double kst_inftau(void *v)
static const char * m_kschan[9]
static void nrn_jacob(neuron::model_sorted_token const &, NrnThread *nt, Memb_list *ml, int type)
static double ks_rseed(void *v)
static Member_ret_obj_func kst_omem[]
static double ks_single(void *v)
static double ks_remove_state(void *v)
static Member_ret_str_func kst_smem[]
static void ksg_destruct(void *)
static double hoc_has_loc(void *v)
static double hoc_get_loc_pnt(void *v)
static Object ** kst_target(void *v)
static double kss_index(void *v)
static double ks_erev(void *v)
static Object ** kss_gate(void *v)
static void ks_destruct(void *)
static void nrn_init(neuron::model_sorted_token const &, NrnThread *nt, Memb_list *ml, int type)
static Object ** ks_gate(void *v)
std::vector< KSChan * > KSChanList
static double kst_stoichiometry(void *v)
static Member_ret_str_func kss_smem[]
static double ks_usetable(void *v)
static Member_func kst_dmem[]
static Object ** ks_add_ksstate(void *v)
static void * ks_cons(Object *o)
static void hoc_destroy_pnt(void *v)
static Symbol * ksstate_sym
static double kst_f(void *v)
static double ksg_power(void *v)
static void check_table_thread_(Memb_list *, std::size_t, Datum *, Datum *, double *, NrnThread *vnt, int type, neuron::model_sorted_token const &)
char * hoc_symbol_units(Symbol *, const char *)
static void * kss_cons(Object *o)
static double ksg_sindex(void *v)
static double ks_is_point(void *v)
static Member_func ks_dmem[]
static const char ** kss_name(void *v)
static double ksg_index(void *v)
static double kst_ab(void *v)
static Object ** kst_parm(void *v)
static double ks_vres(void *v)
static double ks_nligand(void *v)
static void ode_matsol(neuron::model_sorted_token const &token, NrnThread *nt, Memb_list *ml, int type)
static const char * m_kschan_pat[]
static double hoc_loc_pnt(void *v)
static void check_objtype(Object *o, Symbol *s)
static int ksusing(int type)
void nrn_mk_table_check()
static double ks_nstate(void *v)
static void singchan(NrnThread *nt, Memb_list *ml, int type)
static Member_func kss_dmem[]
static Object ** temp_objvar(const char *name, void *v, Object **obp)
static double kss_frac(void *v)
static void ode_map(Prop *prop, int ieq, neuron::container::data_handle< double > *pv, neuron::container::data_handle< double > *pvdot, double *atol, int type)
static double kst_type(void *v)
static Object ** ks_add_transition(void *v)
static void * hoc_create_pnt(Object *ho)
static void chkobj(void *v)
spREAL * spGetElement(char *, int, int)
static void unref(Object *obj)
static void nrn_alloc(Prop *prop)
static Object ** ks_trans(void *v)
static void kst_destruct(void *)
static const char ** ks_ligand(void *v)
static double ks_pr(void *v)
static KSChanList * channels
static void * ksg_cons(Object *o)
static Member_func ksg_dmem[]
void kschan_cvode_single_update()
static Member_ret_str_func ks_smem[]
static double ks_iv_type(void *v)
static const char ** kst_ligand(void *v)
static const char ** ks_name(void *v)
static Symbol * kstrans_sym
static Member_ret_obj_func kss_omem[]
static Member_func member_func[]
static double ks_ntrans(void *v)
static Member_ret_obj_func ks_omem[]
static void kss_destruct(void *)
#define ITERATE(itm, lst)
void update(NrnThread *_nt)
void ion_reg(const char *, double)
void hoc_execerror(const char *s1, const char *s2)
int nrn_get_mechtype(const char *name)
Get mechanism type by the mechanism name.
int point_register_mech(const char **, mod_alloc_t alloc, mod_f_t cur, mod_f_t jacob, mod_f_t stat, mod_f_t initialize, mod_f_t private_constructor, mod_f_t private_destructor, int nrnpointerindex, mod_f_t constructor, mod_f_t destructor, int vectorized)
int register_mech(const char **m, mod_alloc_t alloc, mod_f_t cur, mod_f_t jacob, mod_f_t stat, mod_f_t initialize, mod_f_t private_constructor, mod_f_t private_destructor, int nrnpointerindex, int vectorized)
void hoc_warning(const char *s1, const char *s2)
void * hoc_Emalloc(size_t)
void register_data_fields(int mechtype, std::vector< std::pair< std::string, int >> const ¶m_info, std::vector< std::pair< std::string, std::string >> const &dparam_info)
Model & model()
Access the global Model instance.
int Sprintf(char(&buf)[N], const char *fmt, Args &&... args)
Redirect sprintf to snprintf if the buffer size can be deduced.
std::string to_string(const T &obj)
Prop * prop_alloc(Prop **, int, Node *)
#define nrn_assert(x)
assert()-like macro, independent of NDEBUG status
double nrn_ion_charge(Symbol *)
int const size_t const size_t n
void destroy_point_process(void *)
double loc_point_process(int, void *)
double has_loc_point(void *)
void * create_point_process(int, Object *)
double get_loc_point_process(void *)
Prop * need_memb(Symbol *)
std::vector< Memb_func > memb_func
void nrn_promote(Prop *p, int conc, int rev)
void hoc_register_cvode(int i, nrn_ode_count_t cnt, nrn_ode_map_t map, nrn_ode_spec_t spec, nrn_ode_matsol_t matsol)
void hoc_register_parm_default(int mechtype, const std::vector< double > *pd)
static void * vmin(NrnThread *nt)
static double remove(void *v)
char * spCreate(int Size, BOOLEAN Complex, int *pError)
void spClear(char *eMatrix)
int spFactor(char *eMatrix)
void spSolve(char *eMatrix, spREAL *RHS, spREAL *Solution, std::optional< spREAL * > iRHS=std::nullopt, std::optional< spREAL * > iSolution=std::nullopt)
void spMultiply(char *, spREAL *, spREAL *, std::optional< spREAL * >=std::nullopt, std::optional< spREAL * >=std::nullopt)
Object ** hoc_temp_objptr(Object *)
Symlist * hoc_built_in_symlist
virtual double jacob(Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset)
virtual double cur(double g, Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset)
double jacob(Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset) override
double cur(double g, Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset) override
double jacob(Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset) override
double cur(double g, Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset) override
double cur(double g, Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset) override
double jacob(Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset) override
double jacob(Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset) override
double cur(double g, Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset) override
double cur(double g, Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset) override
double jacob(Datum *pd, double v, Memb_list *ml, std::size_t instance, std::size_t offset) override
A view into a set of mechanism instances.
std::vector< double * > data()
Get a vector of double* representing the model data.
Represent main neuron object computed by single thread.
double * node_rhs_storage()
double * node_d_storage()
double * node_voltage_storage()
A point process is computed just like regular mechanisms.
auto param_handle(int field, int array_index=0)
Return a handle to the i-th double value associated with this Prop.
int param_size() const
Return how many double values are assocated with this Prop.
struct Symbol::@45::@46 rng
container::Mechanism::storage & mechanism_data(int type)
Get the structure holding the data of a particular Mechanism.
Non-template stable handle to a generic value.
T get() const
Explicit conversion to any T.
int Printf(const char *fmt, Args... args)