Skip to content

Refactors VCell Object Cloning and Enhances Libvcell Data Access#1650

Merged
jcschaff merged 12 commits intomasterfrom
libvcell_new
Mar 11, 2026
Merged

Refactors VCell Object Cloning and Enhances Libvcell Data Access#1650
jcschaff merged 12 commits intomasterfrom
libvcell_new

Conversation

@jcschaff
Copy link
Member

This update introduces a comprehensive refactoring of object cloning mechanisms within VCell, moving away from generic Java serialization for a more explicit and controlled deep cloning approach.

Key changes include:

  • Explicit Deep Cloning: Implements dedicated deepClone() methods for various core objects, including BioNetGen (BNG) specification elements (e.g., BNGMolecule, BNGOutputSpec), geometry surface components (e.g., OrigSurface, Polygons), and math objects (e.g., JumpCondition, AnnotatedFunction).
  • Consolidated Cloning via XmlHelper: Centralizes cloning for major VCell documents and components (BioModel, Model, SimulationContext, Geometry, MathDescription, ReactionStep) within XmlHelper, allowing for more robust and controlled replication.
  • Libvcell Integration: Configures XmlHelper to utilize XML-based cloning primarily for libvcell contexts, providing a more reliable cloning mechanism for external integrations.
  • Symbol Table Management: Ensures that cloned expressions have their symbol table bindings cleared, preventing unintended dependencies and binding issues.
  • Improved DataSet Accessibility: Modifies the DataSet class to make its constructor and key methods (read(), getVariableTypeInteger()) public, facilitating direct access and manipulation of field data from libvcell.
  • Enhanced Unit System Checks: Adds a new test fault for INCONSISTENT_UNIT_SYSTEM to catch incompatibilities in substance units, improving overall model consistency.

This refactoring aims to improve the stability, performance, and maintainability of object cloning, particularly benefiting integration efforts with libvcell.

@jcschaff jcschaff self-assigned this Mar 11, 2026
@jcschaff jcschaff merged commit 17f9cf3 into master Mar 11, 2026
22 checks passed
@jcschaff jcschaff deleted the libvcell_new branch March 11, 2026 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant