Spatial hybrid: combineHybrid keeps no-op particle jump processes that suppress competing Smoldyn reactions

Aperta
#2,158 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
70/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java
Ambito
backend

Direzione di ricerca

Start at ParticleMathMapping.combineHybrid() where continuous-variable actions are already stripped from ParticleJumpProcess objects; extend that logic to drop a process whose remaining destroy/create multisets cancel on the same particle variables. Then locate the tests (or a runnable headless model) that generate the .smoldynInput so you can confirm the no-op reaction influx O -> O k line disappears while open/close reactions and the .fvinput PDE source stay intact. Done means a cancelling jump process is omitted from the Smoldyn input and the existing particle-hybrid mapping tests still pass.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary. In a spatial PDE/particle hybrid application, a reaction in which a particle species catalyses a continuous species keeps a particle jump process that destroys and re-creates the same particle. That process has no effect on the particles, but it is written to the .smoldynInput as e.g. reaction influx O -> O 6022.14. Smoldyn assigns competing first-order reactions probabilities ∝ k_i/Σk, so a fast no-op suppresses the particle's real reactions.

Examples of such reactions:

  • O → O + U;
  • a General kinetics reaction → U with O as a modifier, which VCell turns into the same process.

Example (Schaff et al. 2016, Test 1: calcium sparks).

  • Model: channels C ⇌ O are particles (k_on = 1, k_off = 5 s⁻¹). Calcium U is ForceContinuous, with influx O → O + U at J·602.214 ≈ 6022 s⁻¹.
  • Generated Smoldyn reactions: open C -> O 1.0;, close O -> C 5.0; and influx O -> O 6022.14076;.
  • Effect: closing is effectively suppressed. The mean open fraction is ~0.9 instead of k_on/(k_on+k_off) = 1/6, and calcium is ~5× too high.
  • Fix confirmed: removing the influx line from the .smoldynInput restores the exact open fraction. The PDE source RATE ((9.99… * O) - U) in .fvinput is unaffected and correct.

Suggested fix. In ParticleMathMapping.combineHybrid(), after removing actions on continuous variables, also drop a ParticleJumpProcess whose remaining actions cancel: equal destroy/create multisets on the same particle variables. This is the same idea as the existing if (!particleJumpProcess.getActions().isEmpty()) check, extended to cancelling actions.

Context. Found while driving the hybrid solver headlessly (pyvcell → libvcell → pyvcell-fvsolver) in vivarium-collective/viva-pde-particle. The workaround there is viva_pde_particle.reference.vcell_native.drop_noop_reactions.

🤖 Generated with Claude Code

Lingua principale
Java
Stelle
140
Fork
35
Merge medio
22h 6m
PR unite (30g)
14

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di virtualcell/vcell

Tutte le issue di virtualcell/vcell

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.