modification of fiber's diameter through a window

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

modification of fiber's diameter through a window

Post by freddy09 »

Hi Ted and everybody!!!
This is a part of my program
I try to change dendrites' parameters by the modification of fiber's diameter through a window.

Code: Select all

/création d'une procédure, pour récupérer le diamètre et modifier
load_file("cell.ses")
if (CellBuild[0].continuous==0) {
  CellBuild[0].continuous=1
}

//definition parametre du grand axone

celsius=37		//Temperature (°c)
axonnodes=21		//Nombre de noeud (SI)
paranodes1=40		//Nombre de paranode à gauche (SI)
paranodes2=40		//Nombre de paranode à droite (SI)
axoninter=120		//Nombre d'internode (SI) 
axontotal=221		//Nombre total (SI)
D_droite=5.7		//Diametre de la fibre (um)
paralength1=3		//Longueur de myelin entre les paranode (um)
nodelength=1.0		//Longueur d'un noeud (um)
space_p1=0.002		//largeur de myelin entre les paranodes (um)
space_p2=0.004		//largeur des paranodes (um)
space_i=0.004		//largeur des internodes (um)
rhoa=0.7e6		//Resistivite (ohm/um)
mycm=0.1		//Capacite du Myelin (uF/cm²)
mygm=0.001		//Conductivite du Myelin (S/cm²)


//case selon la taille de la fibre
proc affectation_droite(){
if (D_droite==5.7){
			g=0.605
			axonD=3.4	//Diametre des internodes (um)
			nodeD=1.9	//Diametre des noeuds (um)
			paraD1=1.9	//Diametre du myelin (um)
			paraD2=3.4	//Diametre des paranodes (um)
			deltax=500	//Longueur separant 2 nodes (um)
			paralength2=35	//Longueur des paranodes (um)
			nl=80}		//Nombre de "myelin lemella" (SI)
		
if (D_droite==7.3){
			g=0.630
			axonD=4.6	//Diametre des internodes (um)
			nodeD=2.4	//Diametre des noeuds (um)
			paraD1=2.4	//Diametre du myelin (um)
			paraD2=4.6	//Diametre des paranodes (um)
			deltax=750	//Longueur separant 2 nodes (um)
			paralength2=38	//Longueur des paranodes (um)
			nl=100}		//Nombre de "myelin lemella" (SI)

if (D_droite==8.7){
			g=0.661
			axonD=5.8	//Diametre des internodes (um)
			nodeD=2.8	//Diametre des noeuds (um)
			paraD1=2.8	//Diametre du myelin (um)
			paraD2=5.8	//Diametre des paranodes (um)
			deltax=1000	//Longueur separant 2 nodes (um)
			paralength2=40	//Longueur des paranodes (um)
			nl=110}		//Nombre de "myelin lemella" (SI)

if (D_droite==10.0){
			g=0.690
			axonD=6.9	//Diametre des internodes (um)
			nodeD=3.3	//Diametre des noeuds (um)
			paraD1=3.3	//Diametre du myelin (um)
			paraD2=6.9	//Diametre des paranodes (um)
			deltax=1150	//Longueur separant 2 nodes (um)
			paralength2=46	//Longueur des paranodes (um)
			nl=120}		//Nombre de "myelin lemella" (SI)



if (D_droite==11.5){
			g=0.700
			axonD=8.1	//Diametre des internodes (um)
			nodeD=3.7	//Diametre des noeuds (um)
			paraD1=3.7	//Diametre du myelin um)
			paraD2=8.1	//Diametre des paranodes (um)
			deltax=1250	//Longueur separant 2 nodes (um)
			paralength2=50	//Longueur des paranodes (um)
			nl=130}		//Nombre de "myelin lemella" (SI)

if (D_droite==12.8){
			g=0.719
			axonD=9.2	//Diametre des internodes (um)
			nodeD=4.2	//Diametre des noeuds (um)
			paraD1=4.2	//Diametre du myelin (um)
			paraD2=9.2	//Diametre des paranodes (um)
			deltax=1350	//Longueur separant 2 nodes (um)
			paralength2=54	//Longueur des paranodes (um)
			nl=135}		//Nombre de "myelin lemella" (SI)

if (D_droite==14.0){
			g=0.739
			axonD=10.4	//Diametre des internodes (um)
			nodeD=4.7	//Diametre des noeuds (um)
			paraD1=4.7	//Diametre du myelin (um)
			paraD2=10.4	//Diametre des paranodes (um)
			deltax=1400	//Longueur separant 2 nodes (um)
			paralength2=56	//Longueur des paranodes (um)
			nl=140}		//Nombre de "myelin lemella" (SI)

if (D_droite==15.0){
			g=0.767
			axonD=11.5	//Diametre des internodes (um)
			nodeD=5.0	//Diametre des noeuds (um)
			paraD1=5.0	//Diametre du myelin (um)
			paraD2=11.5	//Diametre des paranodes (um)
			deltax=1450	//Longueur separant 2 nodes (um)
			paralength2=58	//Longueur des paranodes (um)
			nl=145}		//Nombre de "myelin lemella" (SI)

if (D_droite==16.0){
			g=0.791	
			axonD=12.7	//Diametre des internodes (um)
			nodeD=5.5	//Diametre des noeuds (um)
			paraD1=5.5	//Diametre du myelin (um)
			paraD2=12.7	//Diametre des paranodes (um)
			deltax=1500	//Longueur separant 2 nodes (um)
			paralength2=60	//Longueur des paranodes (um)
			nl=150}		//Nombre de "myelin lemella" (SI)


//resistivite de l'axone (ohm.cm)
Rpn0=(rhoa*.01)/(PI*((((nodeD/2)+space_p1)^2)-((nodeD/2)^2)))

}

