def buildRdesigneur():
	path = os.path.abspath(os.path.dirname('currentStep_CA3PC-Narayanan2010_v1.0.py'))
	cellProto = [ [ "./cells/" + elecFileNames[0], "elec" ] ]
	chanProto = [
	    [path+'/proto20.make_Ca_conc()', 'Ca_conc'], \
        ['./chans/CaL.xml'], \
        ['./chans/CaN.xml'], \
        ['./chans/CaT.xml'], \
        ['./chans/hd.xml'], \
        ['./chans/kad.xml'], \
        [path+'/proto20.make_K_AHP()', 'kahp'], \
        ['./chans/kap.xml'], \
        [path+'/proto20.make_K_C()', 'kca'], \
        ['./chans/kdr.xml'], \
        ['./chans/km.xml'], \
        ['./chans/na3.xml'] \
    ]
	spineProto = [\
		['makeSpineProto()', 'spine']
	]
	chemProto = []
	passiveDistrib = [ 
	        [ ".", "#", "RM", "6", "CM", "0.0075", "RA", "2",  \
	            "Em", "-65e-3", "initVm", "-65e-3" ] \
    ]
        chanDistrib = [ \
	        ["Ca_conc", "#soma#,#dend#", "tau", "0.0133" ], \
	        ["CaL", "#dend#,#soma#", "Gbar", "p < 50e-6 ? 25 : 0" ], \
            ["CaN", "#soma#,#dend#", "Gbar", "28" ], \
            ["CaT", "#soma#,#dend#", "Gbar", "2.5" ], \
            ["hd", "#dend#,#soma#", "Gbar", "0.1*(1+1.75*p/100)" ], \
            ["kad", "#dend#", "Gbar", "p >= 100e-6 ? 1e-3*(7+(11*p)/100) : 0" ], \
            ["kad", "#soma#", "Gbar", "70" ], \
            ["kahp", "#", "Gbar", "3" ], \
            ["kap", "#dend#", "Gbar", "p < 100e-6 ? 1e-3*(7+(11*p)/100 : 0" ], \
            ["kap", "#soma#", "Gbar", "70" ], \
            ["kca", "#soma#,#dend#", "Gbar", "8" ], \
            #["kdr", "#soma#,#dend#", "Gbar", "300"], \
            ["kdr", "#soma#,#dend#", "Gbar", "88"], \
            #["M", "#soma#,#dend#", "Gbar", "p < 100e-6 ? 1 : 0"  ], \
            ["M", "#soma#,#dend#", "Gbar", "p < 100e-6 ? 0.1 : 0"  ], \
            #["na3", "#soma#,#dend#", "Gbar", "250" ], \
            ["na3", "#soma#,#dend#", "Gbar", "180" ] \
        ]
	spineDistrib = [ \
		["spine", '#apical#', "spineSpacing", "20e-6", \
                "spineSpacingDistrib", "2e-6", \
                "angle", "0", \
                "angleDistrib", str( 2*PI ), \
                "size", "1", \
                "sizeDistrib", "0.5" ] \
        ]
	chemDistrib = []
	adaptorList = []
	rd.addSpineProto()
	rdes = rd.rdesigneur(
        useGssa = useGssa, \
        combineSegments = combineSegments, \
        stealCellFromLibrary = True, \
        passiveDistrib = passiveDistrib, \
        spineDistrib = spineDistrib, \
        chanDistrib = chanDistrib, \
        chemDistrib = chemDistrib, \
        cellProto = cellProto, \
        chanProto = chanProto, \
        chemProto = chemProto, \
        adaptorList = adaptorList
    )
	return rdes
