Repository navigation
Add option to set the symmetry number for orientational entropy - #499
Open
harryswift01 wants to merge 5 commits into
Open
harryswift01 wants to merge 5 commits into
harryswift01 wants to merge 5 commits into
Conversation
skfegan
approved these changes
Nov 27, 2026
skfegan
left a comment
Member
There was a problem hiding this comment.
Looks good. This change should allow users to easily correct the symmetry numbers for cases when the RDKit based determination of symmetry fails.
This branch has not been deployed
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.
Summary
This PR adds a
symmetry_numberoption to set the rotational symmetry number σ used in the orientational entropy, instead of the value computed from the RDKit bond graph. The graph count can overestimate σ (e.g. 24 instead of 12 for methane), which can make the orientational term zero. The computed value stays the default, so existing results do not change.Closes #497
Changes
--symmetry_number(CLI and YAML). Entries areVALUE(all molecule groups) orRESNAME:VALUE(molecules whose first residue has that name). A residue entry takes precedence over a plain value, and unmatched groups keep the computed value.CodeEntropy --symmetry_number 12CodeEntropy --symmetry_number MET:12 NH3:3symmetry_number: ["MET:12", "NH3:3"]parse_symmetry_number()as the single parser for the option. Invalid values (negative, non-integer, malformed or duplicate) are rejected invalidate_inputs()before the run starts, and values above 24 log a warning.LevelDAG._initialise_neighbor_metadata().0keeps its existing meaning (spherical, no orientational entropy).Testing
LevelDAG(all groups, per residue, precedence, unmatched entries).Impact
symmetry_numberis set.VALUEalso applies to water unlesswater_entropyis enabled.Checklist
pyproject.tomlchanged, the lower bounds were reviewed deliberately