10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-06 22:24:00 +01:00
quantum_package/src/MonoInts/mo_mono_ints.irp.f

48 lines
1.4 KiB
FortranFixed
Raw Normal View History

2014-04-16 22:16:32 +02:00
BEGIN_PROVIDER [ double precision, mo_overlap,(mo_tot_num_align,mo_tot_num)]
implicit none
integer :: i,j,n,l
double precision :: f
integer :: lmax
lmax = iand(ao_num,-4)
!$OMP PARALLEL DO SCHEDULE(STATIC) DEFAULT(NONE) &
!$OMP PRIVATE(i,j,n,l) &
!$OMP SHARED(mo_overlap,mo_coef,ao_overlap, &
!$OMP mo_tot_num,ao_num,lmax)
do j=1,mo_tot_num
do i= 1,mo_tot_num
mo_overlap(i,j) = 0.d0
do n = 1, lmax,4
!DIR$ VECTOR ALIGNED
do l = 1, ao_num
mo_overlap(i,j) = mo_overlap(i,j) + mo_coef(l,i) * &
( mo_coef(n ,j) * ao_overlap(l,n ) &
+ mo_coef(n+1,j) * ao_overlap(l,n+1) &
+ mo_coef(n+2,j) * ao_overlap(l,n+2) &
+ mo_coef(n+3,j) * ao_overlap(l,n+3) )
enddo
enddo
do n = lmax+1, ao_num
!DIR$ VECTOR ALIGNED
do l = 1, ao_num
mo_overlap(i,j) = mo_overlap(i,j) + mo_coef(n,j) * mo_coef(l,i) * ao_overlap(l,n)
enddo
enddo
enddo
enddo
!$OMP END PARALLEL DO
END_PROVIDER
BEGIN_PROVIDER [ double precision, mo_mono_elec_integral,(mo_tot_num_align,mo_tot_num)]
implicit none
integer :: i,j,n,l
BEGIN_DOC
! array of the mono electronic hamiltonian on the MOs basis
! : sum of the kinetic and nuclear electronic potential
END_DOC
do i = 1, mo_tot_num
do j = 1, mo_tot_num
mo_mono_elec_integral(i,j) = mo_nucl_elec_integral(i,j) + mo_kinetic_integral(i,j)
enddo
enddo
END_PROVIDER