# README.md Qui mettiamo la descrizione del neurone. Infatti l'espressione G. non e' come un programma tradizionale che puo' essere letto e capito, essendo i comportamenti omomorfi rispetto al codice. In un'espressione G. i comportamenti sono locali in tempo e spazio (contestualizzazione). Non essendoci un flusso programmatico, il commento ai comportamenti locali, non e' sufficienti a spiegare i comportamenti che sara' possibile verificare in diversi ambiti. C'e' quindi bisogno di esprimere i flussi e le chiusure che in diversi ambiti abbiamo voluto esprimere, tramite espressioni locali. ## The four pillars This framework describes a system that is not a static processor, but a living entity that balances high-speed pattern extraction based on expectations with allostatic balancing and physical transformation. ### Pillar 1: The Electrical Pillar (The Integration Layer) - Function & Reason: Pattern Extraction. The neuron acts as a spatiotemporal filter. It integrates thousands of tiny inputs across its dendritic tree (space) and within narrow windows of time. Its "output" is a declaration that a specific relevant pattern has been recognized. - Timescale: Milliseconds (ms). - Behaviors: Summation of Excitatory/Inhibitory Post-Synaptic Potentials (EPSPs/IPSPs), the "Tug-of-War" at the soma, and the propagation of the "Success" signal (the Spike). - Elements Involved: \-- Ions: Na+ (The "Yes" current), K+ (The "No/Reset" current). \-- Hardware: Dendritic tree (The Space), VGSC/VGKC (The Timers). ### Pillar 2: The Metabolic Pillar (The Constraint Layer) * **Function & Reason:** Sustainability and Gradient Maintenance. This pillar provides the energy required for all other behaviors. It sets the "Hard Limit" on how much work the neuron can do. * **Timescale:** **Seconds to Minutes.** * **Behaviors:** Active transport of ions, ATP production, and "Metabolic Silencing" (shutting down to prevent death when energy is low). * **Elements Involved:** * **Molecules:** ATP, Glucose, Oxygen. * **Hardware:** Na/K-ATPase Pump (the "Battery Recharger"), Mitochondria. * **Constraint:** The $Na^+/K^+$ ratio. ### Pillar 3: The Calcium Pillar (The Logic / Information Keeper) * **Function & Reason:** Adaptation and Translation. This pillar acts as the "sensor" that monitors electrical activity and translates it into chemical signals. It keeps the "history" of the cell's workload. * **Timescale:** **Minutes to Hours.** * **Behaviors:** **Homeostatic Scaling** (tuning the master volume), Synaptic Plasticity (LTP/LTD), and Gain Control. * **Elements Involved:** * **Ions:** Calcium ($Ca^{2+}$). * **Hardware:** Somatic VGCCs (L-type), NMDA receptors. * **Software:** Calmodulin, CaMKIV (signaling proteins that "count" the calcium). ### Pillar 4: The Structural Pillar (The Renovation Layer) * **Function & Reason:** Physical Transformation. This pillar is the actual rebuilding of the "factory" to change the neuron's fundamental capabilities. It is the physical manifestation of long-term memory and health. * **Timescale:** **Days to Weeks.** * **Behaviors:** **Axon Initial Segment (AIS) translocation** (moving the trigger zone), dendritic branch growth/pruning, and changes in total channel/receptor count via gene expression. * **Elements Involved:** * **Structural Proteins:** Actin, Microtubules, Ankyrin-G (the "anchor"). * **Genetics:** mRNA, Ribosomes, Transcription Factors (e.g., CREB). ### What is Achieved by This Entity? By combining these four pillars, the neuron becomes a Non-Static Adaptive Engine: - Selective Attention: It doesn't just pass signals; it ignores noise and only "speaks" when its specific spatial and temporal requirements are met. - Self-Regulating Sensitivity: If the patterns it is expecting become too frequent or too rare, the Calcium and Structural pillars adjust the Electrical hardware to find a new "sweet spot." - Metabolic Wisdom: It balances the "desire" to extract patterns against the "cost" of ATP. It is an engine that tunes itself to be as efficient as possible. - Hardware-Software Unity: Unlike a computer, where the software cannot change the CPU, the neuron's "software" (the activity patterns) physically rewrites its "hardware" (the pillars) every single day. This is the portrait of a system that isn't just "running a program"—it is a biological machine constantly sculpting itself to become a better filter for the world it perceives. --- --- ## Flussi e chiusure ### Flusso da POST a SOMA - Gli NT che arrivano a BEH-POST-AMPA aprono i AMPA che fa entrare Na che vengono integrati nella POST - Gli Na nella POST aprono NDMA che fanno entrare Ca2+ - Ca2+ genera VPost nel DB - L'integrazione di VPost nel DB genera VDB nel SOMA - L'integrazione di VDB nel SOMA determina AP - Si aprono i Canali ionici del SOMA, si genera VSOMA e refractory period (emergente) ### Flusso da SOMA a POST bAP ### Flusso da SOMA a PRE AP Based on the computational model provided, here is the complete breakdown of all simulated behaviors, categorized by functional compartment. ## Behaviors ### 1. Presynaptic Behaviors * **Action Potential Arrival (**`V_pre`**):** When a spike occurs, the membrane potential (`V_pre_state`) jumps to a peak and decays based on `tau_V_pre`. This profile determines the duration of ion channel opening. * **Calcium Influx (**`VGCC`**):** Voltage-Gated Calcium Channels open based on `V_pre_state`. The flow is regulated by three "brakes": **eCB** (retrograde), **CDI** (inactivation), and **mGluR** (autoreceptor). * **Intracellular Buffering:** Free calcium (`Ca_micro`) is immediately captured by buffers (`B_free`). As activity increases and buffers saturate, the effective calcium concentration rises faster (**Metabolic Cascade 4**). * **Vesicle Release (NT):** Neurotransmitter release is **deterministic** and follows a Hill equation (simulating Synaptotagmin-1 cooperativity). It is limited by the number of vesicles in the Prontly Releasable Pool (`N_RRP`) and suppressed by high existing levels of NT in the cleft. * **Vesicle Recycling:** Vesicles move from the Reserve Pool (`N_RP`) to the `N_RRP` at a rate determined by the calcium trace (`Tr_Ca`). Fast recruitment occurs during high activity; slow recruitment occurs at rest. * **Calcium-Dependent Inactivation (CDI):** Local calcium entering through channels causes them to close (`CDI_factor`). If calcium clearance fails due to low ATP, the CDI "locks" the synapse into a silent state to prevent damage. ### 2. Postsynaptic Behaviors * **AMPA Activation:** Released NT opens AMPA receptors, allowing **Na+** influx. This generates the local excitatory post-synaptic potential (EPSP). * **Receptor Desensitization:** Continuous exposure to NT reduces the sensitivity of the receptors (`Desensitization_level`), mimicking the presynaptic CDI behavior to prevent over-stimulation. * **NMDA Coincidence Detection:** NMDA channels open only if **NT is present** AND the **membrane is depolarized** (removing the Mg2+ block). Depolarization is achieved via local AMPA drive plus the back-propagating action potential (**bAP**) from the soma. * **eCB Synthesis:** When postsynaptic calcium (`Ca_post`) crosses a specific threshold, **Endocannabinoids** are synthesized and sent back to the presynapse to suppress further NT release. ### 3. Dendritic Behaviors * **EPSP Summation:** The dendritic branch (`DB`) acts as a passive integrator. It collects `receptor_conductance` from all active spines and sums them into `V_dend`. * **Passive Decay:** `V_dend` decays over time according to `tau_dend`, determining the temporal window in which multiple inputs can summate to trigger a somatic spike. * **bAP Distribution:** When the soma fires, a **back-propagating Action Potential** (`V_bAP`) is broadcasted instantly through the dendrite to all spines to enable NMDA coincidence detection. ### 4. Somatic Behaviors * **Leaky Integration:** The soma integrates the signal from the dendrite (`V_dend`) scaled by `soma_weight`. It acts as a leaky integrator with a time constant of `tau_soma`. * **Action Potential (AP) Generation:** If `V_soma` crosses the threshold, a multi-phase AP is triggered: 1. **Rising Phase:** Simulated Na+ channel opening (reaches `V_AP_peak`). 2. **Falling Phase:** Simulated K+ channel opening (drops to `V_AHP`). 3. **AHP Phase:** Recovery from hyperpolarization back to rest. * **Refractory Periods:** After firing, the soma enters an **Absolute Refractory Period** (cannot fire) followed by a **Relative Refractory Period** (threshold is temporarily much higher). ### 5. Astrocytic Behaviors * **Neurotransmitter Clearance:** The astrocyte actively removes NT from the synaptic cleft, governed by the `tau_NT_decay` and metabolic cycles. * **Glutamine Shuttle:** Cleared NT is converted and recycled back to the presynaptic Reserve Pool (`RP`) with a specific `conversion_efficiency`. * **IP3 Signaling & Calcium Wave:** Accumulated NT triggers **IP3** production in the astrocyte. If it crosses a threshold, an **astrocytic calcium wave** is triggered. * **Metabolic Support:** The calcium wave provides a "boost" to the `conversion_efficiency`, helping the synapse recover vesicles faster during high demand. ### 6. Metabolic & Shared Behaviors (ATP Loop) * **ATP Consumption:** Every Action Potential (Pre and Post) and every calcium pumping action (`PMCA`, `SERCA`) drains a shared **Glucose/ATP** budget. * **Pump Scaling:** The speed of ion pumps is determined by a Hill function of available `ATP_level`. Low energy leads to **Pump Failure**. * **Metabolic Silencing:** A 6-stage cascade where high firing leads to ATP depletion, which causes pump failure, leading to residual calcium, which triggers CDI, finally **silencing the synapse** to protect against excitotoxicity. --- ### Logic Summary Table | Input | Process | Output | |------------------------|---------------------|-------------------------------------| | **NT in Cleft** | AMPA / NMDA Opening | **V_post** (Postsynaptic Potential) | | **V_post** | Dendritic Summation | **V_dend** (Dendritic Potential) | | **V_dend** | Somatic Integration | **V_soma** (Somatic Potential) | | **V_soma > Threshold** | Spike Kinetics | **Forward AP** & **Retrograde bAP** | | **Low ATP** | Pump Failure | **Synaptic Silencing** (Protection) |