gasci_supergroup_index Module



Interfaces

public interface GAS_SuperGroupIndexer_t


Derived Types

Components

Type Visibility Attributes Name Initial
integer(kind=int64), public, allocatable :: allowed_composition_indices(:)
integer, public :: n_spin_orbs_

The number of spin orbitals of underlying determinants.

integer, public :: prop_vec_sum_

The sum of the property vectors. In the case of PropVec this is the particle number.

integer, public :: prop_vec_dim_

The dimension of the property vector (corresponds to number of PropVec spaces for pure PropVec)

class(GASSpec_t), public, allocatable :: GAS_spec

Constructor

private pure function construct_SuperGroupIndexer_t (GAS_spec)

Type-Bound Procedures

procedure, public :: idx_prop_vec
procedure, public :: idx_nI => get_idx_prop_vec_det
procedure, public :: n_prop_vecs => get_n_prop_vecs
procedure, public :: dyn_is_allowed
procedure, public :: prop_vec_dim
procedure, public :: n_spin_orbs
procedure, public :: prop_vec_sum
procedure, public :: idx_csf => get_prop_vec_idx_csf
generic, public :: lookup_prop_vec_idx => lookup_prop_vec_idx_nI, lookup_prop_vec_idx_CSF
generic, public :: is_allowed => is_allowed_single, is_allowed_double, is_allowed_triple, is_allowed_configurations, is_allowed_distinct_double
generic, public :: to_prop_vec => to_prop_vec_ni, to_prop_vec_csf
procedure, public :: get_prop_vecs => indexer_get_supergroups

We overwrite the get_supergroups method of the generalized indexer because this allows us a much larger number of GAS spaces for disconnected spaces.

procedure, private :: to_prop_vec_nI => to_supergroup_nI
procedure, private :: to_prop_vec_csf => to_supergroup_csf
procedure, private :: is_allowed_single
procedure, private :: is_allowed_double
procedure, private :: is_allowed_triple
procedure, private :: is_allowed_configurations
procedure, private :: is_allowed_distinct_double
procedure, private :: excite_single
procedure, private :: excite_double
procedure, private :: excite_triple
generic, public :: excite => excite_single, excite_double, excite_triple
procedure, public :: gen_all_excits => idxer_gen_all_excits
procedure, public :: write_to => GAS_write_to

Functions

public pure function get_supergroups(GAS_spec) result(res)

Get the ordered compositions of n into k summands constrained by cumulative minima and maxima.

Read more…

Arguments

Type IntentOptional Attributes Name
class(GASSpec_t), intent(in) :: GAS_spec

Return Value integer, allocatable, (:,:)

public pure function get_first_supergroup(GAS_spec) result(res)

Return the first supergroup

Read more…

Arguments

Type IntentOptional Attributes Name
class(GASSpec_t), intent(in) :: GAS_spec

GAS constraints

Return Value integer, (GAS_spec%nGAS())

public pure function get_last_supergroup(GAS_spec) result(res)

Return the last supergroup

Read more…

Arguments

Type IntentOptional Attributes Name
class(GASSpec_t), intent(in) :: GAS_spec

GAS constraints

Return Value integer, (GAS_spec%nGAS())

public pure function next_supergroup(GAS_spec, comp_idx_last, previous) result(res)

Return the next supergoup

Arguments

Type IntentOptional Attributes Name
class(GASSpec_t), intent(in) :: GAS_spec
integer(kind=int64), intent(in) :: comp_idx_last

The composition index of the last supergroup that can be generated. “Last” as defined by lexicographically decreasing order.

integer, intent(in) :: previous(:)

The previous supergroup.

Return Value integer, (size(previous))

private pure function move_particles_local(GAS_spec, previous, src, tgt) result(res)

Move particles from src -> tgt and as many particles as possible from the right of tgt.

Arguments

Type IntentOptional Attributes Name
type(LocalGASSpec_t), intent(in) :: GAS_spec
integer, intent(in) :: previous(:)

The previous supergroup

integer, intent(in) :: src

Source and target GAS space

integer, intent(in) :: tgt

Source and target GAS space

Return Value integer, (size(previous))

private pure function move_particles_cumul(GAS_spec, previous, src, tgt) result(res)

Move particles from src -> tgt and as many particles as possible from the right of tgt.

Arguments

Type IntentOptional Attributes Name
type(CumulGASSpec_t), intent(in) :: GAS_spec
integer, intent(in) :: previous(:)

The previous supergroup

integer, intent(in) :: src

Source and target GAS space

integer, intent(in) :: tgt

Source and target GAS space

Return Value integer, (size(previous))

public pure function get_allowed_composition_indices(GAS_spec) result(res)

Arguments

Type IntentOptional Attributes Name
class(GASSpec_t), intent(in) :: GAS_spec

Return Value integer(kind=int64), allocatable, (:)

private pure function construct_SuperGroupIndexer_t(GAS_spec) result(idxer)

Arguments

Type IntentOptional Attributes Name
class(GASSpec_t), intent(in) :: GAS_spec

Return Value type(GAS_SuperGroupIndexer_t)

private pure function indexer_get_supergroups(this) result(res)

