############################## Define Brain ################################

BRAIN
        TYPE                    AutoPortTest
	JOB			j_07072004
        FSV                     10000
        DURATION                1.0025
        INTERACTIVE             NO
	STIMULUS_INJECT         stiminject1
	STIMULUS_INJECT         stiminject2
	REPORT			r1
	REPORT                  r2
	REPORT                  r3
        REPORT                  r4
        IGNORE_EMPTY            NO
        SEED                    999999
	COLUMN_TYPE             AI_1
        COLUMN_TYPE             BI_1
	
	#all objects requesting auto port configuration will contact this server
        SERVER                  cortex.cs.unr.edu

	#all objects requesting auto port configuration will connect using this port
        SERVER_PORT             20001

	#indicates that brain commands should be automatically configured
	PORT                    AUTO 
END_BRAIN

############################### Define Stimulus ##########################

STIMULUS
        TYPE                    stimulus1
        MODE                    CURRENT
        PATTERN                 INPUT

	#indicates that this stimulus should use the brain's server and
	#server_port to configure
        PORT                    AUTO

	#the name used to distinguish this stimulus on the server
        FILENAME                reward

        TIME_FREQ_INCREMENT     0.025 0.0
        CELLS_PER_FREQ          4
        FREQ_ROWS               2
        TIMING                  EXACT
        SAMESEED                NO
        AMP_START               1
        AMP_END                 1
        WIDTH                   0.4
        TIME_START              0.2
        TIME_END                0.4
        FREQ_START              1.0
END_STIMULUS

STIMULUS_INJECT
        TYPE                    stiminject1
        STIM_TYPE               stimulus1
        INJECT                  AI_1 layer_A Excitatory s1 1.0
END_STIMULUS_INJECT

STIMULUS
        TYPE                    stimulus2
        MODE                    CURRENT
        PATTERN                 PULSE
        TIMING                  EXACT
        SAMESEED                NO
        AMP_START               10
        AMP_END                 10
        WIDTH                   0.0003
        TIME_START              0.8
        TIME_END                0.8003
        FREQ_START              1
END_STIMULUS

STIMULUS_INJECT
        TYPE                    stiminject2
        STIM_TYPE               stimulus2
        INJECT                  AI_1 layer_A Excitatory s1 1.0
END_STIMULUS_INJECT

############################### Define Reports ###########################

REPORT
        TYPE r1
        CELLS AI_1 layer_A Excitatory s1
        REPORT_ON VOLTAGE
        PROB 1
        ASCII

	#name for port identification
        FILENAME soma.out

	#Use Brain's server and server_port to configure communications
        PORT AUTO
        FREQUENCY 1
        TIME_START 0.0
        TIME_END 1.0
END_REPORT

REPORT
        TYPE r2
        CELLS AI_1 layer_A Inhibitory s1
        REPORT_ON VOLTAGE
        PROB 1
        ASCII
        FILENAME inhib.out
        FREQUENCY 1
        TIME_START 0.0
        TIME_END 1.0
END_REPORT

############################### Define Column Shells #########################

COLUMN_SHELL
        TYPE                    AI_shell_1
        WIDTH                   300
        HEIGHT                  800
        LOCATION                0               0
END_COLUMN_SHELL

COLUMN_SHELL
        TYPE                    BI_shell_1
        WIDTH                   300
        HEIGHT                  800
        LOCATION                0               0
END_COLUMN_SHELL

############################### Fill Columns #################################

COLUMN
        TYPE                    AI_1
        COLUMN_SHELL            AI_shell_1
        LAYER_TYPE              layer_A
        LAYER_TYPE              layer_B
END_COLUMN

COLUMN
        TYPE                    BI_1
        COLUMN_SHELL            BI_shell_1
        LAYER_TYPE              layer_A
        LAYER_TYPE              layer_B
END_COLUMN

############################### Define Layer Shells #########################

LAYER_SHELL
        TYPE                    layer_shell_A
        LOWER                   0
        UPPER                   35
END_LAYER_SHELL

LAYER_SHELL
        TYPE                    layer_shell_B
        LOWER                   35
        UPPER                   65
END_LAYER_SHELL

LAYER_SHELL
        TYPE                    layer_shell_C
        LOWER                   65
        UPPER                   100
END_LAYER_SHELL

############################### Fill Layers ##################################

LAYER
        TYPE                    layer_A
        LAYER_SHELL             layer_shell_A
        CELL_TYPE               Excitatory      10
        CELL_TYPE               Inhibitory      10
        CONNECT
                                Excitatory      s1
                                Inhibitory      s1
                                ExcitSyn1       1.0             3
        CONNECT
                                Excitatory      s1
                                Inhibitory      s1
                                ExcitSyn1       1.0             3
END_LAYER

LAYER
        TYPE                    layer_B
        LAYER_SHELL             layer_shell_B
        CELL_TYPE               Excitatory      1
        CELL_TYPE               Inhibitory      1
        CONNECT
                                Excitatory      s1
                                Inhibitory      s1
                                ExcitSyn1       1.0             3
