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

オープン
#2,158 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
70/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Java
スター
140
フォーク
35
平均マージ
22時間 6分
マージ済み PR(30日)
14

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

virtualcell/vcell のほかの issue

virtualcell/vcell の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。