calc_csf_i Subroutine

public pure subroutine calc_csf_i(ilut, step_vector, b_vector, occ_vector)

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(in) :: ilut(0:niftot)
integer, intent(out) :: step_vector(nSpatOrbs)
integer, intent(out) :: b_vector(nSpatOrbs)
real(kind=dp), intent(out) :: occ_vector(nSpatOrbs)

Contents

Source Code


Source Code

    pure subroutine calc_csf_i(ilut, step_vector, b_vector, occ_vector)
        ! routine to calculate the csf information for specific outputted
        ! information
        integer(n_int), intent(in) :: ilut(0:niftot)
        integer, intent(out) :: step_vector(nSpatOrbs), b_vector(nSpatOrbs)
        real(dp), intent(out) :: occ_vector(nSpatOrbs)

        integer :: b_int, i, step
        ! copy the stuff from below.. when do i want to allocate the objects?
        ! hm..
        step_vector = 0
        b_vector = 0
        occ_vector = 0.0_dp

        b_int = 0

        do i = 1, nSpatOrbs
            step = getStepvalue(ilut, i)
            step_vector(i) = step
            select case (step)
            case (1)
                occ_vector(i) = 1.0_dp
                b_int = b_int + 1
            case (2)
                occ_vector(i) = 1.0_dp
                b_int = b_int - 1
            case (3)
                occ_vector(i) = 2.0_dp
            end select

            b_vector(i) = b_int
        end do
    end subroutine calc_csf_i