The NEURON · 0.2 0.4 0.6 0.8 1 aC2O bC2O C2 + cai O (a, b) (KSTrans[29]) Display inf, tau aC2O =...

Post on 19-Jun-2020

1 views 0 download

Transcript of The NEURON · 0.2 0.4 0.6 0.8 1 aC2O bC2O C2 + cai O (a, b) (KSTrans[29]) Display inf, tau aC2O =...

www.neuron.yale.edu

NEURONSimulator

The

Supported by NINDS

Using:

Building

Running

Analysing

How is the program organized.

Where does it fit in the overall modeling process?

Using:

Building

Running

Analysing

How is the program organized.

Where does it fit in the overall modeling process?

What kind of models?

Using:

Building

Running

Analysing

Numerical methods

How is the program organized.

Where does it fit in the overall modeling process?

What kind of models?

Using:

Building

Running

Analysing

Numerical methods

How is the program organized.

Where does it fit in the overall modeling process?

What kind of models?

Help!

Physical System

Model

Representation in NEURON

Create Representation

Investigate/Explore/Control/Use Representation

Squid axon

Hodgkin−Huxley cable equations

NEURON representation

Physical System

Model

Simulationcreate axonaxon { nseg = 75 diam = 100 L = 20000 insert hh}

��������

����� ������

�������� ��� ��� �"! �$# ��%'& � �)( � �+*",�- �.# ��%/& * ( �0��1 �.# �2%'& 1 (