def buildRdesigneur():
    ##################################################################
    # Here we define which prototypes are to be loaded in to the system.
    # Each specification has the format
    # source [localName]
    # source can be any of
    # filename.extension,   # Identify type of file by extension, load it.
    # function(),           # func( name ) builds object of specified name
    # file.py:function() ,  # load Python file, run function(name) in it.
    # moose.Classname       # Make obj moose.Classname, assign to name.
    # path                  # Already loaded into library or on path.
    # After loading the prototypes, there should be an object called 'name'
    # in the library.
    ##################################################################
    #cellProto = [ [ "./cells/" + elecFileName, "elec" ] ]
    chanProto = [
        ['./chans/hd.xml'], \
        ['./chans/kap.xml'], \
        ['./chans/kad.xml'], \
        ['./chans/kdr.xml'], \
        ['./chans/na3.xml'], \
        ['./chans/nax.xml'], \
        ['./chans/CaConc.xml'], \
        ['./chans/Ca.xml'], \
        ['./chans/NMDA.xml'], \
        ['./chans/Glu.xml'] \
    ]
    spineProto = [ \
        ['makeSpineProto()', 'spine' ]
    ]
    chemProto = [ \
        ['./chem/' + 'psd53.g', 'ltpModel'] \
    ]

    ##################################################################
    # Here we define what goes where, and any parameters. Each distribution
    # has the format
    # protoName, path, field, expr, [field, expr]...
    # where
    #   protoName identifies the prototype to be placed on the cell
    #   path is a MOOSE wildcard path specifying where to put things
    #   field is the field to assign.
    #   expr is a math expression to define field value. This uses the
    #     muParser. Built-in variables are:
    #       p, g, L, len, dia, maxP, maxG, maxL.
    #     where
    #       p = path distance from soma, threaded along dendrite
    #       g = geometrical distance from soma (shortest distance)
    #       L = electrotonic distance from soma: number of length constants
    #       len = length of dendritic compartment
    #       dia = diameter of dendritic compartment
    #       maxP = maximal value of 'p' for the cell
    #       maxG = maximal value of 'g' for the cell
    #       maxL = maximal value of 'L' for the cell
    #
    #     The muParser provides most math functions, and the Heaviside
    #     function H(x) = 1 for x > 0 is also provided.
    ##################################################################
    passiveDistrib = [
            [ ".", "#", "RM", "2.8", "CM", "0.01", "RA", "1.5",  \
                "Em", "-58e-3", "initVm", "-65e-3" ], \
            [ ".", "#axon#", "RA", "0.5" ] \
        ]
    chanDistrib = [ \
            ["hd", "#dend#,#apical#", "Gbar", "5e-2*(1+(p*3e4))" ], \
            ["kdr", "#", "Gbar", "p < 50e-6 ? 500 : 100" ], \
            ["na3", "#soma#,#dend#,#apical#", "Gbar", "250" ], \
            ["nax", "#soma#,#axon#", "Gbar", "1250" ], \
            ["kap", "#axon#,#soma#", "Gbar", "300" ], \
            ["kap", "#dend#,#apical#", "Gbar", \
                "300*(H(100-p*1e6)) * (1+(p*1e4))" ], \
            ["Ca_conc", "#soma#,#dend#,#apical#", "tau", "0.0133" ], \
            ["kad", "#soma#,#dend#,#apical#", "Gbar", \
                "300*H(p - 100e-6)*(1+p*1e4)" ], \
                ["Ca", "#dend#,#apical#", "Gbar", "p<160e-6? 10+ p*0.25e-6 : 50" ], \
            ["Ca", "#soma#", "Gbar", "10" ], \
            ["glu", "#dend#,#apical#", "Gbar", "200*H(p-200e-6)" ], \
            ["NMDA", "#dend#,#apical#", "Gbar", "2*H(p-200e-6)" ] \
        ]
    spineDistrib = [ \
            ["spine", '#apical#', "spineSpacing", "20e-6", \
                "spineSpacingDistrib", "2e-6", \
                "angle", "0", \
                "angleDistrib", str( 2*PI ), \
                "size", "1", \
                "sizeDistrib", "0.5" ] \
        ]
    chemDistrib = [ \
            [ "ltpModel", "#apical#", "install", "1"]
        ]

    ######################################################################
    # Here we define the mappings across scales. Format:
    # sourceObj sourceField destObj destField offset scale
    # where the coupling expression is anything a muParser can evaluate,
    # using the input variable x. For example: 8e-5 + 300*x
    # For now, let's use existing adaptors which take an offset and scale.
    ######################################################################
    adaptorList = [
        ['Ca_conc', 'Ca', 'psd/Ca_input', 'concInit', 8e-5, 1],
        ['Ca_conc', 'Ca', 'dend/Ca_dend_input', 'concInit', 8e-5, 0.1],
        ['psd/tot_PSD_R', 'n', 'glu', 'Gbar', 0, 0.01],
    ]

    ######################################################################
    # Having defined everything, now to create the rdesigneur and proceed
    # with creating the model.
    ######################################################################

    rd.addSpineProto()  # This adds a version with an LCa channel by default.

    rdes = rd.rdesigneur(
        useGssa = useGssa, \
        combineSegments = combineSegments, \
        stealCellFromLibrary = True, \
        passiveDistrib = passiveDistrib, \
        spineDistrib = spineDistrib, \
        chanDistrib = chanDistrib, \
        chemDistrib = chemDistrib, \
        #cellProto = cellProto, \
        chanProto = chanProto, \
        chemProto = chemProto, \
        adaptorList = adaptorList
    )
    #spineProto = spineProto, \

    return rdes
