Skip to content

Conversation

@weisscharlesj
Copy link
Contributor

  • 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.
@weisscharlesj weisscharlesj changed the title Symmetry v2 - minor fixes and enhancements [WIP] Symmetry v2 - minor fixes and enhancements Sep 20, 2025
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.
@weisscharlesj weisscharlesj changed the title [WIP] Symmetry v2 - minor fixes and enhancements Symmetry v2 - minor fixes and enhancements Sep 21, 2025
@weisscharlesj
Copy link
Contributor Author

weisscharlesj commented Sep 21, 2025

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

  • 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 formatting and example formatting for doctest.
  • Fixed issue with _normalize_salc() handling of ints.

Enhancements

  • Added symmetry operation coefficients to print_header() and print_table() for user convenience. Now the user can see both the symmetry operations and the number of each.
  • Update _normalize_salcs() so it now returns integer value coefficients as ints, simplifying the output to the user. For example, instead of [1.0a + 1.0b + 1.0*c], it now returns [a + b + c].
  • Added normalization to calc_salc_projection() to simplify output to the user. For example, instead of [4.0a + 4.0b + 4.0*c], it now returns [a + b + c].
  • Added symmetry.ipynb notebook, containing demonstrations of key features of the symmetry module, to the example folder.

@bjodah bjodah merged commit af3a0ad into bjodah:master Sep 22, 2025
1 of 2 checks passed
@bjodah
Copy link
Owner

bjodah commented Sep 22, 2025

This looks great, I'll try to mint a new patch release of ChemPy ASAP. Thank you for this.

@bjodah
Copy link
Owner

bjodah commented Sep 22, 2025

Released as v0.10.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants