-
Notifications
You must be signed in to change notification settings - Fork 81
Symmetry v2 - minor fixes and enhancements #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Contributor
weisscharlesj
commented
Sep 20, 2025
- Fixed docstrings not appearing for multiple functions due to decorators.
- Fixed a few typos in character table data in tables.py. Multiple are due to common errors in obscure point groups that have propagated over the years (see J. Chem. Educ. 84 (11), 1882-1884). This reference has been included in tables.py along with notes where appropriate.
- Fixed docstring typos (indentations and parameter orders).
- Added symmetry operation coefficients to print_header() and print_table() for user convenience.
- Added symmetry.ipynb notebook to the example folder.
Fixed issue with some docstrings not appearing due to the return_dict and return_dict_method decorators. Also fixed output indentations in docstring examples.
Added coefficients to symmetry operation symbols in print_header() and print_table() functions as a convenience for the user. This makes it easier for the user to know the order, type, and number of symmetry operations for a point group without having to pull out character tables from another source.
Fixed typos in tables.py data. Multiple are due to errors in character tables. See J. Chem. Educ. 84(11), 1882-1884 for explanation of errors that have propagated over the years.
Removed unnecessary print() and updated docstring to match parameter order in the function.
Added symmetry.ipynb examples to the examples folder demonstrating key features of the symmetry module.
Fixed docstring examples causing docstring tests to fail. Added to .gitignore file.
Fixed additional errors in docstring tests.
Fixed _normalize_salcs() issue with it not normalizing ints as intended. calc_salc_func() outputs now are more consistent, and avoids errors in edge cases. Updated tests accordingly by changing variables from x to 1.0*x.
Modified _normalize_salcs() so that coefficients such as 1.0 and 2.0 are returned as ints. This cleans up the output for the user. For example, instead of getting [1.0*a + 1.0*b + 1.0*c], it now returns [a + b + c]. Updated tests accordingly.
Added _normalize_salcs_expr() to normalize SALCs from the projection operator method. This simplifies the output from [4*a + 4*b + 4*c] to [a + b + c], for example.
|
This PR is ready for review. It fixes a few minor bugs and typos in the symmetry module and adds some enhancements for user convenience and makes the SALC outputs more consistent across examples. Bug fixes
Enhancements
|
|
This looks great, I'll try to mint a new patch release of ChemPy ASAP. Thank you for this. |
|
Released as v0.10.1 |
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.