property_vector_pchb_doubles_spinorb_fullyweighted Module

precomputed heat bath implementation for PropVecCI using spin orbitals and full weighting



Derived Types

The PropVec PCHB excitation generator for doubles using spin orbitals and doing full weighting. This means that first a hole is chosen via ( p( A | I J) |{A \notin D_i} ) !! then a second hole is chosen via ( p( B | I J A) | ).

Read more…

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.

class(ParticleSelector_t), private, allocatable :: particle_selector

The particle selector for I, J

type(AliasSampler_2D_t), private :: A_sampler

The sampler for the first hole A. It yields where IJ is a fused index I < J and i_sg is the prop_vec.

type(AliasSampler_3D_t), private :: B_sampler

The sampler for the second hole B. It yields where IJ is a fused index I < J, A is the first hole and i_sg is the prop_vec.

class(PropertyIndexer_t), private, allocatable :: indexer
integer(kind=n_int), private :: last_possible_occupied

The last element of the ilut array has some elements which are not used, if the number of spinorbitals is not a multiple of bitsize_n_int. To correctly zero them this bitmask is 1 wherever a determinant could be occupied in the last element, and 0 otherwise.

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, public :: get_memory_demand
procedure, private :: compute_samplers => PropVec_doubles_PCHB_compute_samplers
procedure, private :: get_unoccupied

Functions

private elemental function get_memory_demand(this) result(res)

Get the memory demand

Arguments

Type IntentOptional Attributes Name
class(PropVec_PCHB_DoublesSpinorbFullyWeightExcGen_t), intent(in) :: this

Return Value type(ByteSize_t)

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_DoublesSpinorbFullyWeightExcGen_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_DoublesSpinorbFullyWeightExcGen_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)

Finalize everything

Arguments

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

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_DoublesSpinorbFullyWeightExcGen_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

private subroutine PropVec_doubles_PCHB_compute_samplers(this, PCHB_particle_selection)

computes and stores values for the alias sampling table

Arguments

Type IntentOptional Attributes Name
class(PropVec_PCHB_DoublesSpinorbFullyWeightExcGen_t), intent(inout) :: this
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_DoublesSpinorbFullyWeightExcGen_t), intent(in) :: this
integer, intent(in) :: nI(nEl)
integer, intent(out) :: n_excits
integer(kind=n_int), intent(out), allocatable :: det_list(:,:)

private pure subroutine get_unoccupied(this, ilutI, ilut_unoccupied, unoccupied)

Return a bitmask and enumeration of the unoccupied spin orbitals.

Arguments

Type IntentOptional Attributes Name
class(PropVec_PCHB_DoublesSpinorbFullyWeightExcGen_t), intent(in) :: this
integer(kind=n_int), intent(in) :: ilutI(0:nIfD)
integer(kind=n_int), intent(out) :: ilut_unoccupied(0:nIfD)
integer, intent(out) :: unoccupied(nBasis-nEl)