TREX-CoE / trexio

TREX I/O library
https://trex-coe.github.io/trexio/
BSD 3-Clause "New" or "Revised" License
49 stars 14 forks source link

Generally contracted basis sets and number of primitives #157

Closed stefabat closed 6 months ago

stefabat commented 6 months ago

I just have a simple question regarding generally contracted basis sets. The example on the website (the H2 molecule) is shown for a segmented basis set, and I was wondering what prim_num stands for in case of a generally contracted basis.

Say I have 5 s-type primitives, which I contract into 3 contracted s orbitals (5s)->[3s]. Even though I only have 5 exponents for a generally contracted basis set, if I understood correctly the three contracted s orbitals define three different shells. Each of these shells has a radial function made of 5 primitive functions, thus I would expect prim_num=15 in this case. Is this correct?

If this is the case, this means that for generally contracted basis sets there will be a lot of redundant data for large systems made of the same atom type.

scemama commented 6 months ago

Hi, you need to convert from the generally contracted to the segmented representation. So yes, you should have prim_num=15. It is true that there will be some redundancy in the storage, but I don't think it wil be a problem, compared to the size of integrals and other things that can be stored. If one day it becomes a problem, the good way to proceed would be to allow writing directly segmented or generally contracted basis sets, and to read the data in any of these two formats, without necessarily knowing how the data is stored.