Difficulties running 84589

Discussions of particular models.

Moderator: tom_morse

Post Reply
Colin
Posts: 3
Joined: Mon May 31, 2010 11:40 pm

Difficulties running 84589

Post by Colin » Fri Jun 04, 2010 2:42 am

Extracellular Action Potential Simulations (EAPS)
NEURON ModelDB Accession: 84589
http://senselab.med.yale.edu/ModelDB/sh ... odel=84589
===============================================================
Have everything needed.
Loaded in the software, done all the misc trimmings needed for windows (XP)
NOTE: do not use the recommended start-up command:
c:\nrn59\bin\neuron.exe -dll mod\nrnmech.dll hoc/src/refs.hoc cells/d151.hoc hoc/src/file_util.hoc hoc/src/main.hoc
I modified it to....
c:\nrn71\bin\neuron.exe -dll mod/nrnmech.dll hoc/src/refs.hoc cells/d151.hoc hoc/src/file_util.hoc hoc/src/main.hoc
================================================================
When you run it it fails badly, killing neuron and leaves files open/hung and does a stack dump file nrniv.exe.stackdump
Neuron window contents are below.
It seems to be main.hoc which falls over due to some LOCAL declarations and somehow it gets tied in knots over brace matching....

The originators GOLD, HOLT etc are all out of the picture... but I will approach them if I have to.
meanwhile.... If there's anyone out there who's used it I'd be very grateful for a little guidance. Surely I can't be the first person to use it!
regards,
Colin Hales (see below)
==========================================
NEURON -- Release 7.1 (359:7f113b76a94b) 2009-10-26
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2008
See http://www.neuron.yale.edu/credits.html

loading membrane mechanisms from mod/nrnmech.dll
Additional mechanisms from files
cadif.mod cal.mod can.mod car.mod cat.mod hdend.mod hsoma.mod kadist.mod kahp.mod kaprox.mod kc.mod kd.mod kk.mod km.mod naf.mod nax.mod
LOADING GEOMETRY FOR d151

-> Setting file roots...
SETTING WINDOWS FILE PATHS!

-> Updating trial number...
.\cells\d151_trial_num.txt
trial number 3

-> Making output directory...
COMMAND = mkdir output/d151_0003
RESULT = 0
COMMAND = mkdir output/d151_0003/nrn
RESULT = 0

-> Opening param & geometry files...

-> Loading param files...
LOADING CELL SPECIFIC MEMBRANE CONDUCTANCE DENSITIES...
param_dir = hoc/params
params file = hoc/params//d151_params.hoc
LOADING Cell Sepcific Params D151(A)!
LOADING STANDARD MEMBRANE PARAMS FOR CELL TYPE:ca1pyr
LOADING STANDARD PARAMS for CA1 pyramidal cells...

