Strange problem during fitting process: is it a bug of nrn?

Using the Multiple Run Fitter, praxis, etc..
Post Reply
Keivan
Posts: 127
Joined: Sat Apr 22, 2006 4:28 am

Strange problem during fitting process: is it a bug of nrn?

Post by Keivan »

I have a mechanism in my model which calculates amplitude of EPSPs for me. I have non-uniform model so I have to initialize my model to the steady state (when t<0). My synapse become active at t = 10. this is my mechanism.

Code: Select all

NEURON {
    SUFFIX vmax
    RANGE vm, tm, vrest, amp
}

ASSIGNED {
	v		(millivolt)
	vm		(millivolt)
	vrest	(millivolt)
	amp		(millivolt)
	tm		(ms)
}

INITIAL {
	reset(v)
}

PROCEDURE reset(v (mV)) { : callable from hoc
	vm = v
	vrest = v
	amp = 0
}

BREAKPOINT { 
	if (v>vm && t>9.9) { 
		vm=v
		tm=t 
	}
	if (t>1 && t<9.9) { vrest = v }
	amp = vm - vrest
}
I have a simple fitting tool which tries to find the weight of synapse in which EPSP become a specific value.

Now my problem #1 is that when I change conductance of one of my channels from 3 to 1.5, EPSP amplitude reported by the above mechanism become a fixed value for different values of synaptic weight. when I plot the membrane potential I can see that for different values of synaptic weight different EPSP is produced in the model. Also, when I use a vector mechanism to record the membrane potential and then find the maximum value of membrane potential I can calculate value of EPSPs.
However, the vmax mechanism always report a fix value for amp when conductance of my channel is 1.5 or 2 or 1.7. then again when I change the conductance of the channel to 3, vmax mechanism works fine.

I am really confused. It seem there is sth wrong.

Problem #2 When I change morphology of my neuron, variable time step tool cause similar problem reported above.

If you want my idea, I think there is nasty bug in the neuron or my vmax mechanism.
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Strange problem during fitting process: is it a bug of n

Post by ted »

Without more information, the source of the problem cannot be discovered. If you send source code (just hoc, ses, and mod files) to me
ted dot carnevale at yale dot edu
I will let you know what I discover.
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Strange problem during fitting process: is it a bug of n

Post by ted »

I guess you figured out what was wrong and fixed it.
Keivan
Posts: 127
Joined: Sat Apr 22, 2006 4:28 am

Re: Strange problem during fitting process: is it a bug of n

Post by Keivan »

Actually no. As I told you before I found another temporary solution for my problem because I had to send the revision of my article as soon as possible. Still, I think there is sth wrong with NMODL. I delayed sending my model to you because I wanted to write a simple test code for you but I could not simplify the problem. I will send you a test code soon.

If you see the results it is obvious that NMODL do not differentiate between the negative time (t < 0) and positive time (t > 0).
Post Reply