3 �354 � %�6 � � �'7 � �.#98 % � ( 6 �:� ; <>=@?BA -DC9E<GFIHKJML NPOPQ�R)SUTWV 7 �X� �ZY F[=@?�AZ\9] EP^ <5_ E3a`354 � %�6 ` ! �'7 ` �M#>8 % ! ( 6 ` �cbed.f Y F[; C ]>=@?BAZ\9] E 7 ` � <<DA[H5J$L NPOgQ.R)hUiWV3 �354 � %�6 � , �'7 � �.#>8 % , ( 6 � � ; C <>=@?[A+]a] E<GFIHKJML NPOPQ�R)iUiWV 7 � ��b 8)jMk Y F[=l?AZ\9] EP^ _ C

v

v

Channel

Pump

Na/Ca XDiffusion

[Ca]

Ca:B

NaK

TransmitterRelease

Extracellular fieldsLinear circuitsSynapsesNetworks

Single Channels

Artificial Spiking CellsDiscrete Event Simulation

FunctionsVariables

Setup

Control

Presentation

CompiledParameterizedEquations

Interpreter

CompiledParameterizedEquations

Neuron specific syntax

Interpreter

CompiledParameterizedEquations

Neuron specific syntax

Interpreter

Object syntax

Java C++ Objects

InterViews

CompiledParameterizedEquations

Model Descriptiontranslator

Membrane ChannelSpecification

Neuron specific syntaxInterpreter

proc run() { finitialize(−65) while (t < tstop) { fadvance() }}

t t + dt

Compartmental ModelingNot much mathematics required.

Good judgment essential!

i + i + i = 01 2 3

1i = −I

3i = V/ R

2i = C dV/ dt

C dV/dt + g V = I

I

C

V

R

i1

2i

3i

0 1 2 3 4 50

2

4

6

8

10

0 1 2 3 4 50

0.005

0.01

0.015

0.02

ms

nA

mV

I

V

ia

im

ia

ia

iax

Σ iaim =∫

=v j

jc jid

dt+

v j−v k

r jkΣk

Section

Node

Segment

Membrane

v(1)v(0) v(1.5/nseg)

Membrane

Extracellularbarrier

v(1)v(0)

vext(0) vext(1)

nseg = 1

nseg = 2

nseg = 3

forall nseg *= 3

Forward Euler

0 1 2 3 0.00

0.20

0.40

0.60

0.80

1.00

t

dt = .5

y(t + dt) = y(t) + dt *f(y(t))

y’ = f(y)

=y(t+dt) − y(t)

dtf(y(t))

1 1

1 1

1/20V

1V

2

0 0.2 0.4 0.6 0.8 10

0.5

1

1.5

2

dt.02 .2

ForwardEuler

0 1 2 3 0.00

0.20

0.40

0.60

0.80

1.00

t

Backward Euler

y(t + dt) = y(t) + dt *f(y(t + dt))

dt = .75

y’ = f(y)

=y(t+dt) − y(t)

dtf(y(t+dt))

1 1

1 1

1/20V

1V

2

dt.02 .2

0 0.2 0.4 0.6 0.8 10

0.5

1

1.5

2

dt = .2

Backward Euler

0 0.2 0.4 0.6 0.8 10

0.5

1

1.5

2

1 1

1 1

1/20V

1V

2

0 0.2 0.4 0.6 0.8 10

0.5

1

1.5

2

dt = .2dt

.02 .2

0 0.2 0.4 0.6 0.8 10

0.5

1

1.5

2

1

1

V1

0 1 2 3 0.00

0.20

0.40

0.60

0.80

1.00

t

Crank−Nicholson

dt = .75

y(t + dt) = y(t) + dt *f(y(t+dt/2))

y’ = f(y)

=y(t+dt) − y(t)

dtf(y(t+dt/2))

0 0.2 0.4 0.6 0.8 10

0.5

1

1.5

2

Cvode.atol(1e−3)

0 0.2 0.4 0.6 0.8 10

0.5

1

1.5

2

Cvode.atol(1e−1)

_

na2g = .12 S/cm

.15 nA

.061 nA

mV

ms0 1 2 3 4 5

−80

−40

0

40

− 1%

.15 nA

.061 nA

mV

ms

Implicit dt=.025 ms

0 1 2 3 4 5

−80

−40

0

40 CN dt=.001 msCN dt=.025 msCVode atol = 1e−2

About Topology Subsets Geometry Biophysics Management Continuous Create

soma dend

dend[1]

dend[2]

Basename: dend

Undo Last

Click and drag toMake SectionCopy SubtreeReconnect SubtreeRepositionMove Label

Click toInsert SectionDelete SectionDelete SubtreeChange Name

Hints

CellBuild[0]

About Topology Subsets Geometry Biophysics Management Continuous Create

somadendrite_8dendrite_7dendrite_6

dendrite_5

dendrite_4dendrite_3dendrite_2dendrite_1

Cell Type Export Import Hints

Import from top level of interpreter. This works only if there is one cell in the interpreter.

Kind of information imported.Topology3−D infoSubsets (not implemented)Geometry (not implemented)Membrane(not implemented)

Import

Turn off indexed name display.Don’t draw short sections as circles.

CellBuild[1]

v

Shape x −619.845 : 653.847 y −408.232 : 1011.84

Iconify

File Edit Build Tools Graph Vector Window

NEURON Main Menu

Close Hide

celsius (degC) 15

Temperature

Close Hide

Init (mV) −65

Init & Run

Stop

Continue til (ms) 5

Continue for (ms) 1

Single Step

t (ms) 0

Tstop (ms) 5

dt (ms) 0.025

Points plotted/ms 40

Quiet

Real Time (s) 0

RunControl

Close Hide

Use variable dt

Absolute Tolerance 0.001

Atol Scale Tool Details

VariableTimeStep

Close Hide

Pyramidal: HH soma, passive dendritesPatch: HHStylizedPyramidalReleaseSynchronizing net (artificial cells)No model

NEURON Demonstrations

Close Hide

v

Shape x −619.845 : 653.847 y −334.027 : 937.633

Close Hide

0 1 2 3 4 5

−80

−40

0

40

0 1 2 3 4 5

−80

−40

0

40

soma.v(.5)

Graph[0] x −0.5 : 5.5 y −92 : 52

Close Hide

SelectPointProcess

Show

IClamp[1]at: soma(0.5)

IClamp[1]

del (ms) 1

dur (ms) 2

amp (nA) 25

i (nA) 0

PointProcessManager

Close Hide

SelectPointProcess

Show

IClamp[2]at: dendrite_1[8](0.5)

PointProcessManager

Close Hide

SelectPointProcess

Show

Noneat: soma(0.5)

PointProcessManager

none

IClamp

AlphaSynapse

ExpSyn

Exp2Syn

SEClamp

VClamp

OClamp

APCount

NetStim

IntFire1

IntFire2

IntFire4

PointProcessMark

IntervalFire

Close Hide

Print Session select move resize01

234

5

67

8910

Print & File Window Manager

Init (mV) −65

Init & Run

Stop

Continue til (ms) 5

Continue for (ms) 0.5

Single Step

t (ms) 5

Tstop (ms) 5

dt (ms) 0.025

Points plotted/ms 40

Quiet

Real Time (s) 1

RunControl

0 1 2 3 4 5

−80

−40

0

40

0 1 2 3 4 5

−80

−40

0

40

soma.v(.5)

Graph[0] Crosshair x −0.5 : 5.5 y −92 : 52

−900 −500 −100 300

−80

−40

0

40

−900 −500 −100 300

−80

−40

0

40v

Graph x −1071.19 : 491.323 y −92 : 52

v

Shape Space Plot x −619.845 : 653.847 y −408.232 : 1011.84

cy’ = f(t, y)

Close Hide

Print Session select move resize0

1

23

Print & File Window ManagerIconify

File Edit Build Tools Graph Vector Window

NEURON Main Menu

Close Hide

States Transitions Properties

Select hh state or ks transition to change properties

C C2 Ov cai

C3 O2v

O3

(0.25*C2 + O)(0.25*C2 + O): 3 state, 2 transitions

Power 1

Fractional Conductance

C2 fraction 0.25

O fraction 1

Adjust Run

−90 −40 10 600

0.20.40.60.8

1

−90 −40 10 600

0.20.40.60.8

1aC2ObC2O

C2 + cai <−> O (a, b) (KSTrans[29])Display inf, tau

aC2O = A

ChannelBuildGateGUI[0] for ChannelBuild[0]

Close Hide

Properties

kca Density Mechanismk ohmic ion current ik (mA/cm2) = g_kca * (v − ek)g = gmax * (0.25*C2 + O) * O2 * O3 Default gmax = 0 (S/cm2)

(0.25*C2 + O): 3 state, 2 transitionsO2: 2 state, 1 transitionsO3’ = aO3*(1 − O3) − bO3*O3

ChannelBuild[0] managed KSChan[0]

Iconify

File Edit Build Tools Graph Vector Window

NEURON Main Menu

Close Hide

Properties

nahh Density Mechanismna ohmic ion current ina (mA/cm2) = g_nahh * (v − ena)g = gmax * m3h1 Default gmax = 0.12 (S/cm2)

m3h1: 8 state, 10 transitions

ChannelBuild[0] managed KSChan[0]

Close Hide

Properties

khh Density Mechanismk ohmic ion current ik (mA/cm2) = g_khh * (v − ek)g = gmax * n4 Default gmax = 0.036 (S/cm2)

n4: 5 state, 4 transitions

ChannelBuild[1] managed KSChan[1]

Close Hide

Properties

leak Density MechanismNonSpecific ohmic ion current i_leak (mA/cm2) = g_leak * (v − e_leak)g = gmax Default gmax = 0.0003 (S/cm2) e = −54.3 (mV)

ChannelBuild[2] managed KSChan[2]

Close Hide

Properties

nahh0 Point Process (Allow Single Channels)na ohmic ion current ina (mA/cm2) = nahh0.g * (v − ena)*(0.01/area)g = gmax * m3h1 Default gmax = 0.12 (uS)

m3h1: 8 state, 10 transitions

ChannelBuild[3] managed KSChan[3]

Close Hide

somapashhnahhkhhleak

SingleCompartment

Close Hide

SelectPointProcess

Show

IClamp[0]at: soma(0.5)

IClamp[0]

del (ms) 0.5

dur (ms) 0.1

amp (nA) 0.3

i (nA) 0

PointProcessManagerClose Hide

0 1 2 3 4 50

0.1

0.2

0.3

0 1 2 3 4 50

0.1

0.2

0.3 nahh0[0].m3h1

Graph Move Text x −0.5 : 5.5 y −0.03 : 0.33

Close Hide

SelectPointProcess

Show

nahh0[0]at: soma(0.5)

nahh0[0]

Nsingle 0

gmax (uS) 0.12

g (uS) 6.816e−08

PointProcessManager

Close Hide

0 1 2 3 4 5

−80

−40

0

40

0 1 2 3 4 5

−80

−40

0

40v(.5)

Graph[0] x −0.5 : 5.5 y −92 : 52

Close Hide

States Transitions Properties

Select hh state or ks transition to change properties

m0h0 m1h0 m2h0 m3h0

m0h1 m1h1 m2h1 m3h1

v v v

v v vv v v v

m3h1m3h1: 8 state, 10 transitions

Power 1

Fractional Conductance

m0h0 fraction 0

m1h0 fraction 0

Adjust Run

−90 −40 10 600

0.20.40.60.8

1

−90 −40 10 600

0.20.40.60.8

1infm0h0m1h0taum0h0m1h0

m0h0 <−> m1h0 (a, b) (KSTrans[14])Display inf, tau

am0h0m1h0 = A*x/(1 − exp(−x)) where x = k*(v − d)

ChannelBuildGateGUI[0] for ChannelBuild[3]

Close Hide

Init (mV) −65

Init & Run

Stop

Continue til (ms) 5

Continue for (ms) 1

Single Step

t (ms) 5

Tstop (ms) 5

dt (ms) 0.025

Points plotted/ms 40

Quiet

Real Time (s) 0.01

RunControl

Close Hide

Print Session select move resize0

1

23

4 567

89

10

11

12

Print & File Window Manager

0 1 2 3 4 50

100

200

300

0 1 2 3 4 50

100

200

300nahh0[0].m3h1

20935 points

1.2 1.3 1.4 1.5250

260

270

280

290

1.2 1.3 1.4 1.5250

260

270

280

290nahh0[0].m3h1

1.32 1.325 1.33 1.335 1.34262

264

266

268

1.32 1.325 1.33 1.335 1.34262

264

266

268nahh0[0].m3h1

Use variable dt

Absolute Tolerance 0.001

Atol Scale Tool Details

soma(0.5)

VmVcIc

Vm

soma(0.5)

cell[0](0.5) cell[1](0.5)

Rgap

axon[0](0.5) axon[1](0.5)

R_ephaptic

soma(0.5)

VmRe2

VxAc

Vc

Ri

Ai

Acmd

synth(0.5)

AI VIc

RI

Re1

Control

eVout

R1

axon[2](0)axon[1](0)

Vm

R2

VC

gap(0.5)

B1 B2

left(0) right(0)

Iconify

File Edit Build Tools Graph Vector Window

NEURON Main Menu

Close Hide

Print Session select move resize0

12

3 4

5

6

Print & File Window Manager

Close Hide

About Topology Subsets Geometry Biophysics Management

Topology refers to section names, connections, and 2d orientation without regard to section length or diameter. Short sections are represented in that tool as circles, longer ones as lines.Subsets allows one to define named section subsets as functional groups for the purpose of specifying membrane properties.Geometry refers to specification of L and diam (microns), and nseg for each section (or subset) in the topology of the cell.Biophysics is used to insert membrane density mechanisms and specify their parameters.Management specifies how to actually bring the cell into existence for simulation. The default is to first build the entire cell and export it to the top level Or else specify it as a cell type for use in networks, It also allows you to import the existing top level cell into this builder for modification.If "Continuous Create" is checked, the spec is continuously instantiated at the top level as it is changed.

CellBuild[0]

Close Hide

PlotWhat?

0 1 2 3 4 5

−100

−50

0

50

0 1 2 3 4 5

−100

−50

0

50Vm (mV)Vout (mV)

LincirGraph[0] for LinearCircuit[0]

Close Hide

PlotWhat?

0 1 2 3 4 5

−450

−250

−50

150

350

0 1 2 3 4 5

−450

−250

−50

150

350 control I (nA)

LincirGraph[1] for LinearCircuit[0]

Close Hide

control

e

Vout

R1Vc

R2

axon[1](1)axon[1](0)

Vm

ArrangeLabelParametersSimulate

Parameters

Source f(t)

Initial Conditions

States

New Graph

Name map

Hints

LinearCircuit[0]

Close Hide

Init (mV) −65

Init & Run

Stop

Continue til (ms) 5

Continue for (ms) 1

Single Step

t (ms) 5

Tstop (ms) 5

dt (ms) 0.025

Points plotted/ms 40

Scrn update invl (s) 0.05

Real Time (s) 0.02

RunControl

0 1 2 3 4 5

−80

−40

0

40

mV

ms

new NetCon(src, target).threshold.delay.weight

g vg

v

NEURON { POINT_PROCESS ExpSyn RANGE tau, e, i NONSPECIFIC_CURRENT i}

...declarations...

INITIAL { g = 0 }

CHANNEL { SOLVE state METHOD cnexp i = g*(v − e)}

DERIVATIVE state { g’ = −g/tau}

NET_RECEIVE(w) { g = g + w}

0 20 40 60 80 1000

0.2

0.4

0.6

0.8

1

S1

C

m

S2

NEURON { ARTIFICIAL_CELL IntFire RANGE tau, m}

...declarations...

INITIAL { m = 0 t0 = t }

NET_RECEIVE (w) { m = m*exp(−(t − t0)/tau) t0 = t m = m + w if (m > 1) { net_event(t) m = 0 }}

0 20 40 60 80 1000

0.2

0.4

0.6

0.8

1

NET_RECEIVE (w) { m = minf + (m − minf)*exp(−(t − t0)/tau) t0 = t if (flag == 0) { m = m + w if (m > 1) { m = 0 net_event(t) } net_move(t+firetime()) }else{ net_event(t) m = 0 net_send(firetime(), 1) }}

FUNCTION firetime() { : m < 1 < minf firetime = tau*log((minf−m)/(minf − 1))}

: dm/dt = (minf − m)/tau: input event adds w to m: when m = 1, or event: makes m >= 1, cell fires: minf is calculated so: that the natural interval: between spikes is invl

INITIAL { minf = 1/(1 − exp(−invl/tau)) m = 0 t0 = t net_send(firetime(), 1)}

0 100 200 300 400 5000

10

20

30

40

0 100 200 300 400 5000

10

20

30

40Cell[39]Cell[38]Cell[37]Cell[36]Cell[35]Cell[34]Cell[33]Cell[32]Cell[31]Cell[30]Cell[29]Cell[28]Cell[27]Cell[26]Cell[25]Cell[24]Cell[23]Cell[22]Cell[21]Cell[20]Cell[19]Cell[18]Cell[17]Cell[16]Cell[15]Cell[14]Cell[13]Cell[12]Cell[11]Cell[10]Cell[9]Cell[8]Cell[7]Cell[6]

Number of all to all cells 40

All to all connection weight 0

Delay (ms) 0

Cell time constant (ms) 10

Lowest natural interval 10

Highest natural interval 15

0 100 200 300 400 5000

10

20

30

40

0 100 200 300 400 5000

10

20

30

40Cell[39]Cell[38]Cell[37]Cell[36]Cell[35]Cell[34]Cell[33]Cell[32]Cell[31]Cell[30]Cell[29]Cell[28]Cell[27]Cell[26]Cell[25]Cell[24]Cell[23]Cell[22]Cell[21]Cell[20]Cell[19]Cell[18]Cell[17]Cell[16]Cell[15]Cell[14]Cell[13]Cell[12]Cell[11]Cell[10]Cell[9]Cell[8]Cell[7]Cell[6]

Number of all to all cells 40

All to all connection weight −0.05

Delay (ms) 0

Cell time constant (ms) 10

Lowest natural interval 10

Highest natural interval 15

0 100 200 300 400 5000

10

20

30

40

0 100 200 300 400 5000

10

20

30

40Cell[39]Cell[38]Cell[37]Cell[36]Cell[35]Cell[34]Cell[33]Cell[32]Cell[31]Cell[30]Cell[29]Cell[28]Cell[27]Cell[26]Cell[25]Cell[24]Cell[23]Cell[22]Cell[21]Cell[20]Cell[19]Cell[18]Cell[17]Cell[16]Cell[15]Cell[14]Cell[13]Cell[12]Cell[11]Cell[10]Cell[9]Cell[8]Cell[7]Cell[6]

Number of all to all cells 40

All to all connection weight −0.05

Delay (ms) 9

Cell time constant (ms) 10

Lowest natural interval 10

Highest natural interval 15

200 220 240 260 280 300

−1

−0.5

0

0.5

1

200 220 240 260 280 300

−1

−0.5

0

0.5

1

IntervalFire[0].M

IntervalFire[39].MIntervalFire[20].M

Iconify

File Edit Build Tools Graph Vector Window

NEURON Main Menu

Close Hide

0 1000 2000 3000 4000 50000

50

100

150

0 1000 2000 3000 4000 50000

50

100

150sim

Graph x −500.025 : 5500.27 y −15.9 : 174.9Close Hide

0 1000 2000 3000 4000 5000

−110

−70

−30

10

50

0 1000 2000 3000 4000 5000

−110

−70

−30

10

50NRN[20].soma.v(0.5)

Graph x −500.025 : 5500.27 y −133.026 : 76.3759

Close Hide

Print Session select move resize

0

1

2 3

0

2 3

Print & File Window Manager