Skip to content

Commit 571a60b

Browse files
committed
Downloaded latest zips from NMC & extracted here
1 parent 7a568ca commit 571a60b

File tree

20 files changed

+260
-132
lines changed

20 files changed

+260
-132
lines changed

NMC/parser/L1_HAC_cNAC187_1/CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
1.0.11: Made compatible with python3. Improved README
12
1.0.10: Increased the current to calculate the Rin to get above the noise level
23
for models with stochastic channels
34
1.0.9: Every model package now contains a cellinfo.json file with e.g. the

NMC/parser/L1_HAC_cNAC187_1/README

Lines changed: 49 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ ModelDB (http://senselab.med.yale.edu/ModelDB/). They assume you have installed
66
a recent NEURON package (>7.3 is known to work), available at
77
http://www.neuron.yale.edu.
88

9-
Linux / Unix
10-
------------
9+
Linux / Unix / Mac
10+
------------------
1111
1. Download one of the model packages from the Downloads section, or from an
1212
me-type fact sheet. For this example we will download the package named
1313
L5_DBC_cACint209_3.zip (i.e. m-type L5_DBC, e-type cAC, exemplar 3)
@@ -23,12 +23,6 @@ user@machine:~/dev/sim/neuron/L5_DBC_cACint209_3$ sh run_hoc.sh
2323

2424
4. Read the 'How to use the ME-type model GUI' section below
2525

26-
If you have installed Neuron with Python support, you can run a python version
27-
of the model. This script will run without a GUI, and will produce traces for
28-
step current 1, 2 and 3 in the directory python_recordings
29-
30-
user@machine:~/dev/sim/neuron/L5_DBC_cACint209_3$ sh run_py.sh
31-
3226
Windows
3327
-------
3428
1. Download one of the model packages from the Downloads section, or from an
@@ -47,33 +41,24 @@ unzipped cell package directory
4741
5. The GUI should load automatically. Read the 'How to use the ME-type model
4842
GUI' section below
4943

50-
Mac OS X
51-
--------
52-
1. Download one of the model packages from the Downloads section, or from an
53-
me-type fact sheet. For this example we will download the package named
54-
L5_DBC_cACint209_3.zip
55-
56-
2. Unzip the downloaded package
57-
58-
3. Drag the 'mechanisms' directory inside the unzipped cell package directory
59-
onto the mknrndll.app icon
44+
Running the Python version of the model package on Linux / Unix / Mac OS X
45+
==========================================================================
46+
Both Python 2.6+ as 3.4+ are supported.
47+
If you have installed Neuron with Python support, you can run a python version
48+
of the model. The python script depends on numpy and matplotlib, so first
49+
install these packages with e.g. 'pip install numpy matplotlib'
50+
The script will run without a GUI, and will produce traces for
51+
step current 1, 2 and 3 in the directory python_recordings
6052

61-
4. Run nrngui.app. Point the 'File->load dll' menu option to
62-
mechanisms/x86_64/.libs/libnrnmech.so (You probably need to change the Filter
63-
from *.dll to *.so. Depending on your computer's processor type x86_64 might
64-
also be e.g. i686). Using 'File->load hoc' load the mosinit.hoc file in the
65-
root directory of the cell package directory.
53+
user@machine:~/dev/sim/neuron/L5_DBC_cACint209_3$ sh run_py.sh
6654

67-
5. The GUI should load automatically.. Read the 'How to use the ME-type model
68-
GUI' section below How to use the ME-type model GUI
55+
How to use the ME-type model GUI
56+
================================
6957

7058
To start simulating the model, press the Init & Run button. Initially there are
7159
no stimuli present, which means that the cell will stay at its resting membrane
7260
potential.
7361

74-
How to use the ME-type model GUI
75-
================================
76-
7762
There are three panels that show the output of the model. One is a graph with
7863
the membrane voltage recorded in the soma (units: ms and mV), the two other
7964
panels have a representation of the cell's morphology. The sections in the
@@ -96,3 +81,39 @@ represented by a Poisson spike train, and the synapses will receive input from
9681
these virtual cell. The default firing rate of these virtual cells is set to 10
9782
Hz. The user can change these value by changing the input field next to the
9883
respective m-type activation button.
84+
85+
Installing Neuron on Mac OS X using Homebrew
86+
============================================
87+
88+
In our experience the Homebrew package manager is the most convenient way to
89+
get a commandline version of Neuron that has both X11 and Python support
90+
running on your Mac.
91+
92+
1. Install Homebrew by following the instruction on http://brew.sh, or:
93+
94+
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)")
95+
96+
2. Tap the Science Homebrew repo from
97+
98+
https://github.com/Homebrew/homebrew-science
99+
100+
by executing:
101+
102+
brew tap homebrew/science
103+
104+
3. Now you can install Neuron:
105+
106+
brew install neuron
107+
108+
This will install all the necessary software dependencies
109+
like InterViews, X11, ...
110+
111+
You can test the installation by executing:
112+
113+
nrngui
114+
115+
which should start the Neuron GUI
116+
117+
To test the Neuron python module:
118+
119+
python -c 'import neuron'
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
1.0.10
2-
2015/07/20
1+
1.0.11
2+
2015/10/07

