inserting synaptic mechanisms from mod file
Posted: Wed Apr 01, 2020 1:44 pm
Hello,
I'm using python that import neuron as a package.
I want to insert a synaptic mechanism from a .mod file.
The code was working three years ago, but now is giving me an error
when I tried to import the mechanism.
here is the code that I'm using:
#Compile the mod file
!nrnivmodl
# import packages
import neuron
from neuron import h
import numpy
import matplotlib.pyplot as plt
# Load external files & initialize
neuron.h.load_file("stdrun.hoc");
neuron.h.stdinit();
# Create a simple neuron to host the synapse
soma = neuron.h.Section()
soma.L = 40
soma.diam = 40
soma.insert('pas')
# Configure the passive biophysics
for sec in h.allsec():
sec.Ra = 100
sec.cm = 1
# Insert the synaptic mechanism
synapse = h.SimpleAMPA_NMDA(soma(0.5))
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-6-50fc4935bda3> in <module>
----> 1 synapse = h.SimpleAMPA_NMDA(soma(0.5))
AttributeError: 'hoc.HocObject' object has no attribute 'SimpleAMPA_NMDA'
I'm using python that import neuron as a package.
I want to insert a synaptic mechanism from a .mod file.
The code was working three years ago, but now is giving me an error
when I tried to import the mechanism.
here is the code that I'm using:
#Compile the mod file
!nrnivmodl
# import packages
import neuron
from neuron import h
import numpy
import matplotlib.pyplot as plt
# Load external files & initialize
neuron.h.load_file("stdrun.hoc");
neuron.h.stdinit();
# Create a simple neuron to host the synapse
soma = neuron.h.Section()
soma.L = 40
soma.diam = 40
soma.insert('pas')
# Configure the passive biophysics
for sec in h.allsec():
sec.Ra = 100
sec.cm = 1
# Insert the synaptic mechanism
synapse = h.SimpleAMPA_NMDA(soma(0.5))
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-6-50fc4935bda3> in <module>
----> 1 synapse = h.SimpleAMPA_NMDA(soma(0.5))
AttributeError: 'hoc.HocObject' object has no attribute 'SimpleAMPA_NMDA'