steady_state(method="integration") reports BIOMD0000000609 converged at a state with four species below zero, from which a run diverges

Open
#1,895 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
22/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

The convergence check behind steady_state(method="integration") is the place to start; the payload names no file for it, so locate it first. Reproduce with the snippet in the issue on BIOMD0000000609 and confirm the returned state has negative species. Done means converged is not set for states that a run from them diverges from, or the steady-state result is rejected when species go below zero.

Written by the indexing model from the issue text.

Description

Found while moving the differential harness's steady-state checks to the per-species rule (#1887).

On BIOMD0000000609 (rr_parity corpus), steady_state(method="integration", rtol=1e-6, atol=1e-9, max_time=1e6) returns converged=True at a state with four species below zero, where a run to t = 1e6 rests with them at or above zero:

species steady_state() run's end
Sulphate__PAPS -1.46e-14 1.33e-14
Paracetamol_APAP -1.69e-14 -1.3e-43
NAPQI -1.74e-16 1.1e-42
GSH -4.97e-17 6.87e-15
Protein_adducts 3.91e-09 2.28e-16

A run from the returned state fails: CV_CONV_FAILURE, the RHS non-finite at t = 2.12, Sulphate__PAPS = inf, Paracetamol_APAP = -5.45e+133. method="newton" does not converge (residual 4.3e25). The march first fails with the analytical Jacobian and retries with the FD one (GH#176's notice).

The whole state at rest is about 1e-14, so the old harness rule (an absolute floor of 1e3·atol = 1e-6) never judged it. The values are under the atol given, but a converged state from which a run diverges is not a steady state; at least it should not be reported converged.

Reproduce:

import bngsim
m = bngsim.Model.load("parity_checks/rr_parity/models/BIOMD0000000609/BIOMD0000000609_url.xml")
sim = bngsim.Simulator(m, method="ode")
ss = sim.steady_state(method="integration", rtol=1e-6, atol=1e-9, max_time=1e6)
print(ss.converged, dict(zip(ss.species_names, ss.concentrations)))

The nightly's steady_vs_run row for this model reads DIFF ("steady_state() converged where a run fails") from #1887 on.

Dominant language
Python
Stars
3
Forks
6
Avg merge
1d 1h
Merged PRs (30d)
295

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lanl/bngsim

All issues in lanl/bngsim

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.