Skip to content

Commit

Permalink
Initial project
Browse files Browse the repository at this point in the history
  • Loading branch information
pgleeson committed Oct 27, 2017
1 parent 3c15c2b commit 7b1b50a
Show file tree
Hide file tree
Showing 13 changed files with 2,834 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
675 changes: 675 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

50 changes: 50 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>NeuroML2 model lite</name>
<url>https://neuroml.org/</url>
<packaging>bundle</packaging>
<groupId>org.neuroml.neuroml2modelLite</groupId>
<artifactId>neuroml2modelLite</artifactId>
<version>0.0.6</version>

<dependencies>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>

</dependencies>


<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.7</version>
<extensions>true</extensions>
<configuration>
<manifestLocation>src/main/java/META-INF</manifestLocation>
<supportedProjectTypes>
<supportedProjectType>jar</supportedProjectType>
<supportedProjectType>bundle</supportedProjectType>
</supportedProjectTypes>
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
</instructions>
</configuration>
</plugin>
</plugins>





</build>


</project>
11 changes: 11 additions & 0 deletions src/main/java/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Manifest-Version: 1.0
Bnd-LastModified: 1509096768302
Build-Jdk: 1.8.0_91
Built-By: padraig
Bundle-ManifestVersion: 2
Bundle-Name: NeuroML2 model lite
Bundle-SymbolicName: neuroml2modelLite
Bundle-Version: 0.0.6
Created-By: Apache Maven Bundle Plugin
Export-Package: org.neuroml2.model;version="0.0.6"
Tool: Bnd-1.50.0
29 changes: 29 additions & 0 deletions src/main/java/org/neuroml2/model/NeuroML2ModelReader.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package org.neuroml2.model;

import java.io.File;
import java.io.IOException;


public class NeuroML2ModelReader {





public static void main(String[] args) throws IOException
{
String ionChannelFile = "src/test/resources/Ca_LVAst.channel.nml";
ionChannelFile = "../../geppetto/org.geppetto.model.neuroml/src/test/resources/traub/k2.channel.nml";
ionChannelFile = "../../geppetto/org.geppetto.model.neuroml/src/test/resources/hhcell/NML2_SingleCompHHCell.nml";
if (args.length==1)
ionChannelFile = args[0];
File nmlFile = new File(ionChannelFile);


NeuroML2ModelReader nmlr;

System.out.println("Opening file: "+nmlFile.getCanonicalPath());

}

}
30 changes: 30 additions & 0 deletions src/test/java/org/neuroml2/model/AllTests.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package org.neuroml2.model;

import java.io.File;
import org.junit.Before;
import org.junit.Test;



public class AllTests {



@Before
public void setUp() throws Throwable {
NeuroML2ModelReader nmlReader = new NeuroML2ModelReader();


}

@Test
public void testChannels() throws Throwable {

System.out.println("Testing...");
}

protected File getLocalFile(String fname) {
return new File(getClass().getResource(fname).getFile());
}

}
76 changes: 76 additions & 0 deletions src/test/resources/Ca_LVAst.channel.nml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<neuroml2>

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

<ionChannel id="Ca_LVAst" conductance="10pS" type="ionChannelHH" species="ca">

<notes>Low voltage activated Ca2+ current

Comment from original mod file:
Note: mtau is an approximation from the plots
:Reference : : Avery and Johnston 1996, tau from Randall 1997
:Comment: shifted by -10 mv to correct for junction potential
:Comment: corrected rates using q10 = 2.3, target temperature 34, orginal 21</notes>

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

<bqmodel:isDescribedBy xmlns:bqmodel="http://biomodels.net/model-qualifiers/">
<rdf:Bag>
<rdf:li>Models of Neocortical Layer 5b Pyramidal Cells Capturing a Wide Range of Dendritic and Perisomatic Active Properties,
Etay Hay, Sean Hill, Felix Schürmann, Henry Markram and Idan Segev, PLoS Comp Biol 2011</rdf:li>
<rdf:li rdf:resource="http://www.ncbi.nlm.nih.gov/pubmed/21829333"/>
</rdf:Bag>
</bqmodel:isDescribedBy>


<bqbiol:isVersionOf xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
<rdf:Bag>
<rdf:li>Ca channels</rdf:li>
<rdf:li rdf:resource="http://senselab.med.yale.edu/neurondb/channelGene2.aspx#table1"/>
</rdf:Bag>
</bqbiol:isVersionOf>

</rdf:Description>
</rdf:RDF>
</annotation>

