calc_orbital_pgen_contr_end_pchb Subroutine

private pure subroutine calc_orbital_pgen_contr_end_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_end_pchb(this, csf_i, occ_orbs, a, orb_pgen)
        debug_function_name("calc_orbital_pgen_contr_end_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)

        i = gtID(occ_orbs(1))
        j = gtID(occ_orbs(2))

        ! and j is at the same time electron and hole index!

        ! depending on L->R or R->L type a can be > i o r < i, but always < j!
        ASSERT( a < j )

        ! j here is both elec and hole ind!
        ij = fuseIndex(i,j)

        ab = fuseIndex(a,j)

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

    end subroutine calc_orbital_pgen_contr_end_pchb