obtain_h2_psi Subroutine

public subroutine obtain_h2_psi()

Arguments

None

Contents

Source Code


Source Code

    subroutine obtain_h2_psi()
        real(dp) :: dummy_sign(lenof_sign)

        ! apply H once, we now have the spawnedParts from a single iteration
        call apply_hamiltonian(CurrentDets, int(TotWalkers), .true., tTruncInitiator, .true.)

        ! communicate the spawns between processors and store the compressed spawns into a buffer
        call generate_spawn_buf()

        ! apply H to the buffer to get H^2 on the original population. The result is stored
        ! in spawnedParts (uncommunicated)
        call apply_hamiltonian(spawnBuf, spawnBufSize, .false., .false., .false.)

        ! communicate the result and compress the population (such that each determinant
        ! only occurs once)
        call SendProcNewParts(spawnBufSize, .false.)
        call CompressSpawnedList(spawnBufSize, iter_data_fciqmc)

    end subroutine obtain_h2_psi