File: cell.g

package info (click to toggle)
genesis 2.1-1.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 14,288 kB
  • ctags: 10,667
  • sloc: ansic: 111,959; makefile: 2,240; yacc: 1,797; lex: 976; csh: 54; sh: 13
file content (65 lines) | stat: -rw-r--r-- 2,346 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//genesis
/* 
	functions defined in this script
=============================================================================
	FUNCTION NAME		ARGUMENTS
=============================================================================
	makeneuron		(path,soma_l,soma_d,dend_l,dend_d)
=============================================================================
*/

//=================================================
//                    NEURON
//=================================================
function makeneuron(path, soma_l, soma_d, dend_l, dend_d)
    str path
    float soma_l, soma_d
    float dend_l, dend_d

    // 100% of the soma active
    float active_area = soma_l*PI*soma_d*1.0

    create neutral {path}
    pushe {path}
    //=============================================
    //                   cell body
    //=============================================
    makecompartment soma {soma_l} {soma_d} {Eleak}
    position soma I I R{-soma_l/2.0}

    //=============================================
    //          voltage dependent conductances
    //=============================================
    make_hhNa soma hh_Na {active_area} {ENa} {EREST}
    make_hhK soma hh_K {active_area} {EK} {EREST}

    //=============================================
    //                   dendrite
    //=============================================
    makecompartment soma/dend {dend_l} {dend_d} {Eleak}
    position soma/dend I I R{-dend_l/2.0}
    link_compartment soma/dend soma

    //=============================================
    //    synaptic conductances on the dendrite
    //=============================================
    makechannel soma/dend Na_channel {ENa} 3.0 3.0 {GNa}
    makechannel soma/dend K_channel {EK} 10.0 10.0 {GK}

    //=============================================
    //                 spike detector
    //=============================================
    create spike spike
    setfield spike thresh 0 abs_refract 10 output_amp 1
    /* use the soma membrane potential to drive the spike detector */
    addmsg soma spike INPUT Vm

    //=============================================
    //                 output axon
    //=============================================
    create axon axon
    /* use the spike detector output to drive the axon */
    addmsg spike axon BUFFER name

    pope
end