def buildRdesigneur():
	cellProto = [ [ "./cells/" + elecFileNames[0], "elec" ] ]
	chanProto = [
        ['./chans/caL.xml'], \
        #['./chans/caN.xml'], \
        #['./chans/caT.xml'], \
        ['./chans/hd.xml'], \
        ['./chans/kad.xml'], \
        #['./chans/kahp.xml'], \
        ['./chans/kap.xml'], \
        #['./chans/kc.xml'], \
#        ['./chans/kd.xml'], \ #slow subthreshold potassium current
        ['./chans/kdr.xml'], \
        ['./chans/km.xml'], \
        ['./chans/na3.xml'], \
    ]
	spineProto = [\
		['makeSpineProto()', 'spine']
	]
	chemProto = []
	passiveDistrib = [ 
	        [ ".", "#", "RM", "3", "CM", "0.02", "RA", "2",  \
	            "Em", "-65e-3", "initVm", "-65e-3" ], \
            [ ".", "#soma#", "RM", "6", "CM", "0.01", "RA", "2" ] \
        ]
	chanDistrib = [ \
	        ["L", "#dend#,#soma#", "Gbar", "p < 50 ? 13 : 0" ], \
            #["Cav2.2", "#soma#,#dend#", "Gbar", "15" ], \
            #["CaT", "#soma#,#dend#", "Gbar", "10" ], \
            ["hd", "#dend#,#soma#", "Gbar", "1*(1+3/100*p)" ], \
            ["kad", "#soma#,#dend#", "Gbar", "p > 100e-6 ? 110*(1+(11/(7*100))*p) : 0" ], \
            #["kahp", "#apical#", "Gbar", "10" ], \
            #["kahp", "#soma#", "Gbar", "0" ], \
            #["kahp", "#basal", "Gbar", "5" ], \
            ["kap", "#soma#,#dend#", "Gbar", "p <= 100e-6 ? 110*(1+(11/(7*100))*p) : 0" ], \
            #["KC", "#soma#,#dend#", "Gbar", "p < 150e-6 ? 40*(150-p)/150 : 0" ], \
           #["kd", "#", "Gbar", "p < 50e-6 ? 500 : 100" ], \
            ["kdr", "#soma#,#dend#", "Gbar", "20"], \
            ["M", "#soma#,#dend#", "Gbar", "p <= 100e-6 ? 1 : 0"  ], \
            ["na3", "#soma#,#dend#", "Gbar", "350" ], \
        ]
	spineDistrib = [ \
		["spine", '#apical#', "spineSpacing", "20e-6", \
                "spineSpacingDistrib", "2e-6", \
                "angle", "0", \
                "angleDistrib", str( 2*PI ), \
                "size", "1", \
                "sizeDistrib", "0.5" ] \
        ]
	chemDistrib = []
	adaptorList = []
	rd.addSpineProto()
	rdes = rd.rdesigneur(
        useGssa = useGssa, \
        combineSegments = combineSegments, \
        stealCellFromLibrary = True, \
        passiveDistrib = passiveDistrib, \
        spineDistrib = spineDistrib, \
        chanDistrib = chanDistrib, \
        chemDistrib = chemDistrib, \
        cellProto = cellProto, \
        chanProto = chanProto, \
        chemProto = chemProto, \
        adaptorList = adaptorList
    )
	return rdes
