chans

package
v1.0.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2023 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package chans provides standard neural conductance channels for computing a point-neuron approximation based on the standard equivalent RC circuit model of a neuron (i.e., basic Ohms law equations). Includes excitatory, leak, inhibition, and dynamic potassium channels.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VFmBio

func VFmBio(vm float32) float32

VFmBio returns normalized 0-1 voltage from biological mV voltage where 0 = -100mV and 1 = 0mV

func VToBio

func VToBio(vm float32) float32

VToBio returns biological mV voltage from normalized 0-1 voltage where 0 = -100mV and 1 = 0mV

Types

type AKParams

type AKParams struct {

	// [def: 1,0.1,0.01] strength of AK current
	Gbar float32 `def:"1,0.1,0.01" desc:"strength of AK current"`

	// [def: 0.01446,02039] multiplier for the beta term; 0.01446 for distal, 0.02039 for proximal dendrites
	Beta float32 `def:"0.01446,02039" desc:"multiplier for the beta term; 0.01446 for distal, 0.02039 for proximal dendrites"`

	// [def: 0.5,0.25] Dm factor: 0.5 for distal, 0.25 for proximal
	Dm float32 `def:"0.5,0.25" desc:"Dm factor: 0.5 for distal, 0.25 for proximal"`

	// [def: 1.8,1.5] offset for K, 1.8 for distal, 1.5 for proximal
	Koff float32 `def:"1.8,1.5" desc:"offset for K, 1.8 for distal, 1.5 for proximal"`

	// [def: 1,11] voltage offset for alpha and beta functions: 1 for distal, 11 for proximal
	Voff float32 `def:"1,11" desc:"voltage offset for alpha and beta functions: 1 for distal, 11 for proximal"`

	// [def: 0.1133,0.1112] h multiplier factor, 0.1133 for distal, 0.1112 for proximal
	Hf float32 `def:"0.1133,0.1112" desc:"h multiplier factor, 0.1133 for distal, 0.1112 for proximal"`
	// contains filtered or unexported fields
}

AKParams control an A-type K channel, which is voltage gated with maximal activation around -37 mV. It has two state variables, M (v-gated opening) and H (v-gated closing), which integrate with fast and slow time constants, respectively. H relatively quickly hits an asymptotic level of inactivation for sustained activity patterns. It is particularly important for counteracting the excitatory effects of voltage gated calcium channels which can otherwise drive runaway excitatory currents. See AKsParams for a much simpler version that works fine when full AP-like spikes are not simulated, as in our standard axon models.

func (*AKParams) AlphaFmVK

func (ap *AKParams) AlphaFmVK(vbio, k float32) float32

AlphaFmVK returns the Alpha function from vbio (not normalized, must not exceed 0)

func (*AKParams) BetaFmVK

func (ap *AKParams) BetaFmVK(vbio, k float32) float32

BetaFmVK returns the Beta function from vbio (not normalized, must not exceed 0)

func (*AKParams) DMHFmV

func (ap *AKParams) DMHFmV(v, m, h float32) (float32, float32)

DMHFmV returns the change at msec update scale in M, H factors as a function of V normalized (0-1)

func (*AKParams) Defaults

func (ap *AKParams) Defaults()

Defaults sets the parameters for distal dendrites

func (*AKParams) Distal

func (ap *AKParams) Distal()

Distal sets the parameters for distal dendrites

func (*AKParams) Gak

func (ap *AKParams) Gak(m, h float32) float32

Gak returns the AK net conductance from m, h gates

func (*AKParams) HFmV

func (ap *AKParams) HFmV(vbio float32) float32

HFmV returns the H gate value from vbio (not normalized, must not exceed 0)

func (*AKParams) HTauFmV

func (ap *AKParams) HTauFmV(vbio float32) float32

HTauFmV returns the HTau rate constant in msec from vbio (not normalized, must not exceed 0)

func (*AKParams) KFmV

func (ap *AKParams) KFmV(vbio float32) float32

KFmV returns the K value from vbio (not normalized, must not exceed 0)

func (*AKParams) MFmAlpha

func (ap *AKParams) MFmAlpha(alpha float32) float32

MFmAlpha returns the M gate factor from alpha

