Have a problem along similar lines of other CVODE question from Brad..
I am trying to implement NetStim in an existing model full of my own mod files (most importantly, a modified version of classic AMPA, GABA channels from Destexhe et al 1994 -- to include Ca2+ currents). In NetStim comments, it says that a CVODE object must exist in order for NetStim to work, so I did something along Brad's lines, adding a derivative state and NetReceive (in place of RELEASE function). Everything compiles ok, but Neuron gives me a non-specific error upon Run and crashes out. Of course, that might be due to some other programming error, but I am still tracking the error down
So my question is -- did I go the wrong way? Can you implement those AMPA and other mod's with NetReceive with modification? And what exactly does it mean, that CVODE object must exist for NetStim to work? I am having a hard time finding this in the documentation...
Old .mod files with CVODE and NetStim
I'm sure Ted or Mike will be along shortly with a more thorough answer, but one thing to quickly try is to ensure that you have actually created a CVode object at the hoc level, as detailed in the documentation
http://www.neuron.yale.edu/neuron/stati ... html#CVode
One way to create the CVode object is to add the following lines to your script:
This will use the default integrator and might allow you to further test your modifications.
Brad
http://www.neuron.yale.edu/neuron/stati ... html#CVode
One way to create the CVode object is to add the following lines to your script:
Code: Select all
objref cv
cv = new CVode()
Brad
-
- Site Admin
- Posts: 6299
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: Old .mod files with CVODE and NetStim
In addition to whatever problems may affect the code you're wrestling
with, there are some possible sources of confusion here. Let's dispel
them first.
1.
Programmer's Reference or netstim.mod itself, at least not with
v. 5.7 2005-4-21 11:7:7 Main (159). Could you please point me to
where you found this statement?
2. If NetStim does require a CVode object to exist, you'll get a CVode
object simply by loading anything that loads stdrun.hoc. Try this:
start nrngui, then type allobjects() at the oc> prompt, and examine the
names that are printed.
3.
would, in and of itself, result in the creation of a CVode object, but
someone else might mistakenly draw such a conclusion from reading
this. The changes you describe would only result in the synaptic
mechanism being able to respond to input events.
Now we get to the bugs themselves.
strategy of starting small, making incremental changes, and testing at
every step. I will assume that the original, unmodified code execute
properly with fixed time steps. Here's how to isolate and fix your
probem(s):
Before you start, you might want to check the original hoc code to
be sure it automatically creates a CVode instance (load the code,
then type allobjects() at the oc> prompt).
with, there are some possible sources of confusion here. Let's dispel
them first.
1.
This might be true, but I don't see such a statement in either theIn NetStim comments, it says that a CVODE object must exist in order for NetStim to work
Programmer's Reference or netstim.mod itself, at least not with
v. 5.7 2005-4-21 11:7:7 Main (159). Could you please point me to
where you found this statement?
2. If NetStim does require a CVode object to exist, you'll get a CVode
object simply by loading anything that loads stdrun.hoc. Try this:
start nrngui, then type allobjects() at the oc> prompt, and examine the
names that are printed.
3.
I bet you didn't mean to suggest that changing the NMODL codeit says that a CVODE object must exist in order for NetStim to work, so I did something along Brad's lines, adding a derivative state and NetReceive
would, in and of itself, result in the creation of a CVode object, but
someone else might mistakenly draw such a conclusion from reading
this. The changes you describe would only result in the synaptic
mechanism being able to respond to input events.
Now we get to the bugs themselves.
Probably the surest way to isolate and fix what's wrong is to apply theEverything compiles ok, but Neuron gives me a non-specific error upon Run and crashes out. Of course, that might be due to some other programming error, but I am still tracking the error down
So my question is -- did I go the wrong way? Can you implement those AMPA and other mod's with NetReceive with modification?
strategy of starting small, making incremental changes, and testing at
every step. I will assume that the original, unmodified code execute
properly with fixed time steps. Here's how to isolate and fix your
probem(s):
Code: Select all
For each of your synaptic mechanisms, one at a time
Repeat
Make what you think are the necessary changes
so that it will respond to input events.
Test it in a simple network model
where it is attached to a single compartment biophysical model cell
and driven by events from a NetStim
until it works
Then test it in your big network model.
until all synaptic mechanisms have been properly revised
be sure it automatically creates a CVode instance (load the code,
then type allobjects() at the oc> prompt).
I can't even find the statement myself.And what exactly does it mean, that CVODE object must exist for NetStim to work? I am having a hard time finding this in the documentation...
Re: Old .mod files with CVODE and NetStim
Programmer's Reference, NetCon, Bugs paragraph:ted wrote:
1. In NetStim comments, it says that a CVODE object must exist in order for NetStim to work
This might be true, but I don't see such a statement in either the
Programmer's Reference or netstim.mod itself, at least not with
v. 5.7 2005-4-21 11:7:7 Main (159). Could you please point me to
where you found this statement?
BUGS
NetCon can currently only be used if a CVode object exists.
Maybe it's just in the context of the example, I should read it more carefully.
And I will definitely follow all the suggestions, hope everything will iron out smoothly.
Ted and Brad, thanks a million!
-
- Site Admin
- Posts: 6299
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
You're right, there it is. I need to start reading things to the very end.
In my own programming, I always use the standard run system and
so have never run afoul of this "bug." Much legacy hoc code, including
some that is in ModelDB, has been written by people who prefer to use
their own code for everything and never use the standard run system.
However, this is not a good practice for developing new models; at the
very least, it complicates software debugging and maintentance,
prevents use of many of the GUI's powerful tools,and makes it harder
for others to reuse programs.
About your synaptic mechanisms: Alain developed some very clever
synaptic mechanisms with receptor saturation. These assume that
"transmitter" is present in the synaptic cleft for a fixed time following
each presynaptic activation. Making these compatible with CVODE
requires use of self-events. You will find a good example of this in
chapter 10 of The NEURON Book--see
http://www.neuron.yale.edu/ftp/ted/book ... xedref.pdf
In my own programming, I always use the standard run system and
so have never run afoul of this "bug." Much legacy hoc code, including
some that is in ModelDB, has been written by people who prefer to use
their own code for everything and never use the standard run system.
However, this is not a good practice for developing new models; at the
very least, it complicates software debugging and maintentance,
prevents use of many of the GUI's powerful tools,and makes it harder
for others to reuse programs.
About your synaptic mechanisms: Alain developed some very clever
synaptic mechanisms with receptor saturation. These assume that
"transmitter" is present in the synaptic cleft for a fixed time following
each presynaptic activation. Making these compatible with CVODE
requires use of self-events. You will find a good example of this in
chapter 10 of The NEURON Book--see
http://www.neuron.yale.edu/ftp/ted/book ... xedref.pdf