diff --git a/.gitignore b/.gitignore
index 77b69e9..2897ee4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,5 @@ report.*.txt
/NeuroML2/Test_RMD.ode
/NeuroML2/report.txt
/RMD.model.xml
+/NeuroML2/LEMS_Test_RMD_cca.xml
+/NeuroML2/LEMS_Test_RMD_shak.xml
diff --git a/NeuroML2/AWCon.cell.nml b/NeuroML2/AWCon.cell.nml
index 4676cfe..7da3d7b 100644
--- a/NeuroML2/AWCon.cell.nml
+++ b/NeuroML2/AWCon.cell.nml
@@ -1,7 +1,9 @@
A cell from Nicoletti et al. 2019
+
+
AWCon cell from Nicoletti et al. 2019
@@ -21,7 +23,9 @@
+
+
diff --git a/NeuroML2/AWCon_cca.channel.nml b/NeuroML2/AWCon_cca.channel.nml
new file mode 100644
index 0000000..c03597d
--- /dev/null
+++ b/NeuroML2/AWCon_cca.channel.nml
@@ -0,0 +1,66 @@
+
+ An ion channel from cell AWCon from Nicoletti et al. 2019
+
+ AWCon_cca channel from Nicoletti et al. 2019
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/NeuroML2/AWCon_kir.channel.nml b/NeuroML2/AWCon_kir.channel.nml
index 2c89e34..0adee92 100644
--- a/NeuroML2/AWCon_kir.channel.nml
+++ b/NeuroML2/AWCon_kir.channel.nml
@@ -11,12 +11,6 @@
-
-
-
-
-
-
@@ -25,8 +19,6 @@
-
-
@@ -35,7 +27,7 @@
-
+
|
diff --git a/NeuroML2/AWCon_shak.channel.nml b/NeuroML2/AWCon_shak.channel.nml
new file mode 100644
index 0000000..ada5e2f
--- /dev/null
+++ b/NeuroML2/AWCon_shak.channel.nml
@@ -0,0 +1,57 @@
+
+ An ion channel from cell AWCon from Nicoletti et al. 2019
+
+ AWCon_shak channel from Nicoletti et al. 2019
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/NeuroML2/GenerateNeuroML.py b/NeuroML2/GenerateNeuroML.py
index 8ef3098..3493587 100644
--- a/NeuroML2/GenerateNeuroML.py
+++ b/NeuroML2/GenerateNeuroML.py
@@ -14,7 +14,7 @@
colors = {"AWCon": "0 0 0.8", "RMD": "0 0.8 0", "GenericMuscleCell": "0.8 0 0"}
-def create_channel_file(chan_id_in_cell, cell_id, xpp, species, gates={}, parameters={}):
+def create_channel_file(chan_id_in_cell, cell_id, xpp, species, gates={},extra_params=[]):
chan_id = "%s_%s" % (cell_id, chan_id_in_cell)
chan_doc = NeuroMLDocument(
id=chan_id,
@@ -51,13 +51,22 @@ def create_channel_file(chan_id_in_cell, cell_id, xpp, species, gates={}, parame
tcct.add(tscale)
+ inf_expr = xpp["derived_variables"][gates[g][1]]
+ tau_expr = xpp["derived_variables"][gates[g][2]]
- for p in parameters:
+ potential_parameters = []
+ for p in xpp["parameters"]:
+ if chan_id_in_cell in p:
+ potential_parameters.append(p)
+
+ for p in potential_parameters+extra_params:
const = component_factory(
"Constant", name=p, dimension="none", value=str(xpp["parameters"][p])
)
- ssct.add(const)
- tcct.add(const)
+ if p in inf_expr:
+ ssct.add(const)
+ if p in tau_expr:
+ tcct.add(const)
d = component_factory("Dynamics")
@@ -65,13 +74,12 @@ def create_channel_file(chan_id_in_cell, cell_id, xpp, species, gates={}, parame
dvv = component_factory("DerivedVariable", name="V", dimension="none", value="(v) / VOLT_SCALE")
d.add(dvv)
- expr = xpp["derived_variables"][gates[g][1]]
import sympy
from sympy.parsing.sympy_parser import parse_expr
v,V = sympy.symbols('v V')
- s_expr = parse_expr(expr, evaluate=False)
+ s_expr = parse_expr(inf_expr, evaluate=False)
s_expr = s_expr.subs(v,V)
dv = component_factory("DerivedVariable", name="x", exposure="x", dimension="none", value=s_expr)
@@ -81,11 +89,10 @@ def create_channel_file(chan_id_in_cell, cell_id, xpp, species, gates={}, parame
tcct.add(d)
d.add(dvv)
- expr = xpp["derived_variables"][gates[g][2]]
- s_expr = parse_expr(expr, evaluate=False)
+ s_expr = parse_expr(tau_expr, evaluate=False)
s_expr = s_expr.subs(v,V)
- dv = component_factory("DerivedVariable", name="t", exposure="t", dimension="time", value=s_expr)
+ dv = component_factory("DerivedVariable", name="t", exposure="t", dimension="time", value='(%s)/1000'%s_expr)
d.add(dv)
@@ -177,8 +184,8 @@ def create_cells(channels_to_include):
seg_type="soma",
)
+ # Leak channel
if 'leak' in channels_to_include:
- # Leak channel
cell.add_channel_density(
cell_doc,
cd_id="leak_chans",
@@ -189,9 +196,33 @@ def create_cells(channels_to_include):
ion_chan_def_file=create_channel_file("leak", cell_id, xpps[cell_id], species='non_specific'),
)
+ # SHK1 CHANNELS
+ if 'shak' in channels_to_include:
+ chan_id = 'shak'
+ ion = 'k'
+ g_param = 'gshak'
+ gates={'m':[1,'minf_shak','tm_shak'],'h':[1,'hinf_shak','th_shak']}
+ extra_params = ['shiftV05']
+
+ cell.add_channel_density(
+ cell_doc,
+ cd_id="%s_chans"%chan_id,
+ cond_density="%s S_per_m2" % xpps[cell_id]["parameters"][g_param],
+ erev="%smV" % xpps[cell_id]["parameters"]["e%s"%ion],
+ ion=ion,
+ ion_channel="%s_%s" % (cell_id,chan_id),
+ ion_chan_def_file=create_channel_file(
+ chan_id,
+ cell_id,
+ xpps[cell_id],
+ species=ion,
+ gates=gates,
+ extra_params = extra_params
+ ),
+ )
+ # IRK/Kir channel
if 'kir' in channels_to_include:
- # IRK/Kir channel
cell.add_channel_density(
cell_doc,
cd_id="kir_chans",
@@ -205,17 +236,28 @@ def create_cells(channels_to_include):
xpps[cell_id],
species='k',
gates={'m':[1,'minf_kir','tm_kir']},
- parameters=[
- "va_kir",
- "ka_kir",
- "p1tmkir",
- "p2tmkir",
- "p3tmkir",
- "p4tmkir",
- "p5tmkir",
- "p6tmkir",
- ],
+ ),
+ )
+ # CCA-1 channels
+ if 'cca' in channels_to_include:
+ chan_id = 'cca'
+ ion = 'ca'
+
+ cell.add_channel_density(
+ cell_doc,
+ cd_id="%s_chans"%chan_id,
+ cond_density="%s S_per_m2" % xpps[cell_id]["parameters"]["gcca1"],
+ erev="%smV" % xpps[cell_id]["parameters"]["e%s"%ion],
+ ion=ion,
+ ion_channel="%s_%s" % (cell_id,chan_id),
+ ion_chan_def_file=create_channel_file(
+ chan_id,
+ cell_id,
+ xpps[cell_id],
+ species=ion,
+ gates={'m':[2,'minf_cca1','tm_cca1'],'h':[1,'hinf_cca1','th_cca1']},
+ extra_params = ['f3ca','f4ca']
),
)
@@ -235,7 +277,7 @@ def create_cells(channels_to_include):
)
sim, net = generate_nmllite(
- cell_id, duration=400, config="IClamp", parameters=None
+ cell_id, duration=1400, config="IClamp", parameters=None
)
################################################################################
@@ -251,4 +293,5 @@ def create_cells(channels_to_include):
channels_to_include = ['leak']
channels_to_include = ['leak','kir']
+ channels_to_include = ['leak','kir','shak','cca']
create_cells(channels_to_include)
diff --git a/NeuroML2/IClamp_RMD.net.nml b/NeuroML2/IClamp_RMD.net.nml
index e290899..aa8fefa 100644
--- a/NeuroML2/IClamp_RMD.net.nml
+++ b/NeuroML2/IClamp_RMD.net.nml
@@ -9,7 +9,7 @@
A network model: IClamp_RMD
-
+
diff --git a/NeuroML2/LEMS_Sim_IClamp_RMD.xml b/NeuroML2/LEMS_Sim_IClamp_RMD.xml
index b01f2da..f6242c6 100644
--- a/NeuroML2/LEMS_Sim_IClamp_RMD.xml
+++ b/NeuroML2/LEMS_Sim_IClamp_RMD.xml
@@ -18,8 +18,8 @@
-
-
+
+
diff --git a/NeuroML2/RMD.cell.nml b/NeuroML2/RMD.cell.nml
index b19f029..4371190 100644
--- a/NeuroML2/RMD.cell.nml
+++ b/NeuroML2/RMD.cell.nml
@@ -1,7 +1,9 @@
A cell from Nicoletti et al. 2019
+
+
RMD cell from Nicoletti et al. 2019
@@ -21,7 +23,9 @@
+
+
diff --git a/NeuroML2/RMD_cca.channel.nml b/NeuroML2/RMD_cca.channel.nml
new file mode 100644
index 0000000..5711cea
--- /dev/null
+++ b/NeuroML2/RMD_cca.channel.nml
@@ -0,0 +1,66 @@
+
+ An ion channel from cell RMD from Nicoletti et al. 2019
+
+ RMD_cca channel from Nicoletti et al. 2019
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/NeuroML2/RMD_kir.channel.nml b/NeuroML2/RMD_kir.channel.nml
index d8d122b..4eca8b0 100644
--- a/NeuroML2/RMD_kir.channel.nml
+++ b/NeuroML2/RMD_kir.channel.nml
@@ -11,12 +11,6 @@
-
-
-
-
-
-
@@ -25,8 +19,6 @@
-
-
@@ -35,7 +27,7 @@
-
+
|
diff --git a/NeuroML2/RMD_shak.channel.nml b/NeuroML2/RMD_shak.channel.nml
new file mode 100644
index 0000000..4e56a0b
--- /dev/null
+++ b/NeuroML2/RMD_shak.channel.nml
@@ -0,0 +1,57 @@
+
+ An ion channel from cell RMD from Nicoletti et al. 2019
+
+ RMD_shak channel from Nicoletti et al. 2019
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/NeuroML2/Sim_IClamp_AWCon.json b/NeuroML2/Sim_IClamp_AWCon.json
index 744414c..00719d5 100644
--- a/NeuroML2/Sim_IClamp_AWCon.json
+++ b/NeuroML2/Sim_IClamp_AWCon.json
@@ -2,7 +2,7 @@
"Sim_IClamp_AWCon": {
"version": "NeuroMLlite v0.5.9",
"network": "IClamp_AWCon.json",
- "duration": 400.0,
+ "duration": 1400.0,
"dt": 0.025,
"seed": 12345,
"record_traces": {
diff --git a/NeuroML2/Sim_IClamp_RMD.json b/NeuroML2/Sim_IClamp_RMD.json
index 04a176e..b6f49b6 100644
--- a/NeuroML2/Sim_IClamp_RMD.json
+++ b/NeuroML2/Sim_IClamp_RMD.json
@@ -2,7 +2,7 @@
"Sim_IClamp_RMD": {
"version": "NeuroMLlite v0.5.9",
"network": "IClamp_RMD.json",
- "duration": 400.0,
+ "duration": 1400.0,
"dt": 0.025,
"seed": 12345,
"record_traces": {
diff --git a/NeuroML2/TestXPP.py b/NeuroML2/TestXPP.py
index 745d894..1d6f1c7 100644
--- a/NeuroML2/TestXPP.py
+++ b/NeuroML2/TestXPP.py
@@ -7,6 +7,7 @@
all_g = ['gshal','gkir','gshak','gegl36','gunc2','gegl19','gcca1','gslo1','gbk','gbk2','gslo2','gca','gsc','gnca']
all_g.remove('gkir')
+all_g.remove('gcca1')
for p in all_g:
parsed_data['parameters'][p] = 0
diff --git a/NeuroML2/analyseChans.sh b/NeuroML2/analyseChans.sh
new file mode 100755
index 0000000..c8c5f9d
--- /dev/null
+++ b/NeuroML2/analyseChans.sh
@@ -0,0 +1,4 @@
+pynml-channelanalysis RMD_cca.channel.nml -iv -clampDe 100 -clampDu 200 -dur 400 -erev 60 -maxV 40 -minV -80
+pynml-channelanalysis RMD_shak.channel.nml -iv -clampDe 100 -clampDu 700 -dur 800 -erev -80 -maxV 40 -minV -120 -clampBaseVoltage -80 -stepTargetVoltage 10
+pynml-channelanalysis RMD_kir.channel.nml -iv -clampDe 100 -clampDu 700 -dur 800 -erev -80 -maxV 40 -minV -120 -clampBaseVoltage -80 -stepTargetVoltage 10
+