func (*AKParams) MTauFmAlphaBeta

func (ap *AKParams) MTauFmAlphaBeta(alpha, beta float32) float32

MTauFmAlphaBeta returns the MTau rate constant in msec from alpha, beta

func (*AKParams) Proximal

func (ap *AKParams) Proximal()

Proximal sets parameters for proximal dendrites

func (*AKParams) Update

func (ap *AKParams) Update()

type AKsParams

type AKsParams struct {

	// [def: 2,0.1,0.01] strength of AK current
	Gbar float32 `def:"2,0.1,0.01" desc:"strength of AK current"`

	// [def: 0.076] H factor as a constant multiplier on overall M factor result -- rescales M to level consistent with H being present at full strength
	Hf float32 `` /* 151-byte string literal not displayed */

	// [def: 0.075] multiplier for M -- determines slope of function
	Mf float32 `def:"0.075" desc:"multiplier for M -- determines slope of function"`

	// [def: 2] voltage offset in biological units for M function
	Voff float32 `def:"2" desc:"voltage offset in biological units for M function"`
	Vmax float32 `def:-37" desc:"voltage level of maximum channel opening -- stays flat above that"`
	// contains filtered or unexported fields
}

AKsParams provides a highly simplified stateless A-type K channel that only has the voltage-gated activation (M) dynamic with a cutoff that ends up capturing a close approximation to the much more complex AK function. This is voltage gated with maximal activation around -37 mV. It is particularly important for counteracting the excitatory effects of voltage gated calcium channels which can otherwise drive runaway excitatory currents.

func (*AKsParams) Defaults

func (ap *AKsParams) Defaults()

Defaults sets the parameters for distal dendrites

func (*AKsParams) Gak

func (ap *AKsParams) Gak(v float32) float32

Gak returns the conductance as a function of normalized Vm GBar * MFmVnorm(v)

func (*AKsParams) MFmV

func (ap *AKsParams) MFmV(vbio float32) float32

MFmV returns the M gate function from vbio

func (*AKsParams) MFmVnorm

func (ap *AKsParams) MFmVnorm(v float32) float32

MFmVnorm returns the M gate function from vnorm

func (*AKsParams) Update

func (ap *AKsParams) Update()

type Chans

type Chans struct {

	// excitatory sodium (Na) AMPA channels activated by synaptic glutamate
	E float32 `desc:"excitatory sodium (Na) AMPA channels activated by synaptic glutamate"`

	// constant leak (potassium, K+) channels -- determines resting potential (typically higher than resting potential of K)
	L float32 `desc:"constant leak (potassium, K+) channels -- determines resting potential (typically higher than resting potential of K)"`

	// inhibitory chloride (Cl-) channels activated by synaptic GABA
	I float32 `desc:"inhibitory chloride (Cl-) channels activated by synaptic GABA"`

	// gated / active potassium channels -- typically hyperpolarizing relative to leak / rest
	K float32 `desc:"gated / active potassium channels -- typically hyperpolarizing relative to leak / rest"`
}

Chans are ion channels used in computing point-neuron activation function

func (*Chans) SetAll

func (ch *Chans) SetAll(e, l, i, k float32)

SetAll sets all the values

func (*Chans) SetFmMinusOther

func (ch *Chans) SetFmMinusOther(minus float32, oth Chans)

SetFmMinusOther sets all the values from given value minus other Chans

func (*Chans) SetFmOtherMinus

func (ch *Chans) SetFmOtherMinus(oth Chans, minus float32)

SetFmOtherMinus sets all the values from other Chans minus given value

type GABABParams