NMC/parser/L1_HAC_cNAC187_1/run.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def create_cell(add_synapses=True):
5252

5353
# Instantiate the cell from the template
5454

55-
print "Loading cell cNAC187_L1_HAC_f8c9772d9d"
55+
print("Loading cell cNAC187_L1_HAC_f8c9772d9d")
5656
cell = neuron.h.cNAC187_L1_HAC_f8c9772d9d(1 if add_synapses else 0)
5757
return cell
5858

@@ -132,7 +132,12 @@ def run_step(step_number, plot_traces=None):
132132
soma_voltage_filename = os.path.join(
133133
recordings_dir,
134134
'soma_voltage_step%d.dat' % step_number)
135-
numpy.savetxt(soma_voltage_filename, zip(time, soma_voltage))
135+
numpy.savetxt(
136+
soma_voltage_filename,
137+
numpy.transpose(
138+
numpy.vstack((
139+
time,
140+
soma_voltage))))
136141

137142
print('Soma voltage for step %d saved to: %s'
138143
% (step_number, soma_voltage_filename))
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
nrnivmodl ./mechanisms
2-
./run.py "$@"
2+
3+
# Use for python 2.6+
4+
python ./run.py "$@"
5+
6+
# Use for python 3.4+
7+
# python3 ./run.py "$@"

NMC/parser/L23_LBC_cSTUT189_1/CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
1.0.11: Made compatible with python3. Improved README
12
1.0.10: Increased the current to calculate the Rin to get above the noise level
23
for models with stochastic channels
34
1.0.9: Every model package now contains a cellinfo.json file with e.g. the

NMC/parser/L23_LBC_cSTUT189_1/README

