Skip to content

Whitespace changes & bump to v1.3.17 - update to require latest pylems/libneuroml/neuromllite #444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion LICENSE.lesser
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,3 @@ whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ A single package in Python unifying scripts and modules for reading, writing, si

Builds on: [libNeuroML](https://github.com/NeuralEnsemble/libNeuroML) & [PyLEMS](https://github.com/LEMS/pylems) and wraps functionality from [jNeuroML](https://github.com/NeuroML/jNeuroML).

Installation
Installation
------------

### Dependencies
Expand Down
2 changes: 1 addition & 1 deletion docs/source/_static/pynml_jnml.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion docs/source/pyneuroml.analysis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ pyneuroml.analysis.ChannelHelper module
:members:
:undoc-members:
:show-inheritance:

1 change: 0 additions & 1 deletion docs/source/pyneuroml.channelml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ pyneuroml.channelml package
:members:
:undoc-members:
:show-inheritance:

1 change: 0 additions & 1 deletion docs/source/pyneuroml.neuron.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ pyneuroml.neuron.analysis module
:members:
:undoc-members:
:show-inheritance:

1 change: 0 additions & 1 deletion docs/source/pyneuroml.povray.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ pyneuroml.povray.OverlaySimulation module
:members:
:undoc-members:
:show-inheritance:

1 change: 0 additions & 1 deletion docs/source/refs.bib
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ @Article{Vella2014
timestamp = {2019-02-20},
year = {2014},
}

16 changes: 8 additions & 8 deletions examples/IM.channel.nml
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,33 @@
<ionChannel id="IM" conductance="10pS" type="ionChannelHH" species="k">

<notes>Slow M-type K+ current for spike frequency adaptation

Comment from original mod file:
M-current, responsible for the adaptation of firing rate and the afterhyperpolarization (AHP) of cortical pyramidal cells
First-order model described by hodgkin-Hyxley like equations.
K+ current, activated by depolarization, noninactivating.

Model taken from Yamada, W.M., Koch, C. and Adams, P.R. Multiple channels and calcium dynamics. In: Methods in Neuronal Modeling,
Model taken from Yamada, W.M., Koch, C. and Adams, P.R. Multiple channels and calcium dynamics. In: Methods in Neuronal Modeling,
edited by C. Koch and I. Segev, MIT press, 1989, p 97-134.
See also: McCormick, D.A., Wang, Z. and Huguenard, J. Neurotransmitter control of neocortical neuronal activity and excitability.

See also: McCormick, D.A., Wang, Z. and Huguenard, J. Neurotransmitter control of neocortical neuronal activity and excitability.
Cerebral Cortex 3: 387-398, 1993.

Written by Alain Destexhe, Laval University, 1995
</notes>

<annotation>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="IM">

<bqmodel:isDescribedBy xmlns:bqmodel="http://biomodels.net/model-qualifiers/">
<rdf:Bag>
<rdf:li>Minimal Hodgkin-Huxley type models for different classes of cortical and thalamic neurons</rdf:li>
<rdf:li rdf:resource="19011929"/>
</rdf:Bag>
</bqmodel:isDescribedBy>


<bqbiol:isVersionOf xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
<rdf:Bag>
<rdf:li>K channels</rdf:li>
Expand All @@ -48,7 +48,7 @@ Written by Alain Destexhe, Laval University, 1995
<timeCourse type="IM_p_tau_tau"/>
<steadyState type="IM_p_inf_inf"/>
</gate>

</ionChannel>

<ComponentType name="IM_p_tau_tau" extends="baseVoltageDepTime">
Expand Down
14 changes: 7 additions & 7 deletions examples/KConductance.channel.nml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2beta4.xsd"
<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2beta4.xsd"
id="KConductance">

<notes>Channel file containing a single channel description</notes>

<ionChannel id="KConductance" conductance="10pS" type="ionChannelHH" species="k">

<notes>HH K Channel</notes>

<annotation>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="KConductance">

<bqmodel:isDescribedBy xmlns:bqmodel="http://biomodels.net/model-qualifiers/">
<rdf:Bag>
<rdf:li>A. L. Hodgkin and A. F. Huxley, A quantitative description of membrane current and its application
Expand All @@ -22,7 +22,7 @@
</rdf:Bag>
</bqmodel:isDescribedBy>


<bqbiol:isVersionOf xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
<rdf:Bag>
<rdf:li>K channels</rdf:li>
Expand All @@ -38,7 +38,7 @@
<forwardRate type="HHExpLinearRate" rate="0.1per_ms" scale="10mV" midpoint="-55mV"/>
<reverseRate type="HHExpRate" rate="0.125per_ms" scale="-80mV" midpoint="-65mV"/>
</gate>

</ionChannel>

</neuroml>
10 changes: 5 additions & 5 deletions examples/Kd.channel.nml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ionChannel id="Kd" conductance="10pS" type="ionChannelHH" species="k">

<notes>Delayed rectifier K+ current based on Traub and Miles 1991.

Comment from original mod file: Hippocampal HH channels
Fast Na+ and K+ currents responsible for action potentials
Iterative equations
Expand All @@ -16,19 +16,19 @@ Equations modified by Traub, for Hippocampal Pyramidal cells, in: Traub and Mile
- range variable vtraub adjust threshold
- Written by Alain Destexhe, Salk Institute, Aug 1992
- Modified Oct 96 for compatibility with Windows: trap low values of arguments</notes>

<annotation>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="Kd">

<bqmodel:isDescribedBy xmlns:bqmodel="http://biomodels.net/model-qualifiers/">
<rdf:Bag>
<rdf:li>Minimal Hodgkin-Huxley type models for different classes of cortical and thalamic neurons</rdf:li>
<rdf:li rdf:resource="19011929"/>
</rdf:Bag>
</bqmodel:isDescribedBy>


<bqbiol:isVersionOf xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
<rdf:Bag>
<rdf:li>K channels</rdf:li>
Expand All @@ -44,7 +44,7 @@ Equations modified by Traub, for Hippocampal Pyramidal cells, in: Traub and Mile
<forwardRate type="Kd_n_alpha_rate"/>
<reverseRate type="Kd_n_beta_rate"/>
</gate>

</ionChannel>

<ComponentType name="Kd_n_alpha_rate" extends="baseVoltageDepRate">
Expand Down
30 changes: 15 additions & 15 deletions examples/LEMS_NML2_Ex5_DetCell.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<!-- Example with Simple cell specifying segment details-->

<!-- This is a file which can be read and executed by the LEMS Interpreter.
It imports the LEMS definitions of the core NeuroML 2 Components,
imports in "pure" NeuroML 2 and contains some LEMS elements for running
It imports the LEMS definitions of the core NeuroML 2 Components,
imports in "pure" NeuroML 2 and contains some LEMS elements for running
a simulation -->


Expand All @@ -23,7 +23,7 @@


<Simulation id="sim1" length="300ms" step="0.01ms" target="net1">

<Display id="d1" title="Ex5: HH cell with simple morphology: voltage" timeScale="1ms" xmin="0" xmax="300" ymin="-90" ymax="50">
<Line id="v" quantity="hhpop[0]/v" scale="1mV" color="#ffffff" timeScale="1ms"/>
<Line id="spiking" quantity="hhpop[0]/spiking" scale="0.1V" color="#004040" timeScale="1ms"/>
Expand All @@ -42,20 +42,20 @@
<Line id="gna" quantity="hhpop[0]/bioPhys1/membraneProperties/NaConductances/gDensity" scale="1" color="#000000" timeScale="1ms"/>
<Line id="gk" quantity="hhpop[0]/bioPhys1/membraneProperties/KConductances/gDensity" scale="1" color="#ff0000" timeScale="1ms"/>
</Display>


<OutputFile id="of0" fileName="results/ex5_v.dat">
<OutputColumn id="v" quantity="hhpop[0]/v"/>
</OutputFile>
<OutputColumn id="v" quantity="hhpop[0]/v"/>
</OutputFile>

<OutputFile id="of1" fileName="results/ex5_vars.dat">
<OutputColumn id="m" quantity="hhpop[0]/bioPhys1/membraneProperties/NaConductances/NaConductance/m/q"/>
<OutputColumn id="h" quantity="hhpop[0]/bioPhys1/membraneProperties/NaConductances/NaConductance/h/q"/>
<OutputColumn id="n" quantity="hhpop[0]/bioPhys1/membraneProperties/KConductances/KConductance/n/q"/>
</OutputFile>
<OutputColumn id="m" quantity="hhpop[0]/bioPhys1/membraneProperties/NaConductances/NaConductance/m/q"/>
<OutputColumn id="h" quantity="hhpop[0]/bioPhys1/membraneProperties/NaConductances/NaConductance/h/q"/>
<OutputColumn id="n" quantity="hhpop[0]/bioPhys1/membraneProperties/KConductances/KConductance/n/q"/>
</OutputFile>


</Simulation>


</Lems>
</Lems>
26 changes: 13 additions & 13 deletions examples/LEMS_NML2_Ex9_FN.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<!-- Example with FitzHugh-Nagumo model -->

<!--
<!--




Needs to be updated, see https://github.com/NeuroML/NeuroML2/issues/42



-->


Expand Down Expand Up @@ -41,13 +41,13 @@
<Line id="V" quantity="fnPop1[0]/V" scale="1" color="#ee40FF" timeScale="1s" />
<Line id="W" quantity="fnPop1[0]/W" scale="1" color="#BBA0AA" timeScale="1s" />
</Display>

<OutputFile id="of1" fileName="results/ex9.dat">
<OutputColumn id="V" quantity="fnPop1[0]/V"/>
<OutputColumn id="W" quantity="fnPop1[0]/W"/>
</OutputFile>
<OutputColumn id="V" quantity="fnPop1[0]/V"/>
<OutputColumn id="W" quantity="fnPop1[0]/W"/>
</OutputFile>

</Simulation>


</Lems>
</Lems>
6 changes: 3 additions & 3 deletions examples/LeakConductance.channel.nml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2beta4.xsd"
<neuroml xmlns="http://www.neuroml.org/schema/neuroml2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2beta4.xsd"
id="LeakConductance">

<notes>Channel file containing a single Channel description</notes>
Expand Down
53 changes: 26 additions & 27 deletions examples/LeakConductance.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ NEURON {
SUFFIX LeakConductance
NONSPECIFIC_CURRENT i
RANGE e

RANGE gion
RANGE i__LeakConductance : a copy of the variable for current which makes it easier to access from outside the mod file
RANGE gmax : Will be changed when ion channel mechanism placed on cell!
Expand All @@ -22,11 +22,11 @@ NEURON {
RANGE fopen : exposure
RANGE conductanceScale : derived variable
RANGE fopen0 : derived variable

}

UNITS {

(nA) = (nanoamp)
(uA) = (microamp)
(mA) = (milliamp)
Expand All @@ -42,71 +42,70 @@ UNITS {
(umol) = (micromole)
(pC) = (picocoulomb)
(S) = (siemens)

}

PARAMETER {

gmax = 0 (S/cm2) : Will be changed when ion channel mechanism placed on cell!

conductance = 1.0E-5 (uS) : was: 1.0E-11 (conductance)
}

ASSIGNED {

gion (S/cm2) : Transient conductance density of the channel? Standard Assigned variables with ionChannel
v (mV)
celsius (degC)
temperature (K)
e (mV)
i (mA/cm2)
i__LeakConductance (mA/cm2)

conductanceScale : derived variable
fopen0 : derived variable
fopen : derived variable
g (uS) : derived variable

}

STATE {

}

INITIAL {
temperature = celsius + 273.15

rates()
rates() ? To ensure correct initialisation.

}

BREAKPOINT {

rates()
? DerivedVariable is based on path: conductanceScaling[*]/factor, on: Component(id=LeakConductance type=ionChannelHH), from conductanceScaling; null
? Path not present in component, using factor: 1
conductanceScale = 1

conductanceScale = 1

? DerivedVariable is based on path: gates[*]/fcond, on: Component(id=LeakConductance type=ionChannelHH), from gates; null
? Path not present in component, using factor: 1
fopen0 = 1

fopen0 = 1

fopen = conductanceScale * fopen0 ? evaluable
g = conductance * fopen ? evaluable
gion = gmax * fopen
gion = gmax * fopen

i = gion * (v - e)
i__LeakConductance = -1 * i : set this variable to the current also - note -1 as channel current convention for LEMS used!

}

PROCEDURE rates() {




}




}
Loading
Loading