get_abelian_sym Function

public pure function get_abelian_sym(string) result(sym)

Arguments

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

Return Value integer


Contents

Source Code


Source Code

    pure function get_abelian_sym(string) result(sym)

        ! Note, the orbital numbers in the input string refer to the spatial orbitals, so we
        ! mnultiply these by 2 when used in G1.

        integer, intent(in) :: string(:)
        integer :: sym
        integer(int64) :: temp_sym
        integer :: i

        if (tHub) then
            !Since RAS is originally developed for molucules, it cannot handle kpoint symmetries.
            !As a quick fix, we ignore symmetry labels of the Hubbard model.
            sym = 0
        else
            temp_sym = G1(BRR(string(1) * 2))%Sym%S

            do i = 2, size(string)
                temp_sym = ieor(temp_sym, G1(BRR(string(i) * 2))%Sym%S)
            end do

            sym = int(temp_sym)
        end if

    end function get_abelian_sym