How to access L (length of section) in NMODL

NMODL and the Channel Builder.
Post Reply
ahwillia
Posts: 17
Joined: Wed Apr 23, 2014 2:17 pm

How to access L (length of section) in NMODL

Post by ahwillia »

I have a couple of mechanisms that need to know the surface area of the section they are inserted into. I tried to achieve this by the following code

Code: Select all

ASSIGNED {
    diam (um)
    L (um)
    surface_area (um)
}
BREAKPOINT {
    surface_area = 3.141592 * diam * L
}
I found that diam was correctly specified... but... L was set to 0.0 (not the length of the section). Is there another way for me to access the value of L or the surface area of the section?

Many thanks.
ted
Site Admin
Posts: 6289
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How to access L (length of section) in NMODL

Post by ted »

Forget about L. NMODL already knows segment area. In the ASSIGNED block declare
area (micron2)
then use area in any equation block. Remember to test your mod files with modlunit and use conversion factors as necessary to reconcile unit inconsistencies.
Post Reply