<gate id="m" type="gateHHtauInf" instances="2">
<q10Settings type="q10Fixed" fixedQ10="2.95288264"/>
<timeCourse type="Ca_LVAst_m_tau_tau"/>
<steadyState type="HHSigmoidVariable" rate="1" scale="6mV" midpoint="-40mV"/>
</gate>

<gate id="h" type="gateHHtauInf" instances="1">
<q10Settings type="q10Fixed" fixedQ10="2.95288264"/>
<timeCourse type="Ca_LVAst_h_tau_tau"/>
<steadyState type="HHSigmoidVariable" rate="1" scale="-6.4mV" midpoint="-90mV"/>
</gate>

</ionChannel>

<ComponentType name="Ca_LVAst_m_tau_tau" extends="baseVoltageDepTime">
<Constant name="TIME_SCALE" dimension="time" value="1 ms"/>
<Constant name="VOLT_SCALE" dimension="voltage" value="1 mV"/>

<Dynamics>
<DerivedVariable name="V" dimension="none" value="v / VOLT_SCALE"/>
<DerivedVariable name="t" exposure="t" dimension="time" value="(5 + 20 / (1 + (exp ((V+35)/5) ))) * TIME_SCALE"/>
</Dynamics>

</ComponentType>

<ComponentType name="Ca_LVAst_h_tau_tau" extends="baseVoltageDepTime">
<Constant name="TIME_SCALE" dimension="time" value="1 ms"/>
<Constant name="VOLT_SCALE" dimension="voltage" value="1 mV"/>

<Dynamics>
<DerivedVariable name="V" dimension="none" value="v / VOLT_SCALE"/>
<DerivedVariable name="t" exposure="t" dimension="time" value="(20 + 50 / (1 + (exp ((V+50)/7) ))) * TIME_SCALE"/>
</Dynamics>

</ComponentType>

</neuroml2>
36 changes: 36 additions & 0 deletions src/test/resources/Ih.channel.nml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<neuroml2>

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

<ionChannel id="Ih" conductance="10pS" type="ionChannelHH" species="hcn">

<notes>Non-specific cation current

Comment from original mod file:
Reference : : Kole,Hallermann,and Stuart, J. Neurosci. 2006</notes>

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

<bqmodel:isDescribedBy xmlns:bqmodel="http://biomodels.net/model-qualifiers/">
<rdf:Bag>
<rdf:li>Models of Neocortical Layer 5b Pyramidal Cells Capturing a Wide Range of Dendritic and Perisomatic Active Properties,
Etay Hay, Sean Hill, Felix Schürmann, Henry Markram and Idan Segev, PLoS Comp Biol 2011</rdf:li>
<rdf:li rdf:resource="http://www.ncbi.nlm.nih.gov/pubmed/21829333"/>
</rdf:Bag>
</bqmodel:isDescribedBy>

</rdf:Description>
</rdf:RDF>
</annotation>

<gate id="m" type="gateHHrates" instances="1">
<forwardRate type="HHExpLinearRate" rate="0.076517per_ms" scale="-11.9mV" midpoint="-154.9mV"/>
<reverseRate type="HHExpRate" rate="0.193per_ms" scale="33.1mV" midpoint="0mV"/>
</gate>

</ionChannel>

</neuroml2>
85 changes: 85 additions & 0 deletions src/test/resources/NML2_SingleCompHHCell.nml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<neuroml2>

<!-- Single compartment cell with HH channels -->

<!-- This is a "pure" NeuroML 2 file. It can be included in a LEMS file for use in a simulaton
by the LEMS interpreter, see LEMS_NML2_Ex5_DetCell.xml -->

<ionChannelHH id="passiveChan" conductance="10pS">
<notes>Leak conductance</notes>
</ionChannelHH>


<ionChannelHH id="naChan" conductance="10pS" species="na">
<notes>Na channel</notes>

<gateHHrates id="m" instances="3">
<forwardRate type="HHExpLinearRate" rate="1per_ms" midpoint="-40mV" scale="10mV"/>
<reverseRate type="HHExpRate" rate="4per_ms" midpoint="-65mV" scale="-18mV"/>
</gateHHrates>

<gateHHrates id="h" instances="1">
<forwardRate type="HHExpRate" rate="0.07per_ms" midpoint="-65mV" scale="-20mV"/>
<reverseRate type="HHSigmoidRate" rate="1per_ms" midpoint="-35mV" scale="10mV"/>
</gateHHrates>

</ionChannelHH>


<ionChannelHH id="kChan" conductance="10pS" species="k">

<gateHHrates id="n" instances="4">
<forwardRate type="HHExpLinearRate" rate="0.1per_ms" midpoint="-55mV" scale="10mV"/>
<reverseRate type="HHExpRate" rate="0.125per_ms" midpoint="-65mV" scale="-80mV"/>
</gateHHrates>