-> Loading code files...
open cell util: hoc/src/cell_util.hoc
open current util: hoc/src/current_util.hoc
nrniv: line_curr already declared local
in current_util.hoc near line 461
proc print_currents() {local i, line_num, arcloc, next_arcloc, line_arc_ratio, line_start_ratio, line_end_ratio,line_curr, seg_start_ratio, seg_end_ratio, line_curr
^
xopen("current_util.hoc" )
execute1("{xopen("current_util.hoc")}" )
load_file("hoc/src/current_util.hoc" )
load_code_files( )
open template for mechanism description: hoc/src/mechdesc.hoc
open membrane init file: hoc/src/membrane_init.hoc
nrniv: gbkd already declared local
in membrane_init.hoc near line 1006
proc jitter_gbars() {local x, percent, old, gbnaf, gbnax, gbkk, gbkd, gbkd, gbkm, gbkap, gbkad
^
xopen("membrane_init.hoc" )
execute1("{xopen("membrane_init.hoc")}" )
load_file("hoc/src/membrane_init.hoc" )
load_code_files( )
nrniv: syntax error
in membrane_init.hoc near line 1116
}
^

tom_morse
Posts: 40
Joined: Wed May 18, 2005 10:23 pm
Location: Yale University School of Medicine
Contact:

please try new version in ModelDB Re: Difficulties running 8

Post by tom_morse » Fri Jun 04, 2010 11:48 am

Colin Hales,
Thanks for bringing this to our attention. We try to test models in modeldb to verify they run. In some cases (commercial applications or special platforms required) the models are not verified.
This one apparently slipped through the cracks as I was able to reproduce the errors you found. I corrected local definition duplications in two files (see below diff) and uploaded the corrected model which ran OK with the first example from the documentation.
-Tom Morse
ModelDB Administrator
PS: This below diff shows that we simply eliminated the duplicated local definitions in the two files
eaps/hoc/src/membrane_init.hoc
eaps/hoc/src/current_util.hoc

[morse 20100603]$ diff eaps_run/hoc/src/ eaps/hoc/src/
diff eaps_run/hoc/src/current_util.hoc eaps/hoc/src/current_util.hoc
461c461
< proc print_currents() {local i, line_num, arcloc, next_arcloc, line_arc_ratio, line_start_ratio, line_end_ratio,line_curr, seg_start_ratio, seg_end_ratio
---
> proc print_currents() {local i, line_num, arcloc, next_arcloc, line_arc_ratio, line_start_ratio, line_end_ratio,line_curr, seg_start_ratio, seg_end_ratio, line_curr
diff eaps_run/hoc/src/membrane_init.hoc eaps/hoc/src/membrane_init.hoc
1006c1006
< proc jitter_gbars() {local x, percent, old, gbnaf, gbnax, gbkk, gbkd, gbkm, gbkap, gbkad
---
> proc jitter_gbars() {local x, percent, old, gbnaf, gbnax, gbkk, gbkd, gbkd, gbkm, gbkap, gbkad
[morse 20100603]$

Colin
Posts: 3
Joined: Mon May 31, 2010 11:40 pm

Re: Difficulties running 84589

Post by Colin » Mon Jun 07, 2010 1:53 am

Many thanks!
I'll set it up again and see how I go.
Greatly appreciated.
regards,
Colin

Colin
Posts: 3
Joined: Mon May 31, 2010 11:40 pm

Re: Query re 84589 (EAPS)

Post by Colin » Thu Jun 17, 2010 3:44 am

Hello again,
All is well. But I have one final question which I am finding troublesome to answer.
Probably a newby question... but better to be sure!
Below is a procedure in the EAPS file current_util( ).
In this program there are roughly 17 different mechanisms.
The program totals up currents by ion type (and pas and cap ... 5 currents in all)
In the case of, say, K, we have, for the current compartment

if (ismembrane("k_ion")) {
ik_comp = ik($1) * 1e-2 * area($1)
itot = itot + ik_comp
} else {
ik_comp = 0
}

Question: if there are, say, 6 different mechanisms for this compartment, then exactly how/where does the function ik($1) total up all the K currents for all the different mechanisms?
I cannot fund this function anywhere. I can find the MODL statements for the "ik" for all the relevant channels. But not the function ik(.). I am assuming it is built in, but I can't find it or any docs telling me about it


Thanks in advance....

Colin
/***************************************************************
read_compartment_currents(x)

Read currents from current section into the globals, and add each one
to itot_comp. This is done fore sodium, potassium, calcium, capactive
and passive currents.

IMPORTANT: Chlorine and non ion-specific currents other than the
passive mechanism are not included here! If your model includes
chlorine currents, synapses, shunts or any other mechanism not based
explicitly on sodium, potassium or calcium you must modify this method
to correctly calculate itot_comp!

Note that i * 1e-2 * area(x) converts from mA/cm^2 --> nA

Also note that this is never called for x=0/1 (where there is no
membrane current defined.)

$1 = X for the current compartment
*/

proc read_compartment_currents() {


//--------------------------------------
// Add up different types of ion currents

v_x = v($1)

// all compartments have capacitve current
icp_comp = i_cap($1) * 1e-2 * area($1)
itot = icp_comp

if (ismembrane("k_ion")) {
ik_comp = ik($1) * 1e-2 * area($1)
itot = itot + ik_comp
} else {
ik_comp = 0
}

if (ismembrane("na_ion")) {
ina_comp = ina($1) * 1e-2 * area($1)
itot = itot + ina_comp
} else {
ina_comp = 0
}

if (ismembrane("ca_ion")) {
ica_comp = ica($1) * 1e-2 * area($1)
itot = itot + ica_comp
} else {
ica_comp = 0
}

if (ismembrane("pas")) {
ips_comp = i_pas($1) * 1e-2 * area($1)
itot = itot + ips_comp
} else {
ips_comp = 0
}

}

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

Re: Difficulties running 84589

Post by ted » Thu Jun 17, 2010 8:31 am

If the NMODL source code for a mechanism contains a USEION foo . . . WRITE ifoo statement, NEURON automatically keeps track of the foo flux that the mechanism generates. This is buried somewhere in NEURON's source code.

Post Reply