Lines changed: 49 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ ModelDB (http://senselab.med.yale.edu/ModelDB/). They assume you have installed
66
a recent NEURON package (>7.3 is known to work), available at
77
http://www.neuron.yale.edu.
88

9-
Linux / Unix
10-
------------
9+
Linux / Unix / Mac
10+
------------------
1111
1. Download one of the model packages from the Downloads section, or from an
1212
me-type fact sheet. For this example we will download the package named
1313
L5_DBC_cACint209_3.zip (i.e. m-type L5_DBC, e-type cAC, exemplar 3)
@@ -23,12 +23,6 @@ user@machine:~/dev/sim/neuron/L5_DBC_cACint209_3$ sh run_hoc.sh
2323

2424
4. Read the 'How to use the ME-type model GUI' section below
2525

26-
If you have installed Neuron with Python support, you can run a python version
27-
of the model. This script will run without a GUI, and will produce traces for
28-
step current 1, 2 and 3 in the directory python_recordings
29-
30-
user@machine:~/dev/sim/neuron/L5_DBC_cACint209_3$ sh run_py.sh
31-
3226
Windows
3327
-------
3428
1. Download one of the model packages from the Downloads section, or from an
@@ -47,33 +41,24 @@ unzipped cell package directory
4741
5. The GUI should load automatically. Read the 'How to use the ME-type model
4842
GUI' section below
4943

50-
Mac OS X
51-
--------
52-
1. Download one of the model packages from the Downloads section, or from an
53-
me-type fact sheet. For this example we will download the package named
54-
L5_DBC_cACint209_3.zip
55-
56-
2. Unzip the downloaded package
57-
58-
3. Drag the 'mechanisms' directory inside the unzipped cell package directory
59-
onto the mknrndll.app icon
44+
Running the Python version of the model package on Linux / Unix / Mac OS X
45+
==========================================================================
46+
Both Python 2.6+ as 3.4+ are supported.
47+
If you have installed Neuron with Python support, you can run a python version
48+
of the model. The python script depends on numpy and matplotlib, so first
49+
install these packages with e.g. 'pip install numpy matplotlib'
50+
The script will run without a GUI, and will produce traces for
51+
step current 1, 2 and 3 in the directory python_recordings
6052

61-
4. Run nrngui.app. Point the 'File->load dll' menu option to
62-
mechanisms/x86_64/.libs/libnrnmech.so (You probably need to change the Filter
63-
from *.dll to *.so. Depending on your computer's processor type x86_64 might
64-
also be e.g. i686). Using 'File->load hoc' load the mosinit.hoc file in the
65-
root directory of the cell package directory.
53+
user@machine:~/dev/sim/neuron/L5_DBC_cACint209_3$ sh run_py.sh
6654

67-
5. The GUI should load automatically.. Read the 'How to use the ME-type model
68-
GUI' section below How to use the ME-type model GUI
55+
How to use the ME-type model GUI
56+
================================
6957

7058
To start simulating the model, press the Init & Run button. Initially there are
7159
no stimuli present, which means that the cell will stay at its resting membrane
7260
potential.
7361

74-
How to use the ME-type model GUI
75-
================================
76-
7762
There are three panels that show the output of the model. One is a graph with
7863
the membrane voltage recorded in the soma (units: ms and mV), the two other
7964
panels have a representation of the cell's morphology. The sections in the
@@ -96,3 +81,39 @@ represented by a Poisson spike train, and the synapses will receive input from
9681
these virtual cell. The default firing rate of these virtual cells is set to 10
9782
Hz. The user can change these value by changing the input field next to the
9883
respective m-type activation button.
84+
85+
Installing Neuron on Mac OS X using Homebrew
86+
============================================
87+
88+
In our experience the Homebrew package manager is the most convenient way to
89+
get a commandline version of Neuron that has both X11 and Python support
90+
running on your Mac.
91+
92+
1. Install Homebrew by following the instruction on http://brew.sh, or:
93+
94+
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)")
95+
96+
2. Tap the Science Homebrew repo from
97+
98+
https://github.com/Homebrew/homebrew-science
99+
100+
by executing:
101+
102+
brew tap homebrew/science
103+
104+
3. Now you can install Neuron:
105+
106+
brew install neuron
107+
108+
This will install all the necessary software dependencies
109+
like InterViews, X11, ...
110+
111+
You can test the installation by executing:
112+
113+
nrngui
114+
115+
which should start the Neuron GUI
116+
117+
To test the Neuron python module:
118+
119+
python -c 'import neuron'
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
1.0.10
2-
2015/07/20
1+
1.0.11
2+
2015/10/07

NMC/parser/L23_LBC_cSTUT189_1/run.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def create_cell(add_synapses=True):
5252

5353
# Instantiate the cell from the template
5454

55-
print "Loading cell cSTUT189_L23_LBC_e6e8f83407"
55+
print("Loading cell cSTUT189_L23_LBC_e6e8f83407")
5656
cell = neuron.h.cSTUT189_L23_LBC_e6e8f83407(1 if add_synapses else 0)
5757
return cell
5858

@@ -132,7 +132,12 @@ def run_step(step_number, plot_traces=None):
132132
soma_voltage_filename = os.path.join(
133133
recordings_dir,
134134
'soma_voltage_step%d.dat' % step_number)
135-
numpy.savetxt(soma_voltage_filename, zip(time, soma_voltage))
135+
numpy.savetxt(
136+
soma_voltage_filename,
137+
numpy.transpose(
138+
numpy.vstack((
139+
time,
140+
soma_voltage))))
136141

137142
print('Soma voltage for step %d saved to: %s'
138143
% (step_number, soma_voltage_filename))
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
nrnivmodl ./mechanisms
2-
./run.py "$@"
2+
3+
# Use for python 2.6+
4+
python ./run.py "$@"
5+
6+
# Use for python 3.4+
7+
# python3 ./run.py "$@"

0 commit comments

Comments
 (0)