ampanmda mod file working with AlphaSynapse

When Python is the interpreter, what is a good
design for the interface to the basic NEURON
concepts.

Moderator: hines

Post Reply
parent41
Posts: 6
Joined: Tue May 26, 2020 8:50 am

ampanmda mod file working with AlphaSynapse

Post by parent41 »

Hi,

I am trying to implement an AMPA/NMDA synapse in my model, and I saw in another topic that Ted suggested the ampanmda.mod file (ModelDB entry 144054). I am using an AlphaSynapse as the presynaptic current generator.
I simply inserted the point process of the mod file at the same location as the AlphaSynapse, kept all the default parameters of the mod file and ran the simulation, but the depolarizations are the same with or without the ampanmda point process present. Perhaps it was too simple? There doesn't seem to be a POINTER parameter in the mod file to specify where the presynaptic current comes from... I also checked the psection() and the ampanmda point process is present.
So my question is: Is it possible to make the ampanmda.mod file work with the AlphaSynapse as the presynaptic release? If so, how?

I am working with NEURON as a Python module.

Thank you!
tom_morse
Posts: 43
Joined: Wed May 18, 2005 10:23 pm
Location: Yale University School of Medicine
Contact:

Re: ampanmda mod file working with AlphaSynapse

Post by tom_morse »

Please mention how you are stimulating the new synapse. Presumably you setup a NetCon that connects it to a NetStim? Please post the code that you are using.
parent41
Posts: 6
Joined: Tue May 26, 2020 8:50 am

Re: ampanmda mod file working with AlphaSynapse

Post by parent41 »

I am using the AlphaSynapse module to stimulate the synapse, without any NetCons and NetStim (I only want to model one neuron, not a network)

The code is quite long, but basically I build the morphology section by section, then add a synapse at the spine_head section (previously created)

Code: Select all

class AddSynapse:
    def __init__(self, syn_loc, onset, gmax, e, i):
        self.syn = h.AlphaSynapse(syn_loc)
        self.syn.onset = onset
        self.syn.tau = 2 * ms
        self.syn.gmax = gmax
        self.syn.e = e
        self.syn.i = i
 
syn1 = AddSynapse(spine1.spine_head(1), 9, 0.0005, 0, 1)
Add the AmpaNmda point process at the same location:

Code: Select all

nmda = h.AmpaNmda(spine1.spine_head(1))
Then record and graph the depolarizations at the spine head and at the soma
The depolarizations are the same with and without the AmpaNmda point process
tom_morse
Posts: 43
Joined: Wed May 18, 2005 10:23 pm
Location: Yale University School of Medicine
Contact:

Re: ampanmda mod file working with AlphaSynapse

Post by tom_morse »

The AmpaNmda is not connected to the onset of the AlphaSynapse. The AmpaNmda needs to be turned on with an event. Here is an example where the default start time of a NetStim (ns.start) triggers an event through the NetCon to turn the synapse on. NetStim's and NetCon's can be used when there is no network.

Code: Select all

from neuron import h,gui
import matplotlib.pyplot as plt

h.tstop=100

spine=h.Section(name="spine")
spine.L=1
spine.diam=1

spine.insert('pas')
spine.e_pas=-65

ampanmda=h.AmpaNmda(spine(0.5))
ns=h.NetStim(spine(0.5))
nc=h.NetCon(ns, ampanmda)
nc.weight[0]=1
ns.number=1
gampa_vec=h.Vector().record(ampanmda._ref_gampa)


v_vec=h.Vector().record(spine(0.5)._ref_v)
t_vec=h.Vector().record(h._ref_t)
h.init()
h.run()

plt.ion()
plt.figure()
plt.plot(t_vec, v_vec)
parent41
Posts: 6
Joined: Tue May 26, 2020 8:50 am

Re: ampanmda mod file working with AlphaSynapse

Post by parent41 »

Thank you Tom, that really helped me!
parent41
Posts: 6
Joined: Tue May 26, 2020 8:50 am

Re: ampanmda mod file working with AlphaSynapse

Post by parent41 »