type GABABParams struct {

	// [def: 0,0.2,0.25,0.3,0.4] overall strength multiplier of GABA-B current
	Gbar float32 `def:"0,0.2,0.25,0.3,0.4" desc:"overall strength multiplier of GABA-B current"`

	// [def: 45] rise time for bi-exponential time dynamics of GABA-B
	RiseTau float32 `def:"45" desc:"rise time for bi-exponential time dynamics of GABA-B"`

	// [def: 50] decay time for bi-exponential time dynamics of GABA-B
	DecayTau float32 `def:"50" desc:"decay time for bi-exponential time dynamics of GABA-B"`

	// [def: 0.2] baseline level of GABA-B channels open independent of inhibitory input (is added to spiking-produced conductance)
	Gbase float32 `` /* 130-byte string literal not displayed */

	// [def: 10] multiplier for converting Gi to equivalent GABA spikes
	GiSpike float32 `def:"10" desc:"multiplier for converting Gi to equivalent GABA spikes"`

	// time offset when peak conductance occurs, in msec, computed from RiseTau and DecayTau
	MaxTime float32 `inactive:"+" desc:"time offset when peak conductance occurs, in msec, computed from RiseTau and DecayTau"`

	// [view: -] time constant factor used in integration: (Decay / Rise) ^ (Rise / (Decay - Rise))
	TauFact float32 `view:"-" desc:"time constant factor used in integration: (Decay / Rise) ^ (Rise / (Decay - Rise))"`
	// contains filtered or unexported fields
}

GABABParams control the GABAB dynamics in PFC Maint neurons, based on Brunel & Wang (2001) parameters.

func (*GABABParams) DG

func (gp *GABABParams) DG(g, x float32) float32

DG returns dG delta for g

func (*GABABParams) DX

func (gp *GABABParams) DX(x float32) float32

DX returns dX delta for x

func (*GABABParams) Defaults

func (gp *GABABParams) Defaults()

func (*GABABParams) GFmGX

func (gp *GABABParams) GFmGX(gabaB, gabaBx float32) float32

GFmGX returns the updated GABA-B / GIRK conductance based on current values and gi inhibitory conductance (proxy for GABA spikes)

func (*GABABParams) GFmS

func (gp *GABABParams) GFmS(s float32) float32

GFmS returns the GABA-B conductance as a function of GABA spiking rate, based on normalized spiking factor (i.e., Gi from FFFB etc)

func (*GABABParams) GFmV

func (gp *GABABParams) GFmV(v float32) float32

GFmV returns the GABA-B conductance as a function of normalized membrane potential

func (*GABABParams) GgabaB

func (gp *GABABParams) GgabaB(gabaB, vm float32) float32

GgabaB returns the overall net GABAB / GIRK conductance including Gbar, Gbase, and voltage-gating

func (*GABABParams) Update

func (gp *GABABParams) Update()

func (*GABABParams) XFmGiX

func (gp *GABABParams) XFmGiX(gabaBx, gi float32) float32

XFmGiX returns the updated GABA-B x value based on current values and gi inhibitory conductance (proxy for GABA spikes)

type KNaMedSlow

type KNaMedSlow struct {

	// if On, apply K-Na adaptation
	On slbool.Bool `desc:"if On, apply K-Na adaptation"`

	// [view: inline] medium time-scale adaptation
	Med KNaParams `view:"inline" desc:"medium time-scale adaptation"`

	// [view: inline] slow time-scale adaptation
	Slow KNaParams `view:"inline" desc:"slow time-scale adaptation"`
	// contains filtered or unexported fields
}

KNaMedSlow describes sodium-gated potassium channel adaptation mechanism. Evidence supports 2 different time constants: Slick (medium) and Slack (slow)

func (*KNaMedSlow) Defaults

func (ka *KNaMedSlow) Defaults()

func (*KNaMedSlow) GcFmSpike

func (ka *KNaMedSlow) GcFmSpike(gKNaM, gKNaS *float32, spike bool)

GcFmSpike updates med, slow time scales of KNa adaptation from spiking

func (*KNaMedSlow) Update

func (ka *KNaMedSlow) Update()

type KNaParams

type KNaParams struct {

	// if On, use this component of K-Na adaptation
	On slbool.Bool `desc:"if On, use this component of K-Na adaptation"`

	// [viewif: On] Rise rate of fast time-scale adaptation as function of Na concentration due to spiking -- directly multiplies -- 1/rise = tau for rise rate
	Rise float32 `` /* 158-byte string literal not displayed */

	// [viewif: On] Maximum potential conductance of fast K channels -- divide nA biological value by 10 for the normalized units here
	Max float32 `` /* 133-byte string literal not displayed */

	// [viewif: On] time constant in cycles for decay of adaptation, which should be milliseconds typically (tau is roughly how long it takes for value to change significantly -- 1.4x the half-life)
	Tau float32 `` /* 197-byte string literal not displayed */

	// [view: -] 1/Tau rate constant
	Dt float32 `view:"-" desc:"1/Tau rate constant"`
	// contains filtered or unexported fields
}

KNaParams implements sodium (Na) gated potassium (K) currents that drive adaptation (accommodation) in neural firing. As neurons spike, driving an influx of Na, this activates the K channels, which, like leak channels, pull the membrane potential back down toward rest (or even below).

func (*KNaParams) Defaults

func (ka *KNaParams) Defaults()

func (*KNaParams) GcFmSpike

func (ka *KNaParams) GcFmSpike(gKNa *float32, spike bool)

GcFmSpike updates the KNa conductance based on spike or not

func (*KNaParams) Update

func (ka *KNaParams) Update()

type MahpParams

type MahpParams struct {

	// strength of mAHP current
	Gbar float32 `desc:"strength of mAHP current"`

	// [def: -30] voltage offset (threshold) in biological units for infinite time N gating function -- where the gate is at 50% strength
	Voff float32 `` /* 136-byte string literal not displayed */

	// [def: 9] slope of the arget (infinite time) gating function
	Vslope float32 `def:"9" desc:"slope of the arget (infinite time) gating function"`

	// [def: 1000] maximum slow rate time constant in msec for activation / deactivation.  The effective Tau is much slower -- 1/20th in original temp, and 1/60th in standard 37 C temp
	TauMax float32 `` /* 183-byte string literal not displayed */

	// [view: -] temperature adjustment factor: assume temp = 37 C, whereas original units were at 23 C
	Tadj float32 `view:"-" inactive:"+" desc:"temperature adjustment factor: assume temp = 37 C, whereas original units were at 23 C"`

	// [view: -] 1/Tau
	DtMax float32 `view:"-" inactive:"+" desc:"1/Tau"`
	// contains filtered or unexported fields
}

MahpParams implements an M-type medium afterhyperpolarizing (mAHP) channel, where m also stands for muscarinic due to the ACh inactivation of this channel. It has a slow activation and deactivation time constant, and opens at a lowish membrane potential. There is one gating variable n updated over time with a tau that is also voltage dependent. The infinite-time value of n is voltage dependent according to a logistic function of the membrane potential, centered at Voff with slope Vslope.

func (*MahpParams) DNFmV

func (mp *MahpParams) DNFmV(v, n float32) float32

DNFmV returns the change in gating factor N based on normalized Vm

func (*MahpParams) Defaults

func (mp *MahpParams) Defaults()

Defaults sets the parameters

func (*MahpParams) EFun

func (mp *MahpParams) EFun(z float32) float32

EFun handles singularities in an elegant way -- from Mainen impl

func (*MahpParams) GmAHP

func (mp *MahpParams) GmAHP(n float32) float32

GmAHP returns the conductance as a function of n

func (*MahpParams) NinfTauFmV

func (mp *MahpParams) NinfTauFmV(vbio float32, ninf, tau *float32)

NinfTauFmV returns the target infinite-time N gate value and voltage-dependent time constant tau, from vbio

func (*MahpParams) NinfTauFmVnorm

func (mp *MahpParams) NinfTauFmVnorm(v float32, ninf, tau *float32)

NinfTauFmVnorm returns the target infinite-time N gate value and voltage-dependent time constant tau, from normalized vm

func (*MahpParams) Update

func (mp *MahpParams) Update()

type NMDAParams

