@breif Add (E_a-E_i)*Z_ai to Pmo
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | e(:) | |||
real(kind=dp), | intent(inout) | :: | pmo(:,:) | |||
real(kind=dp), | intent(in) | :: | z(:,:) | |||
integer, | intent(in) | :: | nocc | |||
integer, | intent(in) | :: | ivec |
subroutine esum(e,pmo,z,nocc,ivec) use precision, only: dp implicit none real(kind=dp), intent(in) :: e(:) real(kind=dp), intent(inout) :: pmo(:,:) real(kind=dp), intent(in) :: z(:,:) integer, intent(in) :: nocc, ivec integer :: i, ij, j, nbf nbf = ubound(e, 1) do j = nocc+1, nbf do i = 1, nocc ij = (j-nocc-1)*nocc + i pmo(ij,ivec) = pmo(ij,ivec) + (e(j)-e(i))*z(ij,ivec) end do end do end subroutine esum