ZeroOccVirtElements Subroutine

public subroutine ZeroOccVirtElements(Coeff)

Arguments

Type IntentOptional Attributes Name
real(kind=dp) :: Coeff(NoOrbs,NoOrbs)

Contents

Source Code


Source Code

    subroutine ZeroOccVirtElements(Coeff)

! This routine sets all the elements of the coefficient matrix that connect occupied and virtual orbitals to 0.
! This ensures that only occupied mix with occupied and virtual mix with virtual.

        HElement_t(dp) :: Coeff(NoOrbs, NoOrbs)
        integer :: i, j

        do i = 1, NoOcc
            do j = NoOcc + 1, NoOrbs
                Coeff(i, j) = 0.0_dp
                Coeff(j, i) = 0.0_dp
            end do
        end do

    end subroutine ZeroOccVirtElements