type NMDAParams struct {

	// [def: 0,0.15,0.25,0.3,1.4] overall multiplier for strength of NMDA current -- multiplies GnmdaSyn to get net conductance.  0.15 standard for SnmdaDeplete = false, 1.4 when on.
	Gbar float32 `` /* 181-byte string literal not displayed */

	// [def: 30,50,100,200,300] decay time constant for NMDA channel activation  -- rise time is 2 msec and not worth extra effort for biexponential.  30 fits the Urakubo et al (2008) model with ITau = 100, but 100 works better in practice is small networks so far.
	Tau float32 `` /* 264-byte string literal not displayed */

	// [def: 1,100] decay time constant for NMDA channel inhibition, which captures the Urakubo et al (2008) allosteric dynamics (100 fits their model well) -- set to 1 to eliminate that mechanism.
	ITau float32 `` /* 196-byte string literal not displayed */

	// [def: 1:1.5] magnesium ion concentration: Brunel & Wang (2001) and Sanders et al (2013) use 1 mM, based on Jahr & Stevens (1990). Urakubo et al (2008) use 1.5 mM. 1.4 with Voff = 5 works best so far in large models, 1.2, Voff = 0 best in smaller nets.
	MgC float32 `` /* 257-byte string literal not displayed */

	// [def: 0,5] offset in membrane potential in biological units for voltage-dependent functions.  5 corresponds to the -65 mV rest, -45 threshold of the Urakubo et al (2008) model.  0 is best in small models
	Voff float32 `` /* 209-byte string literal not displayed */

	// [view: -] rate = 1 / tau
	Dt float32 `view:"-" json:"-" xml:"-" desc:"rate = 1 / tau"`

	// [view: -] rate = 1 / tau
	IDt float32 `view:"-" json:"-" xml:"-" desc:"rate = 1 / tau"`

	// [view: -] MgFact = MgC / 3.57
	MgFact float32 `view:"-" json:"-" xml:"-" desc:"MgFact = MgC / 3.57"`
}

NMDAParams control the NMDA dynamics, based on Jahr & Stevens (1990) equations which are widely used in models, from Brunel & Wang (2001) to Sanders et al. (2013). The overall conductance is a function of a voltage-dependent postsynaptic factor based on Mg ion blockage, and presynaptic Glu-based opening, which in a simple model just increments

func (*NMDAParams) CaFmV

func (np *NMDAParams) CaFmV(v float32) float32

CaFmV returns the calcium current factor as a function of normalized membrane potential -- this factor is needed for computing the calcium current * MgGFmV

func (*NMDAParams) CaFmVbio

func (np *NMDAParams) CaFmVbio(vbio float32) float32

CaFmVbio returns the calcium current factor as a function of biological membrane potential -- this factor is needed for computing the calcium current * MgGFmV. This is the same function used in VGCC for their conductance factor.

func (*NMDAParams) Defaults

func (np *NMDAParams) Defaults()

func (*NMDAParams) Gnmda

func (np *NMDAParams) Gnmda(nmda, vm float32) float32

Gnmda returns the NMDA net conductance from nmda Glu binding and Vm including the GBar factor

func (*NMDAParams) MgGFmV

func (np *NMDAParams) MgGFmV(v float32) float32

MgGFmV returns the NMDA conductance as a function of normalized membrane potential based on Mg ion blocking

func (*NMDAParams) MgGFmVbio

func (np *NMDAParams) MgGFmVbio(vbio float32) float32

MgGFmVbio returns the NMDA conductance as a function of biological membrane potential based on Mg ion blocking

func (*NMDAParams) NMDASyn

func (np *NMDAParams) NMDASyn(nmda, raw float32) float32

NMDASyn returns the updated synaptic NMDA Glu binding based on new raw spike-driven Glu binding.

func (*NMDAParams) SnmdaFmSpike

func (np *NMDAParams) SnmdaFmSpike(spike float32, snmdaO, snmdaI *float32)

SnmdaFmSpike updates sender-based NMDA channel opening based on neural spiking using the inhibition and decay factors. These dynamics closely match the Urakubo et al (2008) allosteric NMDA receptor behavior, with ITau = 100, Tau = 30

func (*NMDAParams) Update

func (np *NMDAParams) Update()

type SahpParams

