mferran1 wrote:I think that for some reason NEURON is not going inside the while to define TOTALDEND.
Think, shmink. Prove to yourself that it does or doesn't by inserting one or more print statements, or other statements, that inform you of progress.
What are you trying to accomplish with your hoc file? My guess is that, expressed in pseudocode, your aim is something like this:
Code: Select all
execute a hoc file that contains the specification of a model cell
do something with this model cell
throw away this model cell
UNTIL the last model specification file has been executed
Have you verified that the contents of any of the model specification files are actually executed? Easy enough to do:
1. Insert a print statement that reports the name of the file that you think the code should read next.
2. At the point at which you think the model specification code has been executed, insert a
statement that will print out the branched architecture of the model cell. Study its output to make sure that it is correct (see last suggestion below).
And are you absolutely sure that your code discards all traces of the previous model before it starts to work on the next one? This can be verified by inserting a topology() statement at the appropriate point.
Only by such tests will you discover whether things are working as you thought, and without that knowledge you're in the dark.
The "neurons.txt" file is just a list of neurons
Actually it's just a list of names of files that contain hoc code. Whether any of the code is ever executed remains to be discovered.
"1.hoc" and "2.hoc" are identical and with the following code:
Code: Select all
. . .[code][/quote]Do yourself a big favor and run tests with tiny model cells--maybe three or four neurites each. And make them different so you can be sure that the two different files are actually executed. Only after your program works with tiny models will it be time to try it with models that have more than a very few neurites.