psi4 / psi4numpy

Combining Psi4 and Numpy for education and development.
BSD 3-Clause "New" or "Revised" License
337 stars 157 forks source link

ordering of angular moment-indexed basis functions in psi4 #134

Open linminhtoo opened 1 year ago

linminhtoo commented 1 year ago

hello,

how can I ascertain the order of atomic orbital basis functions that psi4 uses ? e.g. for p orbital basis functions, what is the ordering of l's from -1 to +1? some programmes use l=0, l=+1, l=-1, others use l=-1, l=0, l=+1, and yet some l=+1, l=0, l=-1...

and by extension, is there a concrete way I can verify the ordering of all atomic orbital basis functions for any basis set in psi4 ??

I did a lot of googling and reading but there doesn't appear to be a straight answer in the documentation.

the closest I came was this page in the psi4 README but it is not unambiguous, as it is unclear if this is always the case. https://psicode.org/psi4manual/master/prog_blas.html#how-to-name-orbital-bases-e-g-ao-so . Note that in PSI4, the real combinations of spherical harmonic functions (see the paragraph below Eq. 15 in the Schlegel paper) are ordered as: 0, 1+, 1-, 2+, 2-, ….

thank you

loriab commented 1 year ago

Psi4 uses "standard" for cartesian (cartgauss) and shell_set and "gaussian" for solid harmonics (shgauss) https://github.com/evaleev/libint/blob/master/configure.ac#L62-L148 . After https://github.com/psi4/psi4/pull/2861 is merged, you'll be able to select standard or gaussian for solid harmonics at psi4 compile time. https://github.com/psi4/psi4/blob/master/psi4/src/psi4/libmints/solidharmonics.cc may also be a file in psi4 that interests you.

linminhtoo commented 1 year ago

Psi4 uses "standard" for cartesian (cartgauss) and shell_set and "gaussian" for solid harmonics (shgauss) https://github.com/evaleev/libint/blob/master/configure.ac#L62-L148 . After psi4/psi4#2861 is merged, you'll be able to select standard or gaussian for solid harmonics at psi4 compile time. https://github.com/psi4/psi4/blob/master/psi4/src/psi4/libmints/solidharmonics.cc may also be a file in psi4 that interests you.

hi @loriab , thank you so much for your very quick reply.

i will have a deep look at these files.

a follow-up question, how can I verify the ordering of the different basis functions and shells for a given element?

e.g. for def2-SVP basis set, for carbon, there are 3 sets of s AOs, 2 sets of p AOs (3 orbitals each) and finally 1 set of d AOs (5 orbitals if spherical, 6 orbitals if cartesian). I got this from Basis Set Exchange. do I assume the order is as written in the psi4 basis set file?

i.e. https://www.basissetexchange.org/basis/def2-svp/format/psi4/?version=1&elements=6 all of the s AOs are listed first, followed by all of the p AOs, and finally the d AOs.

can I assume the same ordering for the rows & columns of the density matrix?

thank you very much.