Conversation
Add a new command-line option `--tol` with which the user can specify the tolerance value added to the box length `lbox` to account for the right-open bin interval of the last bin.
Add `discrete_pos.py` to the list of files whose format is checked by black.
Fix the function `mdtools.structure.discrete_pos_trj` by settings the bin edges to the return value of the function `mdtools.check.bin_edges`. Before, the bin edges were checked but nor changed if they were erroneous.
Add a new argument `rename` to the function `mdtools.file_handler.save_dtrj`. If set to `True` and a file with the given file name already exists, rename it to `fname.bak_timestamp` to back it up.
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.
Refactor script
discretization/discrete_pos.py; Fix functionmdtools.check.bins; Fix functionmdtools.structure.discrete_pos_trjType of change
Proposed changes
Bug Fixes:
mdtools.structure.discrete_pos_trjby setting the bin edges to the return value of the functionmdtools.check.bin_edges. Before, the bin edges were checked but not changed if they were erroneous.mdtools.check.binsthat was introduced in commit f69d2fc (Pull Request New scriptsubvolume_charge.py#119). In this commit anifcondition was changed such that although the variablestepmight beNoneit is compared to an integer which raises aTypeError.New Features:
discretization/discrete_pos.py: Add new command-line option--tolwith which the user can specify the tolerance value that is added to the box length to account for the right-open bin interval of the last bin.mdtools.file_handler.save_dtrj: Add a new argumentrename. If set toTrueand a file with the given file name already exists, rename it tofname.bak_timestampto back it up.PR checklist