GAS_PCHB_DoublesSpatOrbFastWeightedExcGenerator_t Derived Type

type, public, extends(DoubleExcitationGenerator_t) :: GAS_PCHB_DoublesSpatOrbFastWeightedExcGenerator_t

The GAS PCHB excitation generator for doubles


Contents


Components

Type Visibility Attributes Name Initial
logical, public :: use_lookup = .false.

Use a lookup for the supergroup index in global_det_data

logical, public :: create_lookup = .false.

Create and manage! the supergroup index lookup in global_det_data.

type(AliasSampler_3D_t), private :: pchb_samplers

The shape is (fused_number_of_double_excitations, 3, n_supergroup)

type(SuperGroupIndexer_t), private, pointer :: indexer => null()
class(ParticleSelector_t), private, allocatable :: particle_selector
class(GASSpec_t), private, allocatable :: GAS_spec
real(kind=dp), private, allocatable :: pExch(:,:)
integer, private, allocatable :: tgtOrbs(:,:)

Type-Bound Procedures

procedure, public :: init => GAS_doubles_PCHB_init

  • private subroutine GAS_doubles_PCHB_init(this, GAS_spec, use_lookup, create_lookup, PCHB_particle_selection)

    @brief Initialize the pchb excitation generator

    @details This does two things: 1. setup the lookup table for the mapping ab -> (a,b) 2. setup the alias table for picking ab given ij with probability ~

    Arguments

    Type IntentOptional Attributes Name
    class(GAS_PCHB_DoublesSpatOrbFastWeightedExcGenerator_t), intent(inout) :: this
    class(GASSpec_t), intent(in) :: GAS_spec
    logical, intent(in) :: use_lookup
    logical, intent(in) :: create_lookup
    type(PCHB_ParticleSelection_t), intent(in) :: PCHB_particle_selection

procedure, public :: finalize => GAS_doubles_PCHB_finalize

procedure, public :: gen_exc => GAS_doubles_PCHB_gen_exc

  • private subroutine GAS_doubles_PCHB_gen_exc(this, nI, ilutI, nJ, ilutJ, exFlag, ic, ex, tParity, pGen, hel, store, part_type)

    @brief Given the initial determinant (both as nI and ilut), create a random double excitation using the hamiltonian matrix elements as weights

    @param[in] nI determinant to excite from @param[in] elec_map map to translate electron picks to orbitals @param[in] ilut determinant to excite from in ilut format @param[out] nJ on return, excited determinant @param[out] excitMat on return, excitation matrix nI -> nJ @param[out] tParity on return, the parity of the excitation nI -> nJ @param[out] pGen on return, the probability of generating the excitation nI -> nJ @param[in] idet Optional index of determinant in the CurrentDets array.

    Arguments

    Type IntentOptional Attributes Name
    class(GAS_PCHB_DoublesSpatOrbFastWeightedExcGenerator_t), intent(inout) :: this
    integer, intent(in) :: nI(nel)
    integer(kind=n_int), intent(in) :: ilutI(0:NIfTot)
    integer, intent(out) :: nJ(nel)
    integer(kind=n_int), intent(out) :: ilutJ(0:NifTot)
    integer, intent(in) :: exFlag
    integer, intent(out) :: ic
    integer, intent(out) :: ex(2,maxExcit)
    logical, intent(out) :: tParity
    real(kind=dp), intent(out) :: pGen
    real(kind=dp), intent(out) :: hel
    type(excit_gen_store_type), intent(inout), target :: store
    integer, intent(in), optional :: part_type

procedure, public :: get_pgen => GAS_doubles_PCHB_get_pgen

  • private function GAS_doubles_PCHB_get_pgen(this, nI, ilutI, ex, ic, ClassCount2, ClassCountUnocc2) result(pgen)

    @brief Calculate the probability of drawing a given double excitation ex

    @param[in] ex 2x2 excitation matrix

    @return pgen probability of generating this double with the pchb double excitgen

    Arguments

    Type IntentOptional Attributes Name
    class(GAS_PCHB_DoublesSpatOrbFastWeightedExcGenerator_t), intent(inout) :: this
    integer, intent(in) :: nI(nel)
    integer(kind=n_int), intent(in) :: ilutI(0:NIfTot)
    integer, intent(in) :: ex(2,maxExcit)
    integer, intent(in) :: ic
    integer, intent(in) :: ClassCount2(ScratchSize)
    integer, intent(in) :: ClassCountUnocc2(ScratchSize)

    Return Value real(kind=dp)

procedure, public :: gen_all_excits => GAS_doubles_PCHB_gen_all_excits

procedure, private, :: compute_samplers => GAS_doubles_PCHB_compute_samplers

Source Code

    type, extends(DoubleExcitationGenerator_t) :: GAS_PCHB_DoublesSpatOrbFastWeightedExcGenerator_t
        private
        !> Use a lookup for the supergroup index in global_det_data
        logical, public :: use_lookup = .false.
        !> Create **and** manage! the supergroup index lookup in global_det_data.
        logical, public :: create_lookup = .false.

        !> The shape is (fused_number_of_double_excitations, 3, n_supergroup)
        type(AliasSampler_3D_t) :: pchb_samplers

        type(SuperGroupIndexer_t), pointer :: indexer => null()
        class(ParticleSelector_t), allocatable :: particle_selector
        class(GASSpec_t), allocatable :: GAS_spec
        real(dp), allocatable :: pExch(:, :)
        integer, allocatable :: tgtOrbs(:, :)
    contains
        private
        procedure, public :: init => GAS_doubles_PCHB_init
        procedure, public :: finalize => GAS_doubles_PCHB_finalize
        procedure, public :: gen_exc => GAS_doubles_PCHB_gen_exc
        procedure, public :: get_pgen => GAS_doubles_PCHB_get_pgen
        procedure, public :: gen_all_excits => GAS_doubles_PCHB_gen_all_excits

        procedure :: compute_samplers => GAS_doubles_PCHB_compute_samplers
    end type GAS_PCHB_DoublesSpatOrbFastWeightedExcGenerator_t