I have a model loaded from this kind of template:
Code: Select all
{load_file("stdrun.hoc")}
{load_file("import3d.hoc")}
begintemplate Cell_Scnn1a
public init, morphology, geom_nseg_fixed, geom_nsec, gid
public channel_seed
public soma, dend, apic, axon, myelin
create soma[1], dend[1], apic[1], axon[1], myelin[1]
objref this, CellRef, segCounts
public all, somatic, apical, axonal, basal, myelinated, APC
objref all, somatic, apical, axonal, basal, myelinated, APC
proc init(/* args: morphology_dir, morphology_name */) {
all = new SectionList()
apical = new SectionList()
//...
forall delete_section()
if(numarg() >= 2) {
load_morphology($s1, $s2)
} else {
load_morphology($s1, "Scnn1a_473845048_m.swc")
}
geom_nseg()
insertChannel()
biophys()
}
proc load_morphology(/* morphology_dir, morphology_name */) {localobj morph, import, sf, extension
strdef morph_path
sprint(morph_path, "%s/%s", $s1, $s2)
//...
morph.quiet = 1
morph.input(morph_path)
import = new Import3d_GUI(morph, 0)
import.instantiate(this)
}
proc distribute_distance(){local x localobj sl
//...
}
proc geom_nseg() {
//...
}
proc insertChannel() {
forsec this.all {
}
forsec this.apical {
insert pas
}
//...
forsec this.somatic {
insert Im
//...
}
}
proc biophys() {
forsec CellRef.all {
Ra = 138.28
}
forsec CellRef.apical {
g_pas = 9.5861855476200007e-05
//...
}
//...
forsec CellRef.somatic {
gbar_Im = 0.0012021154978799999
//...
}
}
func sec_count(/* SectionList */) {
//..
}
proc geom_nseg_fixed(/* chunkSize */) { local secIndex, chunkSize
//...
}
proc geom_nsec() { local nSec
//...
}
endtemplate Cell_Scnn1a