ACEsuit / Polynomials4ML.jl

Polynomials for ML: fast evaluation, batching, differentiation
MIT License
12 stars 5 forks source link

Normalization Conventions and Condon-Shortley Sign Conventions #25

Closed DexuanZhou closed 1 year ago

DexuanZhou commented 1 year ago

Regarding the normalization conventions, there are three main types (see solid_harmonics2/docs/src/SH.md for more details).

  1. Orthonormalized
  2. Schmidt semi-normalized (Racah's normalization): In this normalization, Y_0^0 is equal to 1.
  3. 4π-normalized

Polynomials4ML utilizes orthonormalized complex and real spherical harmonics, orthonormalized complex solid harmonics and Schmidt semi-normalized real solid harmonics.

As for Condon-Shortley sign convention, there are two sign conventions for associated Legendre polynomials.

  1. Include the Condon-Shortley phase factor (-1)^m
  2. Exclude the Condon-Shortley phase factor (-1)^m

Based on my understanding, Polynomials4ML includes Condon-Shortley phase factor for complex spherical harmonics, complex and real solid harmonics, but not for the real spherical harmonics.

cortner commented 1 year ago

Thank you for doing that research!!

I see - so this is why you added the (-1) factors for the real solid harmonics. So what is your proposal - should we also include the (-1) factors in the real spherical harmonics? or remove it from the real solid harmonics? I don't have too strong a view either way. What would the consequences of either decision be?

DexuanZhou commented 1 year ago

I think the inclusion or exclusion of the Condon-Shortley phase factor is relatively unimportant. We only need to check and be aware of the sign convention used in the sources we are using, and correctly account for any differences there.

cortner commented 1 year ago

In that case would you be happy to remove it from the real solid harmonics? It will save us a few lines of code and possibly even a bit of performance?

DexuanZhou commented 1 year ago

Okay, I'll remove it

cortner commented 1 year ago

thank you - most importantly it is then consistent with the spherical harmonics.

everything ready to wrap up your PR? Then we can start focusing on the actual wave function...

DexuanZhou commented 1 year ago

I'm almost finished with the unit tests and documentation, except for resolving the issue with the Laplacian ForwardDiff test. And I still need to remove the Condon-Shortley phase factor from the real solid harmonics as we discussed above. Earlier today, I merged version 0.1.0-dev into the solid harmonics 2 branch, but it looks like you made another modification after that.

cortner commented 1 year ago

closing this - but we should review and polish the documentation for all our basis sets over the next few months...