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

Solid harm prefact #38

Merged
merged 9 commits into from
May 1, 2024
Merged

Solid harm prefact #38

merged 9 commits into from
May 1, 2024

Conversation

arthur-lin1027
Copy link
Collaborator

The inner product obtaining our expansion coefficients erroneously contained the solid harmonic prefactor. I added code to divide through by the prefactor. This causes the expansion coefficients to actually converge to the underlying atomic gaussian, which is necessary.

I currently cleaning up an example notebook that shows that the expansion of an isotropic gaussian does indeed converge.

However, an anisotropic gaussian does not yet converge... I have some suspicions.

…est never fails. Also moved the scaling outside of the inner loop, significantly speeds up the iterations
Copy link
Contributor

@SeonwooH SeonwooH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great!

@curiosity54
Copy link
Collaborator

curiosity54 commented Apr 30, 2024

hey, i had a rather quick look, but was the purpose here to modify the density expansion coefficients? I am afraid that adding the additional 1/sqrt{2l+1} affects how higher order features are constructed down the line
could you perhaps give me an overview of how the density expansion is now normalized?

@arthur-lin1027
Copy link
Collaborator Author

arthur-lin1027 commented Apr 30, 2024

hey, i had a rather quick look, but was the purpose here to modify the density expansion coefficients? I am afraid that adding the additional 1/sqrt{2l+1} affects how higher order features are constructed down the line could you perhaps give me an overview of how the density expansion is now normalized?

Hi @curiosity54 ,

I made these changes under the assumption that a linear combination of expansion coefficients and basis functions should recreate the underlying gaussian. I identified that this 1/sqrt(2l+1) factor was erroneously included and needed to be divided out in order to recreate the underlying gaussian.

@arthur-lin1027
Copy link
Collaborator Author

To reiterate one more time, I'm trying to unify equations 15 and 16 within the AniSOAP paper, but right below equation 16, we make an incorrect statement saying that

with $R_l^m(r) = r^l * Y_l^m(\hat{r})$

This is incorrect, because actually $R_l^m(r) = \sqrt{\frac{4\pi}{2l+1}}r^l * Y_l^m(\hat{r})$. Hence I need to divide out this factor, because in the code, we are calculating $R_l^m$, but we actually want $r^l * Y_l^m(\hat{r})$ (eqn 15 in the paper)

@curiosity54
Copy link
Collaborator

curiosity54 commented Apr 30, 2024

okay, thank you! i was a little unsure of the prefactor being there in the definition of real-valued spherical harmonics but all good if this makes the anisoap and isotropic gaussian expansion consistent. (ps. incidentally, this made me realize there's a typo in Eq 17, l' must be equal to l)

arthur-lin1027 and others added 4 commits April 30, 2024 17:47
from a for loop to an np divide.

Co-authored-by: Rose K. Cersonsky <[email protected]>
….py
"

Turns out, can't use numpy.divide here, because each entry in sph_to_cart has a different shape that numpy can't figure out how to resolve.
This reverts commit e896cbf.
@rosecers
Copy link
Contributor

rosecers commented Apr 30, 2024 via email

@arthur-lin1027 arthur-lin1027 merged commit 2c93262 into main May 1, 2024
4 checks passed
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.

4 participants