-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
4c4d29a
to
350957c
Compare
…he gaussian to converge. also added more documentation to moment_generator, clarifying the normalization constant
3797095
to
d9db76c
Compare
…est never fails. Also moved the scaling outside of the inner loop, significantly speeds up the iterations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great!
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 |
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. |
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
This is incorrect, because actually |
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) |
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.
That’s fine, only a suggestion
… On Apr 30, 2024, at 6:10 PM, arthur-lin1027 ***@***.***> wrote:
@arthur-lin1027 commented on this pull request.
In anisoap/representations/ellipsoidal_density_projection.py <#38 (comment)>:
> + solid_harm_prefact = np.sqrt((4 * np.pi) / (np.arange(lmax + 1) * 2 + 1))
+ scaled_sph_to_cart = []
+ for l in range(lmax + 1):
+ scaled_sph_to_cart.append(sph_to_cart[l] / solid_harm_prefact[l])
cannot actually make this change, because sph_to_cart is a list of 5-dimensional arrays that change depending on l. np.divide cannot understand how to unify the dimensions so I just use a for loop, plus it's more explicit here.
—
Reply to this email directly, view it on GitHub <#38 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ALKVP3WED2WUGY6YX6IK7LLZAAQGBAVCNFSM6AAAAABGOL3ILSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDAMZSG43DSNJRHE>.
You are receiving this because your review was requested.
|
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.