Hi Zhihe,
I successfully compiled your mod file, but I can't seem to run anything (even without setpointer) without getting a segmentation fault in NEURON. NetPyNE is a wrapper around NEURON, so any code you want to use must be functional in NEURON before it can be used in NetPyNE.
Here is the code I tried just to make sure your mod file worked:
import matplotlib.pyplot as plt
from neuron import h
h.load_file('stdrun.hoc')
soma = h.Section(name='soma')
mod = h.twocomps(soma(0.5))
i_vec = h.Vector()
t_vec = h.Vector()
i_vec.record(mod._ref_isyn)
t_vec.record(h._ref_t)
simdur = 25.0
h.tstop = simdur
h.run()
plt.figure()
plt.plot(t_vec, i_vec)
plt.xlabel('Time (ms)')
plt.ylabel('isyn (nA)')
plt.show()
Running it results in a segmentation fault for me.
If you can get the above code running, then I can help you get it into NetPyNE. Let us know if you need any more help.
Best wishes,
Joe