DecomposeAbelianSym Subroutine

public pure subroutine DecomposeAbelianSym(Isym, AbelSym)

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: Isym
integer, intent(out) :: AbelSym(3)

Contents

Source Code


Source Code

    pure subroutine DecomposeAbelianSym(ISym, AbelSym)
        ! Store the symmetry index as integer(int64).  For Abelian symmetry
        ! we need to have 3 numbers stored in this index.  We store
        ! according to isym=\sum_i AbelSym(i)*32768**(i-1).
        ! This allows point groups with more than 64 irreps to be used in
        ! the point group is Abelian (as all translational/k-point
        ! symmetries are).
        ! Decompose the symmetry label back into the appropriate "quantum"
        ! numbers.
        ! Store the symmetry index as integer(int64).  For Abelian symmetry
        ! we need to have 3 numbers stored in this index.  We store
        ! according to isym=1+\sum_i AbelSym(i)*32768**(i-1).
        ! Note that many symmetry parameters for CPMD-NECI jobs are set in
        ! kpntrep.F in CPMD source.
        ! Decompose the symmetry label back into the appropriate
        ! numbers...
        integer(int64), intent(in) :: Isym
        integer, intent(out) :: AbelSym(3)
!RShift
        AbelSym(3) = int(IShft(Isym, -(PropBitLen * 2)))
!RShift
        AbelSym(2) = int(Iand(IShft(ISym, -PropBitLen), 2_int64**PropBitLen - 1))
        AbelSym(1) = int(Iand(Isym, 2_int64**PropBitLen - 1))
    end subroutine DecomposeAbelianSym