Get the ordered compositions of n into k summands constrained by cumulative minima and maxima.

Read more…

Arguments

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

Return Value integer, allocatable, (:,:)

private pure function excite_single(this, exc, prop_vec) result(res)

Check if a single excitation is allowed.

Read more…

Arguments

Type IntentOptional Attributes Name
class(GAS_SuperGroupIndexer_t), intent(in) :: this
type(Excite_1_t), intent(in) :: exc
integer, intent(in) :: prop_vec(:)

Return Value integer, (size(prop_vec))

private pure function excite_double(this, exc, prop_vec) result(res)

Check if a double excitation is allowed.

Read more…

Arguments

Type IntentOptional Attributes Name
class(GAS_SuperGroupIndexer_t), intent(in) :: this
type(Excite_2_t), intent(in) :: exc
integer, intent(in) :: prop_vec(:)

Return Value integer, (size(prop_vec))

private pure function excite_triple(this, exc, prop_vec) result(res)

Check if a double excitation is allowed.

Read more…

Arguments

Type IntentOptional Attributes Name
class(GAS_SuperGroupIndexer_t), intent(in) :: this
type(Excite_3_t), intent(in) :: exc
integer, intent(in) :: prop_vec(:)

Return Value integer, (size(prop_vec))

private pure function is_allowed_single(this, exc, prop_vec)

Check if a single excitation is allowed.

Read more…

Arguments

Type IntentOptional Attributes Name
class(GAS_SuperGroupIndexer_t), intent(in) :: this
type(Excite_1_t), intent(in) :: exc
integer, intent(in) :: prop_vec(:)

Return Value logical

private pure function is_allowed_double(this, exc, prop_vec)

Check if a double excitation is allowed.

Read more…

Arguments

Type IntentOptional Attributes Name
class(GAS_SuperGroupIndexer_t), intent(in) :: this
type(Excite_2_t), intent(in) :: exc
integer, intent(in) :: prop_vec(:)

Return Value logical

private pure function is_allowed_triple(this, exc, prop_vec)

Check if a double excitation is allowed.

Read more…

Arguments

Type IntentOptional Attributes Name
class(GAS_SuperGroupIndexer_t), intent(in) :: this
type(Excite_3_t), intent(in) :: exc
integer, intent(in) :: prop_vec(:)

Return Value logical

private pure function is_allowed_distinct_double(this, exc, prop_vec)

Arguments

Type IntentOptional Attributes Name
class(GAS_SuperGroupIndexer_t), intent(in) :: this
type(DistinctDouble_t), intent(in) :: exc
integer, intent(in) :: prop_vec(:)

Return Value logical

private pure function is_allowed_configurations(this, nI, nJ)

Check if an excitation nI -> nJ is allowed.

Read more…

Arguments

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

Return Value logical

private pure function to_supergroup_nI(this, nI) result(supergroup)

Arguments

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

Return Value integer, (this%prop_vec_dim())

private pure function to_supergroup_csf(this, csf_i) result(supergroup)

Arguments

Type IntentOptional Attributes Name
class(GAS_SuperGroupIndexer_t), intent(in) :: this
type(CSF_Info_t), intent(in) :: csf_i

Return Value integer, (this%prop_vec_dim())

public pure function get_CAS_indexer(n_el, n_spat_orbs) result(res)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n_el
integer, intent(in) :: n_spat_orbs

Return Value type(GAS_SuperGroupIndexer_t)


Subroutines

private pure subroutine find_flip_local(GAS_spec, sg, src, tgt)

Find source and target to transfer particle

Read more…

Arguments

Type IntentOptional Attributes Name
type(LocalGASSpec_t), intent(in) :: GAS_spec
integer, intent(in) :: sg(:)

A given supergroup

integer, intent(out) :: src

Source and target GAS space. If no possible movement with src <= tgt exists, then tgt == 0.

integer, intent(out) :: tgt

Source and target GAS space. If no possible movement with src <= tgt exists, then tgt == 0.

private pure subroutine find_flip_cumul(GAS_spec, sg, src, tgt)

Find source and target to transfer particle

Read more…

Arguments

Type IntentOptional Attributes Name
type(CumulGASSpec_t), intent(in) :: GAS_spec
integer, intent(in) :: sg(:)

A given supergroup

integer, intent(out) :: src

Source and target GAS space. If no possible movement with src <= tgt exists, then tgt == 0.

integer, intent(out) :: tgt

Source and target GAS space. If no possible movement with src <= tgt exists, then tgt == 0.

private subroutine idxer_gen_all_excits(this, nI, n_excits, det_list, ic)

Get all excitated determinants from det_I that are allowed under GAS constraints.

Arguments

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

Starting determinant

integer, intent(out) :: n_excits

Number of determinants

integer(kind=n_int), intent(out), allocatable :: det_list(:,:)

Allocatable array of determinants in ilut format

integer, intent(in), optional :: ic

Optional input for excitation level (ic=1 => singles, ic=2 => doubles) If ommited generate all.

private subroutine GAS_write_to(this, iunit)

Arguments

Type IntentOptional Attributes Name
class(GAS_SuperGroupIndexer_t), intent(in) :: this
integer, intent(in) :: iunit