CellBuild[0].continuous=0

proc setD_droite(){
	D_droite = $1
	affectation_droite()
	for (i=0;i<=6;i=i+2) dend[i]{
				nseg=100		//nombre de segments (SI)
				diam=nodeD		//diametre (um)
				L=100*nodelength		//longueur (um)
				Ra=rhoa/10000		//resistivite (ohm)	
				cm=2			//capacite du noeud (uF/cm²)
				insert hh		//ajout parametre Hodgkin-H
				insert extracellular	//ajout parametre Extra-cellul
				xraxial=Rpn0		//resistivite longitudinal
				xg=1e10			//conductance
				xc=0}                    //capacite
					}
					

//titre du tableau
xpanel("Section Fibres Droite", 0)

//case pour regler le retard
xvalue("Diametre Fibre Droite (um)", "D_droite", 1, "setD_droite(D_droite)", 0, 0)

//position de la fenetre
xpanel(38,790)

CellBuild[0].continuous=1
If i increase the fiber's diameter, the stimulus' spike decreases.
But i don't want this decrease and i want to obtain "the nervous conduction speed".
Can you help me.
ted
Site Admin
Posts: 5869
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

If i increase the fiber's diameter, the stimulus' spike decreases.
What kind of a stimulus are you using--an IClamp? Do you mean to say that increasing the
diameter causes a reduction of the effect of the IClamp's current on membrane potential?
i want to obtain "the nervous conduction speed".
First things first. Remind me about this question after the "stimulus issue" has been
resolved.


Some comments on the code that you provided:
This

Code: Select all

if (CellBuild[0].continuous==0) {
  CellBuild[0].continuous=1
}
ensures that the CellBuilder is in "Continuous Create" mode, and guarantees that a model
cell will be created according to the specification contained in the CellBuilder.

The statement

Code: Select all

CellBuild[0].continuous=0
should be the very next line in the program, because as soon as the model exists, the
CellBuilder should be switched out of "Continous Create" mode. Otherwise you will be
at risk of accidentally reversing any changes that you make to the model's properties
via hoc statements. It is a mistake to put this line of code anywhere else, because you
are likely to lose track of it.

The statement

Code: Select all