Hi,

The NetStim is working, but I would like to have more control over the EPSP shape and parameters, which the NetStim module doesn't offer me.
From what I understand, the presynaptic release has to pass 'events' to the mod file through the NetCon to activate the NET_RECEIVE block of the mod file (here, nmda receptors). Can this be done with another presynaptic mechanism than NetStim? Perhaps the AlphaSynapse module, Exp2Syn module, or other mod files?

Thank you!
tom_morse
Posts: 43
Joined: Wed May 18, 2005 10:23 pm
Location: Yale University School of Medicine
Contact:

Re: ampanmda mod file working with AlphaSynapse

Post by tom_morse »

True that NetStim doesn't control the shape of the EPSP just the delivery of events via a listening NetCon. The ampanmda.mod looks like it controls the shape of the EPSP with ampatau and Alpha and Beta. You can also try the simpler exp2syn whose shape can be controlled by setting it's rise and fall time constants. The height of the EPSP can be set by both the ampanmda's gmax and also the netcon's weight.
About events, there are many ways to generate events in addition to the NetStim; here is one example: Create a nc=netcon((previous setup)) perhaps as you already have done (one connected to a netstim that you can leave turned off is Ok, because I will now explain how you can program events). After h.init(), execute nc.event(tdelivery) commands for all the times you want events delivered. Use h.continuerun(tstop) to run the simulation (h.run() doesn’t work because it deletes the events before running). Let us know if you have any trouble filling in the missing information. There is a little more help here:
https://neuron.yale.edu/neuron/static/n ... tCon.event
Last edited by tom_morse on Wed Jun 24, 2020 9:50 am, edited 1 time in total.
ted
Site Admin
Posts: 5810
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: ampanmda mod file working with AlphaSynapse

Post by ted »

I would like to have more control over the EPSP shape and parameters, which the NetStim module doesn't offer me.
In NEURON, a synaptic mechanism does not perturb membrane potential directly. It generates a current or a current + conductance change, which interacts with the electrical properties of the postsynaptic neuron to produce EPSPs or IPSPs.

A NetStim is not a module or a "mechanism" (in NEURON the term "mechanism" is typically used to refer to a "biophysical mechanism" e.g. a voltgae- or ligand-gated ion channel, an ion pump or exchanger, etc.). A NetStim is an instance of the NetStim class, which is one of several classes of artificial spiking cells that are included with NEURON. It is just an event generator, a state machine implemented by a bag of equations, functions, and logic. It contains no representation of membrane properties, ionic concentrations or currents or reversal potentials.

An event generated by a NetStim has no effect on anything unless the NetStim is monitored by a NetCon. A NetCon is not a module or a mechanism. It is simply a threshold crossing detector and a delay line. It monitors an artificial spiking cell for spike events, or a variable in a biophysical model cell (a model cell implemented by one or more sections) for positive-going crossing of a user-specified threshold. If a spike event or a positive-going threshold crossing is detected, the NetCon puts an event into a queue for delivery to a target mechanism after a user-specified delay.

The target of a NetCon can be an artificial spiking cell, or a synaptic mechanism that is attached to a segment in a biophysical model cell. In either case, the target must have a NET_RECEIVE block that specifies what happens when an event is delivered. For a synaptic mechanism, "what happens" is typically a perturbation of a system of ordinary differential equations that govern the time course of a postsynaptic conductance or current delivered to the segment to which the synapse is attached. The ODEs (or an equivalent kinetic scheme) are specified in the target mechanism's DERIVATIVE or KINETIC block.

If you want something else to happen, feel free to copy the NMODL code for any event-driven synaptic mechanism, give it a new class name (specified by the POINT_PROCESS statement in the NEURON block), and revise or replace the equations in its NET_RECEIVE and/or other blocks as you like. The customizations that are possible include various forms of short-term and long-term plasticity, and receptor saturation (see ModelDB and chapter 10 in the NEURON Book). You might also want to examine some of the synaptic mechanisms developed by Bill Lytton and his close collaborators, who have implemented some amazing customizations for their own purposes.
Post Reply