generate_uniform_integrals Subroutine

public subroutine generate_uniform_integrals()

Uses

Arguments

None

Contents


Source Code

    subroutine generate_uniform_integrals

        use SystemData, only: nSpatOrbs, nel, lms

        integer :: i, j, k, l, iunit

        open (newunit=iunit, file="FCIDUMP")
        write(iunit, *) "&FCI NORB=", nSpatOrbs, ",NELEC=", nel, "MS2=", lms, ","
        write(iunit, "(A)", advance="no") "ORBSYM="
        do i = 1, nSpatOrbs
            write(iunit, "(A)", advance="no") "1,"
        end do
        write(iunit, *)
        write(iunit, *) "ISYM=1,"
        write(iunit, *) "&END"

        do i = 1, nSpatOrbs
            do j = 1, nSpatOrbs
                do l = 1, nSpatOrbs
                    do k = 1, nSpatOrbs
                        write(iunit, *) h_cast(1.0_dp), i, j, k, l
                    end do
                end do
            end do
        end do
        do i = 1, nSpatOrbs
            do j = i, nSpatOrbs
                write(iunit, *) h_cast(1.0_dp), i, j, 0, 0
            end do
        end do

        write(iunit, *) h_cast(0.0_dp), 0, 0, 0, 0

        close (iunit)

    end subroutine generate_uniform_integrals