Changing a CellBuilder's model via hoc statements

The basics of how to develop, test, and use models.
Post Reply
freddy09
Posts: 17
Joined: Tue Mar 18, 2008 6:06 am
Location: LIRMM

Changing a CellBuilder's model via hoc statements

Post by freddy09 »

Hi everybody!!
I have some questions on its loop which it uses in extacellular stim

Code: Select all

for i=0, slist.count-1 {slist.object(i).rdses()}
0 -5.114 4.698 15.686
0 -5.114 4.688 15.686
0 -5.114 4.693 15.686
0.014 -6.367 3.241 1.4
-1.057 -8.03 2.933 1.4
-4.15 -10.015 2.255 1.4
-6.025 -14.697 2.255 1.4
-7.475 -17.463 -1.495 1.4
-11.012 -23.847 -4.745 1.4
-10.8 -23.847 -4.745 1.4
-13.712 -30.883 -7.245 1.4
-13.513 -30.883 -7.495 1.4
-16 -35.351 0.505 1.4
-22.65 -43.012 -4.745 1.4
-25.35 -45.991 -2.995 1.4
0 -5.114 4.693 15.686
What is the goal of this loop and what is the unit of this parameters?
I don't understand it
ted
Site Admin
Posts: 6305
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

The code snippet

Code: Select all

for i=0, slist.count-1 {slist.object(i).rdses()}
is part of a session file saved from a Cell Builder. It is automatically generated
by NEURON when one saves a Cell Builder to a session file, and like most
computer generated code, it is cryptic and not really intended for users to
read (not that you shouldn't read computer generated code, but when you
do read it, be prepared for some puzzlement). Taken by itself, it simply
iterates over the objects in a List named slist, and calls the method rdses()
which belongs to the objects in that List. Taken in the context of a ses
file saved from a Cell Builder, it has something to do with recreating a Cell
Builder from that session file.

"What is the meaning of slist, what is the significance of the objects in that
list, and what does their rdses() method do?"

These items are part of the implementational details of the Cell Builder
class, which aren't quite as clandestine as the secret rites of the Masons--
the clues are somewhere in the files in lib/hoc/celbild . Not important to
anyone except those who are involved in developing NEURON, but
discoverable by reading the source code.
freddy09
Posts: 17
Joined: Tue Mar 18, 2008 6:06 am
Location: LIRMM

another question

Post by freddy09 »

Hi Ted!
I believed that the loop's goal was to associate some parameters to the dendrite, for the use and the modeling in the CellBuilder.
So could you tell me, how to change dendrite's parameters, like number of segment or fiber's diameter in the extracellular stim ?

Thanks!
ted
Site Admin
Posts: 6305
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

Now I see what you need to know--you're not just motivated by idle curiosity
about stuff in a ses file.

Although I'm much in favor of modifying the contents of ses files to achieve
various goals, there are times when it's better to use a different approach,
and this is one of them. You really don't want to tinker with the contents of
a CellBuilder's ses file. Too arcane, and there's no guarantee that any
changes you make will be compatible with future versions. Far better to
make "post-translational modifications" to the sections that the CellBuilder
spawns, i.e. by writing your own hoc code to change the pt3d diameters or
xyz coords of individual 3d data, nseg values, and/or biophysical properties
of any sections you like. But you also must be sure to protect your changes
from being overwritten by the CellBuilder itself--after all, if the CB is in
Continuous Create mode, and just for a moment you fiddle with something
on one of its pages, poof! it emits a new model specification that zaps
whatever you did with your own hoc code.

So after loading the CB's ses file, make sure there are sections, and then
turn off the CB's Continuous Create.

Code: Select all

// assume cb.ses recreates a CellBuilder
load_file("cb.ses")
// assume that this is the only CellBuilder, so it is CellBuild[0]
// make sure that sections actually exist
if (CellBuild[0].continuous==0) {
  CellBuild[0].continuous=1
}
// prevent CellBuilder from overwriting anything you might do to these 
// sections via user-written hoc statements
CellBuild[0].continuous=0
// now you can execute any statements you like that modify properties 
// of any section(s)
// anything you might want to do should probably be encapsulated in a 
// proc for ease of reassertion, just in case you should accidentally or 
// deliberately return the CellBuilder to Continuous Create mode
Post Reply