Skip to content

Commit b93d088

Browse files
committed
Improve gap example
1 parent 22e3004 commit b93d088

5 files changed

Lines changed: 22 additions & 8 deletions

File tree

.github/workflows/non-omv.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
omv install neuron
4141
omv install netpyne
4242
omv install pyNeuroML
43+
omv install pynn
4344
4445
pip list
4546

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,7 @@ arm64
201201
/NeuroML2/gaps/report.SimExampleGJ.txt
202202
/NeuroML2/gaps/SimExampleGJ.json
203203
/NeuroML2/TwoCells/LEMS_TwoCell_netpyne_data.json-e
204+
/NeuroML2/gaps/*_netpyne.py
205+
/NeuroML2/gaps/*_nrn.py
206+
/NeuroML2/gaps/*.mod
207+
/NeuroML2/gaps/*.hoc

NeuroML2/gaps/ExampleGaps.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from neuromllite import Network, Cell, InputSource, Population, Synapse
2-
from neuromllite import Projection, RandomConnectivity, Input, Simulation
2+
from neuromllite import Projection, RandomConnectivity, Input, Simulation, RandomLayout, RectangularRegion
33
import sys
44

55
################################################################################
@@ -23,12 +23,15 @@
2323

2424
net.input_sources.append(input_source)
2525

26+
r1 = RectangularRegion(id="region1", x=0, y=0, z=0, width=1000, height=100, depth=1000)
27+
net.regions.append(r1)
2628

2729
pop_pre = Population(
2830
id="PopPre",
2931
size="1",
3032
component=cell.id,
3133
properties={"color": ".7 0 0"},
34+
random_layout = RandomLayout(region=r1.id),
3235
)
3336
pop_post = Population(
3437
id="PopPost",

NeuroML2/gaps/Example_GapJunctions.net.nml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,21 @@
1212
<notes>Example: testing gap junctions...</notes>
1313
<property tag="recommended_dt_ms" value="0.025"/>
1414
<property tag="recommended_duration_ms" value="300.0"/>
15-
<population id="PopPre" component="pascell" size="1"/>
15+
<population id="PopPre" component="pascell" size="1" type="populationList">
16+
<property tag="color" value=".7 0 0"/>
17+
<property tag="region" value="region1"/>
18+
<instance id="0">
19+
<location x="52.363598850944328" y="8.718667752263231" z="407.241763670398313"/>
20+
</instance>
21+
</population>
1622
<population id="PopPost" component="pascell" size="3"/>
1723
<electricalProjection id="projGJ" presynapticPopulation="PopPre" postsynapticPopulation="PopPost">
18-
<electricalConnection id="0" preCell="0" postCell="0" synapse="gj"/>
19-
<electricalConnection id="1" preCell="0" postCell="1" synapse="gj"/>
20-
<electricalConnection id="2" preCell="0" postCell="2" synapse="gj"/>
24+
<electricalConnectionInstance id="0" preCell="../PopPre/0/pascell" postCell="../PopPost[0]" synapse="gj"/>
25+
<electricalConnectionInstance id="1" preCell="../PopPre/0/pascell" postCell="../PopPost[1]" synapse="gj"/>
26+
<electricalConnectionInstance id="2" preCell="../PopPre/0/pascell" postCell="../PopPost[2]" synapse="gj"/>
2127
</electricalProjection>
2228
<inputList id="stim" population="PopPre" component="iclamp0">
23-
<input id="0" target="../PopPre[0]" destination="synapses"/>
29+
<input id="0" target="../PopPre/0/pascell" destination="synapses"/>
2430
</inputList>
2531
</network>
2632
</neuroml>

NeuroML2/gaps/LEMS_SimExampleGJ.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</Display>
2727

2828
<Display id="PopPre_v" title="Plots of PopPre_v" timeScale="1ms" xmin="-30.0" xmax="330.0" ymin="-80" ymax="40">
29-
<Line id="PopPre_0__v" quantity="PopPre[0]/v" scale="1mV" color="#bca074" timeScale="1ms"/>
29+
<Line id="PopPre_0_pascell_v" quantity="PopPre/0/pascell/v" scale="1mV" color="#bca074" timeScale="1ms"/>
3030
</Display>
3131

3232
<OutputFile id="SimExampleGJ_PopPost_v_dat" fileName="SimExampleGJ.PopPost.v.dat">
@@ -36,7 +36,7 @@
3636
</OutputFile>
3737

3838
<OutputFile id="SimExampleGJ_PopPre_v_dat" fileName="SimExampleGJ.PopPre.v.dat">
39-
<OutputColumn id="PopPre_0__v" quantity="PopPre[0]/v"/>
39+
<OutputColumn id="PopPre_0_pascell_v" quantity="PopPre/0/pascell/v"/>
4040
</OutputFile>
4141

4242
</Simulation>

0 commit comments

Comments
 (0)