HistInitPopulations Subroutine

public subroutine HistInitPopulations(SignCurr, VecSlot)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: SignCurr
integer, intent(in) :: VecSlot

Contents

Source Code


Source Code

    subroutine HistInitPopulations(SignCurr, VecSlot)

        integer, intent(in) :: VecSlot
        real(dp), intent(in) :: SignCurr
        integer :: InitBinNo

        if (abs(SignCurr) > InitiatorWalkNo) then
            ! Just summing in those determinants which are initiators.
            ! Need to figure out which bin to put them in though.
            InitBinNo = floor((log(abs(SignCurr)) - InitBinMin) / &
                              InitBinIter) + 1
            if (InitBinNo >= 1 .and. InitBinNo <= 25000) then
                if (SignCurr < 0) then
                    HistInitPops(1, InitBinNo) = HistInitPops(1, InitBinNo) + 1
                else
                    HistInitPops(2, InitBinNo) = HistInitPops(2, InitBinNo) + 1
                end if
!            else
!                call stop_all (this_routine, 'Trying to histogram outside&
!                              & the range of the bins.')
            end if
        end if

        if (SignCurr < MaxInitPopNeg) then
            MaxInitPopNeg = SignCurr
            HighPopNeg = VecSlot
        end if
        if (SignCurr > MaxInitPopPos) then
            MaxInitPopPos = SignCurr
            HighPopPos = VecSlot
        end if

    end subroutine HistInitPopulations