Add energy-diff and dissipation columns to gather_results - #271
Merged
Conversation
Surfaces free_energy_error, dissipation/ts_dissipation, and the raw forward/backward switching energy-diff (+ lambda) arrays so phase transitions during a ts/tscale sweep can be diagnosed straight from the gathered DataFrame instead of re-parsing each folder by hand. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
prabhath-c
marked this pull request as draft
July 28, 2026 11:57
Contributor
Author
|
@srmnitc, please let me know if you would like any more features for this function |
srmnitc
marked this pull request as ready for review
July 28, 2026 13:28
Member
|
@prabhath-c looks good to me, shall I merge it? |
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.
This pull request enhances the
gather_resultsfunction incalphy.postprocessingby adding new quality metrics and diagnostics to its output DataFrame, and introduces comprehensive tests for these additions. The main improvements include support for free energy error, dissipation, and detailed per-replica diagnostics, as well as robust handling of missing files and calculation modes.Enhancements to result metrics:
gather_resultsnow includes new columns:free_energy_error,dissipation,ts_dissipation,forward_energy_diff,backward_energy_diff,forward_lambda, andbackward_lambda, with clear documentation for each.np.nanorNone) to ensure consistent output even when data is missing. [1] [2]Parsing and diagnostics improvements:
ts) mode, the function now parses the statistical error fromtemperature_sweep.datand extracts per-replica forward/backward energy differentials and lambda arrays fromts.forward_i.dat/ts.backward_i.datfiles, providing detailed diagnostics for phase transitions.Testing:
tests/test_postprocessing.pybuilds minimal calculation folders and validates the new metrics and fallback behaviors for different calculation modes and missing files.