Brian is an open source Python package for developing simulations of networks of spiking neurons. It is being developed by Romain Brette and Dan Goodman at the École Normale Supérieure in Paris.
Brian is aimed at researchers developing models based on networks of spiking neurons. The design is aimed at minimizing users' development time, with execution speed a secondary goal. Users specify neuron models by giving their differential equations in standard mathematical form, create groups of neurons and connect them via synapses. The intent is to make the process as flexible as possible, so that researchers are not restricted to using neuron models already built in to the simulator. The entire simulator is written in Python, using the NumPy and SciPy numerical and scientific computing packages. Parts of the simulator can optionally be run using C code generated on the fly. Computationally, Brian uses vectorization techniques, so that for large numbers of neurons, execution speed is of the same order of magnitude as C code.
The following code defines, runs and plots a randomly connected network of leaky integrate and fire neurons with exponential inhibitory and excitatory currents.
Sample raster plot from randomly connected network of integrate and fire neurons with exponential inhibitory and excitatory currents.
from brian 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=-50*mV, reset=-60*mV)
P.v = -60*mV
Pe = P.subgroup(3200)
Pi = P.subgroup(800)
Ce = Connection(Pe, P, 'ge', weight=1.62*mV, sparseness=0.02)
Ci = Connection(Pi, P, 'gi', weight=-9*mV, sparseness=0.02)
M = SpikeMonitor(P)
 Comparison to other simulators
Brian is primarily aimed at single compartmental model neurons. Simulators focused on multi-compartmental models include Neuron, GENESIS, and its derivatives.
Another similar simulator is NEST.
 External links