Brian is a simulator for spiking neural networks available on almost all platforms. The motivation for this project is that a simulator should not only save the time of processors, but also the time of scientists.
Brian is easy to learn and use, highly flexible and easily extensible. The Brian package itself and simulations using it are all written in the Python programming language, which is an easy, concise and highly developed language with many advanced features and development tools, excellent documentation and a large community of users providing support and extension packages.
The following code defines a randomly connected network of integrate and fire neurons with exponential inhibitory and excitatory currents, runs the simulation and makes the raster plot on the right.
from brian2 import * eqs = ''' dv/dt = (ge+gi-(v+49*mV))/(20*ms) : volt dge/dt = -ge/(5*ms) : volt dgi/dt = -gi/(10*ms) : volt ''' P = NeuronGroup(4000, eqs, threshold='v>-50*mV', reset='v=-60*mV') P.v = -60*mV Pe = P[:3200] Pi = P[3200:] Ce = Synapses(Pe, P, pre='ge+=1.62*mV') Ce.connect(True, p=0.02) Ci = Synapses(Pi, P, pre='gi-=9*mV') Ci.connect(True, p=0.02) M = SpikeMonitor(P) run(1*second) plot(M.t/ms, M.i, '.') show()
See the manuals for more examples.
Brian is currently available in two versions, the stable version Brian 1.x (this website mostly refers to it when talking about “Brian” in general) and Brian 2, currently in development. We’d recommend new users to directly start using Brian 2, see the downloads page for details how to get it.
How to cite Brian: if you use Brian for your published research, we suggest that you cite one of our introductory articles: (1) Goodman DF and Brette R (2009). The Brian simulator. Front Neurosci doi:10.3389/neuro.01.026.2009; or (2) Stimberg M, Goodman DFM, Benichoux V, Brette R (2014). Equation-oriented specification of neural models for simulations. Frontiers Neuroinf, doi: 10.3389/fninf.2014.00006. You can also download our logo for posters and presentations.