AsymmetryGapJunction

AsymmetryGapJunction#

class brainpy.state.AsymmetryGapJunction(pre, pre_state, post, post_state, conn, weight, param_type=<class 'brainstate.ParamState'>)#

Implements an asymmetric electrical coupling (gap junction) between neuron populations.

This class represents electrical synapses where the conductance in one direction can differ from the conductance in the opposite direction. Unlike chemical synapses, gap junctions allow bidirectional flow of electrical current directly between neurons, with the current magnitude proportional to the voltage difference between connected neurons.

Parameters:
  • pre (Dynamics) – The pre-synaptic neuron group dynamics object.

  • pre_state (str) – Name of the state variable in pre-synaptic neurons (typically membrane potential).

  • post (Dynamics) – The post-synaptic neuron group dynamics object.

  • post_state (str) – Name of the state variable in post-synaptic neurons (typically membrane potential).

  • conn (Callable) – Connection function that returns pre_ids and post_ids arrays defining connections.

  • weight (Union[Callable, ArrayLike]) – Conductance weights for the gap junctions. Must have shape […, 2] where the last dimension contains [pre_weight, post_weight] for each connection, defining potentially different conductances in each direction.

  • param_type (type, optional) – The parameter state type to use for weights, defaults to ParamState.

See also

SymmetryGapJunction

For gap junctions with identical conductance in both directions.

Notes

The asymmetric gap junction allows for different conductances in each direction between the same pair of neurons. This can model rectifying electrical synapses that preferentially allow current to flow in one direction.

References

Examples

>>> import brainpy.state as brainpy
>>> import saiunit as u
>>> import numpy as np
>>>
>>> # Create two neuron populations
>>> n_neurons = 100
>>> pre_pop = brainpy.LIF(n_neurons, V_rest=-70*u.mV, V_threshold=-50*u.mV)
>>> post_pop = brainpy.LIF(n_neurons, V_rest=-70*u.mV, V_threshold=-50*u.mV)
>>> pre_pop.init_state()
>>> post_pop.init_state()
>>>
>>> # Create asymmetric gap junction with different weights in each direction
>>> weights = np.ones((n_neurons, 2)) * u.nS
>>> weights[:, 0] *= 2.0  # Double weight in pre->post direction
>>>
>>> gap_junction = brainpy.AsymmetryGapJunction(
...     pre=pre_pop,
...     pre_state='V',
...     post=post_pop,
...     post_state='V',
...     conn=one_to_one,
...     weight=weights
... )