getSpinIndex Function

public pure elemental function getSpinIndex(orb) result(ms)

Arguments

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

Return Value integer


Contents

Source Code


Source Code

    pure elemental function getSpinIndex(orb) result(ms)
        ! return a spin index of the orbital orb which can be used to address arrays
        ! Input: orb - spin orbital
        ! Output: ms - spin index of orb with the following values:
        !              0 - alpha
        !              1 - beta
        integer, intent(in) :: orb
        integer :: ms

        ms = mod(orb, 2)
    end function getSpinIndex