Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

regarding netpyni gui upload mod files

56 views
Skip to first unread message

Arpit Shrimankar

unread,
Nov 14, 2020, 1:51:26 AM11/14/20
to netpyn...@googlegroups.com
Respected sir,


as i am going through tutorial4 of netpyne


i want to use gui for this.to do that i had copy the tut4.py code and paste in the gui python console .

here to run this code i wanted to upload izhi2007b.mod and compile it .so how can i do and upload through gui and run the tut4 ?

in gui ihave uploaded the file through 
image.png

but i was unable to locate the file...


so my question is how can i do that ?

awaiting for reply...

thanks ,
arpit

Salvador Dura

unread,
Nov 16, 2020, 10:20:21 AM11/16/20
to NetPyNE Q&A forum
Hi Arpit, you can upload a .zip with multiple files and folders. It will be available in the /uploads folder. You can then use the "Import" -> "From Python" to select netParams, simConfig and compile mod files. 

arpitsh...@gmail.com

unread,
Nov 16, 2020, 4:05:53 PM11/16/20
to NetPyNE Q&A forum
i had try as u mentioned and now i can run tut4 .
thank you ...
arpit

Reza

unread,
May 20, 2024, 8:39:18 AM5/20/24
to NetPyNE Q&A forum

Hello guys!

I am trying to have the outputs in tutorial 4 as we have (tut4.py) by adding Izhikevich mechanism besides HH as below;
[PYR_Izhi = {'secs': {}}PYR_Izhi['secs']['soma'] = {'geom': {}, 'pointps': {}} # soma params dict PYR_Izhi['secs']['soma']['geom'] = {'diam': 10.0, 'L': 10.0, 'cm': 31.831} # soma geometry PYR_Izhi['secs']['soma']['pointps']['Izhi'] = { # soma Izhikevich properties 'mod':'Izhi2007b', 'C':1, 'k':0.7, 'vr':-60, 'vt':-40, 'vpeak':35, 'a':0.03, 'b':-2, 'c':-50, 'd':100, 'celltype':1} netParams.cellParams['PYR_Izhi'] = PYR_Izhi # add dict to list of cell parameters]


but, even with making sure the directory for the "izhi2007b.mod" is correct, it seems I cannot use the this mechanism and I get the following error:

[
netParams.cellParams.keys(): odict_keys(['PYR_HH', 'PYR_Izhi']) Start time: 2024-05-20 12:01:33.570876 Creating network of 3 cell populations on 1 hosts...
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-65-408b010db006> in <cell line: 115>() 113 114 # Create network and run simulation --> 115 sim.createSimulateAnalyze(netParams = netParams, simConfig = simConfig) 116 sim.analysis.plotRaster()

8 frames
/usr/local/lib/python3.10/dist-packages/netpyne/cell/compartCell.py in _addPointProcesses(self, sectName, sectParams, cellType, cellVars) 501 sec['pointps'][pointpName] = Dict() 502 loc = pointpParams['loc'] if 'loc' in pointpParams else 0.5 # set location --> 503 Pointp = getattr(h, pointpParams['mod']) 504 pointpObj = Pointp(loc, sec=sec['hObj']) # create h Pointp object (eg. h.Izhi2007b) 505  
AttributeError: 'hoc.HocObject' object has no attribute 'Izhi2007b']


Thank you. 

Arpit Shrimankar

unread,
May 21, 2024, 6:46:22 AM5/21/24
to Reza, NetPyNE Q&A forum
hi,

I hope after placing the mod file in the folder ,did you compiled it ?

image.png

Sincerely,
Arpit 

--
You received this message because you are subscribed to a topic in the Google Groups "NetPyNE Q&A forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/netpyne-forum/_iYyKSsvsiw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to netpyne-foru...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netpyne-forum/dd3e06b9-cef9-47cf-9430-041edac26ef2n%40googlegroups.com.

Reza

unread,
May 21, 2024, 7:52:43 AM5/21/24
to NetPyNE Q&A forum
Yes, I have. 

Reza

unread,
Jun 12, 2024, 5:58:37 AM6/12/24
to NetPyNE Q&A forum
Hello guys!
While I am trying to have Izhikevich mechanism, I get the following error:


[
netParams.cellParams.keys(): odict_keys(['PYR', 'I', 'PYR_Izhi']) Start time: 2024-06-12 09:48:14.172004
Creating network of 2 cell populations on 1 hosts...: 0%| |
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-24-5f9905b63eec> in <cell line: 225>() 223 netParams = netParams) 224 sim.net.createPops() # instantiate network populations --> 225 sim.net.createCells() # instantiate network cells based on defined populations 226 sim.net.connectCells() # create connections between cells based on params 227 sim.net.addStims() # add stimulation

6 frames
/content/netpyne/netpyne/cell/compartCell.py in _addPointProcesses(self, sectName, sectParams, cellType, cellVars) 485 sec['pointps'][pointpName] = Dict() 486 loc = pointpParams['loc'] if 'loc' in pointpParams else 0.5 # set location --> 487 Pointp = getattr(h, pointpParams['mod']) 488 pointpObj = Pointp(loc, sec=sec['hObj']) # create h Pointp object (eg. h.Izhi2007b) 489  
AttributeError: 'hoc.HocObject' object has no attribute 'izhi2007b']


The following shows how I compile this "izhi2007b.mod" file:

------------------------------------------------------------------------------------
%cd /content/

!nrnivmodl

/content INFO : Using neuron-nightly Package (Developer Version) /content cfiles = Mod files: "izhi2007b.mod" Creating 'x86_64' directory for .o files. MODOBJS= ./izhi2007b.o ->
Compiling mod_func.cpp -> NMODL ../izhi2007b.mod Translating izhi2007b.mod into /content/x86_64/izhi2007b.cpp Notice: VERBATIM blocks are not thread safe -> Compiling /content/x86_64/izhi2007b.cpp => LINKING shared library "/content/x86_64/./libnrnmech.so" => LINKING executable "/content/x86_64/./special" LDFLAGS are: Successfully created x86_64/special
------------------------------------------------------------------------------------


This is how I added Izhi2007b:

PYR_Izhi = {'secs': {}}
PYR_Izhi['secs']['soma'] = {'geom': {}, 'pointps': {}} # soma params dict
PYR_Izhi['secs']['soma']['geom'] = {'diam': 10.0, 'L': 10.0, 'cm': 31.831} # soma geometry
PYR_Izhi['secs']['soma']['pointps']['Izhi'] = { # soma Izhikevich properties
'mod':'izhi2007b',
'C':1,
'k':0.7,
'vr':-60,
'vt':-40,
'vpeak':35,
'a':0.03,
'b':-2,
'c':-50,
'd':100,
'celltype':1}
netParams.cellParams['PYR_Izhi'] = PYR_Izhi

print('netParams.cellParams.keys(): ', netParams.cellParams.keys())




I would be grateful if you could help me with this.
Thank you. 
Reza
Reply all
Reply to author
Forward
0 new messages