maria diamantaki wrote:In one branch of each dendrite I have two synapses, one AMPA and one NMDA.
First, a comment. The code excerpt you provide contains a single NetCon; for each synaptic mechanism instance you will need a separate NetCon, and each activation of each synapse is going to require that you stuff a corresponding event into the event queue. If the number of synapses and activations are both small, it's probably OK to use the "loadqueue" strategy. However, your code will be cleaner and your model will scale better (handle a larger number of synapses and events more efficiently) if you use a single VecStim object as the spike source.
What I want to do is to have a specific sequence of events . . . and during this sequence of events, to change the synaptic conductance by changing gmax.
So am I right to presume you're not using NEURON's built-in ExpSyn or Exp2Syn? Most event driven synaptic mechanisms that I have seen, and certainly any that can handle multiple convergent afferent streams, do not have a gmax parameter. Instead the amplitude of the synaptic conductance change is specified by the weight of the NetCon that delivers the event. Indeed, in my experience most event driven synaptic mechanisms with a gmax parameter are rather limited in their capabilities if not downright buggy. If you're using something you found in ModelDB, please point me to the file(s) so I can see for myself. If it's code that isn't in ModelDB and you want me to look at it, zip it up and email to
ted dot carnevale at yale dot edu
and I'll check it out.
Back to your original question in its most general form: how to specify a temporal sequence of synaptic activations so that each activation occurs at a precomputed time and causes a precomputed perturbation of synaptic conductance. Suppose the event times t0..tn-1 are contained in Vector stvec and the corresponding perturbations of synaptic conductance w0..wn-1 are contained in Vector swvec, and the synaptic mechanisms have been appended to a List called slist, here's a strategy expressed in pseudocode that will force the synapses to be activated at the times specified in stvec.
Code: Select all
create a VecStim that generates events at the times specified in stvec
attach the VecStim to each synapse and set the NetCon's delay to 0
The next question is how to force the desired synaptic strengths. For each synaptic activation, the weights must be changed to their new values _before_ the activation occurs. Here's pseudocode for how to do that:
Code: Select all
find the shortest interevent interval in stvec; call this mindel
subtract mindel/2 from the elements of stvec (now contains t0-mindel/2, t1-mindel/2 etc.)
create a VecStim that generates events at the times specified in stvec
attach the VecStim to each synapse and set the NetCon's delay to mindel/2
// at this point, each synapse will be activated at t0 - mindel/2 + mindel/2, t1 - mindel/2 + mindel/2 etc.
set up an FInitializeHandler that sets a global variable called "count" to 0
set up proc setweights() that, when called, sets the synaptic weights to swvec.x[count] and increments count by 1
create a NetCon that is driven by the VecStim, has delay set to 0, and uses its event() method to call setweights()
Now in the course of a run, the synaptic weights will be set to the desired values at times t0-mindel/2, t1-mindel/2 . . . and the synapses will be activated at times t0, t1 . . .
Of course the devil is in the details, and I'll be able to provide those when I know more about the synaptic mechanisms you're using.