GABAa

Contents

GABAa#

class brainpy.dyn.GABAa(size, keep_size=False, sharding=None, method='exp_auto', name=None, mode=None, alpha=0.53, beta=0.18, T=1.0, T_dur=1.0)[source]#

GABAa synapse model.

Model Descriptions

GABAa synapse model has the same equation with the AMPA synapse,

\[\begin{split}\frac{d g}{d t}&=\alpha[T](1-g) - \beta g \\ I_{syn}&= - g_{max} g (V - E)\end{split}\]

but with the difference of:

  • Reversal potential of synapse \(E\) is usually low, typically -80. mV

  • Activating rate constant \(\alpha=0.53\)

  • De-activating rate constant \(\beta=0.18\)

  • Transmitter concentration \([T]=1\,\mu ho(\mu S)\) when synapse is triggered by a pre-synaptic spike, with the duration of 1. ms.

This module can be used with interface brainpy.dyn.ProjAlignPreMg2, as shown in the following example:

import numpy as np
import brainpy as bp
import brainpy.math as bm

import matplotlib.pyplot as plt

class GABAa(bp.Projection):
    def __init__(self, pre, post, delay, prob, g_max, E=-80.):
        super().__init__()
        self.proj = bp.dyn.ProjAlignPreMg2(
            pre=pre,
            delay=delay,
            syn=bp.dyn.GABAa.desc(pre.num, alpha=0.53, beta=0.18, T=1.0, T_dur=1.0),
            comm=bp.dnn.CSRLinear(bp.conn.FixedProb(prob, pre=pre.num, post=post.num), g_max),
            out=bp.dyn.COBA(E=E),
            post=post,
        )


class SimpleNet(bp.DynSysGroup):
    def __init__(self, E=0.):
        super().__init__()

        self.pre = bp.dyn.SpikeTimeGroup(1, indices=(0, 0, 0, 0), times=(10., 30., 50., 70.))
        self.post = bp.dyn.LifRef(1, V_rest=-60., V_th=-50., V_reset=-60., tau=20., tau_ref=5.,
                                  V_initializer=bp.init.Constant(-60.))
        self.syn = AMPA(self.pre, self.post, delay=None, prob=1., g_max=1., E=E)

    def update(self):
        self.pre()
        self.syn()
        self.post()

        # monitor the following variables
        conductance = self.syn.proj.refs['syn'].g
        current = self.post.sum_inputs(self.post.V)
        return conductance, current, self.post.V


indices = np.arange(1000)  # 100 ms, dt= 0.1 ms
conductances, currents, potentials = bm.for_loop(SimpleNet(E=0.).step_run, indices, progress_bar=True)
ts = indices * bm.get_dt()

fig, gs = bp.visualize.get_figure(1, 3, 3.5, 4)
fig.add_subplot(gs[0, 0])
plt.plot(ts, conductances)
plt.title('Syn conductance')
fig.add_subplot(gs[0, 1])
plt.plot(ts, currents)
plt.title('Syn current')
fig.add_subplot(gs[0, 2])
plt.plot(ts, potentials)
plt.title('Post V')
plt.show()
Parameters: