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: SynapseTypeSynapse type.
weight: f64Synaptic weight (0 to w_max).
w_max: f64Maximum synaptic weight.
delay: f64Synaptic delay (ms).
vesicle_pool: VesiclePoolPresynaptic vesicle pool.
neurotransmitter: NeurotransmitterNeurotransmitter 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: CalciumDynamicsPresynaptic calcium dynamics.
postsynaptic_calcium: CalciumDynamicsPostsynaptic calcium dynamics.
Implementations§
Source§impl Synapse
impl Synapse
Sourcepub fn excitatory(weight: f64, delay: f64) -> Result<Self>
pub fn excitatory(weight: f64, delay: f64) -> Result<Self>
Create a new excitatory (glutamatergic) synapse.
Sourcepub fn inhibitory(weight: f64, delay: f64) -> Result<Self>
pub fn inhibitory(weight: f64, delay: f64) -> Result<Self>
Create a new inhibitory (GABAergic) synapse.
Sourcepub fn depressing_excitatory(weight: f64, delay: f64) -> Result<Self>
pub fn depressing_excitatory(weight: f64, delay: f64) -> Result<Self>
Create depressing excitatory synapse.
Sourcepub fn facilitating_excitatory(weight: f64, delay: f64) -> Result<Self>
pub fn facilitating_excitatory(weight: f64, delay: f64) -> Result<Self>
Create facilitating excitatory synapse.
Sourcepub fn presynaptic_spike(&mut self, time: f64) -> Result<()>
pub fn presynaptic_spike(&mut self, time: f64) -> Result<()>
Sourcepub fn postsynaptic_spike(&mut self, time: f64) -> Result<()>
pub fn postsynaptic_spike(&mut self, time: f64) -> Result<()>
Sourcepub fn update(
&mut self,
time: f64,
postsynaptic_voltage: f64,
dt: f64,
) -> Result<()>
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)
Sourcepub fn conductance(&self) -> f64
pub fn conductance(&self) -> f64
Sourcepub fn effective_weight(&self) -> f64
pub fn effective_weight(&self) -> f64
Get effective synaptic strength (includes short-term plasticity).
Sourcepub fn set_weight(&mut self, weight: f64) -> Result<()>
pub fn set_weight(&mut self, weight: f64) -> Result<()>
Set synaptic weight.
Sourcepub fn enable_stdp(
&mut self,
a_plus: f64,
a_minus: f64,
tau_plus: f64,
tau_minus: f64,
) -> Result<()>
pub fn enable_stdp( &mut self, a_plus: f64, a_minus: f64, tau_plus: f64, tau_minus: f64, ) -> Result<()>
Enable STDP plasticity.
Sourcepub fn disable_stdp(&mut self)
pub fn disable_stdp(&mut self)
Disable STDP plasticity.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Synapse
impl RefUnwindSafe for Synapse
impl Send for Synapse
impl Sync for Synapse
impl Unpin for Synapse
impl UnwindSafe for Synapse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more