CellBuild[0].continuous=1
at the end returns the CellBuilder to "Continuous Create" mode. This will restore the
model's properties to those that were specified by the CellBuilder, and leave the
CellBuilder in "Continuous Create" mode where you can accidentally undo any changes
you might make later with your own hoc statements. Is that really what you want to do?
freddy09
Posts: 17
Joined: Tue Mar 18, 2008 6:06 am
Location: LIRMM

Post by freddy09 »

What kind of a stimulus are you using--an IClamp?
I use an IClamp for stimulus.
Do you mean to say that increasing the diameter causes a reduction of the effect of the IClamp's current on membrane potential?
Yes, if i increase fiber's diameter, i decrease the effect of the stimulus.

And for the using of the CellBuilder, i don't have any problem with it.
I change dendrite's diameter with the CellBuilder put on continuous create.
ted
Site Admin
Posts: 5869
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

freddy09 wrote:if i increase fiber's diameter, i decrease the effect of the stimulus.
To help me provide better answers to your questions, please tell me something about your
background. Would you say you have more knowledge or experience in math, physics,
engineering, or biology? And have you spent much time in a laboratory stimulating and
recording from real neurons?
And for the using of the CellBuilder, i don't have any problem with it.
I change dendrite's diameter with the CellBuilder put on continuous create.
Dangerous. To understand why, consider the following scenario:
Step 1. Experimenter X uses a CellBuilder to set up a model specification.
Step 2. Then X uses hoc statements to change certain properties of the model.
Step 3. Finally X uses the CellBuilder to do anything at all to the model specification,
or even simply turns Continuous Create on.

Step 3 undoes everything that X did in step 2.
freddy09
Posts: 17
Joined: Tue Mar 18, 2008 6:06 am
Location: LIRMM

Post by freddy09 »

Step 3 undoes everything that X did in step 2.
For my project, at the beginning the CellBuilder helped me to create a model with some dendrite and axone. But later, the CellBuilder will not make modification on the model. And the X user should not have access to the CellBuilder.
please tell me something about your background
For my background (formation), I followed the lessons of electronics, programming and automatism in France (into a university).
I don't know many thing in biology. However my guardian, he has knowledge, but not in programming
ted
Site Admin
Posts: 5869
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

freddy09 wrote:
Step 3 undoes everything that X did in step 2.
For my project, at the beginning the CellBuilder helped me to create a model with some dendrite and axone. But later, the CellBuilder will not make modification on the model. And the X user should not have access to the CellBuilder.
OK. But I would still feel safer if CellBuild[0].continuous == 0 and stays == 0 as soon as
possible.
For my background (formation), I followed the lessons of electronics, programming and automatism in France (into a university).
Excellent.
I don't know many thing in biology. However my guardian, he has knowledge, but not in programming
Good. An interdisciplinary collaboration. A real opportunity for both of you to learn new
things.
if i increase fiber's diameter, i decrease the effect of the stimulus.
Because increasing the diameter puts more membrane "electrically close" to the point
at which you are injecting the current stimulus. Consequently more charge must be
injected to drive local membrane potential above firing threshold. Also, increasing axon
diameter allows injected charge to escape into adjacent regions of the cell more easily
(resistance between two points along a cylinder is inversely proportional to the square
of fiber diameter).

In other words, increasing diamter lowers the input impedance at the site of current
injection

So if you change fiber diameter, you should also adjust stimulus intensity. But by how
much?

It is a common practice to use a brief (0.1 ms) stimulus whose amplitude is twice as large
as the threshold stimulus. This gives a good "clean" start to the spike. Weaker stimuli
tend to allow sodium channel inactivation and potassium channel activation that slows
the launch of the spike from the stimulated region, and stronger stimuli allow the injected
current to spread farther down the axon and contaminate the initial part of spike
propagation.

But how do you find spike threshold? Best to do this automatically. I will point you to some
reusable code that does this for you.
Last edited by ted on Wed Apr 30, 2008 10:22 am, edited 1 time in total.
ted
Site Admin
Posts: 5869
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Finding spike threshold, and determining conduction velocity

Post by ted »

OK, this is what I was looking for--right here in the Forum:
How to find spike threshold automatically
http://www.neuron.yale.edu/phpBB2/viewtopic.php?p=1107

