evaleev / libint

Libint: high-performance library for computing Gaussian integrals in quantum mechanics
Other
218 stars 96 forks source link

Different contraction coefficients between .gbs and std::cout<<libint2::Shell #288

Closed FreemanTheMaverick closed 6 months ago

FreemanTheMaverick commented 7 months ago

Dear Prof. Valeev,

I notice that the contraction coefficients written in .gbs and those given by std::cout<<libint2::Shell; are different. For example, the basis set file says the first shell of oxygen 6-31g* is

O     0 
S   6   1.00
   5484.6717000              0.0018311        
    825.2349500              0.0139501        
    188.0469600              0.0684451        
     52.9645000              0.2327143        
     16.8975700              0.4701930        
      5.7996353              0.3585209        

while std::cout<<libint2::Shell; gives

Shell:( O={0,0,0}
   {l=0,sph=1}
  5484.67 0.831735
  825.235 1.53081
  188.047 2.47715
  52.9645 3.25628
  16.8976 2.79289
  5.79964 0.954938

Perhaps after reading .gbs file, libint2 somehow rescales the contraction coefficients. Could you please tell me how to retrieve the original coefficients through libint2? Thank you!

loriab commented 6 months ago

You could see if the embed_normalization_into_coefficients flag https://github.com/evaleev/libint/blob/25867986b574254ea88e41a8f29830a035167afa/include/libint2/shell.h#L131 does what you need.

FreemanTheMaverick commented 6 months ago

You could see if the embed_normalization_into_coefficients flag

https://github.com/evaleev/libint/blob/25867986b574254ea88e41a8f29830a035167afa/include/libint2/shell.h#L131 does what you need.

Thank you for your reply! When I create a basis set via libint2::BasisSet obs("6-31g*",atoms);, what should I do to toggle that flag on?

FreemanTheMaverick commented 6 months ago

I have figured it out. The function libint2::Shell::coeff_normalized(c,p) returns the wanted value.