An edition-2 job cannot set ODE solver tolerances for a BNGL model: the model: line refuses rtol:/atol: for .bngl, and the simulations built from experiment: lines never carry them

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
42/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python

調査の方向性

Start with ADR-0116 and related issues #586 and #969, then trace edition-2 model and experiment handling in pybnf/pset.py and pybnf/bngsim_model/net_model.py. Check the BNG2.pl action path, gradient/sensitivity and ms job types, stochastic methods, and PEtab export. Done means BNGL tolerances are consistently applied or refused as specified, with updated docstrings and docs/config_keys.rst.

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

説明

enhancement

An edition-2 job cannot set the ODE solver's tolerances for a BNGL model. A stiff model, or one whose species span many orders of magnitude, may need tighter tolerances than the defaults to integrate accurately. But every simulation PyBNF builds from an experiment: line for a .bngl model runs at the backend's defaults, whatever the user writes:

  • the model: line's rtol: / atol: fields (ADR-0116, #586) are refused for a .bngl model; they apply only to SBML/Antimony models on sbml_backend = bngsim;
  • the refusal, and the docstrings of TimeCourse and ParamScan in pybnf/pset.py, send BNGL users to the model's own begin actions block. But a hand-written simulate(..., atol=>..., rtol=>...) there was always a separate simulation and never reached the declared experiments. #969 now refuses such lines in edition 2, which removes even that option;
  • no experiment: field carries a tolerance.

SBML models have per-model tolerances; BNGL models in edition 2 have none, and nothing tells the user their stiff model is being integrated at the default.

What happens today

  • BNG2.pl: the synthesized simulate / parameter_scan actions carry no atol / rtol. BioNetGen 2.9.3 then uses atol = 1e-8, rtol = 1e-8 (Perl2/BNGAction.pm, lines 235–236 and 1968–1969).
  • bngsim .net bridge: it passes atol / rtol to Simulator.run only when the action carries them (pybnf/bngsim_model/net_model.py, around line 1289). The synthesized actions never do, so bngsim's own defaults apply.

Proposal

  • The field: accept rtol: and atol: on a BNGL model: line, with the same syntax and checks as for SBML (ADR-0116). Also accept species_atol: / atol: tracking where the bngsim .net path supports them; otherwise refuse those forms for BNGL.
  • Where it applies: to every ODE simulation of that model's experiments, on both backends. That covers time courses, steady states, scans (plain and pre-equilibrated), and the pre-equilibration phase itself, including the equil_t_end fixed-duration phase.
  • Other job types: check the gradient/sensitivity path and job_type = ms, and either apply the tolerances there or refuse them there.
  • Stochastic methods: refuse the fields for a model whose experiments run a stochastic or network-free method (ssa, nf, rm, pla), where a CVODE tolerance means nothing.
  • Export: say what the PEtab export does with them. PEtab has no solver-settings table, so it is likely run recipe, dropped the way a per-experiment method: is.
  • Docs: update the TimeCourse / ParamScan docstrings and docs/config_keys.rst, so they no longer point BNGL users to the actions block.

Related: #969 (edition-2 actions-block rule), #586 / ADR-0116 (per-model tolerances for SBML).

主要言語
Python
スター
25
フォーク
25
平均マージ
4時間 5分
マージ済み PR(30日)
10

環境構築

はじめの一歩

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

lanl/PyBNF のほかの issue

lanl/PyBNF の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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