Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added seed #165

Merged
merged 1 commit into from
Jan 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/prg_modelham_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,24 @@ end subroutine prg_parse_mham
subroutine prg_twolevel_model(ea, eb, dab, daiaj, dbibj, dec, rcoeff, reshuffle, &
& seed, h_bml, verbose)
real(dp), intent(in) :: ea, eb, dab, daiaj, dbibj, rcoeff
integer, intent(in) :: verbose
integer :: seed
integer, intent(in) :: verbose, seed
integer, allocatable :: seedin(:)
logical, intent(in) :: reshuffle
type(bml_matrix_t),intent(inout) :: h_bml
real(dp), allocatable :: diagonal(:), row(:), rowi(:), rowj(:)
type(bml_matrix_t) :: ht_bml
integer :: norbs, i, j
integer :: norbs, i, j, ssize
real(dp) :: dec, dist, ran

norbs = bml_get_N(h_bml)
allocate(diagonal(norbs))
allocate(row(norbs))

call random_seed(seed)

call random_seed()
call random_seed(size=ssize)
allocate(seedin(ssize))
seedin = seed
call random_seed(PUT=seedin)

do i=1,norbs
if(mod(i,2) == 0)then
Expand Down