1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2024-07-17 16:33:59 +02:00

Fixed mo bug

This commit is contained in:
Anthony Scemama 2022-05-05 20:49:44 +02:00
parent 5a833cf3f0
commit 1889fed100

View File

@ -669,7 +669,7 @@ integer function qmckl_compute_mo_basis_mo_vgl_doc_f(context, &
integer*8 :: LDA, LDB, LDC
info = QMCKL_SUCCESS
if (.False.) then ! fast algorithm
if (.True.) then ! fast algorithm
do j=1,point_num
mo_vgl(:,:,j) = 0.d0
do k=1,ao_num
@ -810,11 +810,12 @@ qmckl_compute_mo_basis_mo_vgl_hpc (const qmckl_context context,
#endif
for (int64_t ipoint=0 ; ipoint < point_num ; ++ipoint) {
double* restrict const vgl1 = &(mo_vgl[ipoint*5*mo_num]);
const double* restrict avgl1 = &(ao_vgl[ipoint*5*ao_num]);
double* restrict const vgl2 = vgl1 + mo_num;
double* restrict const vgl3 = vgl1 + (mo_num << 1);
double* restrict const vgl4 = vgl1 + (mo_num << 1) + mo_num;
double* restrict const vgl5 = vgl1 + (mo_num << 2);
const double* restrict avgl1 = &(ao_vgl[ipoint*5*ao_num]);
const double* restrict avgl2 = avgl1 + ao_num;
const double* restrict avgl3 = avgl1 + (ao_num << 1);
const double* restrict avgl4 = avgl1 + (ao_num << 1) + ao_num;
@ -849,6 +850,7 @@ qmckl_compute_mo_basis_mo_vgl_hpc (const qmckl_context context,
}
int64_t n;
for (n=0 ; n < nidx-4 ; n+=4) {
int64_t k = idx[n];
const double* restrict ck1 = coef_normalized_t + idx[n ]*mo_num;
@ -893,8 +895,7 @@ qmckl_compute_mo_basis_mo_vgl_hpc (const qmckl_context context,
}
}
int64_t n0 = nidx-4;
n0 = n0 < 0 ? 0 : n0;
const int64_t n0 = n < 0 ? 0 : n;
for (int64_t n=n0 ; n < nidx ; n+=1) {
const double* restrict ck = coef_normalized_t + idx[n]*mo_num;
const double a1 = av1[n];