Every time you change your model in a way that might affect spike threshold, you should
use threshold() to determine the new firing threshold. Then you should use a stimulus intensity
that is twice as large for your tests.
i want to obtain "the nervous conduction speed".
Easily done--after you have discovered what stimulus intensity to use.

Do it the same way an experimentalist would determine conduction velocity. An
experimenatlist would record from two points along a known length of axon, and
determine the times at which the spike passes each of these points. With NEURON,
you would use the NetCon class's record() method
http://www.neuron.yale.edu/neuron/stati ... tml#record
to capture the threshold crossing times to a Vector.

It is important to make sure that the stimulus site is far enough from the two NetCons,
and that the stimulus duration is brief enough, that the stimulus current itself has no
significant effect on propagation of the spike along the part of the axon that lies between
the two NetCons. An experimentalist working on a real axon would have similar concerns.

If you are using fixed time step integration, threshold crossing will be detected on time
step boundaries. Greater precision can be achieved by using adaptive integration
(cvode), especially if you take care to use optimal error tolerances (set by the
Atol Scale Tool, which is part of the VariableStepControl GUI tool), and assert
cvode.condition_order(2)
so that threshold crossing times are determined by interpolation (this increases
accuracy of threshold crossing times from 1st order to 2nd order--see
http://www.neuron.yale.edu/neuron/stati ... tion_order
).
Last edited by ted on Wed Apr 30, 2008 10:24 am, edited 2 times in total.
freddy09
Posts: 17
Joined: Tue Mar 18, 2008 6:06 am
Location: LIRMM

Post by freddy09 »

An aside: I just noticed something very strange. Apparently, when I replied to freddy09's
question, I hit the "edit" button instead of the "quote" button. Then, without noticing my
error, I destroyed much of what freddy09 had written. Finally, when I "submitted" my
reply, it was attributed to freddy09. In the following, the quotes are from freddy09,
and the rest was written by me.

Sorry for any confusion this may cause. I'll try to be more careful in the future so it
doesn't happen again.
--ted

i don't understand the real use of the threshold. Because it doesn't really change anything.
You said that changing axon diameter changed the effect of the stimulus on membrane
potential. So when you change axon diameter, you also have to change the stimulus
amplitude. You're interested in conduction velocity, so the purpose of the stimulus must
be to elicit a spike. Experimentalists who study conduction velocity typically use a stimulus
intensity that is 2 x threshold. So every time you change diameter (or any other parameter
of your model, for that matter), you need to find the amplitude of the threshold stimulus,
then use a stimulus twice as large to elicit the spike whose conduction velocity you will
measure. func threshold() is a convenient way of determining the stimulus threshold amplitude.
And i don't find where you modify and create the soma and its properties in your code.
I think that there are not parameters associated to the soma.
Soma? What soma? Up to this point, there has been no mention of soma in this discussion
thread, and soma isn't mentioned in the discussion thread about threshold() that I cited. Does
your model have a soma?
freddy09
Posts: 17
Joined: Tue Mar 18, 2008 6:06 am
Location: LIRMM

Post by freddy09 »

In your code, you use

Code: Select all

soma ocbox_ = new PointProcessManager(0)
And in the point process window there is a soma.
Does your model have a soma?
No, there is no soma.
I try to simulate on the fibers or the dendrites.
ted
Site Admin
Posts: 5869
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

You are referring to the example provided in threshold_demo.zip, which is mentioned in
How to find spike threshold automatically
http://www.neuron.yale.edu/phpBB2/viewtopic.php?p=1107

That example uses a toy model that consists of a single compartment with the Hodgkin-Huxley mechanism, which is stimulated by a current clamp. The details of the
model cell are unimportant, other than the fact that it is excitable. func threshold() is usable
with any model, regardless of its internal details, as long as it has a default section that can
spike, and a variable that controls the amplitude of a stimulus.

The toy model cell and the current clamp were both created with NEURON's GUI tools. If
you have questions about the GUI tools, it would be best to open a new discussion thread.
Post Reply