How to change runtime synaptic conductance?

Moderator: wwlytton

Post Reply
mmushtaq
Posts: 15
Joined: Mon Jun 23, 2014 7:23 am

How to change runtime synaptic conductance?

Post by mmushtaq »

I am working on thalamocortical model for slow oscillations. Actually, I want to change thalamic synaptic conductance during each slow oscillation cycle. For example, when slow oscillation cycle will start, during initial 500 ms, I want to block synaptic conductance between thalamic and cortical network. After 500 ms I want to change or increase synaptic conductance between these two networks layers.
There are two possibilities to give synaptic current 500 ms late.
1: Simply adding synaptic delay of 500 ms (This is not feasible for my results) in netcon.
2: I want to give low or zero conductance during initial 500 ms and after 500 ms I want to increase synaptic conductance during runtime.

Basically, I used and modified Knox model (2018). (https://senselab.med.yale.edu/ModelDB/s ... 233#tabs-1)

I already detected the points (ssflag) where synaptic conductance will change.
(If ssflag == 1 syn_conductance = .05), If (ssflag == 0 syn_conductance = .0) etc. In above model file, Fspikewave.oc I added some code.

Code: Select all

proc advance() {
   fadvance()
   if(ssflag_Autogoad==1) {
     //                RERE  RETCa RETCb TCRE  PYPY  PYIN  INPYa   PYRE   PYTC  TCPY  TCIN  PYPYn  PYINn
       assign_synapses(.05,  .05,  .01,  .025, .026, .05,  .17,  .0032,  .0017,.013, .012, .0018,  .001)
   } else {
     //                RERE  RETCa RETCb TCRE  PYPY  PYIN  INPYa   PYRE   PYTC  TCPY  TCIN  PYPYn  PYINn
       assign_synapses(.05,  .05,  .01,  .025, .026, .05,  .17,    .00,   .00,  .013, .012, .0018,  .001)
   }


   field = xfield(230,fielddist,watchneuron)
}
Initially it works for 10 seconds, but after 10 seconds, some thalamic cells are disconnected from networks because there resting potential drop down from given reversal potential (e.g. from -80mV to -110 mV).
I think, I am making some mistake in code for runtime synaptic conductance change. I need your kind help to fix this problem. I will wait for your kind reply
ted
Site Admin
Posts: 5989
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How to change runtime synaptic conductance?

Post by ted »

It's best not to change proc advance() or any other part of the standard run system to change parameters during a simulation. The safe and sure way to change parameters during a run is to use an FInitializeHandler. In the Hot tips area of the Forum look for How to change parameters during a simulationan for an example of how to change temperature during a run.

For your particular problem, insert these statements into your program AFTER model setup is complete but before you call run():

Code: Select all

t_change = 500 // time at which synaptic strengths are to be changed

objref fih
fih = new FInitializeHandler("control_synapses()")

proc control_synapses() {
  . . . statements that set synaptic weights to what they should be while t < t_change ms  . . .
  cvode.event(t_change, changesyn())
}

proc changesyn() {
  . . . statements that change synaptic weights to what they should be for t >= t_change . . .
}
mmushtaq
Posts: 15
Joined: Mon Jun 23, 2014 7:23 am

Re: How to change runtime synaptic conductance?

Post by mmushtaq »

Dear sir
Thank you very much for your kind reply. I implemented FinitializeHandler() in my code and it works. In my case I need to apply synaptic delay for each up state of slow oscillation cycle. For example when I start simulation the first slow oscillation cycle will also starts and I want to to change synaptic conductance after 500 ms of slow oscillation cycle for example 2nd slow oscillation cycle start at t =1500 ms I need to change conductance again at t=2000 ms simpaly t_change will vary during simulation for example 500 ms, 2000 ms, 3500 ms etc. I am detecting and saving this varied time in global variable of mod file. Now would you give me some suggestion how can I get updated value of mod file variable in hoc file? We can get updated value of mod variable in proc advance() but I don't know how to get updated value of mod file variable in hoc file out side of proc advance().
How can I deal with varied t_change in cvode.event(t_change, changesyn()). I will wait for your kind reply.
ted
Site Admin
Posts: 5989
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How to change runtime synaptic conductance?

Post by ted »

I need to apply synaptic delay for each up state of slow oscillation cycle. For example when I start simulation the first slow oscillation cycle will also starts and I want to to change synaptic conductance after 500 ms of slow oscillation cycle for example 2nd slow oscillation cycle start at t =1500 ms I need to change conductance again at t=2000 ms
Tell me if I understand correctly: you want your program to do something like this--

every time a slow oscillation cycle starts, launch an event that will return 500 ms later
when that event returns, change synaptic conductance

In principle this might be doable with an FInitializeHandler, cvode.event(), and some procedures. Maybe something like this:

objref fih
fih = new FInitializeHandler("controlsynapses()")

proc controlsynapses() {
set synaptic weight to desired starting values
}

plus "code that detects each time that a slow oscillation cycle starts and uses cvode.event() to change synaptic weights 500 ms later." The big question is: what is your definition of "the start of a slow oscillation cycle"? Is it the start of a sustained depolarization of the spike trigger zone, where "sustained depolarization" means "v > some value Vx for more than Tx milliseconds" (and what should Vx and Tx be)? Or should it be the time of the first spike in a burst of spikes, where a "burst of spikes" is defined as "the occurrence of at least N spikes over an interval of T ms" (and what should N and T be)?
mmushtaq
Posts: 15
Joined: Mon Jun 23, 2014 7:23 am

Re: How to change runtime synaptic conductance?

Post by mmushtaq »

Dear Sir

Again thank you very much for your reply and help! You asked about
" what is your definition of "the start of a slow oscillation cycle"?
I am using second strategy. Once a spike is detected, t_change flag (initially t_change = 0 (synaptic weights will zero or very low)) value will change after 500 ms (t_change = 1) now we need to change synaptic weights (increased synaptic weights). As slow oscillation cycle will complete (entire network cells are on resting condition) now again t_change = 0 (again synaptic weights will zero or very low) and similarly this process will repeat for second and so forth slow oscillation cycles. Actually you gave me a mod file(autogoat.mod I will send you by mail) for spike detection. I am using that one for slow oscillation detection. As for as number of spikes are concerned, in 50 ms, 2 spikes should occur. I hope now picture is more clear. I will wait for your kind suggestions.
mmushtaq
Posts: 15
Joined: Mon Jun 23, 2014 7:23 am

Re: How to change runtime synaptic conductance?

Post by mmushtaq »

I have implemented FInitializeHandler. But I am still facing same problem. I noticed this error during simulation.
exp(702.716) out of range, returning exp(700)
exp(702.469) out of range, returning exp(700)
exp(702.64) out of range, returning exp(700)
exp(705.532) out of range, returning exp(700)
I am simulating this model on MAC book. Can anyone help me to solve this problem? I will wait for your kind reply.
Post Reply