Closed HalblauterPC closed 1 year ago
Update:
I get the same integral values, when I sum up the integrals by primitives individually as follows
for (int p1 = 0; p1 < m1; p1++){
for (int p2 = 0; p2 < m2; p2++){
auto prim1 = ao_basis[s1].extract_primitive(p1); //normalized primitive
auto prim2 = ao_basis[s2].extract_primitive(p2); //normalized primitive
overlap_dipole_engines[id].compute(prim1, prim2);
kinetic_engines[id].compute(prim1, prim2);
potential_engines[id].compute(prim1, prim2);
if (n1 == 1 && n2 == 1) {
int orbital_index = bf1 * Norbitals + bf2;
auto coef = (ao_basis[s1].coeff_normalized(0,p1)*ao_basis[s2].coeff_normalized(0,p2));
smat[orbital_index] += coef*buf_vec1[0][0]; // evtl. buf_vec1[0][0]
Dx[orbital_index] -= coef*buf_vec1[0][1];
Dy[orbital_index] -= coef*buf_vec1[0][2];
Dz[orbital_index] -= coef*buf_vec1[0][3];
}
}
I also tried with the direct coefficients (auto c1 = ao_basis[s1].contr.at(0).coeff[p1];
) and changing to extract_primitive(p1, false)
, but I still don't get normalized overlap in any combination of those.
Also, when printing the basis set, it differs quite from the coefficients saved in lib/basis/ for several basis sets tested. e.g.
Shell:( O={0,0,-0.699999909988376}
{l=0,sph=0}
13.01 0.0961066598498265
1.962 0.163020057680412
0.4446 0.185545117025848
1 3
Shell:( O={0,0,-0.699999909988376}
{l=0,sph=0}
0.122 0.147122794428574
1 1
Shell:( O={0,0,-0.699999909988376}
{l=1,sph=0}
0.727 0.956881375059565
3 1
...
vs.
H 0
S 3 1.00
13.0100000 0.0196850
1.9620000 0.1379770
0.4446000 0.4781480
S 1 1.00
0.1220000 1.0000000
P 1 1.00
0.7270000 1.0000000
The problem was that I included the libint2::Shell::do_enforce_unit_normalization(false);
line of the Hartree-Fock example.
This disables the normalization of convoluted Shells. I don't know why this is disabled in the HF example, but for normalized overlap, which I need here, this is not correct. Removing the line or changing it to true
corrects the behavior.
When using the library as follows:
After printing out the results (Here the diagonals for H2 in the aug-cc-pVDZ basis), I get:
where the BF with several primitives seem only to evaluate one of them. Am I missing something?