New entropy functions and dump_colored_trj. #127
Merged
matteobecchi merged 27 commits intoGMPavanLab:mainfrom Nov 7, 2025
Merged
New entropy functions and dump_colored_trj. #127matteobecchi merged 27 commits intoGMPavanLab:mainfrom
matteobecchi merged 27 commits intoGMPavanLab:mainfrom
Conversation
Collaborator
Author
|
I started to make the names of parameters in functions and methods consistent (see issue #125 ). I did the easy part, what remains to be done requires to modify the lens functions, it will be a future PR. |
andrewtarzia
requested changes
Nov 7, 2025
Collaborator
andrewtarzia
left a comment
There was a problem hiding this comment.
Great work @matteobecchi
andrewtarzia
approved these changes
Nov 7, 2025
SimoneMartino98
approved these changes
Nov 7, 2025
Collaborator
SimoneMartino98
left a comment
There was a problem hiding this comment.
All good, Approved
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.
Requested Reviewers: @andrewtarzia @SimoneMartino98
Two improvements:
First, I added the method Trj.dump_color_trj() which takes an array of labels and saves a .xyz file with the atoms correctly labelled. There is an analogous function for OnionSmoothInsight, but in this way the user can do it with any array of labels.
Second, I created two new functions to compute Shannon entropy and information gain, respectively. The idea is that these functions are better than the many functions implemented before, so the user should stick to those.
They are better in the sense that:
I added to the old functions a warning saying they are deprecated, then I left them there for backward compatibility.
I updated the examples and recipes accordingly.