Skip to content
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

Add algorithm to compute real Gaunt coefficient #24070

Merged
merged 5 commits into from Sep 21, 2022

Conversation

AntiPhoton47
Copy link
Contributor

I have coded a symbolic algorithm to compute the integral of three real spherical harmonics based on the outline presented in Homeier and Steinborn (1996). The appropriate import lines, references, and documentation have also been added throughout the entire file.

References to other Issues or PRs

I proposed these changes with the help of @smichr in pull request #24035, but I am new to GitHub and didnt merge the changes properly so I am opening a new pull request.

Brief description of what is fixed or changed

An algorithm to compute the real Gaunt coefficient has been added as a function titled real_gaunt, along with the appropriate import lines, references, and documentation scattered throughout the wigner.py file. A test function titled test_realgaunt was added to the testing file within the physics module as well. Lastly, the test functions for the clebsch-gordon function were all condensed down to one.

Other comments

The algorithm uses the already included Gaunt algorithm, but I can find another if this is problematic (due to copyright issues perhaps). Please also let me know if anyone finds any bugs or other conflicting lines.

EDIT: Very big thanks to Christopher Smith for suggesting a number of modifications that have made the program more concise and reduced the runtime significantly.

Release Notes

  • physics.wigner
    • Added real_gaunt function to compute the integral of 3 real spherical harmonics.

@sympy-bot
Copy link

sympy-bot commented Sep 19, 2022

Hi, I am the SymPy bot (v167). I'm here to help you write a release notes entry. Please read the guide on how to write release notes.

Your release notes are in good order.

Here is what the release notes will look like:

  • physics.wigner
    • Added real_gaunt function to compute the integral of 3 real spherical harmonics. (#24070 by @AntiPhoton47)

This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.12.

Click here to see the pull request description that was parsed.
<!-- Your title above should be a short description of what
was changed. Do not include the issue number in the title. -->

I have coded a symbolic algorithm to compute the integral of three real spherical harmonics based on the outline presented in Homeier and Steinborn (1996). The appropriate import lines, references, and documentation have also been added throughout the entire file.

#### References to other Issues or PRs
<!-- If this pull request fixes an issue, write "Fixes #NNNN" in that exact
format, e.g. "Fixes #1234" (see
https://tinyurl.com/auto-closing for more information). Also, please
write a comment on that issue linking back to this pull request once it is
open. -->

I proposed these changes with the help of @smichr in pull request #24035, but I am new to GitHub and didnt merge the changes properly so I am opening a new pull request.

#### Brief description of what is fixed or changed

An algorithm to compute the real Gaunt coefficient has been added as a function titled real_gaunt, along with the appropriate import lines, references, and documentation scattered throughout the wigner.py file. A test function titled test_realgaunt was added to the testing file within the physics module as well. Lastly, the test functions for the clebsch-gordon function were all condensed down to one.

#### Other comments

The algorithm uses the already included Gaunt algorithm, but I can find another if this is problematic (due to copyright issues perhaps). Please also let me know if anyone finds any bugs or other conflicting lines.

EDIT: Very big thanks to Christopher Smith for suggesting a number of modifications that have made the program more concise and reduced the runtime significantly.

#### Release Notes

<!-- Write the release notes for this release below between the BEGIN and END
statements. The basic format is a bulleted list with the name of the subpackage
and the release note for this PR. For example:

* solvers
  * Added a new solver for logarithmic equations.

* functions
  * Fixed a bug with log of integers.

or if no release note(s) should be included use:

NO ENTRY

See https://github.com/sympy/sympy/wiki/Writing-Release-Notes for more
information on how to write release notes. The bot will check your release
notes automatically to see if they are formatted correctly. -->

<!-- BEGIN RELEASE NOTES -->

* physics.wigner
  * Added `real_gaunt` function to compute the integral of 3 real spherical harmonics. 

<!-- END RELEASE NOTES -->

Update

The release notes on the wiki have been updated.

auto-merge was automatically disabled September 20, 2022 03:20

Head branch was pushed to by a user without write access

sympy/physics/wigner.py Outdated Show resolved Hide resolved
sympy/physics/wigner.py Outdated Show resolved Hide resolved
sympy/physics/wigner.py Outdated Show resolved Hide resolved
sympy/physics/wigner.py Outdated Show resolved Hide resolved
sympy/physics/wigner.py Outdated Show resolved Hide resolved
@smichr
Copy link
Member

smichr commented Sep 20, 2022

If, in this branch, you git reset head~8 and commit as "review edits" (and even squash that 4th commit into your 3rd commit) and then push here with git push -f AntiPhoton47 patch-1 that will clean up the several small additions that we have made.

@AntiPhoton47
Copy link
Contributor Author

I'm still doing something wrong and i'm not sure what it is. I am in my local directory and I first entered git reset head~8, then I entered git commit -m "review edits", and finally I entered git push -f origin patch-1.

@AntiPhoton47
Copy link
Contributor Author

The odd part is that my local clone is the version we had before I reset the head, but the version that was pushed to my remote repository is the original version I opened the pull request with.

@smichr
Copy link
Member

smichr commented Sep 21, 2022

Looks good to me. This will merge when tests pass.

@smichr smichr merged commit 796c90a into sympy:master Sep 21, 2022
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.

None yet

3 participants