guga_prop_vec_pchb_doubles_select_particles Module



Variables

Type Visibility Attributes Name Initial
type(PCHB_ParticleSelection_vals_t), public, parameter :: PCHB_particle_selection_vals = PCHB_ParticleSelection_vals_t()

Abstract Interfaces

abstract interface

  • private pure function GetPgen_t(this, nI, csf_I, i_sg, I, J)

    Arguments

    Type IntentOptional Attributes Name
    class(ParticleSelector_t), intent(in) :: this
    integer, intent(in) :: nI(nEl)

    The CSF in nI-format and the prop_vec

    type(CSF_Info_t), intent(in) :: csf_I
    integer, intent(in) :: i_sg

    The CSF in nI-format and the prop_vec

    integer, intent(in) :: I

    The particles.

    integer, intent(in) :: J

    The particles.

    Return Value real(kind=dp)

abstract interface

  • private subroutine Finalize_t(this)

    Arguments

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

abstract interface

  • private subroutine Draw_t(this, nI, ilutI, csf_I, i_sg, srcs, p)

    Arguments

    Type IntentOptional Attributes Name
    class(ParticleSelector_t), intent(in) :: this
    integer, intent(in) :: nI(nEl)

    The determinant in nI-format and the prop_vec index

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

    The determinant in bitmask format

    type(CSF_Info_t), intent(in) :: csf_I
    integer, intent(in) :: i_sg

    The prop_vec index

    integer, intent(out) :: srcs(2)

    The chosen particles and their index in nI. It is guaranteed that scrs(1) < srcs(2).

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

    The probability of drawing . This is the probability of drawing two particles from a given determinant regardless of order.


Derived Types

type, public, extends(EnumBase_t) ::  PCHB_ParticleSelection_t

Components

Type Visibility Attributes Name Initial
integer, public :: val
character(len=20), private :: str

Type-Bound Procedures

generic, public :: operator(==) => eq_EnumBase_t
generic, public :: operator(/=) => neq_EnumBase_t
procedure, public :: to_str

type, public ::  PCHB_ParticleSelection_vals_t

Components

Type Visibility Attributes Name Initial
type(PCHB_ParticleSelection_t), public :: UNIF_UNIF = PCHB_ParticleSelection_t(1, 'UNIF-UNIF')

Both particles are drawn uniformly. We draw from and then and both probabilites come from the PCHB weighting scheme. We guarantee that and are occupied. We draw uniformly and then The second distribution comes from the PCHB weighting scheme. We guarantee that and are occupied.

type(PCHB_ParticleSelection_t), public :: FULL_FULL = PCHB_ParticleSelection_t(2, 'FULL-FULL')

Both particles are drawn uniformly. We draw from and then and both probabilites come from the PCHB weighting scheme. We guarantee that and are occupied. We draw uniformly and then The second distribution comes from the PCHB weighting scheme. We guarantee that and are occupied.

type(PCHB_ParticleSelection_t), public :: UNIF_FULL = PCHB_ParticleSelection_t(3, 'UNIF-FULL')

Both particles are drawn uniformly. We draw from and then and both probabilites come from the PCHB weighting scheme. We guarantee that and are occupied. We draw uniformly and then The second distribution comes from the PCHB weighting scheme. We guarantee that and are occupied.

Type-Bound Procedures

procedure, public, nopass :: from_str => from_keyword

type, public, abstract ::  ParticleSelector_t

Type-Bound Procedures

procedure(Draw_t), public, deferred :: draw
procedure(GetPgen_t), public, deferred :: get_pgen
procedure(Finalize_t), public, deferred :: finalize

type, public, extends(ParticleSelector_t) ::  UniformParticles_t

Type-Bound Procedures

procedure, public :: draw => draw_UniformParticles_t
procedure, public :: get_pgen => get_pgen_UniformParticles_t
procedure, public :: finalize => finalize_UniformParticles_t

type, private, abstract, extends(ParticleSelector_t) ::  PC_Particles_t

Components

Type Visibility Attributes Name Initial
type(AliasSampler_1D_t), private :: I_sampler

The shape is (n_prop_vec) -> 2 * number_of_spat_orbs

Read more…
type(AliasSampler_2D_t), private :: j_sampler

The shape is (number_of_spat_orbs, n_prop_vec) -> number_of_spat_orbs

class(AlsoGUGA_PropertyIndexer_t), private, allocatable :: indexer
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-Bound Procedures

procedure(Draw_t), public, deferred :: draw
procedure(GetPgen_t), public, deferred :: get_pgen
procedure, public :: init => init_PC_WeightedParticles_t
procedure, public :: finalize => finalize_PC_WeightedParticles_t

type, private, extends(PC_Particles_t) ::  PC_FullyWeightedParticles_t

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-Bound Procedures

procedure, public :: init => init_PC_WeightedParticles_t
procedure, public :: finalize => finalize_PC_WeightedParticles_t
procedure, public :: draw => draw_PC_FullyWeightedParticles_t
procedure, public :: get_pgen => get_pgen_PC_FullyWeightedParticles_t

type, private, extends(PC_Particles_t) ::  PC_WeightedParticles_t

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-Bound Procedures

procedure, public :: init => init_PC_WeightedParticles_t
procedure, public :: finalize => finalize_PC_WeightedParticles_t
procedure, public :: draw => draw_PC_WeightedParticles_t
procedure, public :: get_pgen => get_pgen_PC_WeightedParticles_t

Functions

private pure function to_str(options) result(res)

Arguments

Type IntentOptional Attributes Name
class(PCHB_ParticleSelection_t), intent(in) :: options

Return Value character(len=:), allocatable

