Add vcml_to_moving_boundary_input entrypoint#19
Merged
Conversation
Adds a new entrypoint, analogous to vcml_to_finite_volume_input, that converts a VCML simulation into Moving Boundary solver input. The generated file is a MovingBoundarySetup XML, the format consumed by the vcell-mbsolver package (MovingBoundarySolver.from_xml). Java (vcell-native): - LocalMovingBoundarySolverStandalone: subclass of MovingBoundarySolver that writes the mb.xml input via MovingBoundaryFileWriter while skipping the native executable lookup performed by the stock initialize() (mirrors how LocalFVSolverStandalone exposes an input-only path for Finite Volume). - SolverUtils.vcmlToMovingBoundaryInput: loads the BioModel and requires the named simulation to already use the Moving Boundary solver (clear error otherwise, since the input is generated from MovingBoundary-specific math). - Entrypoints: new @centrypoint vcmlToMovingBoundaryInput. - MainRecorder: exercises the new path so native-image records its config. Python (libvcell): - native_utils registers the new symbol guarded by hasattr so the package still loads against older shared libraries that predate it. - native_calls / solver_utils / __init__ add and export vcml_to_moving_boundary_input. Tests: - Java: 4 SolverEntrypointsTest cases (writes a MovingBoundarySetup mb.xml; bad sim name; wrong solver; SBML-instead) - all pass on the JVM. - Python: a test that skips until the native library is rebuilt with the new symbol. - Fixture: Solver_Suite_6_2.vcml (simulation "Simulation33" uses the Moving Boundary solver) added to both test-resource trees. The Python end-to-end path requires rebuilding the native shared library (scripts/local_build_native.sh) to expose the new C entry point. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The prettier pre-commit hook (run by the CI quality job via `make check`) reformatted CLAUDE.md; apply it so the hook passes. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Summary
Adds
vcml_to_moving_boundary_input, a new entrypoint analogous tovcml_to_finite_volume_input, that converts a VCML simulation into Moving Boundary solver input. The output is aMovingBoundarySetupXML file — the format consumed by thevcell-mbsolverpackage (MovingBoundarySolver.from_xml).Design
<jms>element is omitted from the generated XML.Changes
Java (
vcell-native/)solvers/LocalMovingBoundarySolverStandalone.java(new) — writesmb.xmlviaMovingBoundaryFileWriter, skipping the native-executable lookup that the stockMovingBoundarySolver.initialize()performs (mirrorsLocalFVSolverStandalonefor Finite Volume).SolverUtils.vcmlToMovingBoundaryInput— loads the BioModel, validates the solver, writes input.Entrypoints.java— new@CEntryPoint vcmlToMovingBoundaryInput.MainRecorder.java— exercises the new path so native-image records its reflection/resource config.Python (
libvcell/)native_utils.pyregisters the new symbol guarded byhasattrso the package still loads against older shared libraries.native_calls.py/solver_utils.py/__init__.pyadd and exportvcml_to_moving_boundary_input.Tests & fixtures
SolverEntrypointsTestcases (writes aMovingBoundarySetupmb.xml; bad sim name; wrong solver; SBML-instead) — all pass on the JVM (23/23 in the suite).Solver_Suite_6_2.vcml(simulationSimulation33uses the Moving Boundary solver) added to both test-resource trees.Verification
vcell-nativeJava suite: 23/23 pass (incl. the 4 new tests).mypy --strictclean;ruffclean on changed code.import libvcellloads and exports the new function.Note for reviewers
The Python end-to-end path requires rebuilding the native shared library (
scripts/local_build_native.sh) to expose the new C entry point. CI performs this build, which is what exercises the (currently skipped) Python test.🤖 Generated with Claude Code