FlexibleGASSpec_t Derived Type

type, public, extends(GASSpec_t) :: FlexibleGASSpec_t


Components

Type Visibility Attributes Name Initial
integer, public, allocatable :: supergroups(:,:)

List the allowed supergroups. The indices are: (nGAS, n_supergroups)

integer(kind=int64), public, allocatable :: composition_indices(:)

Constructor

public interface FlexibleGASSpec_t

  • private pure function construct_FlexibleGASSpec_t(supergroups, spat_GAS_orbs, recoupling) result(GAS_spec)

    Constructor of FlexibleGASSpec_t

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: supergroups(:,:)

    The allowed supergroups.

    integer, intent(in) :: spat_GAS_orbs(:)

    GAS space for the i-th spatial orbital.

    logical, intent(in), optional :: recoupling

    Exchange double excitations that recouple the spin are allowed

    Return Value type(FlexibleGASSpec_t)


Type-Bound Procedures

procedure, public :: get_possible_holes

  • private pure function get_possible_holes(this, det_I, add_holes, add_particles, n_total, excess) result(possible_holes)

    Return the possible holes where a particle can be created under GAS constraints.

    Read more…

    Arguments

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

    Specification of GAS spaces.

    integer, intent(in) :: det_I(:)

    The starting determinant

    integer, intent(in), optional :: add_holes(:)

    An index of orbitals where particles should be deleted before creating the new particle.

    integer, intent(in), optional :: add_particles(:)

    An index of orbitals where particles should be created before creating the new particle.

    integer, intent(in), optional :: n_total

    The total number of particles that will be created. Defaults to one.

    type(SpinProj_t), intent(in), optional :: excess

    The current excess of spin projections. If a beta electron was deleted, the excess is (1 \cdot \alpha).

    Return Value integer, allocatable, (:)

generic, public :: contains_conf => contains_conf_nI

  • private pure function contains_conf_nI(this, nI) result(res)

    Query wether a determinant is contained in the GAS space.

    Arguments

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

    Specification of GAS spaces.

    integer, intent(in) :: nI(:)

    An index of occupied spin orbitals.

    Return Value logical

generic, public :: contains_conf => contains_conf_csf

  • private pure function contains_conf_csf(this, csf_i) result(res)

    Query wether a CSF is contained in the GAS space.

    Arguments

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

    Specification of GAS spaces.

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

    Return Value logical

procedure, public :: contains_ilut

  • private pure function contains_ilut(this, ilut) result(res)

    Query wether a determinant in bitmask format is contained in the GAS space.

    Read more…

    Arguments

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

    Specification of GAS spaces.

    integer(kind=n_int), intent(in) :: ilut(0:nIfTot)

    An index of occupied spin orbitals.

    Return Value logical

procedure, public :: is_connected => get_is_connected

  • private pure function get_is_connected(this)

    Query if there are connected GAS spaces under the GAS specification.

    Arguments

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

    Specification of GAS spaces.

    Return Value logical

procedure, public :: nGAS => get_nGAS

  • private pure function get_nGAS(this)

    Returns the total number of GAS spaces.

    Arguments

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

    Return Value integer

procedure, public :: max_GAS_size => get_max_GAS_size

  • private pure function get_max_GAS_size(this)

    Returns the size of the largest GAS space.

    Arguments

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

    Return Value integer

procedure, public :: recoupling

  • private elemental function recoupling(this)

    Query whether we do exchange recoupling.

    Arguments

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

    Return Value logical

procedure, public :: n_spin_orbs => get_nOrbs

  • private elemental function get_nOrbs(this)

    Arguments

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

    Return Value integer

procedure, public :: nEl => get_nEl

  • private elemental function get_nEl(this)

    Get the number of electrons.

    Arguments

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

    Return Value integer

generic, public :: GAS_size => get_GAS_size_i, get_GAS_size_idx, get_GAS_size_all

  • private pure function get_GAS_size_i(this, iGAS)

    Returns the size of the i-th GAS space in number of spin orbitals.

    Arguments

    Type IntentOptional Attributes Name
    class(GASSpec_t), intent(in) :: this
    integer, intent(in) :: iGAS

    Return Value integer

  • private pure function get_GAS_size_idx(this, idx) result(res)

    Returns the sizes for GAS spaces specified in idx.

    Arguments

    Type IntentOptional Attributes Name
    class(GASSpec_t), intent(in) :: this
    integer, intent(in) :: idx(:)

    Return Value integer, (size(idx))

  • private pure function get_GAS_size_all(this) result(res)

    Returns the sizes for all GAS spaces.

    Arguments

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

    Return Value integer, (size(this%GAS_sizes))