private pure function from_keyword(w) result(res)

Parse a given keyword into the possible particle selection schemes

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: w

Return Value type(PCHB_ParticleSelection_t)

private pure function get_pgen_UniformParticles_t(this, nI, csf_i, i_sg, i, j) result(p)

Calculates

Read more…

Arguments

Type IntentOptional Attributes Name
class(UniformParticles_t), intent(in) :: this
integer, intent(in) :: nI(nEl)

The CSF in nI-format

type(CSF_Info_t), intent(in) :: csf_i
integer, intent(in) :: i_sg

The CSF in nI-format

integer, intent(in) :: i

The particles.

integer, intent(in) :: j

The particles.

Return Value real(kind=dp)

private pure function get_pgen_PC_FullyWeightedParticles_t(this, nI, csf_I, i_sg, i, j) result(p)

Calculates

Read more…

Arguments

Type IntentOptional Attributes Name
class(PC_FullyWeightedParticles_t), intent(in) :: this
integer, intent(in) :: nI(nEl)

The determinant in nI-format and the prop_vec index

type(CSF_Info_t), intent(in) :: csf_I
integer, intent(in) :: i_sg

The determinant in nI-format and the prop_vec index

integer, intent(in) :: i

The particles in spatial format

integer, intent(in) :: j

The particles in spatial format

Return Value real(kind=dp)

private pure function get_pgen_PC_WeightedParticles_t(this, nI, csf_I, i_sg, i, j) result(p)

Calculates

Read more…

Arguments

Type IntentOptional Attributes Name
class(PC_WeightedParticles_t), intent(in) :: this
integer, intent(in) :: nI(nEl)

The determinant in nI-format and the prop_vec index

type(CSF_Info_t), intent(in) :: csf_I
integer, intent(in) :: i_sg

The determinant in nI-format and the prop_vec index

integer, intent(in) :: i

The particles in spatial format

integer, intent(in) :: j

The particles in spatial format

Return Value real(kind=dp)


Subroutines

public subroutine allocate_and_init(PCHB_particle_selection, indexer, ij_weights, rank_with_info, use_lookup, particle_selector)

Arguments

Type IntentOptional Attributes Name
type(PCHB_ParticleSelection_t), intent(in) :: PCHB_particle_selection
class(AlsoGUGA_PropertyIndexer_t), intent(in) :: indexer
real(kind=dp), intent(in) :: ij_weights(:,:,:)

The weights for the spatial orbitals ij nSpatOrb * n_SpatOrb * n_prop_vec

integer, intent(in) :: rank_with_info

The intra-node rank that contains the weights to be used all other arr of all other ranks are ignored (and can be allocated with size 0).

logical, intent(in) :: use_lookup
class(ParticleSelector_t), intent(inout), allocatable :: particle_selector

private subroutine draw_UniformParticles_t(this, nI, ilutI, csf_i, i_sg, srcs, p)

Arguments

Type IntentOptional Attributes Name
class(UniformParticles_t), intent(in) :: this
integer, intent(in) :: nI(nEl)

The determinant in nI-format and the prop_vec index

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

The determinant in bitmask format

type(CSF_Info_t), intent(in) :: csf_i
integer, intent(in) :: i_sg

The prop_vec index

integer, intent(out) :: srcs(2)

The chosen particles and their index in nI. It is guaranteed that scrs(1) < srcs(2).

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

The probability of drawing . This is the probability of drawing two particles from a given determinant regardless of order.

private subroutine finalize_UniformParticles_t(this)

Arguments

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

private subroutine init_PC_WeightedParticles_t(this, indexer, weights, rank_with_info, use_lookup, create_lookup)

Arguments

Type IntentOptional Attributes Name
class(PC_Particles_t), intent(inout) :: this
class(AlsoGUGA_PropertyIndexer_t), intent(in) :: indexer
real(kind=dp), intent(in) :: weights(:,:,:)

w(j, i, i_sg), The weight of picking j after picking i under prop_vec i_sg

integer, intent(in) :: rank_with_info

The intra-node rank that contains the weights to be used all other arr of all other ranks are ignored (and can be allocated with size 0).

logical, intent(in) :: use_lookup
logical, intent(in) :: create_lookup

private subroutine finalize_PC_WeightedParticles_t(this)

Arguments

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

private subroutine draw_PC_FullyWeightedParticles_t(this, nI, ilutI, csf_i, i_sg, srcs, p)

Arguments

Type IntentOptional Attributes Name
class(PC_FullyWeightedParticles_t), intent(in) :: this
integer, intent(in) :: nI(nEl)

The determinant in nI-format and the prop_vec index

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

The determinant in bitmask format

type(CSF_Info_t), intent(in) :: csf_i
integer, intent(in) :: i_sg

The prop_vec index

integer, intent(out) :: srcs(2)

The chosen particles and their index in nI. It is guaranteed that scrs(1) <= srcs(2).

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

The probability of drawing . This is the probability of drawing two particles from a given determinant regardless of order.

private subroutine draw_PC_WeightedParticles_t(this, nI, ilutI, csf_i, i_sg, srcs, p)

Arguments

Type IntentOptional Attributes Name
class(PC_WeightedParticles_t), intent(in) :: this
integer, intent(in) :: nI(nEl)

The determinant in nI-format and the prop_vec index

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

The determinant in bitmask format

type(CSF_Info_t), intent(in) :: csf_i
integer, intent(in) :: i_sg

The prop_vec index

integer, intent(out) :: srcs(2)

The chosen particles and their index in nI. It is guaranteed that scrs(1) <= srcs(2).

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

The probability of drawing . This is the probability of drawing two particles from a given determinant regardless of order.