def buildRdesigneur():
	cellProto = [ [ "./cells/" + elecFileNames[0], "elec" ] ]
	#chanProto = [
	    #['/home/sarathy/Work/templates/neurons/cA3_PC_rat/chans/proto20.make_Ca_conc()', 'Ca_conc'], \
        #['./chans/CaL.xml'], \
        #['./chans/CaN.xml'], \
        #['./chans/CaT.xml'], \
        #['./chans/hd.xml'], \
        #['./chans/kad.xml'], \
        #['/home/sarathy/Work/templates/neurons/cA3_PC_rat/chans/proto20.make_K_AHP()', 'kahp'], \
        #['./chans/kap.xml'], \
        #['/home/sarathy/Work/templates/neurons/cA3_PC_rat/chans/proto20.make_K_C()', 'kca'], \
##        ['./chans/kd.xml'], \ #slow subthreshold potassium current
        #['./chans/kdr.xml'], \
        #['./chans/km.xml'], \
        #['./chans/na3.xml'], \
    #]
        chanProto = [
        ['/home/sarathy/Work/templates/neurons/ca3_PC_rat/chans/proto20.make_Ca_conc()', 'Ca_conc'], \
        ['./chans/CaL.xml'], \
        ['./chans/CaN.xml'], \
        ['./chans/CaT.xml'], \
        ['./chans/hd-90.xml'], \
        ['./chans/hd-82.xml'], \
        ['./chans/kad.xml'], \
        ['/home/sarathy/Work/templates/neurons/ca3_PC_rat/chans/proto20.make_K_AHP()', 'kahp'], \
        ['./chans/kap.xml'], \
        ['/home/sarathy/Work/templates/neurons/ca3_PC_rat/chans/proto20.make_K_C()', 'kca'], \
#        ['./chans/kd.xml'], \ #slow subthreshold potassium current
        ['./chans/kdr.xml'], \
        ['./chans/km.xml'], \
        ['./chans/na3.xml'], \
    ]
	spineProto = [\
		['makeSpineProto()', 'spine']
	]
	chemProto = []
	#------------------------Lazarewicz et al 2002----------------------------------------#
	passiveDistrib = [ 
	        [ ".", "#", "RM", "3", "CM", "0.02", "RA", "2",  \
	            "Em", "-65e-3", "initVm", "-65e-3" ], \
            [ ".", "#soma#", "RM", "6", "CM", "0.01" ] \
        ]
	chanDistrib = [ \
	        ["Ca_conc", "#soma#,#dend#", "tau", "0.0133" ], \
	        ["CaL", "#soma#", "Gbar", "13" ], \
            ["CaL", "#dend#,#apical#,#basal#", "Gbar", "p < 50e-6 ? 13 : 0" ], \
            ["CaN", "#soma#,#dend#", "Gbar", "15" ], \
            ["CaT", "#soma#,#dend#", "Gbar", "10" ], \
            ["hd-82", "#dend#,#apical#", "Gbar", "p > 100 ? 1*(1+3/100*p) : 0" ], \
            ["hd-90", "#dend#,#basal#", "Gbar", "p <= 100 ? 1*(1+3/100*p) : 0" ], \
            ["hd-90", "#soma#", "Gbar", "1" ], \
            ["kad", "#dend#,#apical#,#basal#", "Gbar", "p > 100e-6 ? 110*(1+(11/(7*100))*p) : 0" ], \
            ["kad", "#soma#", "Gbar", "110" ], \
            ["kahp", "#soma#", "Gbar", "0" ], \
            ["kahp", "#dend#,#apical#", "Gbar", "5" ], \
            ["kahp", "#dend#,#basal#", "Gbar", "10" ], \
            ["kap", "#dend#,#apical#,#basal#", "Gbar", "p > 100e-6 ? 110*(1+(11/(7*100))*p) : 0" ], \
            ["kap", "#soma#", "Gbar", "110" ], \
            ["kap", "#axon#", "Gbar", "200"], \
            ["kca", "#dend#,#apical#,#basal#", "Gbar", "p < 150e-6 ? 40*(150-p)/150 : 0" ], \
			["kca", "#soma#", "Gbar", "40"], \
			##["kd", "#", "Gbar", "p < 50e-6 ? 500 : 100" ], \
            ["kdr", "#soma#,#dend#", "Gbar", "100"], \
            ["kdr", "#axon#", "Gbar", "100"], \
            ["M", "#soma#,#dend#,#apical#,#basal#", "Gbar", "p <= 100e-6 ? 1 : 0"  ], \
            ["na3", "#soma#,#dend#", "Gbar", "350" ], \
            ["na3", "#axon#", "Gbar", "1100" ], \
            #["na3", "#axon#", "Gbar", "1100" ], \
        ]
        #------------------------Narayanan et al 2010----------------------------------------#
    	#passiveDistrib = [ 
	        #[ ".", "#", "RM", "6", "CM", "0.0075", "RA", "2",  \
	            #"Em", "-65e-3", "initVm", "-65e-3" ], \
            ##[ ".", "#soma#", "RM", "6", "CM", "0.01", "RA", "2" ] \
        #]
        #chanDistrib = [ \
	        #["Ca_conc", "#soma#,#dend#", "tau", "0.0133" ], \
	        #["CaL", "#dend#,#soma#", "Gbar", "p < 50e-6 ? 25 : 0" ], \
            #["CaN", "#soma#,#dend#", "Gbar", "28" ], \
            #["CaT", "#soma#,#dend#", "Gbar", "2.5" ], \
            #["hd", "#dend#,#soma#", "Gbar", "0.1*(1+1.75*p/100)" ], \
            #["kad", "#dend#", "Gbar", "p >= 100e-6 ? 1e-3*(7+(11*p)/100) : 0" ], \
            #["kad", "#soma#", "Gbar", "70" ], \
            #["kahp", "#", "Gbar", "3" ], \
            #["kap", "#dend#", "Gbar", "p < 100e-6 ? 1e-3*(7+(11*p)/100 : 0" ], \
            #["kap", "#soma#", "Gbar", "70" ], \
            #["kca", "#soma#,#dend#", "Gbar", "8" ], \
           ##["kd", "#", "Gbar", "p < 50e-6 ? 500 : 100" ], \
            #["kdr", "#soma#,#dend#", "Gbar", "300"], \
            #["M", "#soma#,#dend#", "Gbar", "p < 100e-6 ? 1 : 0"  ], \
            #["na3", "#soma#,#dend#", "Gbar", "250" ], \
            ##["na3", "#axon#", "Gbar", "p < 80e-6 ? 5000 : 0" ], \
        #]
	spineDistrib = [ \
		["spine", '#apical#', "spineSpacing", "20e-6", \
                "spineSpacingDistrib", "2e-6", \
                "angle", "0", \
                "angleDistrib", str( 2*PI ), \
                "size", "1", \
                "sizeDistrib", "0.5" ] \
        ]
	chemDistrib = []
	adaptorList = []
	rd.addSpineProto()
	rdes = rd.rdesigneur(
        useGssa = useGssa, \
        combineSegments = combineSegments, \
        stealCellFromLibrary = True, \
        passiveDistrib = passiveDistrib, \
        spineDistrib = spineDistrib, \
        chanDistrib = chanDistrib, \
        chemDistrib = chemDistrib, \
        cellProto = cellProto, \
        chanProto = chanProto, \
        chemProto = chemProto, \
        adaptorList = adaptorList
    )
	return rdes
