Skip to content

Commit

Permalink
// K calc
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdAmmar committed Dec 12, 2024
1 parent d28c033 commit 84a989b
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions src/AOtoMO/exchange_matrix_AO_basis.f90
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,20 @@ subroutine exchange_matrix_AO_basis_hpc(nBas, ERI_size, P, ERI_chem, K)



! !$OMP PARALLEL SHARED (NONE)
! !$OMP PRIVATE ()
! !$OMP SHARED ()
! !$OMP DO
!$OMP PARALLEL DEFAULT (NONE) &
!$OMP PRIVATE (nu, si, la, mu, &
!$OMP nunu0, nunu, lanu, numu, mumu0, mumu, simu, lala0, nula, &
!$OMP nunununu, nulanula, lanulanu, lanulanu0, nulanula0, &
!$OMP nulanusi, lanulamu, lanunusi, lanusinu , numumumu, &
!$OMP nulamula, nulalamu, lanumusi, lanusimu, nulamusi, &
!$OMP nulasimu, simunula, simulanu) &
!$OMP SHARED (nBas, P, ERI_chem, K)
!$OMP DO
do nu = 1, nBas

nunu0 = shiftr(nu * (nu - 1), 1)
nunu = nunu0 + nu

nunununu = shiftr(nunu * (nunu - 1), 1) + nunu
K(nu,nu) = -P(nu,nu) * ERI_chem(nunununu)

Expand Down Expand Up @@ -219,8 +225,8 @@ subroutine exchange_matrix_AO_basis_hpc(nBas, ERI_size, P, ERI_chem, K)

enddo ! mu
enddo ! nu
! !$OMP END DO
! !$OMP END PARALLEL
!$OMP END DO
!$OMP END PARALLEL


do nu = 1, nBas
Expand All @@ -234,3 +240,6 @@ subroutine exchange_matrix_AO_basis_hpc(nBas, ERI_size, P, ERI_chem, K)

! ---




0 comments on commit 84a989b

Please sign in to comment.