10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-06-29 16:34:50 +02:00

Accelerated pot_mo_ints.irp.f

This commit is contained in:
Anthony Scemama 2016-06-17 12:42:59 +02:00
parent 27571fc087
commit 5a4453b74e

View File

@ -6,24 +6,23 @@ BEGIN_PROVIDER [double precision, mo_nucl_elec_integral, (mo_tot_num_align,mo_to
! interaction nuclear electron on the MO basis ! interaction nuclear electron on the MO basis
END_DOC END_DOC
mo_nucl_elec_integral = 0.d0 double precision, allocatable :: X(:,:)
!$OMP PARALLEL DO DEFAULT(none) & allocate(X(ao_num_align,mo_tot_num))
!$OMP PRIVATE(i,j,i1,j1,c_j1,c_i1) &
!$OMP SHARED(mo_tot_num,ao_num,mo_coef, & call dgemm('N','N',ao_num,mo_tot_num,ao_num, &
!$OMP mo_nucl_elec_integral, ao_nucl_elec_integral) 1.d0, &
do i = 1, mo_tot_num ao_nucl_elec_integral, size(ao_nucl_elec_integral,1), &
do j = 1, mo_tot_num mo_coef,size(mo_coef,1), &
do i1 = 1,ao_num 0.d0, X, size(X,1))
c_i1 = mo_coef(i1,i)
do j1 = 1,ao_num call dgemm('T','N',mo_tot_num,mo_tot_num,ao_num, &
c_j1 = c_i1*mo_coef(j1,j) 1.d0, &
mo_nucl_elec_integral(j,i) = mo_nucl_elec_integral(j,i) + & mo_coef,size(mo_coef,1), &
c_j1 * ao_nucl_elec_integral(j1,i1) X, size(X,1), &
enddo 0.d0, mo_nucl_elec_integral, size(mo_nucl_elec_integral,1))
enddo
enddo deallocate(X)
enddo
!$OMP END PARALLEL DO
END_PROVIDER END_PROVIDER
@ -36,25 +35,25 @@ BEGIN_PROVIDER [double precision, mo_nucl_elec_integral_per_atom, (mo_tot_num_al
! where Rk is the geometry of the kth atom ! where Rk is the geometry of the kth atom
END_DOC END_DOC
mo_nucl_elec_integral_per_atom = 0.d0 allocate(X(ao_num_align,mo_tot_num))
do k = 1, nucl_num double precision, allocatable :: X(:,:)
!$OMP PARALLEL DO DEFAULT(none) &
!$OMP PRIVATE(i,j,i1,j1,c_j1,c_i1) & do k = 1, nucl_num
!$OMP SHARED(mo_tot_num,ao_num,mo_coef, &
!$OMP mo_nucl_elec_integral_per_atom, ao_nucl_elec_integral_per_atom,k) call dgemm('N','N',ao_num,mo_tot_num,ao_num, &
do i = 1, mo_tot_num 1.d0, &
do j = 1, mo_tot_num ao_nucl_elec_integral_per_atom, size(ao_nucl_elec_integral_per_atom,1),&
do i1 = 1,ao_num mo_coef,size(mo_coef,1), &
c_i1 = mo_coef(i1,i) 0.d0, X, size(X,1))
do j1 = 1,ao_num
c_j1 = c_i1*mo_coef(j1,j) call dgemm('T','N',mo_tot_num,mo_tot_num,ao_num, &
mo_nucl_elec_integral_per_atom(j,i,k) = mo_nucl_elec_integral_per_atom(j,i,k) + & 1.d0, &
c_j1 * ao_nucl_elec_integral_per_atom(j1,i1,k) mo_coef,size(mo_coef,1), &
enddo X, size(X,1), &
enddo 0.d0, mo_nucl_elec_integral_per_atom(1,1,k), size(mo_nucl_elec_integral_per_atom,1))
enddo
enddo
!$OMP END PARALLEL DO
enddo enddo
deallocate(X)
END_PROVIDER END_PROVIDER