Esempio n. 5
0
def buildRdesigneur():
    '''
    ##################################################################
    # Here we define which prototypes are to be loaded in to the system.
    # Each specification has the format
    # source [localName]
    # source can be any of
    # filename.extension,   # Identify type of file by extension, load it.
    # function(),           # func( name ) builds object of specified name
    # file.py:function() ,  # load Python file, run function(name) in it.
    # moose.Classname       # Make obj moose.Classname, assign to name.
    # path                  # Already loaded into library or on path.
    # After loading the prototypes, there should be an object called 'name'
    # in the library.
    ##################################################################
    '''
    cellProto = [ [ "./cells/" + elecFileName, "elec" ] ]
    chanProto = [
        ['./chans/hd.xml'], \
        ['./chans/kap.xml'], \
        ['./chans/kad.xml'], \
        ['./chans/kdr.xml'], \
        ['./chans/na3.xml'], \
        ['./chans/nax.xml'], \
        ['./chans/CaConc.xml'], \
        ['./chans/Ca.xml'], \
        ['./chans/NMDA.xml'], \
        ['./chans/Glu.xml'] \
    ]
    spineProto = [ \
        ['makeSpineProto()', 'spine' ]
    ]
    chemProto = []

    ##################################################################
    # Here we define what goes where, and any parameters. Each distribution
    # has the format
    # protoName, path, field, expr, [field, expr]...
    # where 
    #   protoName identifies the prototype to be placed on the cell
    #   path is a MOOSE wildcard path specifying where to put things
    #   field is the field to assign.
    #   expr is a math expression to define field value. This uses the
    #     muParser. Built-in variables are:
    #       p, g, L, len, dia, maxP, maxG, maxL.
    #     where
    #       p = path distance from soma, threaded along dendrite
    #       g = geometrical distance from soma (shortest distance)
    #       L = electrotonic distance from soma: number of length constants
    #       len = length of dendritic compartment
    #       dia = diameter of dendritic compartment
    #       maxP = maximal value of 'p' for the cell
    #       maxG = maximal value of 'g' for the cell
    #       maxL = maximal value of 'L' for the cell
    #
    #     The muParser provides most math functions, and the Heaviside 
    #     function H(x) = 1 for x > 0 is also provided.
    ##################################################################
    passiveDistrib = [ 
            [ ".", "#", "RM", "2.8", "CM", "0.01", "RA", "1.5",  \
                "Em", "-58e-3", "initVm", "-65e-3" ], \
            [ ".", "#axon#", "RA", "0.5" ] \
        ]
    chanDistrib = [ \
            ["hd", "#dend#,#apical#", "Gbar", "5e-2*(1+(p*3e4))" ], \
            ["kdr", "#", "Gbar", "p < 50e-6 ? 500 : 100" ], \
            ["na3", "#soma#,#dend#,#apical#", "Gbar", "250" ], \
            ["nax", "#soma#,#axon#", "Gbar", "1250" ], \
            ["kap", "#axon#,#soma#", "Gbar", "300" ], \
            ["kap", "#dend#,#apical#", "Gbar", \
                "300*(H(100-p*1e6)) * (1+(p*1e4))" ], \
            ["Ca_conc", "#soma#,#dend#,#apical#", "tau", "0.0133" ], \
            ["kad", "#soma#,#dend#,#apical#", "Gbar", \
                "300*H(p - 100e-6)*(1+p*1e4)" ], \
                ["Ca", "#dend#,#apical#", "Gbar", "p<160e-6? 10+ p*0.25e-6 : 50" ], \
            ["Ca", "#soma#", "Gbar", "10" ], \
            ["glu", "#dend#,#apical#", "Gbar", "200*H(p-200e-6)" ], \
            ["NMDA", "#dend#,#apical#", "Gbar", "2*H(p-200e-6)" ] \
        ]
    spineDistrib = [ \
            ["spine", '#apical#', "spineSpacing", "20e-6", \
                "spineSpacingDistrib", "2e-6", \
                "angle", "0", \
                "angleDistrib", str( 2*PI ), \
                "size", "1", \
                "sizeDistrib", "0.5" ] \
        ]
    chemDistrib = []

    ######################################################################
    # Here we define the mappings across scales. Format:
    # sourceObj sourceField destObj destField offset scale
    # where the coupling expression is anything a muParser can evaluate,
    # using the input variable x. For example: 8e-5 + 300*x
    # For now, let's use existing adaptors which take an offset and scale.
    ######################################################################
    adaptorList = []

    ######################################################################
    # Having defined everything, now to create the rdesigneur and proceed
    # with creating the model.
    ######################################################################
    
    rd.addSpineProto() # This adds a version with an LCa channel by default.

    rdes = rd.rdesigneur(
        useGssa = useGssa, \
        combineSegments = combineSegments, \
        stealCellFromLibrary = True, \
        passiveDistrib = passiveDistrib, \
        spineDistrib = spineDistrib, \
        chanDistrib = chanDistrib, \
        chemDistrib = chemDistrib, \
        cellProto = cellProto, \
        chanProto = chanProto, \
        chemProto = chemProto, \
        adaptorList = adaptorList
    )
    #spineProto = spineProto, \

    return rdes
