fix: write the QMCFC dummy row in vel, force, and charge files - #191
Open
galjos wants to merge 1 commit into
Open
fix: write the QMCFC dummy row in vel, force, and charge files#191galjos wants to merge 1 commit into
galjos wants to merge 1 commit into
Conversation
The QMCFC header always counts one extra atom, but the dummy X row was only written for position trajectories. Velocity, force and charge files therefore declared n_atoms+1 atoms while containing only n_atoms rows per frame, so read_trajectory rejected them as corrupt. The dummy row is now written for every trajectory type, matching what the reader strips, so header and body agree.
Contributor
|
PYLINT REPORT Your code has been rated at 9.78/10 Full reportRaw metrics
Duplication
Messages by category
% errors / warnings by module
Messages
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #191 +/- ##
=======================================
Coverage 93.94% 93.94%
=======================================
Files 177 177
Lines 9227 9229 +2
=======================================
+ Hits 8668 8670 +2
Misses 559 559
🚀 New features to boost your workflow:
|
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.
The dummy X row was only written for xyz trajectories while the header always counted it, so vel, force, and charge files disagreed with their own header and could not be read back. The row is now written for all four types, matching what
FrameReader._check_qmcfcstrips on read.The added test round-trips all four trajectory types through write and read.
Fixes #190.