END_LAYER

############################### Define Cells ################################

CELL
        TYPE                    Excitatory
        COMPARTMENT             soma_e1         s1      0       0   0
END_CELL

CELL
        TYPE                    Excitatory2
        COMPARTMENT             soma_e1         s1      0       0   0
END_CELL

CELL
        TYPE                    Inhibitory
        COMPARTMENT             soma_e1         s1      0       0  0
END_CELL

############################### Define Compartments ##########################

COMPARTMENT
        TYPE                    soma_e1
        SPIKESHAPE              AP_Hoff
        SPIKE_HALFWIDTH         10              0
        TAU_MEMBRANE            0.015           0.0
        R_MEMBRANE              200             0
        THRESHOLD               -40             0
        LEAK_REVERSAL           0               0
        LEAK_CONDUCTANCE        0               0
        VMREST                  -60             0
        CA_INTERNAL             100              0
        CA_EXTERNAL             0               0
        CA_SPIKE_INCREMENT      300             0
        CA_TAU                  0.07            0.0
        CHANNEL                 ahp-2
        CHANNEL                 m-1
END_COMPARTMENT

COMPARTMENT
        TYPE                    soma_i1
        SPIKESHAPE              AP_Hoff
        SPIKE_HALFWIDTH         10              0
        TAU_MEMBRANE            0.015           0.001
        R_MEMBRANE              200             3
        THRESHOLD               -40             1
        LEAK_REVERSAL           0               0
        LEAK_CONDUCTANCE        0               0
        VMREST                  -60             1
        CA_INTERNAL             20              0
        CA_EXTERNAL             0               0
        CA_SPIKE_INCREMENT      100             5
        CA_TAU                  0.1            0.001
END_COMPARTMENT

COMPARTMENT
        TYPE                    dendrite
        TAU_MEMBRANE            0.015           0.001
        R_MEMBRANE              200             3
        LEAK_REVERSAL           0               0
        LEAK_CONDUCTANCE        0               0
        VMREST                  -60             1
        CA_INTERNAL             20              0
        CA_EXTERNAL             0               0
        CA_SPIKE_INCREMENT      100             5
        CA_TAU                  0.1            0.001
END_COMPARTMENT

############################### Define Channels #############################

CHANNEL Kahp
        TYPE                            ahp-1
        REVERSAL_POTENTIAL              -80             0
        M_INITIAL                       0.0             0.0
        M_POWER                         2
        CA_SCALE_FACTOR                 0.000125        0
        CA_EXP_FACTOR                   2               0
        CA_HALF_MIN                     2.5             0
        CA_TAU_SCALE_FACTOR             1.0             0.0
        UNITARY_G                       0.054           0
        STRENGTH                        1.5            0.0
END_CHANNEL

CHANNEL Kahp
        TYPE                            ahp-2
        REVERSAL_POTENTIAL              -80             0
        M_INITIAL                       0.0             0.0
        M_POWER                         2
        CA_SCALE_FACTOR                 0.000125        0
        CA_EXP_FACTOR                   2               0
        CA_HALF_MIN                     2.5             0
        CA_TAU_SCALE_FACTOR             0.003            0.0000
        UNITARY_G                       0.054           0
        STRENGTH                        0.15            0.0
END_CHANNEL

CHANNEL Km
        TYPE                            m-1
        REVERSAL_POTENTIAL              -80             0
        M_INITIAL                       0.1             0.0
        M_POWER                         1
        E_HALF_MIN_M                    -44             0
        SLOPE_FACTOR_M                  40              20              8.8
        SLOPE_FACTOR_M_STDEV            0
        TAU_SCALE_FACTOR_M		0.303
        UNITARY_G                       0.084           0
        STRENGTH                        0.03           0
END_CHANNEL

CHANNEL Ka
        TYPE                            a-1
        REVERSAL_POTENTIAL              -80             0
        M_INITIAL                       0.3             0.0
        M_POWER                         1
        E_HALF_MIN_M                    -21.3              0
        SLOPE_FACTOR_M                  35
        SLOPE_FACTOR_M_STDEV            0.0
        V_TAU_VOLTAGE_M                 100.000000
        V_TAU_VOLTAGE_M_STDEV           0.000000
        V_TAU_VALUE_M                   0.000200        9999.000000
        V_TAU_VALUE_M_STDEV             0.00000
        H_INITIAL                       0.7             0.0
        H_POWER                         1
        E_HALF_MIN_H                    -58             0
        SLOPE_FACTOR_H                  8.2
        SLOPE_FACTOR_H_STDEV            0.0
        V_TAU_VOLTAGE_H                 -21.000000      -1.000000       10.000000       21.000000
        V_TAU_VOLTAGE_H_STDEV           0.0
        V_TAU_VALUE_H                   0.005000        0.001000        0.015000        0.020000        0.250000
        V_TAU_VALUE_H_STDEV             0.0000
        UNITARY_G                       0.120           0
        STRENGTH                        0.05            0
END_CHANNEL

CHANNEL Ka
        TYPE                            a-2
        REVERSAL_POTENTIAL              -80             0
        M_INITIAL                       0.3             0.0
        M_POWER                         1
        E_HALF_MIN_M                    -21.3              0
        SLOPE_FACTOR_M                  35
        SLOPE_FACTOR_M_STDEV            0.0
        V_TAU_VOLTAGE_M                 100.000000
        V_TAU_VOLTAGE_M_STDEV           0.000000
        V_TAU_VALUE_M                   0.0002        9999.000000
        V_TAU_VALUE_M_STDEV             0.00000
        H_INITIAL                       0.7             0.0
        H_POWER                         1
        E_HALF_MIN_H                    -58             0
        SLOPE_FACTOR_H                  8.2
        SLOPE_FACTOR_H_STDEV            0.0
        V_TAU_VOLTAGE_H                 -21.000000      -1.000000       10.000000       21.000000
        V_TAU_VOLTAGE_H_STDEV           0.0
        V_TAU_VALUE_H                   0.005000        0.001000        0.015000        0.020000        0.250000
        V_TAU_VALUE_H_STDEV             0.0000
        UNITARY_G                       0.120           0
        STRENGTH                        0.05            0
END_CHANNEL

############################### Define Synapse ##############################

SYNAPSE
        TYPE                    ExcitSyn1
        SFD_LABEL               F0
        SYN_PSG			PSGexcit
        LEARN_LABEL             0HEBB
	MAX_CONDUCT             0.12
        DELAY                   0.000           0.0008
        SYN_REVERSAL		0		0	                    
	ABSOLUTE_USE		0.250		0.0
END_SYNAPSE

SYNAPSE
        TYPE                    InhibSyn1
        SFD_LABEL               F0
        SYN_PSG		        PSGinhib
        LEARN_LABEL             0HEBB
	MAX_CONDUCT             0.05
        DELAY                   0.000           0.0008
        SYN_REVERSAL		0		0	                    
        ABSOLUTE_USE            0.32		0.0
END_SYNAPSE

############################### Short-term Synaptic Dynamics ###############

SYN_FACIL_DEPRESS
        TYPE                    F0
        SFD                     NONE
        FACIL_TAU               0.1           0.01
        DEPR_TAU                0.1           0.01
END_SYN_FACIL_DEPRESS

SYN_FACIL_DEPRESS
        TYPE                    F1
        SFD                     BOTH
        FACIL_TAU               0.376           0.0
        DEPR_TAU                0.045           0.0
END_SYN_FACIL_DEPRESS

SYN_FACIL_DEPRESS
        TYPE                    F2
        SFD                     BOTH
        FACIL_TAU               0.021           0.0
        DEPR_TAU                0.706           0.0
END_SYN_FACIL_DEPRESS

SYN_FACIL_DEPRESS
        TYPE                    F3
        SFD                     BOTH
        FACIL_TAU               0.062           0.031
        DEPR_TAU                0.144           0.08
END_SYN_FACIL_DEPRESS

############################### Synaptic waveform #########################

SYN_PSG
        TYPE                    PSGexcit
        PSG_FILE                /home/jbm/EPSC.txt
END_SYN_PSG

SYN_PSG
        TYPE                    PSGinhib
        PSG_FILE                /home/jbm/IPSC.txt
END_SYN_PSG

############################### Long-term Synaptic Dynamics ###############

SYN_LEARNING
        TYPE                    0HEBB
        LEARNING                NONE
	NEG_HEB_WINDOW          0.04            0.0
        POS_HEB_WINDOW          0.04            0.0
        POS_HEB_PEAK_DELTA_USE  0.01            0.0
        NEG_HEB_PEAK_DELTA_USE  0.005           0.0
        POS_HEB_PEAK_TIME       0.01            0.0
        NEG_HEB_PEAK_TIME       0.01            0.0
END_SYN_LEARNING

SYN_LEARNING
        TYPE                    +-HEBB
        LEARNING                BOTH
        NEG_HEB_WINDOW          0.04            0.0
        POS_HEB_WINDOW          0.04            0.0
        POS_HEB_PEAK_DELTA_USE  0.01            0.0
        NEG_HEB_PEAK_DELTA_USE  0.005           0.0
        POS_HEB_PEAK_TIME       0.01            0.0
        NEG_HEB_PEAK_TIME       0.01            0.0
END_SYN_LEARNING

############################### Define spikeshapes #######################

SPIKESHAPE
  TYPE     AP_Hoff
  VOLTAGES -38 -35 -30 -20 -7 15 40 20 7 -8 -16 -22 -28 -33 -37 -40 -43 -45 -47 -52 -60
END_SPIKESHAPE

