NMDA & GUI

Using the graphical user interface to build and exercise models. Includes customizing the GUI by writing a little bit of hoc.
Martenzi
Posts: 34
Joined: Thu Feb 28, 2013 4:17 am

NMDA & GUI

Post by Martenzi » Sat Apr 06, 2013 3:31 am

I need to implement and control NMDA receptors while fire synapses. How do I implement NMDA receptor using GUI?

ted
Site Admin
Posts: 5330
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: NMDA & GUI

Post by ted » Sat Apr 06, 2013 1:24 pm

NEURON doesn't come with a built-in NMDA synapse. You can add one to NEURON by putting a mod file that contains source code for such a synapse into the same directory as your model's hoc and ses files, then run makenrndll in that directory (or nrnivmodl if you're using Linux). This will make the synaptic mechanism available to hoc, Python, and GUI tools such as the Network Builder tools, and the Point Process Manager.

ModelDB contains many NEURON models that use NMDA synaptic mechanisms. A particuarly good one is ampanmda.mod, which is part of model entry 144054

McTavish TS, Migliore M, Shepherd GM, Hines ML (2012)
Mitral cell spike synchrony modulated by dendrodendritic synapse location.
Frontiers in Computational Neuroscience 6:3. doi: 10.3389/fncom.2012.00003

What makes this particular synaptic mechanism attractive is that it:
--includes both AMPAergic and NMDA-gated conductances, which are independently adjustable
--includes Mg block of NMDA-gated conductance
--correctly implements saturation of responses to events from a single input stream (i.e. "homosynaptic saturation caused by repeated activation of the same presynaptic terminal")
--correctly implements linear summation of responses to inputs from different input streams (the computational equivalent of synaptic convergence i.e. a situation in which there are two or more presynaptic neurons, each driving its own synapse, and the synapses are electrically close to each other)

One caveat: you may not want to use its synaptic plasticity rule, which is a "frequency-dependent potentiation/depression" rule rather than a Hebbian (spike-timing-dependent) rule. You can disable its plasticity rule by setting its ltpinvl and ltdinvl parameters to -1.

Martenzi
Posts: 34
Joined: Thu Feb 28, 2013 4:17 am

Re: NMDA & GUI

Post by Martenzi » Sun Apr 07, 2013 12:22 pm

Thank you for a very helpful reply.

Martenzi
Posts: 34
Joined: Thu Feb 28, 2013 4:17 am

NMDA mg T is not a Template?

Post by Martenzi » Mon Apr 08, 2013 11:54 am

C:\nrn73w64\bin64\nrniv.exe: NMDA_Mg_T is not a template
in C:\Neuron\FINAL(Exp).hoc near line 124
cNMDA = new NMDA_Mg_T()
^
oc>

Can you tell me what I should do?

My code looks like this:

// Add NMDA

objectvar cNMDA
proc addNMDA(){

cNMDA = new NMDA_Mg_T()
cNMDA.gmax = 8000
setpointer cNMDA.C, T_rel(0.5)
Erev_NMDA_Mg = 5
mg_NMDA_Mg_T = 1

}

// This code is in my hoc file. The error message is from the interpreter. I just wanna implement the NMDA from NMDA_mg_T as a synapse influencing the EPSP in my model. I used Branco et al. 2010 mod file that is written from experimental design in Kempe et al. 2004. but Branco´s hoc file is to complicated for my expertise, both with the use of 3D structure and saving matrix to .dat file etc. I have a simple cell and want to implement AlphaSynapse (AMPA) plus NMDA at 7 synaptic locations on a single dendrite. I will show my whole code just to give the above a complete picture:

create soma, dend, axon, apic
access soma

axon {
nseg = 5
diam = 1.0
L = 1000.0
Ra = 123
insert hh
Cm = 1
}

soma {
nseg = 1
diam = 18.8
L = 18.8
Ra = 123.0
insert hh
Cm = 1
}

dend {
nseg = 25
diam = 2.0
L = 549.1
Ra = 123
insert pas
Cm = 2
}

apic {
nseg = 10
diam = 3.18
L = 701.9
Ra = 123
insert pas
Cm = 2
}


// Connect things together
connect dend(0), soma(0.5)
connect apic(0), soma(0)
connect axon(0), soma(1)


/*--------------------------------------------------------
Insert passive and active properties

Option to have non-uniform resting Vm in basal dendrites

Tiago Branco (2010)
--------------------------------------------------------*/

proc init_params() {
celsius = 37
Cm = 1
Rm = 10000
Ri = 150
v_init = -75
}


//-------------------------------------------------------
//add passive properties
//-------------------------------------------------------

proc init_passive(){
forall {insert pas g_pas = 1/Rm e_pas=v_init cm=Cm Ra=Ri}
axon {g_pas = 0.02}
}




//-------------------------------------------------------
//add active properties
//-------------------------------------------------------
proc init_active_params(){
Ek = -90
Ena = 60
Eca = 140
vshift_na = -5
vshift_ca = 0

gna_axon = 30000
gkv_axon = 400

gna_soma = 1500
gkv_soma = 200
gkm_soma = 2.2
gkca_soma = 2.5
gca_soma = 0.5
git_soma = 0.0003

gna_dend = 40
gkv_dend = 30
gkm_dend = 0.05
gkca_dend = 2.5
gca_dend = 0.5
git_dend = 0.0006
gh_dend = 0
}


// Add Synapse

objectvar stim
dend stim = new AlphaSynapse(1)
stim.onset = 0
stim.tau = 2
stim.gmax = 0.1
stim.e = 0

// Add NMDA

objectvar cNMDA
proc addNMDA(){

cNMDA = new NMDA_Mg_T()
cNMDA.gmax = 8000
setpointer cNMDA.C, T_rel(0.5)
Erev_NMDA_Mg = 5
mg_NMDA_Mg_T = 1
}


///// And these two last sections of code shall be replicated 7 times with altering onset times. Thats it. I cant get the NMDA to work properly… Please help me.

ted
Site Admin
Posts: 5330
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: NMDA mg T is not a Template?

Post by ted » Mon Apr 08, 2013 11:58 am

Did you forget to compile the mod files?

Martenzi
Posts: 34
Joined: Thu Feb 28, 2013 4:17 am

Re: NMDA & GUI

Post by Martenzi » Mon Apr 08, 2013 12:18 pm

PARAMETER {

Erev = 5 (mV) : reversal potential
gmax = 500 (pS) : maximal conductance
mg = 1 (mM) : external magnesium concentration
vmin = -120 (mV)
vmax = 100 (mV)
valence = -2 : parameters of voltage-dependent Mg block
memb_fraction = 0.8

// This is from the mod file. I assume that I can use these with a command calling upon this properties?

Martenzi
Posts: 34
Joined: Thu Feb 28, 2013 4:17 am

Re: NMDA mg T is not a Template?

Post by Martenzi » Mon Apr 08, 2013 12:24 pm

ted wrote:Did you forget to compile the mod files?
No. And I just double checked by compiling again and creating a new dll.

ted
Site Admin
Posts: 5330
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: NMDA & GUI

Post by ted » Mon Apr 08, 2013 1:03 pm

Maybe the cause of the problem is that you aren't telling NEURON where to attach the point process. In proc addNMDA() change
cNMDA = new NMDA_Mg_T()
to
cNMDA = new NMDA_Mg_T(0.5)

Martenzi
Posts: 34
Joined: Thu Feb 28, 2013 4:17 am

Re: NMDA & GUI

Post by Martenzi » Mon Apr 08, 2013 1:08 pm

Yes its present without errors.

Besides this problem, can I state something in my hoc file that makes the interpreter load the mod files directly. That way I do not have to load the dlls first.

ted
Site Admin
Posts: 5330
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: NMDA & GUI

Post by ted » Mon Apr 08, 2013 1:23 pm

Martenzi wrote:PARAMETER {

Erev = 5 (mV) : reversal potential
gmax = 500 (pS) : maximal conductance
mg = 1 (mM) : external magnesium concentration
vmin = -120 (mV)
vmax = 100 (mV)
valence = -2 : parameters of voltage-dependent Mg block
memb_fraction = 0.8

// This is from the mod file. I assume that I can use these with a command calling upon this properties?
By default, PARAMETERs are global. The value of a global PARAMETER is known to hoc by a name of the form
varname_mechname
where
varname is the name declared in the PARAMETER block
mechname is the name of the mechanism declared in the NEURON block
So Erev will be available to hoc as Erev_NMDA_Mg_T, and its value will affect every instance of the NMDA_Mg_T class.

If a PARAMETER is declared RANGE in the NEURON block, it wll be know to hoc by a name of the form
objrefname.varname
So if you execute these statements
objref foo
foo = new NMDA_Mg_T(0.5)
then foo.gmax will be the name of the gmax parameter for this particular instance of NMDA_Mg_T.

ted
Site Admin
Posts: 5330
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: NMDA & GUI

Post by ted » Mon Apr 08, 2013 1:24 pm

Martenzi wrote:Yes its present without errors.
I beg your pardon--what are you referring to?
can I state something in my hoc file that makes the interpreter load the mod files directly. That way I do not have to load the dlls first.
Just make sure the dll is present in the same directory as your program's main hoc file, and the dll will be loaded automatically.

Martenzi
Posts: 34
Joined: Thu Feb 28, 2013 4:17 am

Re: NMDA & GUI

Post by Martenzi » Mon Apr 08, 2013 2:01 pm

ted wrote:Maybe the cause of the problem is that you aren't telling NEURON where to attach the point process. In proc addNMDA() change
cNMDA = new NMDA_Mg_T()
to
cNMDA = new NMDA_Mg_T(0.5)
What does setpointer cNMDA.C, T_rel(0.5) mean?

ted
Site Admin
Posts: 5330
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: NMDA & GUI

Post by ted » Mon Apr 08, 2013 2:28 pm

See the Programmer's Reference entry on setpointer:
http://www.neuron.yale.edu/neuron/stati ... setpointer
For a link to the Programmer's Reference, see the menu at the top of http://www.neuron.yale.edu/

Martenzi
Posts: 34
Joined: Thu Feb 28, 2013 4:17 am

Re: NMDA & GUI

Post by Martenzi » Mon Apr 08, 2013 3:26 pm

Branco wrote this original code:

setpointer cNMDA[n].C, PRE[n].T_rel(0.5)

I changed it to:

setpointer cNMDA.vpre, soma.v(0.5)

I´m not sure if "vpre" is correct. It was the example from the links you send me. Please help my sort this out as it is the last piece of the puzzle to my progress.

Activating NMDA should that cause a noticable difference to the AMPA AlphaSynapse ? I cant see any difference on the graph with or without the NMDA using Hoc file. The point process manager do not show any active NMDA_mg_T ?

Martenzi
Posts: 34
Joined: Thu Feb 28, 2013 4:17 am

Re: NMDA & GUI

Post by Martenzi » Mon Apr 08, 2013 10:30 pm

If you can help my figure out how to implement this NMDA procedure and explain to me the following, then I my research project can finally take off and you have lifted a great monkey of my shoulders:

When I get the above mentioned code to have effect on my EPSP firing without the AMPA (that way I know it does something on the graph) then I know how to customise it to my multiple experiments and how to get the proper data collected.

Could you please explain if the NMDA mod file ought to have a major influence on the graph without the built in AlpaSynapse? Or is the effect very marginal and can be difficult to spot? How do I test whether my NMDA synapse is having effect? Will there be a EPSP if I´m only simulating using NMDA etc? - And which numbers should I alter to see the main effects - If I alter the g of AMPA synapse I see the immediate effect from EPSP to AP (due to theoretical over the top amplitude). What numbers in my code corresponds to the NMDA_mg_T mod file effect?

Thank you so much for your time and effort into this forum!

Post Reply