Loading NMODL mechanisms....
Posted: Mon Mar 24, 2008 9:07 pm
Hi,
I have been initializing hoc objects, loading in NMODL mechanisms and inserting the mechanisms semi-successfully using the lines:
I can also use this syntax:
But I can't mix and match (which would be fine and understandable), and I can't do this:
This syntax is extremely useful for setting and getting the values of range variables and parameters later, but when I try to soma.insert() I receive the following error:
Unfortunately I don't have a ton of NEURON experience in hoc so I can't tell if this is a problem with the way I'm trying to use the mechanism or the way that new mechanisms are imported into python. Do you have any idea why I can't insert mechanisms that I've loaded using nrn_load_dll()? Thanks for the help!
-Andrew
I have been initializing hoc objects, loading in NMODL mechanisms and inserting the mechanisms semi-successfully using the lines:
Code: Select all
os.system('/usr/local/nrn/i686/bin/nrnivmodl')
h=hoc.HocObject()
h.nrn_load_dll("/home/gartland/rgc/i686/.libs/libnrnmech.so")
h('create soma')
h('access soma')
h('insert spike')
h('ena_spike=40')
Code: Select all
soma=Section()
soma.push()
soma.insert('pas')
soma(0.5).pas.e=-80
Code: Select all
soma.insert('spike')
soma(0.5).spike.ena=40
It seems like maybe the mechanisms added with load_dll aren't visible to the insert command accessed with python dot notation? I also get similar errors when I try to do:argument not a density mechanism name
Code: Select all
h('insert spike')
soma(0.5).spike.ena=40
-Andrew