theochem / horton

HORTON: Helpful Open-source Research TOol for N-fermion systems
http://theochem.github.io/horton/
GNU General Public License v3.0
94 stars 40 forks source link

The ordering of P orbitals for pure Gaussian functions #298

Closed yingxingcheng closed 1 year ago

yingxingcheng commented 1 year ago

According to the implementation of integrals, when spherical or pure Gaussian functions are used, Horton (3 or 2) and Psi4 (version=1.0.x-1.7.x) should give the same integrals. However, it is not always true, e.g., oxygen pairs with cc-pVDZ basis set.

I'm not sure if this a potential issue, but I found the ordering of p angular momentum for pure Gaussian functions is still x y z instead of z x y by default:

https://github.com/theochem/horton/blob/3a5adfeac6eba42a8cc468ff16a4b0b9a34ee69e/horton/gbasis/iobas.py#L35-L41

Are there some specific reasons for this?

PaulWAyers commented 1 year ago

@tovrstra or @kimt33 any thoughts on this? I know that PySCF uses the same convention except that it uses $x,y,z$ order for the p's instead of the (more sensible) order from wikipedia ($y,z,x$).

yingxingcheng commented 1 year ago

The conventional order used in Horton (version=2.1.1) is here. But, for $p$ orbitals it is a little bit different from the implementation mentioned above.

yingxingcheng commented 1 year ago

I guess because Gaussian and Molden also use the order " $x$ $y$ $z$ ", and no one cares about its order. ;)

PaulWAyers commented 1 year ago

@yingxingcheng did you get this sorted out? I assume that @tovrstra can help you with this.

yingxingcheng commented 1 year ago

I've received confirmation from David, as it is a common practice in other software such as Gaussian.

tovrstra commented 1 year ago

As far as I remember, Gaussian does not have "pure p" functions. I believe p functions are written out in Cartesian order, even when doing a calculation with pure basis functions. If you have an example showing the opposite, it would be good to attach a wavefunction file and explain how it was obtained. (A small example would be Ideal, so it can be used in a unit test.)