Synapse

Struct Synapse 

Source
pub struct Synapse {
    pub synapse_type: SynapseType,
    pub weight: f64,
    pub w_max: f64,
    pub delay: f64,
    pub vesicle_pool: VesiclePool,
    pub neurotransmitter: Neurotransmitter,
    pub ampa: Option<AMPAReceptor>,
    pub nmda: Option<NMDAReceptor>,
    pub gabaa: Option<GABAAReceptor>,
    pub stdp: Option<STDP>,
    pub presynaptic_calcium: CalciumDynamics,
    pub postsynaptic_calcium: CalciumDynamics,
    /* private fields */
}
Expand description

Complete synapse model.

Integrates all components of synaptic transmission:

  • Presynaptic vesicle release
  • Neurotransmitter diffusion and clearance
  • Postsynaptic receptor activation
  • Short-term plasticity (depression/facilitation)
  • Long-term plasticity (STDP)
  • Calcium dynamics

Fields§

§synapse_type: SynapseType

Synapse type.

§weight: f64

Synaptic weight (0 to w_max).

§w_max: f64

Maximum synaptic weight.

§delay: f64

Synaptic delay (ms).

§vesicle_pool: VesiclePool

Presynaptic vesicle pool.

§neurotransmitter: Neurotransmitter

Neurotransmitter in synaptic cleft.

§ampa: Option<AMPAReceptor>

AMPA receptor (for excitatory synapses).

§nmda: Option<NMDAReceptor>

NMDA receptor (for excitatory synapses).

§gabaa: Option<GABAAReceptor>

GABA-A receptor (for inhibitory synapses).

§stdp: Option<STDP>

STDP plasticity rule.

§presynaptic_calcium: CalciumDynamics

Presynaptic calcium dynamics.

§postsynaptic_calcium: CalciumDynamics

Postsynaptic calcium dynamics.

Implementations§

Source§

impl Synapse

Source

pub fn excitatory(weight: f64, delay: f64) -> Result<Self>

Create a new excitatory (glutamatergic) synapse.

Source

pub fn inhibitory(weight: f64, delay: f64) -> Result<Self>

Create a new inhibitory (GABAergic) synapse.

Source

pub fn depressing_excitatory(weight: f64, delay: f64) -> Result<Self>

Create depressing excitatory synapse.

Source

pub fn facilitating_excitatory(weight: f64, delay: f64) -> Result<Self>

Create facilitating excitatory synapse.

Source

pub fn presynaptic_spike(&mut self, time: f64) -> Result<()>

Process presynaptic spike.

§Arguments
  • time - Current time (ms)
Source

pub fn postsynaptic_spike(&mut self, time: f64) -> Result<()>

Process postsynaptic spike.

§Arguments
  • time - Current time (ms)
Source

pub fn update( &mut self, time: f64, postsynaptic_voltage: f64, dt: f64, ) -> Result<()>

Update synapse dynamics.

§Arguments
  • time - Current time (ms)
  • postsynaptic_voltage - Current postsynaptic membrane voltage (mV)
  • dt - Time step (ms)
Source

pub fn current(&self, voltage: f64) -> f64

Get total postsynaptic current.

§Arguments
  • voltage - Postsynaptic membrane voltage (mV)
§Returns

Synaptic current (pA)

Source

pub fn conductance(&self) -> f64

Get total postsynaptic conductance.

§Returns

Synaptic conductance (nS)

Source

pub fn effective_weight(&self) -> f64

Get effective synaptic strength (includes short-term plasticity).

Source

pub fn set_weight(&mut self, weight: f64) -> Result<()>

Set synaptic weight.

Source

pub fn enable_stdp( &mut self, a_plus: f64, a_minus: f64, tau_plus: f64, tau_minus: f64, ) -> Result<()>

Enable STDP plasticity.

Source

pub fn disable_stdp(&mut self)

Disable STDP plasticity.

Source

pub fn reset(&mut self)

Reset synapse to initial state.

Trait Implementations§

Source§

impl Clone for Synapse

Source§

fn clone(&self) -> Synapse

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Synapse

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.