property_vector_pchb_doubles_spatorb_fastweighted Module

precomputed heat bath implementation for PropVecCI using spatial orbitals



Variables

Type Visibility Attributes Name Initial
integer, private, parameter :: SAME_SPIN = 1
integer, private, parameter :: OPP_SPIN_NO_EXCH = 2
integer, private, parameter :: OPP_SPIN_EXCH = 3

Derived Types

The PropVec PCHB excitation generator for doubles

Components

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

Use a lookup for the prop_vec index in global_det_data

logical, public :: create_lookup = .false.

Create and manage! the prop_vec index lookup in global_det_data.

type(AliasSampler_3D_t), private :: pchb_samplers

The shape is (fused_number_of_double_excitations, 3, n_prop_vec)

class(PropertyIndexer_t), private, allocatable :: indexer
class(ParticleSelector_t), private, allocatable :: particle_selector
real(kind=dp), private, allocatable :: pExch(:,:)
integer, private, allocatable :: tgtOrbs(:,:)

Type-Bound Procedures

procedure, public :: init => PropVec_doubles_PCHB_init
procedure, public :: finalize => PropVec_doubles_PCHB_finalize
procedure, public :: gen_exc => PropVec_doubles_PCHB_gen_exc
procedure, public :: get_pgen => PropVec_doubles_PCHB_get_pgen
procedure, public :: gen_all_excits => PropVec_doubles_PCHB_gen_all_excits
procedure, private :: compute_samplers => PropVec_doubles_PCHB_compute_samplers

Functions

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

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

Arguments

Type IntentOptional Attributes Name
class(PropVec_PCHB_DoublesSpatOrbFastWeightExcGen_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)


Subroutines

private subroutine PropVec_doubles_PCHB_init(this, indexer, use_lookup, create_lookup, PCHB_particle_selection)

@brief Initialize the pchb excitation generator

Read more…

Arguments

Type IntentOptional Attributes Name
class(PropVec_PCHB_DoublesSpatOrbFastWeightExcGen_t), intent(inout) :: this
class(PropertyIndexer_t), intent(in) :: indexer
logical, intent(in) :: use_lookup
logical, intent(in) :: create_lookup
type(PCHB_ParticleSelection_t), intent(in) :: PCHB_particle_selection

private subroutine PropVec_doubles_PCHB_finalize(this)

@brief Deallocate the sampler and the mapping ab -> (a,b)

Arguments

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

private subroutine PropVec_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

Arguments

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

on return, the parity of the excitation nI -> nJ

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

on return, the probability of generating the excitation nI -> nJ

real(kind=dp), intent(out) :: hel
type(excit_gen_store_type), intent(inout), target :: store
integer, intent(in), optional :: part_type

private subroutine PropVec_doubles_PCHB_compute_samplers(this, nBI, PCHB_particle_selection)

computes and stores values for the alias sampling table n_prop_vec * number_of_fused_indices * 3 * (bytes_per_sampler)

Arguments

Type IntentOptional Attributes Name
class(PropVec_PCHB_DoublesSpatOrbFastWeightExcGen_t), intent(inout) :: this
integer, intent(in) :: nBI
type(PCHB_ParticleSelection_t), intent(in) :: PCHB_particle_selection

private subroutine PropVec_doubles_PCHB_gen_all_excits(this, nI, n_excits, det_list)

Arguments

Type IntentOptional Attributes Name
class(PropVec_PCHB_DoublesSpatOrbFastWeightExcGen_t), intent(in) :: this
integer, intent(in) :: nI(nEl)
integer, intent(out) :: n_excits
integer(kind=n_int), intent(out), allocatable :: det_list(:,:)