Repository navigation
feat(native): vcml_regenerate_math, VCell's forced upgrade per application (0.0.25) - #32
Merged
Merged
Conversation
…ation vcml_to_vcml runs BioModel.updateAll(false): it regenerates every application's math, but leaves an old ratio-only application's structure mappings without sizes, and one failing application aborts the document. vcml_regenerate_math runs SimulationContext.updateAll(true) on each application on its own: the StructureSizeSolver writes the solved sizes into the mappings, and the result (MathRegeneration) lists the applications regenerated and the reason each failed one failed. Its use: comparing another math generator against the math current VCell generates rather than the math a document was last saved with. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… cause Regenerating the corpus with vcml_regenerate_math found 129 rule-based applications failing in the native library with "Supplier failed" that the JVM regenerates: network generation compares species graphs with JGraphT, which constructs SpeciesGraphIsomorphismInspector$BNGEdge reflectively, and the recorder's models never reach that path. The constructor is registered in a checked-in reachability file (src/main/native-image/bionetgen), and a corpus model that needs it is a Python regression fixture. A failed application's reason now carries its root cause's type and message, and the stack trace is logged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
virtualcell/vcell#2205 repairs duplicate membrane voltage names at load, so vcml_regenerate_math now regenerates the 136 public corpus documents (556 applications) current VCell used to refuse. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
A new entry point,
vcmlRegenerateMath, exposed in Python asvcml_regenerate_math(vcml_content, vcml_file_path). It returns(success, message, MathRegeneration | None).SimulationContext.updateAll(true)on each application. For an old non-spatial application with no absolute structure size, theStructureSizeSolversolves the sizes from its surface-to-volume ratios and volume fractions and writes them into the structure mappings. The model's first structure is anchored at 1, and the sizes stay symbolic over the ratios.MathRegenerationlists the applications regenerated and, for each failure, the reason. A failed application keeps its stored math.vcml_to_vcmlis unchanged. It runsBioModel.updateAll(false). That generates the same math, but it leaves a ratio-only application's mappings unsized, and one failing application aborts the whole document.Why
vcell-core's math oracle compares its own ODE generation against VCell's math. The math a corpus document stores is the math it was last saved with, often from an old generator and sometimes stale. This lets the oracle compare against what current VCell generates instead.
Tests
test_vcml_regenerate_math_solves_relative_sizesuses a pre-5.3 public biomodel, 2264899, with ratios only. ER is anchored at 1, cyto solves to 4 and ERMem to 1. The test also pins that the unforced path generates the same math but leaves the mappings unsized.test_vcml_regenerate_mathchecks the same fixture through the native library. It is skipped when the library predates the symbol.MainRecorderexercises the new path, so native-image records its configuration.Local results:
make checkpasses, pytest 27 passed with 4 skipped for the missing ODE solver package, andmvn -o testpasses all 43 tests on the rebuilt macOS native library.🤖 Generated with Claude Code