Yes — and this is actually the most important calcium process on the postsynaptic side, because it is the mechanism behind **synaptic plasticity** (LTP and LTD). You are pointing at something that is missing from the current postsynaptic model entirely.

---

**What is happening biologically**

The postsynapse has its own calcium dynamics, completely separate from the presynapse. The key player is the **NMDA receptor** — a special type of glutamate receptor that is both ligand-gated (requires NT to bind) AND voltage-gated (requires the membrane to be depolarised to remove a magnesium block). This dual requirement makes it a **coincidence detector**: it only opens fully when NT arrives AND the postsynaptic membrane is already depolarised.

The depolarisation can come from two sources:

**Forward signal** — NT from the presynapse depolarises V_post via AMPA receptors, which then unblocks NMDA receptors and lets Ca²⁺ in.

**Backpropagating AP (bAP)** — when the postsynaptic neuron fires its own action potential, that signal travels not only forward down the axon but also backward up the dendrites. When this bAP arrives at the synapse at the same time as presynaptic NT, the NMDA receptor sees both conditions simultaneously and opens maximally.

---

**The coincidence detection logic**

```
NT arrives (presynapse fires)     →  AMPA opens  →  V_post rises
bAP arrives (postsynapse fires)   →  membrane depolarised
Both together at the same time    →  NMDA fully open  →  Ca2+_post large surge
NT alone, no bAP                  →  NMDA partially open  →  Ca2+_post small
bAP alone, no NT                  →  NMDA blocked (no NT)  →  Ca2+_post minimal
```

---

**What Ca²⁺ level in the postsynapse controls**

Postsynaptic Ca²⁺ (`Ca_post`) drives three things depending on its level:

| Ca_post level | Outcome             | Mechanism                                          |
|---------------|---------------------|----------------------------------------------------|
| low           | LTD (weakening)     | activates phosphatases that remove AMPA receptors  |
| medium        | no change           | neither pathway threshold crossed                  |
| high          | LTP (strengthening) | activates kinases (CaMKII) that add AMPA receptors |
| very high     | eCB synthesis       | triggers retrograde suppression of presynapse      |

The current model already has the eCB branch (very high Ca_post → eCB). What is missing is the Ca_post variable itself and the LTP/LTD branches.

---

**Proposed variables to add**

```python
# -----------------------------------------------------------------------
# POSTSYNAPTIC Ca2+ DYNAMICS
# -----------------------------------------------------------------------

# -- NMDA receptor --
k_NMDA_bind       = 0.03    # /ms - NMDA conductance per unit NT when unblocked
Mg_block          = 1.0     # magnesium block factor (0=fully blocked, 1=fully open)
                            # removed by V_post depolarisation and bAP
V_NMDA_threshold  = 0.3     # V_post level at which Mg block begins to lift
                            # below this NMDA is nearly fully blocked

# -- bAP --
bAP_active        = False   # flag: postsynaptic neuron has fired (set externally)
bAP_amplitude     = 1.0     # normalised bAP depolarisation contribution
tau_bAP           = 3.0     # ms - bAP decay time constant at the synapse
                            # bAP attenuates as it travels up the dendrite
bAP_state         = 0.0     # continuous bAP depolarisation (mirrors V_pre_state)

# -- Postsynaptic Ca2+ --
Ca_post           = 0.0     # free Ca2+ in postsynaptic spine
                            # driven by NMDA opening and bAP
k_Ca_post_decay   = 0.05    # /ms - Ca_post clearance rate
                            # postsynapse has its own pumps (PMCA, NCX equivalents)

# -- Plasticity thresholds --
Ca_post_LTD       = 0.3     # Ca_post below this → LTD if sustained
Ca_post_LTP       = 0.7     # Ca_post above this → LTP if sustained
Ca_post_eCB       = 0.9     # Ca_post above this → eCB synthesis

# -- Plasticity state --
AMPA_density      = 1.0     # normalised AMPA receptor density (0 -> 2)
                            # LTP increases this, LTD decreases it
                            # feeds back into receptor_conductance
tau_plasticity    = 30_000.0 # ms - plasticity integration window (~30 s)
Ca_post_trace     = 0.0     # slow integrator of Ca_post, drives plasticity
                            # analogous to Tr_Ca on the presynaptic side
```

---

**Proposed behaviors**

```
— ms (postsynapse, additions):

- bAP arrives → bAP_state jumps to bAP_amplitude, decays with tau_bAP
  (mirrors V_pre_state / V_pre_peak on the presynaptic side)

- Mg block removal: Mg_block = f(V_post + bAP_state)
  low voltage  → Mg_block ≈ 1 (fully blocked, no Ca2+ entry)
  high voltage → Mg_block ≈ 0 (fully open, maximal Ca2+ entry)

- NMDA conductance: NMDA_conductance = k_NMDA_bind * NT_cleft * (1 - Mg_block)
  requires BOTH NT (ligand gate) AND depolarisation (voltage gate)
  this is the coincidence detection step

- Ca_post rises with NMDA_conductance each ms
- Ca_post decays with k_Ca_post_decay each ms (postsynaptic pumps)

- Ca_post_trace integrates Ca_post (slow, analogous to Tr_Ca)

— seconds (postsynapse, additions):

- eCB synthesis now driven by Ca_post_trace > Ca_post_eCB
  (replaces V_post_history as the eCB trigger — more accurate biologically
   because it is Ca2+ in the spine that actually synthesises eCB,
   not voltage per se)

— mins (postsynapse, additions):

- if Ca_post_trace sustained below Ca_post_LTD → AMPA_density decreases (LTD)
- if Ca_post_trace sustained above Ca_post_LTP → AMPA_density increases (LTP)
- AMPA_density feeds back into receptor_conductance ceiling:
  effective receptor_conductance max = N_receptors * AMPA_density
```

---

**Why this closes an important loop**

Without postsynaptic Ca²⁺ the model has no plasticity — the synapse behaves identically after 10 minutes of activity as it did at the start. Adding `Ca_post` with the coincidence detection logic means the synapse now has a **history** in the biological sense: repeated co-activation of pre and post strengthens it (LTP), one-sided activity weakens it (LTD). This is the postsynaptic equivalent of the presynaptic metabolic cascade — a slow, activity-dependent recalibration of the synapse's operating point, but driven by learning rather than protection.

The bAP is also what makes the eCB synthesis biologically accurate. Currently eCB is triggered by V_post (voltage). But the actual synthesis of endocannabinoids in the spine is triggered by high Ca²⁺ in the spine, which requires NMDA opening, which requires coincidence. So by adding `Ca_post`, the eCB trigger becomes mechanistically correct: it is not just "the postsynapse is depolarised" but "the postsynapse is receiving coordinated pre and post activity", which is a much more specific and meaningful signal for the presynapse to receive.