</ionChannelHH>



<cell id="hhcell">

<morphology id="morph1">
<segment id="0" name="soma">
<proximal x="0" y="0" z="0" diameter="17.841242"/> <!--Gives a convenient surface area of 1000.0 ?m�-->
<distal x="0" y="0" z="0" diameter="17.841242"/>
</segment>

<segmentGroup id="soma_group">
<member segment="0"/>
</segmentGroup>

</morphology>

<biophysicalProperties id="bioPhys1">

<membraneProperties>

<channelDensity id="leak" ionChannel="passiveChan" condDensity="3.0 S_per_m2" erev="-54.3mV"/>
<channelDensity id="naChans" ionChannel="naChan" condDensity="120.0 mS_per_cm2" erev="50.0 mV" ion="na"/>
<channelDensity id="kChans" ionChannel="kChan" condDensity="360 S_per_m2" erev="-77mV" ion="k"/>

<spikeThresh value="-20mV"/>
<specificCapacitance value="1.0 uF_per_cm2"/>
<initMembPotential value="-65mV"/>

</membraneProperties>

<intracellularProperties>
<resistivity value="0.03 kohm_cm"/> <!-- Note: not used in single compartment simulations -->
</intracellularProperties>

</biophysicalProperties>

</cell>

<pulseGenerator id="pulseGen1" delay="100ms" duration="100ms" amplitude="0.08nA"/>


<network id="net1">
<population id="hhpop" component="hhcell" size="1"/>
<explicitInput target="hhpop[0]" input="pulseGen1"/>
</network>

</neuroml2>

71 changes: 71 additions & 0 deletions src/test/resources/SK_E2.channel.nml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?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" id="SK_E2">

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

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

<notes>Small-conductance, Ca2+ activated K+ current

Comment from original mod file:
: SK-type calcium-activated potassium current
: Reference : Kohler et al. 1996</notes>

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

<bqmodel:isDescribedBy xmlns:bqmodel="http://biomodels.net/model-qualifiers/">
<rdf:Bag>
<rdf:li>Models of Neocortical Layer 5b Pyramidal Cells Capturing a Wide Range of Dendritic and Perisomatic Active Properties,
Etay Hay, Sean Hill, Felix Schürmann, Henry Markram and Idan Segev, PLoS Comp Biol 2011</rdf:li>
<rdf:li rdf:resource="http://www.ncbi.nlm.nih.gov/pubmed/21829333"/>
</rdf:Bag>
</bqmodel:isDescribedBy>


<bqbiol:isVersionOf xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
<rdf:Bag>
<rdf:li>K channels</rdf:li>
<rdf:li rdf:resource="http://senselab.med.yale.edu/neurondb/channelGene2.aspx#table3"/>
</rdf:Bag>
</bqbiol:isVersionOf>

</rdf:Description>
</rdf:RDF>
</annotation>

<gate id="z" type="gateHHtauInf" instances="1">
<timeCourse type="SK_E2_z_tau_tau"/>
<steadyState type="SK_E2_z_inf_inf"/>
</gate>

</ionChannel>

<ComponentType name="SK_E2_z_tau_tau" extends="baseVoltageConcDepTime">
<Constant name="TIME_SCALE" dimension="time" value="1 ms"/>
<Constant name="VOLT_SCALE" dimension="voltage" value="1 mV"/>
<Constant name="CONC_SCALE" dimension="concentration" value="1 mol_per_cm3"/>

<Dynamics>
<DerivedVariable name="V" dimension="none" value="v / VOLT_SCALE"/>
<DerivedVariable name="ca_conc" dimension="none" value="caConc / CONC_SCALE"/>
<DerivedVariable name="t" exposure="t" dimension="time" value="(1) * TIME_SCALE"/>
</Dynamics>

</ComponentType>

<ComponentType name="SK_E2_z_inf_inf" extends="baseVoltageConcDepVariable">
<Constant name="TIME_SCALE" dimension="time" value="1 ms"/>
<Constant name="VOLT_SCALE" dimension="voltage" value="1 mV"/>
<Constant name="CONC_SCALE" dimension="concentration" value="1 mol_per_cm3"/>

<Dynamics>
<DerivedVariable name="V" dimension="none" value="v / VOLT_SCALE"/>
<DerivedVariable name="ca_conc" dimension="none" value="caConc / CONC_SCALE"/>
<DerivedVariable name="x" exposure="x" dimension="none" value="1/(1+(4.3e-10/ca_conc)^4.8)"/>
</Dynamics>

</ComponentType>

</neuroml>
Loading

0 comments on commit 7b1b50a

Please sign in to comment.