Clean four-state competitive models around free receptor#16
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e768cac6e3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| a = 1.0 + receptor_free / Kds | ||
| b = 1.0 + receptor_free / Kd | ||
| c = receptor_free / (Kd * Kd3) |
There was a problem hiding this comment.
Guard free-species solve against zero Kd or Kd3
This introduces an unguarded division by Kd * Kd3; when either parameter is 0.0 (both are allowed at their lower bounds in this model, and Kd can be hit during fitting), c becomes inf/nan, which then propagates through the quadratic and returns invalid model responses. The previous implementation did not divide by Kd or Kd3 in the response mapping, so this is a regression that can break fits or produce NaN curves at boundary parameter values.
Useful? React with 👍 / 👎.
Summary
Rrather thanr_equiv.RS + RLS.Kd_eff = (1 + N) * Kd.Kds == Kd3quartic case.algebra/derive_four_state_r_equivalent_coefficients.ipynbso it derives the free-receptor quintic and validates the runtime coefficient helper.sympyto the notebook dependency group for the derivation notebook.Validation
Kds == Kd3degenerate cases.Note: the old
.qmddocumentation was intentionally left untouched.