Skip to content

Conversation

@lohedges
Copy link
Contributor

This PR adds supports for saving crash reports during Sire dynamics runs using the save_crash_report kwarg when calling dynamics.run(). If specified, the following files will be saved during a crash:

  • A log file with current lambda and energy contribution from each force.
  • An XML file containing the OpenMM system.
  • A NumPy text file containing the atomic positions.

All files correspond to the system at the start of the dynamics block, not the crash, which might not be available. This allows a user to replay a crash. Files are given a UUID name that is consistent across files, e.g. crash_UUID.log, system_UUID.xml, and positions_UUID.txt. I'm not sure whether we should allow the user to pass a name, or create the UUID for the dynamics object itself, then increment some file index, e.g. if there are multiple crashes along a trajectory. This probably isn't that important, since this is really intended to only be turned on when debugging unstable simulations to capture examples of soft-crashes. Happy to take suggestions, though.

  • 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 test for any new functionality in this pull request: [y]
  • I confirm that I have added documentation (e.g. a new tutorial page or detailed guide) for any new functionality in this pull request: [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 GPL3 license: [y]

@lohedges lohedges requested a review from mb2055 October 28, 2025 13:53
@lohedges lohedges added the enhancement New feature or request label Oct 28, 2025
@lohedges lohedges added the cresset related to work with cresset label Oct 28, 2025
Copy link
Contributor

@mb2055 mb2055 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good 👍

@lohedges lohedges merged commit 02eaf49 into devel Oct 28, 2025
4 of 5 checks passed
@lohedges lohedges deleted the feature_crash_report branch October 28, 2025 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cresset related to work with cresset enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants