From 564ecedb3ba5b50adb90b73ee6b6f3f910882435 Mon Sep 17 00:00:00 2001
From: pgleeson
Date: Wed, 20 Mar 2024 16:29:54 +0000
Subject: [PATCH 1/7] Regenerated
---
NetPyNE/ACnet/LEMS_MediumNet_netpyne.py | 11 +++++++++--
NetPyNE/GapJunctions/LEMS_GJ_netpyne.py | 11 +++++++++--
NetPyNE/LEMS_2007One_netpyne.py | 11 +++++++++--
NetPyNE/TwoCells/LEMS_TwoCell_netpyne.py | 11 +++++++++--
NetPyNE/UI/LEMS_HHSimple_netpyne.py | 11 +++++++++--
NeuroML2/LEMS_HHSmall.xml | 2 +-
NeuroML2/LEMS_HybridSmall.xml | 2 +-
NeuroML2/LEMS_HybridTut.xml | 2 +-
NeuroML2/LEMS_M1.xml | 2 +-
9 files changed, 49 insertions(+), 14 deletions(-)
diff --git a/NetPyNE/ACnet/LEMS_MediumNet_netpyne.py b/NetPyNE/ACnet/LEMS_MediumNet_netpyne.py
index 8dd9511..b3579da 100644
--- a/NetPyNE/ACnet/LEMS_MediumNet_netpyne.py
+++ b/NetPyNE/ACnet/LEMS_MediumNet_netpyne.py
@@ -58,7 +58,7 @@
class NetPyNESimulation():
- def __init__(self, tstop=500.0, dt=0.01, seed=123456789, save_json=False):
+ def __init__(self, tstop=500.0, dt=0.01, seed=123456789, save_json=False, abs_tol=None):
self.setup_start = time.time()
@@ -89,6 +89,13 @@ def __init__(self, tstop=500.0, dt=0.01, seed=123456789, save_json=False):
self.simConfig.duration = self.simConfig.tstop = tstop # Duration of the simulation, in ms
self.simConfig.dt = dt # Internal integration timestep to use
+ # cvode
+ if abs_tol is not None:
+ self.simConfig.cvode_active = True
+ self.simConfig.cvode_atol = abs_tol
+ else:
+ self.simConfig.cvode_active = False
+
# Seeds for randomizers (connectivity, input stimulation and cell locations)
# Note: locations and connections should be fully specified by the structure of the NeuroML,
# so seeds for conn & loc shouldn't affect networks structure/behaviour
@@ -1402,7 +1409,7 @@ def save_results(self):
save_json = '-json' in sys.argv
no_run = '-norun' in sys.argv
- ns = NetPyNESimulation(tstop=500.0, dt=0.01, seed=123456789, save_json=save_json)
+ ns = NetPyNESimulation(tstop=500.0, dt=0.01, seed=123456789, save_json=save_json, abs_tol=None)
if not no_run:
ns.run()
diff --git a/NetPyNE/GapJunctions/LEMS_GJ_netpyne.py b/NetPyNE/GapJunctions/LEMS_GJ_netpyne.py
index d3b2311..bfe24ea 100644
--- a/NetPyNE/GapJunctions/LEMS_GJ_netpyne.py
+++ b/NetPyNE/GapJunctions/LEMS_GJ_netpyne.py
@@ -32,7 +32,7 @@
class NetPyNESimulation():
- def __init__(self, tstop=700.0, dt=0.01, seed=123456789, save_json=False):
+ def __init__(self, tstop=700.0, dt=0.01, seed=123456789, save_json=False, abs_tol=None):
self.setup_start = time.time()
@@ -63,6 +63,13 @@ def __init__(self, tstop=700.0, dt=0.01, seed=123456789, save_json=False):
self.simConfig.duration = self.simConfig.tstop = tstop # Duration of the simulation, in ms
self.simConfig.dt = dt # Internal integration timestep to use
+ # cvode
+ if abs_tol is not None:
+ self.simConfig.cvode_active = True
+ self.simConfig.cvode_atol = abs_tol
+ else:
+ self.simConfig.cvode_active = False
+
# Seeds for randomizers (connectivity, input stimulation and cell locations)
# Note: locations and connections should be fully specified by the structure of the NeuroML,
# so seeds for conn & loc shouldn't affect networks structure/behaviour
@@ -200,7 +207,7 @@ def save_results(self):
save_json = '-json' in sys.argv
no_run = '-norun' in sys.argv
- ns = NetPyNESimulation(tstop=700.0, dt=0.01, seed=123456789, save_json=save_json)
+ ns = NetPyNESimulation(tstop=700.0, dt=0.01, seed=123456789, save_json=save_json, abs_tol=None)
if not no_run:
ns.run()
diff --git a/NetPyNE/LEMS_2007One_netpyne.py b/NetPyNE/LEMS_2007One_netpyne.py
index 3b511ca..3614edc 100644
--- a/NetPyNE/LEMS_2007One_netpyne.py
+++ b/NetPyNE/LEMS_2007One_netpyne.py
@@ -30,7 +30,7 @@
class NetPyNESimulation():
- def __init__(self, tstop=520.0, dt=0.001, seed=123456789, save_json=False):
+ def __init__(self, tstop=520.0, dt=0.001, seed=123456789, save_json=False, abs_tol=None):
self.setup_start = time.time()
@@ -51,6 +51,13 @@ def __init__(self, tstop=520.0, dt=0.001, seed=123456789, save_json=False):
self.simConfig.duration = self.simConfig.tstop = tstop # Duration of the simulation, in ms
self.simConfig.dt = dt # Internal integration timestep to use
+ # cvode
+ if abs_tol is not None:
+ self.simConfig.cvode_active = True
+ self.simConfig.cvode_atol = abs_tol
+ else:
+ self.simConfig.cvode_active = False
+
# Seeds for randomizers (connectivity, input stimulation and cell locations)
# Note: locations and connections should be fully specified by the structure of the NeuroML,
# so seeds for conn & loc shouldn't affect networks structure/behaviour
@@ -175,7 +182,7 @@ def save_results(self):
save_json = '-json' in sys.argv
no_run = '-norun' in sys.argv
- ns = NetPyNESimulation(tstop=520.0, dt=0.001, seed=123456789, save_json=save_json)
+ ns = NetPyNESimulation(tstop=520.0, dt=0.001, seed=123456789, save_json=save_json, abs_tol=None)
if not no_run:
ns.run()
diff --git a/NetPyNE/TwoCells/LEMS_TwoCell_netpyne.py b/NetPyNE/TwoCells/LEMS_TwoCell_netpyne.py
index 5702dab..f0fccc1 100644
--- a/NetPyNE/TwoCells/LEMS_TwoCell_netpyne.py
+++ b/NetPyNE/TwoCells/LEMS_TwoCell_netpyne.py
@@ -51,7 +51,7 @@
class NetPyNESimulation():
- def __init__(self, tstop=700.0, dt=0.01, seed=123456789, save_json=False):
+ def __init__(self, tstop=700.0, dt=0.01, seed=123456789, save_json=False, abs_tol=None):
self.setup_start = time.time()
@@ -82,6 +82,13 @@ def __init__(self, tstop=700.0, dt=0.01, seed=123456789, save_json=False):
self.simConfig.duration = self.simConfig.tstop = tstop # Duration of the simulation, in ms
self.simConfig.dt = dt # Internal integration timestep to use
+ # cvode
+ if abs_tol is not None:
+ self.simConfig.cvode_active = True
+ self.simConfig.cvode_atol = abs_tol
+ else:
+ self.simConfig.cvode_active = False
+
# Seeds for randomizers (connectivity, input stimulation and cell locations)
# Note: locations and connections should be fully specified by the structure of the NeuroML,
# so seeds for conn & loc shouldn't affect networks structure/behaviour
@@ -435,7 +442,7 @@ def save_results(self):
save_json = '-json' in sys.argv
no_run = '-norun' in sys.argv
- ns = NetPyNESimulation(tstop=700.0, dt=0.01, seed=123456789, save_json=save_json)
+ ns = NetPyNESimulation(tstop=700.0, dt=0.01, seed=123456789, save_json=save_json, abs_tol=None)
if not no_run:
ns.run()
diff --git a/NetPyNE/UI/LEMS_HHSimple_netpyne.py b/NetPyNE/UI/LEMS_HHSimple_netpyne.py
index 24b7e92..8a3f267 100644
--- a/NetPyNE/UI/LEMS_HHSimple_netpyne.py
+++ b/NetPyNE/UI/LEMS_HHSimple_netpyne.py
@@ -30,7 +30,7 @@
class NetPyNESimulation():
- def __init__(self, tstop=450.0, dt=0.05, seed=123456789, save_json=False):
+ def __init__(self, tstop=450.0, dt=0.05, seed=123456789, save_json=False, abs_tol=None):
self.setup_start = time.time()
@@ -51,6 +51,13 @@ def __init__(self, tstop=450.0, dt=0.05, seed=123456789, save_json=False):
self.simConfig.duration = self.simConfig.tstop = tstop # Duration of the simulation, in ms
self.simConfig.dt = dt # Internal integration timestep to use
+ # cvode
+ if abs_tol is not None:
+ self.simConfig.cvode_active = True
+ self.simConfig.cvode_atol = abs_tol
+ else:
+ self.simConfig.cvode_active = False
+
# Seeds for randomizers (connectivity, input stimulation and cell locations)
# Note: locations and connections should be fully specified by the structure of the NeuroML,
# so seeds for conn & loc shouldn't affect networks structure/behaviour
@@ -181,7 +188,7 @@ def save_results(self):
save_json = '-json' in sys.argv
no_run = '-norun' in sys.argv
- ns = NetPyNESimulation(tstop=450.0, dt=0.05, seed=123456789, save_json=save_json)
+ ns = NetPyNESimulation(tstop=450.0, dt=0.05, seed=123456789, save_json=save_json, abs_tol=None)
if not no_run:
ns.run()
diff --git a/NeuroML2/LEMS_HHSmall.xml b/NeuroML2/LEMS_HHSmall.xml
index d731ab7..f8cfd62 100644
--- a/NeuroML2/LEMS_HHSmall.xml
+++ b/NeuroML2/LEMS_HHSmall.xml
@@ -2,7 +2,7 @@
diff --git a/NeuroML2/LEMS_HybridSmall.xml b/NeuroML2/LEMS_HybridSmall.xml
index 1e9fe6a..473285d 100644
--- a/NeuroML2/LEMS_HybridSmall.xml
+++ b/NeuroML2/LEMS_HybridSmall.xml
@@ -2,7 +2,7 @@
diff --git a/NeuroML2/LEMS_HybridTut.xml b/NeuroML2/LEMS_HybridTut.xml
index e54ae87..424cac8 100644
--- a/NeuroML2/LEMS_HybridTut.xml
+++ b/NeuroML2/LEMS_HybridTut.xml
@@ -2,7 +2,7 @@
diff --git a/NeuroML2/LEMS_M1.xml b/NeuroML2/LEMS_M1.xml
index 7f4b39e..032b7c0 100644
--- a/NeuroML2/LEMS_M1.xml
+++ b/NeuroML2/LEMS_M1.xml
@@ -2,7 +2,7 @@
From f876044408e2f29a6ef1b9cf5e30b6fee67bedfd Mon Sep 17 00:00:00 2001
From: pgleeson
Date: Thu, 21 Mar 2024 09:32:32 +0000
Subject: [PATCH 2/7] Initial test on index.npjson
---
NetPyNE/HybridSmall/HybridSmall.py | 2 ++
NetPyNE/HybridSmall/index.npjson | 6 ++++++
NetPyNE/HybridSmall/init.py | 10 ++++++++++
NetPyNE/UI/clean.sh | 2 +-
4 files changed, 19 insertions(+), 1 deletion(-)
create mode 100644 NetPyNE/HybridSmall/index.npjson
create mode 100644 NetPyNE/HybridSmall/init.py
diff --git a/NetPyNE/HybridSmall/HybridSmall.py b/NetPyNE/HybridSmall/HybridSmall.py
index ea93f23..37d1115 100644
--- a/NetPyNE/HybridSmall/HybridSmall.py
+++ b/NetPyNE/HybridSmall/HybridSmall.py
@@ -115,3 +115,5 @@
simConfig.analysis['plotRaster'] = {'orderInverse': False} #True # Whether or not to plot a raster
simConfig.analysis['plotTraces'] = {'include': [1,51]} # plot recorded traces for this list of cells
#simConfig.analysis['plotRatePSD'] = {'include': ['allCells', 'PYR_HH', 'PYR_Izhi'], 'smooth': 10} # plot recorded traces for this list of cells
+
+cfg = simConfig
\ No newline at end of file
diff --git a/NetPyNE/HybridSmall/index.npjson b/NetPyNE/HybridSmall/index.npjson
new file mode 100644
index 0000000..c3cc48a
--- /dev/null
+++ b/NetPyNE/HybridSmall/index.npjson
@@ -0,0 +1,6 @@
+{
+ "mod_folder": "../HybridSmall",
+ "simConfig": "HybridSmall.py",
+ "python_run": "init.py",
+ "netParams": "HybridSmall.py"
+}
\ No newline at end of file
diff --git a/NetPyNE/HybridSmall/init.py b/NetPyNE/HybridSmall/init.py
new file mode 100644
index 0000000..e9f3c35
--- /dev/null
+++ b/NetPyNE/HybridSmall/init.py
@@ -0,0 +1,10 @@
+"""
+init.py
+
+Starting script to run NetPyNE-based model.
+"""
+
+from netpyne import sim
+
+cfg, netParams = sim.loadFromIndexFile('index.npjson')
+sim.createSimulateAnalyze(netParams, cfg)
diff --git a/NetPyNE/UI/clean.sh b/NetPyNE/UI/clean.sh
index a2c5a9d..8403c75 100755
--- a/NetPyNE/UI/clean.sh
+++ b/NetPyNE/UI/clean.sh
@@ -1,2 +1,2 @@
-rm -rf x86_64 __pycache__
+rm -rf x86_64 arm64 __pycache__ *dat
mv *mod *hoc *nrn_py *netpyne.py *nrn.py *dat *spikes *props *txt NET*nml LEMS*json test*json /tmp
From 7839c02ff6c2e37a420147b81a74004c1b3d81db Mon Sep 17 00:00:00 2001
From: pgleeson
Date: Thu, 21 Mar 2024 10:31:52 +0000
Subject: [PATCH 3/7] Update hybridsmall to pref form
---
NetPyNE/HybridSmall/HybridSmall.py | 51 +++++++++++++-----------------
1 file changed, 22 insertions(+), 29 deletions(-)
diff --git a/NetPyNE/HybridSmall/HybridSmall.py b/NetPyNE/HybridSmall/HybridSmall.py
index 37d1115..3d96b99 100644
--- a/NetPyNE/HybridSmall/HybridSmall.py
+++ b/NetPyNE/HybridSmall/HybridSmall.py
@@ -1,13 +1,3 @@
-"""
-params.py
-
-netParams is a dict containing a set of network parameters using a standardized structure
-
-simConfig is a dict containing a set of simulation configurations using a standardized structure
-
-Contributors: salvadordura@gmail.com
-"""
-
from netpyne import specs
netParams = specs.NetParams() # object of class NetParams to store the network parameters
@@ -26,23 +16,28 @@
pop_size = 3
# Population parameters
-netParams.popParams['PYR_HH'] = {'cellModel': 'HH', 'cellType': 'PYR', 'numCells': pop_size} # add dict with params for this pop
-netParams.popParams['PYR_Izhi'] = {'cellModel': 'Izhi', 'cellType': 'PYR', 'numCells': pop_size} # add dict with params for this pop
+netParams.popParams['PYR_HH'] = {'cellType': 'PYR', 'numCells': pop_size} # add dict with params for this pop
+netParams.popParams['PYR_Izhi'] = {'cellType': 'PYR_Izhi', 'numCells': pop_size} # add dict with params for this pop
# Cell parameters list
## PYR cell properties (HH)
-cellRule = {'conds': {'cellType': 'PYR', 'cellModel': 'HH'}, 'secs': {}}
+cellRule = {'secs': {}}
cellRule['secs']['soma'] = {'geom': {}, 'topol': {}, 'mechs': {}} # soma properties
-cellRule['secs']['soma']['geom'] = {'diam': 18.8, 'L': 18.8, 'Ra': 123.0, 'pt3d':[]}
-cellRule['secs']['soma']['geom']['pt3d'].append((0, 0, 0, 18.8))
-cellRule['secs']['soma']['geom']['pt3d'].append((0, 0, 18.8, 18.8))
+cellRule['secs']['soma']['geom'] = {'diam': 6.3, 'L': 5, 'Ra': 123.0, 'pt3d':[]}
+cellRule['secs']['soma']['geom']['pt3d'].append((0, 0, 0, 20))
+cellRule['secs']['soma']['geom']['pt3d'].append((0, 0, 20, 20))
cellRule['secs']['soma']['mechs']['hh'] = {'gnabar': 0.12, 'gkbar': 0.036, 'gl': 0.003, 'el': -70}
+cellRule['secs']['dend'] = {'geom': {}, 'topol': {}, 'mechs': {}} # dend properties
+cellRule['secs']['dend']['geom'] = {'diam': 5.0, 'L': 150.0, 'Ra': 150.0, 'cm': 1, 'pt3d': []}
+cellRule['secs']['dend']['topol'] = {'parentSec': 'soma', 'parentX': 1.0, 'childX': 0}
+cellRule['secs']['dend']['mechs']['pas'] = {'g': 0.0000357, 'e': -70}
+
netParams.cellParams['PYR_HH'] = cellRule # add dict to list of cell properties
## PYR cell properties (Izhi)
-cellRule = {'conds': {'cellType': 'PYR', 'cellModel': 'Izhi'}, 'secs': {}}
+cellRule = {'secs': {}}
cellRule['secs']['soma'] = {'geom': {}, 'pointps':{}} # soma properties
cellRule['secs']['soma']['geom'] = {'diam': 10, 'L': 10, 'cm': 31.831}
cellRule['secs']['soma']['pointps']['Izhi'] = {'mod':'Izhi2007b',
@@ -51,28 +46,26 @@
# Synaptic mechanism parameters
-netParams.synMechParams['syn1'] = {'mod': 'ExpSyn', 'tau': 30, 'e': 0}
-netParams.synMechParams['syn2'] = {'mod': 'ExpSyn', 'tau': 4, 'e': 0}
+netParams.synMechParams['AMPA'] = {'mod': 'ExpSyn', 'tau': 0.1, 'e': 0}
# Stimulation parameters
-netParams.stimSourceParams['bkg1'] = {'type': 'NetStim', 'rate': 20, 'noise': 0}
-netParams.stimSourceParams['bkg2'] = {'type': 'NetStim', 'rate': 20, 'noise': 1}
-netParams.stimTargetParams['bg->PYR_Izhi'] = {'source': 'bkg1', 'conds': {'cellType': 'PYR', 'cellModel': 'Izhi'},
- 'connFunc': 'fullConn','weight': 0.01, 'delay': 0, 'synMech': 'syn2'}
-netParams.stimTargetParams['bg->PYR_HH'] = {'source': 'bkg2', 'conds': {'cellType': 'PYR', 'cellModel': 'HH'},
- 'connFunc': 'fullConn','weight': 0.005, 'synMech': 'syn1', 'sec': 'soma', 'loc': 1.0, 'delay': 0}
+netParams.stimSourceParams['bkg'] = {'type': 'NetStim', 'rate': 10, 'noise': 0.5}
+netParams.stimTargetParams['bg->PYR_Izhi'] = {'source': 'bkg', 'conds': {'cellType': 'PYR_Izhi'},
+ 'weight': 1, 'delay': 'uniform(1,5)', 'synMech': 'AMPA'}
+netParams.stimTargetParams['bg->PYR_HH'] = {'source': 'bkg', 'conds': {'cellType': 'PYR_HH'},
+ 'weight': 1, 'synMech': 'AMPA', 'sec': 'dend', 'loc': 1.0, 'delay': 'uniform(1,5)'}
# Connectivity parameters
netParams.connParams['PYR->PYR'] = {
- 'preConds': {'cellType': 'PYR'}, 'postConds': {'cellType': 'PYR'},
- 'weight': 0.0, # weight of each connection
+ 'preConds': {'cellType': ['PYR_HH', 'PYR_Izhi']},
+ 'postConds': {'cellType': ['PYR_HH', 'PYR_Izhi']},
+ 'weight': 0.2, # weight of each connection
'delay': '0.2+normal(13.0,1.4)', # delay min=0.2, mean=13.0, var = 1.4
'threshold': 10, # threshold
'convergence': 'uniform(0,5)', # convergence (num presyn targeting postsyn) is uniformly distributed between 1 and 10
- 'synMech': 'syn1'}
-
+ 'synMech': 'AMPA'}
From 47d995ca6442263c12fcd8106d16c934f79f8cd9 Mon Sep 17 00:00:00 2001
From: pgleeson
Date: Thu, 21 Mar 2024 10:41:26 +0000
Subject: [PATCH 4/7] Passes validation!
---
NetPyNE/HybridSmall/HybridSmall.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/NetPyNE/HybridSmall/HybridSmall.py b/NetPyNE/HybridSmall/HybridSmall.py
index 3d96b99..1a9fa76 100644
--- a/NetPyNE/HybridSmall/HybridSmall.py
+++ b/NetPyNE/HybridSmall/HybridSmall.py
@@ -16,7 +16,7 @@
pop_size = 3
# Population parameters
-netParams.popParams['PYR_HH'] = {'cellType': 'PYR', 'numCells': pop_size} # add dict with params for this pop
+netParams.popParams['PYR_HH'] = {'cellType': 'PYR_HH', 'numCells': pop_size} # add dict with params for this pop
netParams.popParams['PYR_Izhi'] = {'cellType': 'PYR_Izhi', 'numCells': pop_size} # add dict with params for this pop
@@ -103,6 +103,7 @@
simConfig.saveDpk = False # save to a .dpk pickled file
simConfig.saveDat = True
+simConfig.validateNetParams=True
# Analysis and plotting
simConfig.analysis['plotRaster'] = {'orderInverse': False} #True # Whether or not to plot a raster
From a2f87ef7287dd9e77a37dd06244d6ad99d8d336b Mon Sep 17 00:00:00 2001
From: pgleeson
Date: Thu, 21 Mar 2024 10:50:35 +0000
Subject: [PATCH 5/7] Regenerated hybridsmall nml
---
NetPyNE/HybridSmall/HybridSmall.py | 2 +-
NeuroML2/HybridSmall.net.nml | 102 ++++++++++++++++-------------
NeuroML2/LEMS_HybridSmall.xml | 24 +++----
3 files changed, 70 insertions(+), 58 deletions(-)
diff --git a/NetPyNE/HybridSmall/HybridSmall.py b/NetPyNE/HybridSmall/HybridSmall.py
index 1a9fa76..f86cf3c 100644
--- a/NetPyNE/HybridSmall/HybridSmall.py
+++ b/NetPyNE/HybridSmall/HybridSmall.py
@@ -50,7 +50,7 @@
# Stimulation parameters
-netParams.stimSourceParams['bkg'] = {'type': 'NetStim', 'rate': 10, 'noise': 0.5}
+netParams.stimSourceParams['bkg'] = {'type': 'NetStim', 'rate': 10, 'noise': 1}
netParams.stimTargetParams['bg->PYR_Izhi'] = {'source': 'bkg', 'conds': {'cellType': 'PYR_Izhi'},
'weight': 1, 'delay': 'uniform(1,5)', 'synMech': 'AMPA'}
netParams.stimTargetParams['bg->PYR_HH'] = {'source': 'bkg', 'conds': {'cellType': 'PYR_HH'},
diff --git a/NeuroML2/HybridSmall.net.nml b/NeuroML2/HybridSmall.net.nml
index 562e96e..4be6bb7 100644
--- a/NeuroML2/HybridSmall.net.nml
+++ b/NeuroML2/HybridSmall.net.nml
@@ -21,15 +21,18 @@
-
-
-
+
+
Cell exported from NetPyNE:
-{'conds': {'cellType': 'PYR', 'cellModel': 'HH'}, 'secs': {'soma': {'geom': {'diam': 18.8, 'L': 18.8, 'Ra': 123.0, 'pt3d': [(0, 0, 0, 18.8), (0, 0, 18.8, 18.8)]}, 'topol': {}, 'mechs': {'hh': {'gnabar': 0.12, 'gkbar': 0.036, 'gl': 0.003, 'el': -70}}}}}
-
+{secs: {'soma': {'geom': {'diam': 6.3, 'L': 5, 'Ra': 123.0, 'pt3d': [(0, 0, 0, 20), (0, 0, 20, 20)]}, 'topol': {}, 'mechs': {'hh': {'gnabar': 0.12, 'gkbar': 0.036, 'gl': 0.003, 'el': -70}}}, 'dend': {'geom': {'diam': 5.0, 'L': 150.0, 'Ra': 150.0, 'cm': 1, 'pt3d': []}, 'topol': {'parentSec': 'soma', 'parentX': 1.0, 'childX': 0}, 'mechs': {'pas': {'g': 3.57e-05, 'e': -70}}}}}
+
-
-
+
+
+
+
+
+
@@ -37,26 +40,35 @@
+
+
+
+
+
+
-
+
+
+
+
|
-
-
-
+
+
+
-
+
@@ -68,7 +80,7 @@
-
+
@@ -81,43 +93,43 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
diff --git a/NeuroML2/LEMS_HybridSmall.xml b/NeuroML2/LEMS_HybridSmall.xml
index 473285d..b7244d7 100644
--- a/NeuroML2/LEMS_HybridSmall.xml
+++ b/NeuroML2/LEMS_HybridSmall.xml
@@ -18,27 +18,27 @@
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
From 9b2e50af981e7f3c3293fc7c7969715a78686f89 Mon Sep 17 00:00:00 2001
From: pgleeson
Date: Thu, 2 May 2024 17:46:12 +0100
Subject: [PATCH 6/7] Regenerated
---
NeuroML2/LEMS_HHSmall.xml | 2 +-
NeuroML2/LEMS_HybridSmall.xml | 2 +-
NeuroML2/LEMS_HybridTut.xml | 2 +-
NeuroML2/LEMS_M1.xml | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/NeuroML2/LEMS_HHSmall.xml b/NeuroML2/LEMS_HHSmall.xml
index f8cfd62..e34ac24 100644
--- a/NeuroML2/LEMS_HHSmall.xml
+++ b/NeuroML2/LEMS_HHSmall.xml
@@ -2,7 +2,7 @@
diff --git a/NeuroML2/LEMS_HybridSmall.xml b/NeuroML2/LEMS_HybridSmall.xml
index b7244d7..b5691ef 100644
--- a/NeuroML2/LEMS_HybridSmall.xml
+++ b/NeuroML2/LEMS_HybridSmall.xml
@@ -2,7 +2,7 @@
diff --git a/NeuroML2/LEMS_HybridTut.xml b/NeuroML2/LEMS_HybridTut.xml
index 424cac8..72eb7e3 100644
--- a/NeuroML2/LEMS_HybridTut.xml
+++ b/NeuroML2/LEMS_HybridTut.xml
@@ -2,7 +2,7 @@
diff --git a/NeuroML2/LEMS_M1.xml b/NeuroML2/LEMS_M1.xml
index 032b7c0..1e7f0f7 100644
--- a/NeuroML2/LEMS_M1.xml
+++ b/NeuroML2/LEMS_M1.xml
@@ -2,7 +2,7 @@
From 0c83616a57ca3a327d448461f0e07cc5aac8108f Mon Sep 17 00:00:00 2001
From: pgleeson
Date: Thu, 2 May 2024 17:48:16 +0100
Subject: [PATCH 7/7] Better hybridsmall
---
NetPyNE/HybridSmall/HybridSmall.py | 32 +++++------
NeuroML2/HybridSmall.net.nml | 90 +++++++++++++-----------------
2 files changed, 53 insertions(+), 69 deletions(-)
diff --git a/NetPyNE/HybridSmall/HybridSmall.py b/NetPyNE/HybridSmall/HybridSmall.py
index f86cf3c..25de36c 100644
--- a/NetPyNE/HybridSmall/HybridSmall.py
+++ b/NetPyNE/HybridSmall/HybridSmall.py
@@ -24,16 +24,11 @@
## PYR cell properties (HH)
cellRule = {'secs': {}}
cellRule['secs']['soma'] = {'geom': {}, 'topol': {}, 'mechs': {}} # soma properties
-cellRule['secs']['soma']['geom'] = {'diam': 6.3, 'L': 5, 'Ra': 123.0, 'pt3d':[]}
-cellRule['secs']['soma']['geom']['pt3d'].append((0, 0, 0, 20))
-cellRule['secs']['soma']['geom']['pt3d'].append((0, 0, 20, 20))
+cellRule['secs']['soma']['geom'] = {'diam': 18.8, 'L': 18.8, 'Ra': 123.0, 'pt3d':[]}
+cellRule['secs']['soma']['geom']['pt3d'].append((0, 0, 0, 18.8))
+cellRule['secs']['soma']['geom']['pt3d'].append((0, 0, 18.8, 18.8))
cellRule['secs']['soma']['mechs']['hh'] = {'gnabar': 0.12, 'gkbar': 0.036, 'gl': 0.003, 'el': -70}
-cellRule['secs']['dend'] = {'geom': {}, 'topol': {}, 'mechs': {}} # dend properties
-cellRule['secs']['dend']['geom'] = {'diam': 5.0, 'L': 150.0, 'Ra': 150.0, 'cm': 1, 'pt3d': []}
-cellRule['secs']['dend']['topol'] = {'parentSec': 'soma', 'parentX': 1.0, 'childX': 0}
-cellRule['secs']['dend']['mechs']['pas'] = {'g': 0.0000357, 'e': -70}
-
netParams.cellParams['PYR_HH'] = cellRule # add dict to list of cell properties
## PYR cell properties (Izhi)
@@ -46,26 +41,27 @@
# Synaptic mechanism parameters
-netParams.synMechParams['AMPA'] = {'mod': 'ExpSyn', 'tau': 0.1, 'e': 0}
+netParams.synMechParams['syn1'] = {'mod': 'ExpSyn', 'tau': 30, 'e': 0}
+netParams.synMechParams['syn2'] = {'mod': 'ExpSyn', 'tau': 4, 'e': 0}
# Stimulation parameters
-netParams.stimSourceParams['bkg'] = {'type': 'NetStim', 'rate': 10, 'noise': 1}
-netParams.stimTargetParams['bg->PYR_Izhi'] = {'source': 'bkg', 'conds': {'cellType': 'PYR_Izhi'},
- 'weight': 1, 'delay': 'uniform(1,5)', 'synMech': 'AMPA'}
-netParams.stimTargetParams['bg->PYR_HH'] = {'source': 'bkg', 'conds': {'cellType': 'PYR_HH'},
- 'weight': 1, 'synMech': 'AMPA', 'sec': 'dend', 'loc': 1.0, 'delay': 'uniform(1,5)'}
+netParams.stimSourceParams['bkg1'] = {'type': 'NetStim', 'rate': 20, 'noise': 0}
+netParams.stimSourceParams['bkg2'] = {'type': 'NetStim', 'rate': 20, 'noise': 1}
+netParams.stimTargetParams['bg->PYR_Izhi'] = {'source': 'bkg1', 'conds': {'cellType': 'PYR_Izhi'},
+ 'weight': 0.01, 'delay': 0, 'synMech': 'syn2'}
+netParams.stimTargetParams['bg->PYR_HH'] = {'source': 'bkg2', 'conds': {'cellType': 'PYR_HH'},
+ 'weight': 0.005, 'synMech': 'syn1', 'sec': 'soma', 'loc': 1.0, 'delay': 0}
# Connectivity parameters
netParams.connParams['PYR->PYR'] = {
- 'preConds': {'cellType': ['PYR_HH', 'PYR_Izhi']},
- 'postConds': {'cellType': ['PYR_HH', 'PYR_Izhi']},
- 'weight': 0.2, # weight of each connection
+ 'preConds': {'cellType': ['PYR_HH', 'PYR_Izhi']}, 'postConds': {'cellType': ['PYR_HH', 'PYR_Izhi']},
+ 'weight': 0.0, # weight of each connection
'delay': '0.2+normal(13.0,1.4)', # delay min=0.2, mean=13.0, var = 1.4
'threshold': 10, # threshold
'convergence': 'uniform(0,5)', # convergence (num presyn targeting postsyn) is uniformly distributed between 1 and 10
- 'synMech': 'AMPA'}
+ 'synMech': 'syn1'}
diff --git a/NeuroML2/HybridSmall.net.nml b/NeuroML2/HybridSmall.net.nml
index 4be6bb7..189e2d0 100644
--- a/NeuroML2/HybridSmall.net.nml
+++ b/NeuroML2/HybridSmall.net.nml
@@ -21,18 +21,15 @@
-
+
+
Cell exported from NetPyNE:
-{secs: {'soma': {'geom': {'diam': 6.3, 'L': 5, 'Ra': 123.0, 'pt3d': [(0, 0, 0, 20), (0, 0, 20, 20)]}, 'topol': {}, 'mechs': {'hh': {'gnabar': 0.12, 'gkbar': 0.036, 'gl': 0.003, 'el': -70}}}, 'dend': {'geom': {'diam': 5.0, 'L': 150.0, 'Ra': 150.0, 'cm': 1, 'pt3d': []}, 'topol': {'parentSec': 'soma', 'parentX': 1.0, 'childX': 0}, 'mechs': {'pas': {'g': 3.57e-05, 'e': -70}}}}}
+{secs: {'soma': {'geom': {'diam': 18.8, 'L': 18.8, 'Ra': 123.0, 'pt3d': [(0, 0, 0, 18.8), (0, 0, 18.8, 18.8)]}, 'topol': {}, 'mechs': {'hh': {'gnabar': 0.12, 'gkbar': 0.036, 'gl': 0.003, 'el': -70}}}}}
-
-
-
-
-
-
+
+
@@ -40,33 +37,24 @@
-
-
-
-
-
-
-
-
-
|
-
-
+
+
@@ -93,43 +81,43 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
|