LocalGASSpec_t Derived Type

type, public, extends(GASSpec_t) :: LocalGASSpec_t


Contents


Components

Type Visibility Attributes Name Initial
integer, private, allocatable :: min(:)

The indices are: min(1 : nGAS), max(1 : nGAS). min(iGAS) specifies the minimum particle number per GAS space. max(iGAS) specifies the maximum particle number per GAS space.

integer, private, allocatable :: max(:)

The indices are: min(1 : nGAS), max(1 : nGAS). min(iGAS) specifies the minimum particle number per GAS space. max(iGAS) specifies the maximum particle number per GAS space.


Constructor

public interface LocalGASSpec_t

  • private pure function construct_LocalGASSpec_t(n_min, n_max, spat_GAS_orbs, recoupling) result(GAS_spec)

    Constructor of LocalGASSpec_t

    Arguments

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

    Minimum particle number per GAS space.

    integer, intent(in) :: n_max(:)

    Maximum particle number per GAS space.

    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(LocalGASSpec_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.

    This function uses get_possible_spaces to find possible GAS spaces where a particle can be created and returns only unoccupied sites of correct spin.

    “Trivial” excitations are avoided. That means, that a site is only counted as unoccupied if it was unoccupied in nI from the beginning on. (A double excitation where a particle is deleted, but immediately recreated would be such a trivial excitations.)

    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, (:)

procedure, public, :: contains_conf

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

    Query wether a determinant or CSF 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

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.

    The function in nI-format is faster! It is assumed that the determinant is contained in the Full CI space and obeys e.g. the Pauli principle. The return value is not defined, if that is not the case!

    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, :: 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, :: 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)

    Arguments

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

    Return Value logical

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.

    Can be seen as the preimage of get_iGAS (which is usually not injective).

    Arguments

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

    Return Value integer

procedure, public, :: count_per_GAS

  • private pure function count_per_GAS(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))

generic, public, :: is_allowed => is_allowed_single, is_allowed_double

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

    Check if a single excitation is allowed.

    Is called once at initialization, so it does not have to be super fast.

    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.

    Is called once at initialization, so it does not have to be super fast. recoupling allows recoupling excitations that change the spin projection of individual GAS spaces.

    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

procedure, public, :: contains_supergroup => Local_contains_supergroup

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

    Query wether a supergroup is contained in the GAS space.

    Arguments

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

    Specification of GAS spaces.

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

    A supergroup.

    Return Value logical

procedure, public, :: is_valid => Local_is_valid

  • private pure function Local_is_valid(this, n_basis)

    Check if the GAS specification is valid

    If the number of particles or the number of spin orbitals is provided, then the consistency with these numbers is checked as well.

    Arguments

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

    Specification of GAS spaces with local constraints.

    integer, intent(in), optional :: n_basis

    Return Value logical

procedure, public, :: write_to => Local_write_to

  • private subroutine Local_write_to(this, iunit)

    Arguments

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

procedure, public, :: get_possible_spaces => Local_get_possible_spaces

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

    Arguments

    Type IntentOptional Attributes Name
    class(LocalGASSpec_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, (:)

generic, public, :: get_min => get_min_i, get_min_all

  • private elemental function get_min_i(this, iGAS)

    Returns the minimum particle number for a given GAS space.

    Arguments

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

    Return Value integer

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

    Returns the minimum particle number for all GAS spaces.

    Arguments

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

    Return Value integer, allocatable, (:)

procedure, private :: get_min_all

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

    Returns the minimum particle number for all GAS spaces.

    Arguments

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

    Return Value integer, allocatable, (:)

procedure, private :: get_min_i

  • private elemental function get_min_i(this, iGAS)

    Returns the minimum particle number for a given GAS space.

    Arguments

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

    Return Value integer

generic, public, :: get_max => get_max_i, get_max_all

  • private elemental function get_max_i(this, iGAS)

    Returns the maximum particle number for a given GAS space.

    Arguments

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

    Return Value integer

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

    Returns the maximum particle number for all GAS spaces.

    Arguments

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

    Return Value integer, allocatable, (:)

procedure, private :: get_max_all

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

    Returns the maximum particle number for all GAS spaces.

    Arguments

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

    Return Value integer, allocatable, (:)

procedure, private :: get_max_i

  • private elemental function get_max_i(this, iGAS)

    Returns the maximum particle number for a given GAS space.

    Arguments

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

    Return Value integer