Skip to content

Fix issue #218 - #547

Merged
lohedges merged 2 commits into
develfrom
fix_218
Nov 25, 2026
Merged

lohedges merged 2 commits into
develfrom
fix_218

Conversation

@lohedges

Copy link
Copy Markdown
Contributor

This PR closes #218 by fixing new trajectory frames being lost after delete_frame is called on a system.

Deleting a frame converts each molecule's live view of the SystemTrajectory into an in-memory copy, but System::deleteFrame left the system's SystemTrajectory pointer in place. Later frames were saved into a trajectory that the molecules no longer referenced, so frame counts went 5, 4, 3 instead of 5, 9, 13. The pointer is now nulled, as already done in deleteAllFrames and the overwriting saveFrame. A new SystemTrajectory is then created on the next save and appended to each molecule's trajectory.

The other problems reported in #218 were fixed earlier: Dynamics.commit() now returns a clone, deleteAllFrames nulls the trajectory pointer, and the page cache no longer kills its threads on exit. A regression test now covers both delete_all_frames and delete_frame between dynamics blocks.

  • I confirm that I have merged the latest version of devel into this branch before issuing this pull request (e.g. by running git pull origin devel): [y]
  • I confirm that I have added a changelog entry to the changelog (we will add a link to this PR as part of the review): [y]
  • I confirm that I have permission to release this code under the MIT license (the Python API) or the LGPLv3+ license (everything else), as described in the LICENSE file: [y]

lohedges added a commit that referenced this pull request Nov 25, 2026
@lohedges
lohedges merged commit e6076a1 into devel Nov 25, 2026
5 checks passed
@lohedges
lohedges deleted the fix_218 branch November 25, 2026 14:27

This branch was previously deployed

1 inactive deployment
sire-build — 13c0aef8 Deployed Nov 25, 2026 by lohedges via build (3.12, linux) #479
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Trajectories are not properly stored after mols.delete_all_frames() is called.

1 participant