From 544b46b56503372f81517c59be0b7a9218010866 Mon Sep 17 00:00:00 2001
From: pgleeson
Date: Tue, 21 May 2024 15:38:42 +0100
Subject: [PATCH] Final channel! bk2
---
NeuroML2/AWCon.cell.nml | 2 +
NeuroML2/AWCon_bk2.channel.nml | 284 +++++++++++++++++++++++++++++++
NeuroML2/GenerateNeuroML.py | 88 ++++++++++
NeuroML2/LEMS_Sim_IClamp_RMD.xml | 120 ++++++++-----
NeuroML2/RMD.cell.nml | 2 +
NeuroML2/RMD_bk2.channel.nml | 284 +++++++++++++++++++++++++++++++
NeuroML2/Sim_IClamp_RMD.json | 12 ++
NeuroML2/TestXPP.py | 20 ++-
8 files changed, 760 insertions(+), 52 deletions(-)
create mode 100644 NeuroML2/AWCon_bk2.channel.nml
create mode 100644 NeuroML2/RMD_bk2.channel.nml
diff --git a/NeuroML2/AWCon.cell.nml b/NeuroML2/AWCon.cell.nml
index 2070acf..c2cc3e5 100644
--- a/NeuroML2/AWCon.cell.nml
+++ b/NeuroML2/AWCon.cell.nml
@@ -10,6 +10,7 @@
+
@@ -41,6 +42,7 @@
+
diff --git a/NeuroML2/AWCon_bk2.channel.nml b/NeuroML2/AWCon_bk2.channel.nml
new file mode 100644
index 0000000..94374be
--- /dev/null
+++ b/NeuroML2/AWCon_bk2.channel.nml
@@ -0,0 +1,284 @@
+
+ An ion channel from cell AWCon from Nicoletti et al. 2019
+
+ AWCon_bk2 channel from Nicoletti et al. 2019
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/NeuroML2/GenerateNeuroML.py b/NeuroML2/GenerateNeuroML.py
index f334e0a..38773bd 100644
--- a/NeuroML2/GenerateNeuroML.py
+++ b/NeuroML2/GenerateNeuroML.py
@@ -825,6 +825,92 @@ def create_cells(channels_to_include, duration=700, stim_delay=310, stim_duratio
),
)
+ # SLO2-EGL19 COMPLEX
+ if "bk2" in channels_to_include:
+ chan_id = "bk2"
+ ion = "k"
+ g_param = "gbk2"
+ gates = {
+ "m": [1, "minf_bk2", "tm_bkegl19"],
+ "h": [1, "hinf_egl19", "ths_egl19"],
+ }
+ extra_params = [
+ "backgr",
+ "cac_nano",
+ "wom1",
+ "wyx1",
+ "kyx1",
+ "nyx1",
+ "wop1",
+ "wxy1",
+ "kxy1",
+ "nxy1",
+ "stm19",
+ "sth19",
+ "pdg1",
+ "pdg2",
+ "pdg3",
+ "pdg4",
+ "pdg5",
+ "pdg6",
+ "pdg7",
+ "stau19",
+ "pds1",
+ "pds2",
+ "pds3",
+ "pds4",
+ "pds5",
+ "pds6",
+ "pds7",
+ "pds8",
+ "pds9",
+ "pds10",
+ "pds11",
+ "shiftdps",
+ "tm_egl19",
+ "pi",
+ "r",
+ "d",
+ "F",
+ "kb",
+ "b",
+ "gsc",
+ "eca",
+ "cao_nano",
+ "kcm1",
+ "kom1",
+ "kop1",
+ "minf_egl19",
+ "alpha1",
+ "beta1",
+ "stm2",
+ "m_egl19",
+ ]
+ for p in xpps[cell_id]["parameters"]:
+ if "egl19" in p:
+ extra_params.append(p)
+
+ xpps[cell_id]["parameters"]["pi"] = 3.14159265359
+
+ cell.add_channel_density(
+ cell_doc,
+ cd_id="%s_chans" % chan_id,
+ cond_density="%s S_per_m2"
+ % (float(xpps[cell_id]["parameters"][g_param]) * density_factor),
+ 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,
+ add_all=True,
+ ),
+ )
+
# SLO2-UNC2 COMPLEX
if "slo2" in channels_to_include:
chan_id = "slo2"
@@ -994,6 +1080,7 @@ def create_cells(channels_to_include, duration=700, stim_delay=310, stim_duratio
channels_to_include = ["leak", "unc2", "slo2"]
channels_to_include = ["leak", "unc2", "bk"]
channels_to_include = ["leak", "egl19", "slo1"]
+ channels_to_include = ["leak", "egl19", "bk2"]
channels_to_include = [
"leak",
"nca",
@@ -1007,6 +1094,7 @@ def create_cells(channels_to_include, duration=700, stim_delay=310, stim_duratio
"ca",
"bk",
"slo1",
+ "bk2",
"slo2",
]
diff --git a/NeuroML2/LEMS_Sim_IClamp_RMD.xml b/NeuroML2/LEMS_Sim_IClamp_RMD.xml
index 95bbc13..97f44ec 100644
--- a/NeuroML2/LEMS_Sim_IClamp_RMD.xml
+++ b/NeuroML2/LEMS_Sim_IClamp_RMD.xml
@@ -19,186 +19,218 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/NeuroML2/RMD.cell.nml b/NeuroML2/RMD.cell.nml
index 2e25738..541704a 100644
--- a/NeuroML2/RMD.cell.nml
+++ b/NeuroML2/RMD.cell.nml
@@ -11,6 +11,7 @@
+
@@ -43,6 +44,7 @@
+
diff --git a/NeuroML2/RMD_bk2.channel.nml b/NeuroML2/RMD_bk2.channel.nml
new file mode 100644
index 0000000..2ff40f2
--- /dev/null
+++ b/NeuroML2/RMD_bk2.channel.nml
@@ -0,0 +1,284 @@
+
+ An ion channel from cell RMD from Nicoletti et al. 2019
+
+ RMD_bk2 channel from Nicoletti et al. 2019
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/NeuroML2/Sim_IClamp_RMD.json b/NeuroML2/Sim_IClamp_RMD.json
index cf1e3c1..b0a0e6f 100644
--- a/NeuroML2/Sim_IClamp_RMD.json
+++ b/NeuroML2/Sim_IClamp_RMD.json
@@ -126,6 +126,18 @@
"biophys/membraneProperties/slo1_chans/RMD_slo1/h/q": {
"all": "*"
},
+ "biophys/membraneProperties/bk2_chans/gDensity": {
+ "all": "*"
+ },
+ "biophys/membraneProperties/bk2_chans/iDensity": {
+ "all": "*"
+ },
+ "biophys/membraneProperties/bk2_chans/RMD_bk2/m/q": {
+ "all": "*"
+ },
+ "biophys/membraneProperties/bk2_chans/RMD_bk2/h/q": {
+ "all": "*"
+ },
"biophys/membraneProperties/slo2_chans/gDensity": {
"all": "*"
},
diff --git a/NeuroML2/TestXPP.py b/NeuroML2/TestXPP.py
index c94c945..36d91c8 100644
--- a/NeuroML2/TestXPP.py
+++ b/NeuroML2/TestXPP.py
@@ -50,6 +50,7 @@
channels_to_include = ["leak", "unc2", "slo2"]
channels_to_include = ["leak", "unc2", "bk"]
channels_to_include = ["leak", "egl19", "slo1"]
+channels_to_include = ["leak", "egl19", "bk2"]
channels_to_include = [
"leak",
"nca",
@@ -63,6 +64,7 @@
"ca",
"bk",
"slo1",
+ "bk2",
"slo2",
]
@@ -88,18 +90,20 @@
chans = [
["egl19", "m", "m_egl19"],
- ["egl19", "h", "h_egl19"],
- ["slo1", "m", "mslo1"],
- ["slo1", "h", "h_egl19"],
-]
-"""
+ ["egl19", "h", "hs_egl19"],
+ ["bk2", "m", "mbk2"],
["unc2", "m", "m_unc2"],
["unc2", "h", "h_unc2"],
["bk", "m", "mbk"],
- ["bk", "h", "h_unc2"],
["slo2", "m", "mslo2"],
- ["slo2", "h", "h_unc2"],
-"""
+ ["slo1", "m", "mslo1"],
+ ["kir", "m", "m_kir"],
+ ["sk", "m", "m_sk"],
+ ["shak", "m", "m_shak"],
+ ["shak", "h", "h_shak"],
+ ["cca", "m", "m_cca1"],
+ ["cca", "h", "h_cca1"],
+]
plot_separately = {mp_fig: "v", ca_fig: "ca_intra1"}