This repository was archived by the owner on Mar 25, 2025. It is now read-only.
Localize kinetic reaction rates.#1232
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1232 +/- ##
==========================================
+ Coverage 86.59% 86.65% +0.05%
==========================================
Files 176 176
Lines 13053 13132 +79
==========================================
+ Hits 11303 11379 +76
- Misses 1750 1753 +3 ☔ View full report in Codecov by Sentry. |
30727b1 to
8bd19d9
Compare
This comment has been minimized.
This comment has been minimized.
8bd19d9 to
8483416
Compare
This comment has been minimized.
This comment has been minimized.
pramodk
reviewed
Apr 5, 2024
pramodk
left a comment
Contributor
There was a problem hiding this comment.
Two minor suggestions. It's done nicely! With the tests, it quite clear! 👌
Collaborator
|
Logfiles from GitLab pipeline #203899 (:white_check_mark:) have been uploaded here! Status and direct links: |
pramodk
approved these changes
Apr 9, 2024
JCGoran
pushed a commit
to neuronsimulator/nrn
that referenced
this pull request
Mar 12, 2025
Store the forward and reverse rates in local variables, e.g.: ``` rate = 42.0 ~ a <-> b (1.0*rate, 2.0*rate) ``` is converted to: ``` LOCAL kf0_, kb0_ rate = 42.0 kf0_ = 1.0*rate kb0_ = 2.0*rate ~ a <-> b (kf0_, kb0_) ``` This solves a bug that assigning to `rate` between two reaction equation statements would mean the first line sees the value meant for the second line. NMODL Repo SHA: BlueBrain/nmodl@868ce13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If assignments and reaction equations are interspersed the ODE might use incorrect reaction rates. Example:
was equivalent to:
This PR solves the issue by localizing the rates, i.e. it'll produce:
Which can then be safely shuffled into:
and from there transformed as usual.