makePopSnapshot Subroutine

public subroutine makePopSnapshot(i)

Arguments

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

Contents

Source Code


Source Code

    subroutine makePopSnapshot(i)
        use real_time_data, only: popSnapshot, snapshotOrbs, numSnapshotOrbs

        implicit none
        integer, intent(in) :: i
        integer :: iOrb, nI(nel), iEl, part
        real(dp) :: avPop, tmpSign(lenof_sign)

        call decode_bit_det(nI, CurrentDets(:, i))
        do iOrb = 1, numSnapshotOrbs
            do iEl = 1, nel
                if (nI(iEl) == snapshotOrbs(iOrb)) then
                    avPop = 0
                    call extract_sign(CurrentDets(:, i), tmpSign)
                    do part = 1, lenof_sign
                        avPop = avPop + abs(tmpSign(part))
                    end do
                    avPop = avPop / inum_runs
                    popSnapshot(iOrb) = popSnapshot(iOrb) + avPop
                end if
            end do
        end do

    end subroutine makePopSnapshot