calc_orbital_pgen_contr_start_pchb Subroutine

private pure subroutine calc_orbital_pgen_contr_start_pchb(this, csf_i, occ_orbs, a, orb_pgen)

Type Bound

GugaAliasSampler_t

Arguments

Type IntentOptional Attributes Name
class(GugaAliasSampler_t), intent(in) :: this
type(CSF_Info_t), intent(in) :: csf_i
integer, intent(in) :: occ_orbs(2)
integer, intent(in) :: a
real(kind=dp), intent(out) :: orb_pgen

Contents


Source Code

    pure subroutine calc_orbital_pgen_contr_start_pchb(this, csf_i, occ_orbs, a, orb_pgen)
        debug_function_name("calc_orbital_pgen_contr_start_pchb")
        class(GugaAliasSampler_t), intent(in) :: this
        type(CSF_Info_t), intent(in) :: csf_i
        integer, intent(in) :: occ_orbs(2), a
        real(dp), intent(out) :: orb_pgen

        integer :: i, j, ij, ab

        ! Has to be there for function pointer interface
        unused_var(csf_i)

        ! depending on type (R->L / L->R) a can be > j or < j, but always > i
        !
        i = gtID(occ_orbs(1))
        j = gtID(occ_orbs(2))

        ASSERT( i < a )

        ! here i is both electron and hole index!

        ij = fuseIndex(i, j)
        ab = fuseIndex(i, a)

        orb_pgen = this%alias_sampler%get_prob(ij, ab)

    end subroutine calc_orbital_pgen_contr_start_pchb