GAS_PCHB_DoublesSpinOrbFastWeightedExcGenerator_t Derived Type

type, public, extends(DoubleExcitationGenerator_t) :: GAS_PCHB_DoublesSpinOrbFastWeightedExcGenerator_t

GAS PCHB excitation generator for doubles using spin orbitals, with “fast weighting” This means we choose holes via


Contents


Components

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

use a lookup for the supergroup index

logical, public :: create_lookup = .false.

create and manage the supergroup index

class(ParticleSelector_t), private, allocatable :: particle_selector

particle selector for getting I, J

type(AliasSampler_2D_t), private :: AB_sampler

sampler for holes, dubbed (fused index) It yields where IJ is a fused index I < J and i_sg is the supergroup.

type(SuperGroupIndexer_t), private, pointer :: indexer => null()
class(GASSpec_t), private, allocatable :: GAS_spec
integer, private, allocatable :: tgtOrbs(:,:)

Type-Bound Procedures

procedure, public :: init => GAS_doubles_PCHB_spinorb_init

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

    initalises the spinorb-resolved PCHB doubles excitation generator

    more specifically, sets up a lookup table for ab -> (a,b) and sets up the alias table for picking ab given ij with prob ~ Hijab

    Arguments

    Type IntentOptional Attributes Name
    class(GAS_PCHB_DoublesSpinOrbFastWeightedExcGenerator_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_spinorb_finalize

procedure, public :: gen_exc => GAS_doubles_PCHB_spinorb_gen_exc

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

    given the initial determinant (both as nI and ilut), create a random doubles excitation using the Hamiltonian matrix elements as weights

    Arguments

    Type IntentOptional Attributes Name
    class(GAS_PCHB_DoublesSpinOrbFastWeightedExcGenerator_t), intent(inout) :: this

    the exctitation generator

    integer, intent(in) :: nI(nel)

    determinant to excite from unused in this generator

    integer(kind=n_int), intent(in) :: ilutI(0:NIfTot)

    determint from which to excite, ilut format

    integer, intent(out) :: nJ(nel)

    the excited determinant upon return excitation order (for doubles generator, always == 2) excitation matrix nI -> nJ

    integer(kind=n_int), intent(out) :: ilutJ(0:NifTot)

    excited determinant, ilut format

    integer, intent(in) :: exFlag

    determinant to excite from unused in this generator

    integer, intent(out) :: ic

    the excited determinant upon return excitation order (for doubles generator, always == 2) excitation matrix nI -> nJ

    integer, intent(out) :: ex(2,maxExcit)

    the excited determinant upon return excitation order (for doubles generator, always == 2) excitation matrix nI -> nJ

    logical, intent(out) :: tParity

    the parity of the excitation nI -> nJ

    real(kind=dp), intent(out) :: pGen

    probability of generating the excitation

    real(kind=dp), intent(out) :: hel

    matrix element Hijab

    type(excit_gen_store_type), intent(inout), target :: store
    integer, intent(in), optional :: part_type

    unused in this generator

procedure, public :: get_pgen => GAS_doubles_PCHB_spinorb_get_pgen

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

    calculates the probability of drawing a given double excitation parametrised by the excitation matrix ex

    Arguments

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

    excitation matrix

    integer, intent(in) :: ic

    excitation matrix

    integer, intent(in) :: ClassCount2(ScratchSize)
    integer, intent(in) :: ClassCountUnocc2(ScratchSize)

    Return Value real(kind=dp)

procedure, public :: gen_all_excits => GAS_doubles_PCHB_spinorb_gen_all_excits

procedure, private, :: compute_samplers => GAS_doubles_PCHB_spinorb_compute_samplers

Source Code

    type, extends(DoubleExcitationGenerator_t) :: GAS_PCHB_DoublesSpinOrbFastWeightedExcGenerator_t
        !! GAS PCHB excitation generator for doubles using spin orbitals, with
        !! "fast weighting"
        !! This means we choose holes via \(p(AB|IJ)\)
        private
        logical, public :: use_lookup = .false.
            !! use a lookup for the supergroup index
        logical, public :: create_lookup = .false.
            !! create and manage the supergroup index

        class(ParticleSelector_t), allocatable :: particle_selector
            !! particle selector for getting I, J
        type(AliasSampler_2D_t) :: AB_sampler
            !! sampler for holes, dubbed \(AB\) (fused index)
            !! It yields \( p(AB | IJ, i_{\text{sg}}) \)
            !! where IJ is a fused index I < J and `i_sg` is the supergroup.

        type(SuperGroupIndexer_t), pointer :: indexer => null()
        class(GASSpec_t), allocatable :: GAS_spec
        integer, allocatable :: tgtOrbs(:, :)
    contains
        private
        procedure, public :: init => GAS_doubles_PCHB_spinorb_init
        procedure, public :: finalize => GAS_doubles_PCHB_spinorb_finalize
        procedure, public :: gen_exc => GAS_doubles_PCHB_spinorb_gen_exc
        procedure, public :: get_pgen => GAS_doubles_PCHB_spinorb_get_pgen
        procedure, public :: gen_all_excits => GAS_doubles_PCHB_spinorb_gen_all_excits

        procedure :: compute_samplers => GAS_doubles_PCHB_spinorb_compute_samplers
    end type GAS_PCHB_DoublesSpinOrbFastWeightedExcGenerator_t