@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 ~
GAS_PCHB_DoublesSpinorbFullyWeightedExcGenerator_t
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(GAS_PCHB_DoublesSpinorbFullyWeightedExcGenerator_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 |
subroutine GAS_doubles_PCHB_init(this, GAS_spec, &
use_lookup, create_lookup, PCHB_particle_selection)
class(GAS_PCHB_DoublesSpinorbFullyWeightedExcGenerator_t), intent(inout) :: this
class(GASSpec_t), intent(in) :: GAS_spec
logical, intent(in) :: use_lookup, create_lookup
type(PCHB_ParticleSelection_t), intent(in) :: PCHB_particle_selection
character(*), parameter :: this_routine = 'GAS_doubles_PCHB_init'
this%GAS_spec = GAS_spec
allocate(this%indexer, source=SuperGroupIndexer_t(GAS_spec, nEl))
this%create_lookup = create_lookup
this%use_lookup = use_lookup
if (this%create_lookup) then
if (associated(lookup_supergroup_indexer)) then
call stop_all(this_routine, 'Someone else is already managing the supergroup lookup.')
else
write(stdout, *) 'GAS PCHB (RHF) doubles is creating and managing the supergroup lookup'
lookup_supergroup_indexer => this%indexer
end if
end if
if (this%use_lookup) write(stdout, *) 'GAS PCHB doubles is using the supergroup lookup'
this%last_possible_occupied = 0_n_int
block
integer :: i
do i = 0, ilut_off(nBasis)
this%last_possible_occupied = ibset(this%last_possible_occupied, i)
end do
end block
call this%compute_samplers(PCHB_particle_selection)
write(stdout, *) "Finished excitation generator initialization"
end subroutine GAS_doubles_PCHB_init