Hello Ted,
In my current application I am looking to modify .mod files automatically from Matlab, then compile them using mknrndll and run some .hoc files which require the said .mod.
Since this is to be repeated over a loop I need a way to compile .mod files from the system command line, Matlab command, or another way that doesn't require manual GUI interaction.
So far I have been able to make the GUI appear in two ways:
launching a windows cmd and running C:\nrn72\bin\nrniv.exe /cygdrive/C/nrn72/lib/hoc/mknrndll.hoc
or the equivalent from Matlab system('C:\nrn72\bin\nrniv.exe /cygdrive/C/nrn72/lib/hoc/mknrndll.hoc')
The next step would be to find a command that is equivalent to pressing the buttons on the GUI that pops up, and entering a string for the chosen directory.
When running the above command in Matlab, the command window enters the Neuron prompt interface (as it should, since it's simply running a .hoc file).
I have tried to inspect the file C:\nrn72\lib\hoc\mknrndll.hoc for useful functions, and tried to run some on the on the Neuron prompt that appears. The prompt, however, is unresponsive even to simple queries like 1+1, which I believe is from the fact that it's expecting interaction with the GUI, and simply ignores written commands.
As far as I can tell there used to be a mknrndll DOS box, in which you could cd to the directories you wanted and simply type mknrndll to run. Is my only option to uninstall neuron 7.2 and revert back to 5.0.1 and earlier, just to be able to use the mknrndll DOS box? I am afraid of the buggy repercussions such measure would lead to.
Thank you in advance for your help and best wishes,
Susana
Running mknrndll from the command line
-
- Site Admin
- Posts: 6300
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: Running mknrndll from the command line
That shouldn't be necessary, unless you are changing the actual structure of the underlying equations--and even then it may be largely avoidable. It is very easy to revise a mod file so as to expose parameter values to hoc and Python, which makes them modifiable by mere assignment statements. If you aren't sure what I mean, email mesl6609 wrote:In my current application I am looking to modify .mod files automatically from Matlab, then compile them using mknrndll
ted dot carnevale at yale dot edu
an example mod file and describe the kinds of changes that you were planning to make.
Re: Running mknrndll from the command line
Dear Ted,
Thank you for your prompt reply.
I realized this on the way home yesterday and planned to implement exactly what you suggested today. I guess I was a bit to quick to post on this forum.
In any case thank you again for your continued support and help to the neuron community.
Best wishes,
Susana
Thank you for your prompt reply.
I realized this on the way home yesterday and planned to implement exactly what you suggested today. I guess I was a bit to quick to post on this forum.
In any case thank you again for your continued support and help to the neuron community.
Best wishes,
Susana
Re: Running mknrndll from the command line
I am trying to do something similar to what is being described above. I am trying to do a parameter sweep of a synapse, which is described in a mod file. The parameters are defined in the PARAMETER { } block of the .mod file. How do I access or change this from within hoc code?
Thanks
Thanks
Re: Running mknrndll from the command line
So I've found most of what I need, but I just want a little clarification.
I have a synapse, called AMPA_S, with the parameter wMax that I want to modify in all sections with the synapse. The code that I am using is as follows (the print statements are for debugging):
Will this code successfully change all the values of wMax in each section with an AMPA_S synapse?
I have a synapse, called AMPA_S, with the parameter wMax that I want to modify in all sections with the synapse. The code that I am using is as follows (the print statements are for debugging):
Code: Select all
forall {
if (ismembrane("AMPA_S")){
print secname()
printf("Setting wMax to %-3.3f \n",i*0.01)
wMax_AMPA_S = i*0.01
}
}
-
- Site Admin
- Posts: 6300
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: Running mknrndll from the command line
All PARAMETERs are automatically visible to hoc and Python. Syntax depends on whether the mechanism is a density mechanism, in which case it is param_suffix, or a point process, in which case it is objrefname.param. A PARAMETER is global unless it is declared as RANGE in the NEURON block, in which case it may be assigned different values in different compartments.
You might find it useful to read chapter 9 of the NEURON Book, or at least this
Hines, M.L. and Carnevale, N.T. Expanding NEURON's repertoire of mechanisms with NMODL. Neural Computation 12:995-1007, 2000
which is available from a link at
http://www.neuron.yale.edu/neuron/nrnpubs
You might find it useful to read chapter 9 of the NEURON Book, or at least this
Hines, M.L. and Carnevale, N.T. Expanding NEURON's repertoire of mechanisms with NMODL. Neural Computation 12:995-1007, 2000
which is available from a link at
http://www.neuron.yale.edu/neuron/nrnpubs
-
- Site Admin
- Posts: 6300
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: Running mknrndll from the command line
How hard is it to (1) read the Programmer's Reference, and (2) if that isn't sufficiently clear, try your code and find out for yourself? As Bill Lytton says, "this isn't chemistry lab" (i.e. "nothing will blow up").Grado wrote:So I've found most of what I need, but I just want a little clarification.