gtSpin Function

public pure elemental function gtSpin(spinOrb) result(spinInd)

Arguments

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

Return Value integer


Contents

Source Code


Source Code

    pure elemental function gtSpin(spinOrb) result(spinInd)
        ! get a spin index encoding the spin of the input orbital
        ! Input: spinOrb - spin orbital which spin index to get
        ! Output: spinInd - 1 if MS is +1
        !                   2 if MS is -1
        implicit none
        integer, intent(in) :: spinOrb
        integer :: spinInd

        spinInd = mod(spinOrb, 2)
    end function gtSpin