IsSymAllowedExcitMat Function

public function IsSymAllowedExcitMat(ex, ic) result(bValid)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ex(2,ic)
integer, intent(in) :: ic

Return Value logical


Contents

Source Code


Source Code

    function IsSymAllowedExcitMat(ex, ic) result(bValid)
        integer, intent(in) :: ex(2, ic), ic
        logical :: bValid

        type(symmetry) :: sym_prod1, sym_prod2
        integer :: ms1, ms2, i
        bValid = .true.

        ! Check the symmetry properties of the excitation matrix
        sym_prod1 = G1(ex(1, 1))%Sym
        sym_prod2 = G1(ex(2, 1))%Sym
        ms1 = G1(ex(1, 1))%ms
        ms2 = G1(ex(2, 1))%ms
        do i = 2, ic
            sym_prod1 = SYMPROD(sym_prod1, G1(ex(1, i))%Sym)
            sym_prod2 = SYMPROD(sym_prod2, G1(ex(2, i))%Sym)
            ms1 = ms1 + G1(ex(1, i))%ms
            ms2 = ms2 + G1(ex(2, i))%ms
        end do
        if (.not. SYMEQ(sym_prod1, sym_prod2)) bValid = .false.
        if (ms1 /= ms2 .and. (.not. tReltvy)) bValid = .false.
    end function IsSymAllowedExcitMat