mult_hamil_vector_direct_ci_real Subroutine

public subroutine mult_hamil_vector_direct_ci_real(input_vector, output_vector)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: input_vector(:)
real(kind=dp), intent(out) :: output_vector(:)

Contents


Source Code

    subroutine mult_hamil_vector_direct_ci_real(input_vector, output_vector)
        use direct_ci, only: perform_multiplication, transfer_from_block_form, transfer_to_block_form
        use FciMCData, only: davidson_ras, davidson_classes, davidson_strings, davidson_iluts, davidson_excits
        use SystemData, only: ecore

        real(dp), intent(in) :: input_vector(:)
        real(dp), intent(out) :: output_vector(:)

        ! The davidson code uses a single vector to store amplitudes. However, the direct CI code
        ! works in terms of alpha and beta strings and so uses block matrices. This routine will
        ! transfer the vector to block form.

        call transfer_to_block_form(davidson_ras, davidson_classes, input_vector, direct_ci_inp)

        call perform_multiplication(davidson_ras, davidson_classes, davidson_strings, davidson_iluts, davidson_excits, &
                                    direct_ci_inp, direct_ci_out)

        call transfer_from_block_form(davidson_ras, davidson_classes, output_vector, direct_ci_out)

        ! The above multiplication does not include the nuclear-nuclear energy, so add this
        ! contribution now.
        output_vector = output_vector + ecore * input_vector
    end subroutine mult_hamil_vector_direct_ci_real