def buildRdesigneur():
    cellProto = [["./cells/" + elecFileNames[0], "elec"]]
    #chanProto = [
    #['/home/sarathy/Work/templates/neurons/cA3_PC_rat/chans/proto20.make_Ca_conc()', 'Ca_conc'], \
    #['./chans/CaL.xml'], \
    #['./chans/CaN.xml'], \
    #['./chans/CaT.xml'], \
    #['./chans/hd.xml'], \
    #['./chans/kad.xml'], \
    #['/home/sarathy/Work/templates/neurons/cA3_PC_rat/chans/proto20.make_K_AHP()', 'kahp'], \
    #['./chans/kap.xml'], \
    #['/home/sarathy/Work/templates/neurons/cA3_PC_rat/chans/proto20.make_K_C()', 'kca'], \
    ##        ['./chans/kd.xml'], \ #slow subthreshold potassium current
    #['./chans/kdr.xml'], \
    #['./chans/km.xml'], \
    #['./chans/na3.xml'], \
    #]
    chanProto = [
    ['/home/sarathy/Work/templates/neurons/ca3_PC_rat/chans/proto20.make_Ca_conc()', 'Ca_conc'], \
    ['./chans/CaL.xml'], \
    ['./chans/CaN.xml'], \
    ['./chans/CaT.xml'], \
    ['./chans/hd-90.xml'], \
    ['./chans/hd-82.xml'], \
    ['./chans/kad.xml'], \
    ['/home/sarathy/Work/templates/neurons/ca3_PC_rat/chans/proto20.make_K_AHP()', 'kahp'], \
    ['./chans/kap.xml'], \
    ['/home/sarathy/Work/templates/neurons/ca3_PC_rat/chans/proto20.make_K_C()', 'kca'], \
#        ['./chans/kd.xml'], \ #slow subthreshold potassium current

    ['./chans/kdr.xml'], \
    ['./chans/km.xml'], \
    ['./chans/na3.xml'], \
]
    spineProto = [\
     ['makeSpineProto()', 'spine']
    ]
    chemProto = []
    #------------------------Lazarewicz et al 2002----------------------------------------#
    passiveDistrib = [
            [ ".", "#", "RM", "3", "CM", "0.02", "RA", "2",  \
                "Em", "-65e-3", "initVm", "-65e-3" ], \
               [ ".", "#soma#", "RM", "6", "CM", "0.01" ] \
           ]
    chanDistrib = [ \
            ["Ca_conc", "#soma#,#dend#", "tau", "0.0133" ], \
            ["CaL", "#soma#", "Gbar", "13" ], \
               ["CaL", "#dend#,#apical#,#basal#", "Gbar", "p < 50e-6 ? 13 : 0" ], \
               ["CaN", "#soma#,#dend#", "Gbar", "15" ], \
               ["CaT", "#soma#,#dend#", "Gbar", "10" ], \
               ["hd-82", "#dend#,#apical#", "Gbar", "p > 100 ? 1*(1+3/100*p) : 0" ], \
               ["hd-90", "#dend#,#basal#", "Gbar", "p <= 100 ? 1*(1+3/100*p) : 0" ], \
               ["hd-90", "#soma#", "Gbar", "1" ], \
               ["kad", "#dend#,#apical#,#basal#", "Gbar", "p > 100e-6 ? 110*(1+(11/(7*100))*p) : 0" ], \
               ["kad", "#soma#", "Gbar", "110" ], \
               ["kahp", "#soma#", "Gbar", "0" ], \
               ["kahp", "#dend#,#apical#", "Gbar", "5" ], \
               ["kahp", "#dend#,#basal#", "Gbar", "10" ], \
               ["kap", "#dend#,#apical#,#basal#", "Gbar", "p > 100e-6 ? 110*(1+(11/(7*100))*p) : 0" ], \
               ["kap", "#soma#", "Gbar", "110" ], \
               ["kap", "#axon#", "Gbar", "200"], \
               ["kca", "#dend#,#apical#,#basal#", "Gbar", "p < 150e-6 ? 40*(150-p)/150 : 0" ], \
      ["kca", "#soma#", "Gbar", "40"], \
			##["kd", "#", "Gbar", "p < 50e-6 ? 500 : 100" ], \
               ["kdr", "#soma#,#dend#", "Gbar", "100"], \
               ["kdr", "#axon#", "Gbar", "100"], \
               ["M", "#soma#,#dend#,#apical#,#basal#", "Gbar", "p <= 100e-6 ? 1 : 0"  ], \
               ["na3", "#soma#,#dend#", "Gbar", "350" ], \
               ["na3", "#axon#", "Gbar", "1100" ], \
            #["na3", "#axon#", "Gbar", "1100" ], \
           ]
    #------------------------Narayanan et al 2010----------------------------------------#
    #passiveDistrib = [
    #[ ".", "#", "RM", "6", "CM", "0.0075", "RA", "2",  \
    #"Em", "-65e-3", "initVm", "-65e-3" ], \
    ##[ ".", "#soma#", "RM", "6", "CM", "0.01", "RA", "2" ] \
    #]
    #chanDistrib = [ \
    #["Ca_conc", "#soma#,#dend#", "tau", "0.0133" ], \
    #["CaL", "#dend#,#soma#", "Gbar", "p < 50e-6 ? 25 : 0" ], \
    #["CaN", "#soma#,#dend#", "Gbar", "28" ], \
    #["CaT", "#soma#,#dend#", "Gbar", "2.5" ], \
    #["hd", "#dend#,#soma#", "Gbar", "0.1*(1+1.75*p/100)" ], \
    #["kad", "#dend#", "Gbar", "p >= 100e-6 ? 1e-3*(7+(11*p)/100) : 0" ], \
    #["kad", "#soma#", "Gbar", "70" ], \
    #["kahp", "#", "Gbar", "3" ], \
    #["kap", "#dend#", "Gbar", "p < 100e-6 ? 1e-3*(7+(11*p)/100 : 0" ], \
    #["kap", "#soma#", "Gbar", "70" ], \
    #["kca", "#soma#,#dend#", "Gbar", "8" ], \
    ##["kd", "#", "Gbar", "p < 50e-6 ? 500 : 100" ], \
    #["kdr", "#soma#,#dend#", "Gbar", "300"], \
    #["M", "#soma#,#dend#", "Gbar", "p < 100e-6 ? 1 : 0"  ], \
    #["na3", "#soma#,#dend#", "Gbar", "250" ], \
    ##["na3", "#axon#", "Gbar", "p < 80e-6 ? 5000 : 0" ], \
    #]
    spineDistrib = [ \
     ["spine", '#apical#', "spineSpacing", "20e-6", \
                   "spineSpacingDistrib", "2e-6", \
                   "angle", "0", \
                   "angleDistrib", str( 2*PI ), \
                   "size", "1", \
                   "sizeDistrib", "0.5" ] \
           ]
    chemDistrib = []
    adaptorList = []
    rd.addSpineProto()
    rdes = rd.rdesigneur(
           useGssa = useGssa, \
           combineSegments = combineSegments, \
           stealCellFromLibrary = True, \
           passiveDistrib = passiveDistrib, \
           spineDistrib = spineDistrib, \
           chanDistrib = chanDistrib, \
           chemDistrib = chemDistrib, \
           cellProto = cellProto, \
           chanProto = chanProto, \
           chemProto = chemProto, \
           adaptorList = adaptorList
       )
    return rdes