procedure, public :: get_iGAS

  • private elemental function get_iGAS(this, spin_orb_idx)

    Returns the GAS space for a given spin orbital index.

    Arguments

    Type IntentOptional Attributes Name
    class(GASSpec_t), intent(in) :: this
    integer, intent(in) :: spin_orb_idx

    Return Value integer

procedure, public :: get_orb_idx

  • private elemental function get_orb_idx(this, i, iGAS)

    Returns the i-th spin orbital in the iGAS GAS space.

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(GASSpec_t), intent(in) :: this
    integer, intent(in) :: i
    integer, intent(in) :: iGAS

    Return Value integer

generic, public :: count_per_GAS => count_per_GAS_nI, count_per_GAS_csf

  • private pure function count_per_GAS_nI(this, occupied) result(supergroup)

    Count the particles per GAS space. i.e. return the supergroup.

    Arguments

    Type IntentOptional Attributes Name
    class(GASSpec_t), intent(in) :: this
    integer, intent(in) :: occupied(:)

    Return Value integer, (get_nGAS(this))

  • private pure function count_per_GAS_csf(this, csf_i) result(supergroup)

    Count the particles per GAS space. i.e. return the supergroup.

    Arguments

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

    Return Value integer, (this%nGAS())

  • private pure function is_allowed_single(this, exc, supergroup)

    Check if a single excitation is allowed.

    Read more…

    Arguments

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

    Return Value logical

  • private pure function is_allowed_double(this, exc, supergroup)

    Check if a double excitation is allowed.

    Read more…

    Arguments

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

    Return Value logical

  • private pure function is_allowed_triple(this, exc, supergroup)

    Check if a triple excitation is allowed.

    Read more…

    Arguments

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

    Return Value logical

  • private pure function is_allowed_distinct_double(this, exc, supergroup)

    Arguments

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

    Return Value logical

generic, public :: excite => excite_single, excite_double, excite_triple

  • private pure function excite_single(this, exc, supergroup) result(excited_supergroup)

    Arguments

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

    Return Value integer, (size(supergroup))

  • private pure function excite_double(this, exc, supergroup) result(excited_supergroup)

    Arguments

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

    Return Value integer, (size(supergroup))

  • private pure function excite_triple(this, exc, supergroup) result(excited_supergroup)

    Arguments

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

    Return Value integer, (size(supergroup))

procedure, public :: get_available_singles

  • private pure function get_available_singles(this, det_I) result(singles_exc_list)

    Arguments

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

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

    integer, intent(in) :: det_I(:)

    Return Value integer, allocatable, (:,:)

    Dimension is (nEl, n_configurations)

procedure, public :: get_available_doubles

  • private pure function get_available_doubles(this, det_I) result(doubles_exc_list)

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

    Arguments

    Type IntentOptional Attributes Name
    class(GASSpec_t), intent(in) :: this
    integer, intent(in) :: det_I(:)

    Return Value integer, allocatable, (:,:)

procedure, public :: gen_all_excits

  • private subroutine 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(GASSpec_t), intent(in) :: this

    GAS specification

    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.

procedure, public :: contains_supergroup => Flexible_contains_supergroup

  • private pure function Flexible_contains_supergroup(this, supergroup) result(res)

    Query wether a supergroup is contained in the GAS space.

    Arguments

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

    Specification of GAS spaces.

    integer, intent(in) :: supergroup(:)

    A supergroup.

    Return Value logical

procedure, public :: is_valid => Flexible_is_valid

  • private pure function Flexible_is_valid(this, n_basis)

    Check if the GAS specification is valid

    Read more…

    Arguments

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

    Specification of GAS spaces with local constraints.

    integer, intent(in), optional :: n_basis

    Return Value logical

procedure, public :: write_to => Flexible_write_to

  • private subroutine Flexible_write_to(this, iunit)

    Arguments

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

procedure, public :: get_possible_spaces => Flexible_get_possible_spaces

  • private pure function Flexible_get_possible_spaces(this, supergroup, add_holes, add_particles, n_total) result(spaces)

    Arguments

    Type IntentOptional Attributes Name
    class(FlexibleGASSpec_t), intent(in) :: this
    integer, intent(in) :: supergroup(size(this%GAS_sizes))
    integer, intent(in), optional :: add_holes(:)
    integer, intent(in), optional :: add_particles(:)
    integer, intent(in), optional :: n_total

    Return Value integer, allocatable, (:)