Skip to content

Commit

Permalink
Merge pull request #486 from BlueBrain/jinja-template
Browse files Browse the repository at this point in the history
update jinja template to have getCell function
  • Loading branch information
AurelienJaquier authored Feb 5, 2024
2 parents e05921d + e9f01c7 commit 6fddc82
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bluepyopt/ephys/templates/cell_template.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
}
Expand Down
5 changes: 5 additions & 0 deletions examples/stochkv/stochkv3cell.hoc
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
}
Expand Down
5 changes: 5 additions & 0 deletions examples/stochkv/stochkv3cell_det.hoc
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
}
Expand Down
5 changes: 5 additions & 0 deletions examples/stochkv/stochkvcell.hoc
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
}
Expand Down
5 changes: 5 additions & 0 deletions examples/stochkv/stochkvcell_det.hoc
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 6fddc82

Please sign in to comment.