File: channel.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 (89 lines) | stat: -rw-r--r-- 3,194 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89

//genesis
/* channel.g


	functions defined in this script
=============================================================================
	FUNCTION NAME		ARGUMENTS
=============================================================================
	makechannel		(compartment,channel,Ek,tau1,tau2,gmax)
	make_hhNa		(compartment,channel,activearea,ENa,Erest)
	make_hhK		(compartment,channel,activearea,EK,Erest)
=============================================================================
*/


//=================================================
//       BASIC TRANSMITTER ACTIVATED CHANNEL
//=================================================
function makechannel(compartment, channel, Ek, tau1, tau2, gmax)
    str compartment
    str channel
    // mV
    float Ek
    // msec
    float tau1, tau2
    // mS
    float gmax

    create synchan {compartment}/{channel}
    setfield ^ Ek {Ek} tau1 {tau1} tau2 {tau2} gmax {gmax}
    link_channel2 {compartment}/{channel} {compartment}
end

/*
 The Hodgkin-Huxley voltage activated channels are implemented with
 tabchannel objects using parameters taken from
 A.L.Hodgkin and A.F.Huxley, J.Physiol(Lond) 117, pp 500-544 (1952)

 The following two functions may be compared to those in MultiCell/channel.g,
 where the hh_channel object is used.  These are based upon hh_tchan.g in
 the neurokit/prototypes directory, but use physiological units (mV and msec).
 This means that the "-range" option of the setupalpha function must be
 specified, as the default range is -0.1 to 0.05 Volts.
*/

//=================================================
//                 HH NA CHANNEL
//=================================================
function make_hhNa(compartment, channel, activearea, ENa, EREST_ACT)
    str compartment
    str channel
    float activearea     // cm^2
    float ENa, EREST_ACT    // mV

    create tabchannel {compartment}/{channel}
    setfield ^ Ek {ENa} Gbar {120.0*activearea} Xpower 3 Ypower 1 Zpower 0

    setupalpha {compartment}/{channel} X {0.1*(25.0 + EREST_ACT)} -0.1  \
            -1.0 {-1.0*(25.0 + EREST_ACT)} -10.0  \
            4.0 0.0 0.0 {-1.0*EREST_ACT} 18.0 -range -100.0 50.0

    setupalpha {compartment}/{channel} Y 0.07 0.0 0.0  \
            {-1.0*EREST_ACT} 20.0 1.0 0.0 1.0  \
            {-1.0*(30.0 + EREST_ACT)} -10.0  -range -100.0 50.0

    addmsg {compartment} {compartment}/{channel} VOLTAGE Vm
    addmsg {compartment}/{channel} {compartment} CHANNEL Gk Ek
end

//=================================================
//                  HH K CHANNEL
//=================================================
function make_hhK(compartment, channel, activearea, EK, EREST_ACT)
    str compartment
    str channel
    float activearea
    float EK, EREST_ACT    // mV

    create tabchannel {compartment}/{channel}
    setfield ^ Ek {EK} Gbar {36.0*activearea} Xpower 4 Ypower 0 Zpower 0

    setupalpha {compartment}/{channel} X {0.01*(10.0 + EREST_ACT)} -0.01  \
            -1.0 {-1.0*(10.0 + EREST_ACT)} -10.0 0.125 0.0 0.0  \
            {-1.0*EREST_ACT} 80.0 -range -100.0 50.0

    addmsg {compartment} {compartment}/{channel} VOLTAGE Vm
    addmsg {compartment}/{channel} {compartment} CHANNEL Gk Ek
end