type SahpParams struct {

	// [def: 0.05,0.1] strength of sAHP current
	Gbar float32 `def:"0.05,0.1" desc:"strength of sAHP current"`

	// [def: 5,10] time constant for integrating Ca across theta cycles
	CaTau float32 `def:"5,10" desc:"time constant for integrating Ca across theta cycles"`

	// [def: 0.8] integrated Ca offset (threshold) for infinite time N gating function -- where the gate is at 50% strength
	Off float32 `def:"0.8" desc:"integrated Ca offset (threshold) for infinite time N gating function -- where the gate is at 50% strength"`

	// [def: 0.02] slope of the infinite time logistic gating function
	Slope float32 `def:"0.02" desc:"slope of the infinite time logistic gating function"`

	// [def: 1] maximum slow rate time constant in msec for activation / deactivation.  The effective Tau is much slower -- 1/20th in original temp, and 1/60th in standard 37 C temp
	TauMax float32 `` /* 180-byte string literal not displayed */

	// [view: -] 1/Tau
	CaDt float32 `view:"-" inactive:"+" desc:"1/Tau"`

	// [view: -] 1/Tau
	DtMax float32 `view:"-" inactive:"+" desc:"1/Tau"`
	// contains filtered or unexported fields
}

SahpParams implements a slow afterhyperpolarizing (sAHP) channel, It has a slowly accumulating calcium value, aggregated at the theta cycle level, that then drives the logistic gating function, so that it only activates after a significant accumulation. After which point it decays. For the theta-cycle updating, the normal m-type tau is all within the scope of a single theta cycle, so we just omit the time integration of the n gating value, but tau is computed in any case.

func (*SahpParams) CaInt

func (mp *SahpParams) CaInt(caInt, ca float32) float32

CaInt returns the updated time-integrated Ca value from current value and current Ca

func (*SahpParams) DNFmV

func (mp *SahpParams) DNFmV(ca, n float32) float32

DNFmCa returns the change in gating factor N based on integrated Ca Omit this and just use ninf directly for theta-cycle updating.

func (*SahpParams) Defaults

func (mp *SahpParams) Defaults()

Defaults sets the parameters

func (*SahpParams) EFun

func (mp *SahpParams) EFun(z float32) float32

EFun handles singularities in an elegant way -- from Mainen impl

func (*SahpParams) GsAHP

func (mp *SahpParams) GsAHP(n float32) float32

GsAHP returns the conductance as a function of n

func (*SahpParams) NinfTauFmCa

func (mp *SahpParams) NinfTauFmCa(ca float32, ninf, tau *float32)

NinfTauFmCa returns the target infinite-time N gate value and time constant tau, from integrated Ca value

func (*SahpParams) Update

func (mp *SahpParams) Update()

type VGCCParams

type VGCCParams struct {

	// [def: 0.02,0.12] strength of VGCC current -- 0.12 value is from Urakubo et al (2008) model -- best fits actual model behavior using axon equations (1.5 nominal in that model), 0.02 works better in practice for not getting stuck in high plateau firing
	Gbar float32 `` /* 256-byte string literal not displayed */

	// [def: 25] calcium from conductance factor -- important for learning contribution of VGCC
	Ca float32 `def:"25" desc:"calcium from conductance factor -- important for learning contribution of VGCC"`
	// contains filtered or unexported fields
}

VGCCParams control the standard L-type Ca channel

func (*VGCCParams) CaFmG

func (np *VGCCParams) CaFmG(v, g, ca float32) float32

CaFmG returns the Ca from Gvgcc conductance, current Ca level, and normalized membrane potential.

func (*VGCCParams) DMHFmV

func (np *VGCCParams) DMHFmV(v, m, h float32, dm, dh *float32)

DMHFmV returns the change at msec update scale in M, H factors as a function of V normalized (0-1)

func (*VGCCParams) Defaults

func (np *VGCCParams) Defaults()

func (*VGCCParams) GFmV

func (np *VGCCParams) GFmV(v float32) float32

GFmV returns the VGCC conductance as a function of normalized membrane potential

func (*VGCCParams) Gvgcc

func (np *VGCCParams) Gvgcc(vm, m, h float32) float32

Gvgcc returns the VGCC net conductance from m, h activation and vm

func (*VGCCParams) HFmV

func (np *VGCCParams) HFmV(vbio float32) float32

HFmV returns the H gate function from vbio (not normalized, must not exceed 0)

func (*VGCCParams) MFmV

func (np *VGCCParams) MFmV(vbio float32) float32

MFmV returns the M gate function from vbio (not normalized, must not exceed 0)

func (*VGCCParams) Update

func (np *VGCCParams) Update()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL