diff --git a/bluepyopt/ephys/templates/cell_template.jinja2 b/bluepyopt/ephys/templates/cell_template.jinja2 index 2b964641..65d9376b 100644 --- a/bluepyopt/ephys/templates/cell_template.jinja2 +++ b/bluepyopt/ephys/templates/cell_template.jinja2 @@ -42,6 +42,10 @@ begintemplate {{template_name}} public all, somatic, apical, axonal, basal, myelinated, APC objref all, somatic, apical, axonal, basal, myelinated, APC +obfunc getCell(){ + return this +} + proc init(/* args: morphology_dir, morphology_name */) { all = new SectionList() apical = new SectionList() @@ -120,6 +124,7 @@ proc distribute_distance(){local x localobj sl this.soma[0] distance(0, 0.5) sprint(distfunc, "%%s %s(%%f) = %s", mech, distfunc) forsec sl for(x, 0) { + // use distance(x) twice for the step distribution case, e.g. for calcium hotspot sprint(stmp, distfunc, secname(), x, distance(x), distance(x)) execute(stmp) } diff --git a/examples/stochkv/stochkv3cell.hoc b/examples/stochkv/stochkv3cell.hoc index 4224e882..b19bf683 100644 --- a/examples/stochkv/stochkv3cell.hoc +++ b/examples/stochkv/stochkv3cell.hoc @@ -27,6 +27,10 @@ begintemplate stochkv3_cell public all, somatic, apical, axonal, basal, myelinated, APC objref all, somatic, apical, axonal, basal, myelinated, APC +obfunc getCell(){ + return this +} + proc init(/* args: morphology_dir, morphology_name */) { all = new SectionList() apical = new SectionList() @@ -98,6 +102,7 @@ proc distribute_distance(){local x localobj sl this.soma[0] distance(0, 0.5) sprint(distfunc, "%%s %s(%%f) = %s", mech, distfunc) forsec sl for(x, 0) { + // use distance(x) twice for the step distribution case, e.g. for calcium hotspot sprint(stmp, distfunc, secname(), x, distance(x), distance(x)) execute(stmp) } diff --git a/examples/stochkv/stochkv3cell_det.hoc b/examples/stochkv/stochkv3cell_det.hoc index 186179a2..4ece5e02 100644 --- a/examples/stochkv/stochkv3cell_det.hoc +++ b/examples/stochkv/stochkv3cell_det.hoc @@ -27,6 +27,10 @@ begintemplate stochkv3_cell public all, somatic, apical, axonal, basal, myelinated, APC objref all, somatic, apical, axonal, basal, myelinated, APC +obfunc getCell(){ + return this +} + proc init(/* args: morphology_dir, morphology_name */) { all = new SectionList() apical = new SectionList() @@ -98,6 +102,7 @@ proc distribute_distance(){local x localobj sl this.soma[0] distance(0, 0.5) sprint(distfunc, "%%s %s(%%f) = %s", mech, distfunc) forsec sl for(x, 0) { + // use distance(x) twice for the step distribution case, e.g. for calcium hotspot sprint(stmp, distfunc, secname(), x, distance(x), distance(x)) execute(stmp) } diff --git a/examples/stochkv/stochkvcell.hoc b/examples/stochkv/stochkvcell.hoc index a777a6c2..fcdc4ea3 100644 --- a/examples/stochkv/stochkvcell.hoc +++ b/examples/stochkv/stochkvcell.hoc @@ -27,6 +27,10 @@ begintemplate stochkv_cell public all, somatic, apical, axonal, basal, myelinated, APC objref all, somatic, apical, axonal, basal, myelinated, APC +obfunc getCell(){ + return this +} + proc init(/* args: morphology_dir, morphology_name */) { all = new SectionList() apical = new SectionList() @@ -98,6 +102,7 @@ proc distribute_distance(){local x localobj sl this.soma[0] distance(0, 0.5) sprint(distfunc, "%%s %s(%%f) = %s", mech, distfunc) forsec sl for(x, 0) { + // use distance(x) twice for the step distribution case, e.g. for calcium hotspot sprint(stmp, distfunc, secname(), x, distance(x), distance(x)) execute(stmp) } diff --git a/examples/stochkv/stochkvcell_det.hoc b/examples/stochkv/stochkvcell_det.hoc index 6e90e6a1..7a926b5c 100644 --- a/examples/stochkv/stochkvcell_det.hoc +++ b/examples/stochkv/stochkvcell_det.hoc @@ -27,6 +27,10 @@ begintemplate stochkv_cell public all, somatic, apical, axonal, basal, myelinated, APC objref all, somatic, apical, axonal, basal, myelinated, APC +obfunc getCell(){ + return this +} + proc init(/* args: morphology_dir, morphology_name */) { all = new SectionList() apical = new SectionList() @@ -98,6 +102,7 @@ proc distribute_distance(){local x localobj sl this.soma[0] distance(0, 0.5) sprint(distfunc, "%%s %s(%%f) = %s", mech, distfunc) forsec sl for(x, 0) { + // use distance(x) twice for the step distribution case, e.g. for calcium hotspot sprint(stmp, distfunc, secname(), x, distance(x), distance(x)) execute(stmp) }