Skip to content
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
9 changes: 9 additions & 0 deletions src/prg_modelham_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ subroutine prg_twolevel_model(ea, eb, dab, daiaj, dbibj, dec, rcoeff, h_bml, ver
real(dp), intent(in) :: ea, eb, dab, daiaj, dbibj, rcoeff
integer, intent(in) :: verbose
type(bml_matrix_t),intent(inout) :: h_bml
type(bml_matrix_t) :: ht_bml
integer :: norbs, i, j, seed
real(dp), allocatable :: diagonal(:), row(:)
real(dp) :: dec, dist, ran
Expand Down Expand Up @@ -151,12 +152,20 @@ subroutine prg_twolevel_model(ea, eb, dab, daiaj, dbibj, dec, rcoeff, h_bml, ver
row(j) = (dab + rcoeff*(2.0_dp*ran - 1.0_dp))*exp(dec*dist)
endif
! write(*,*)i,j,row(j),mod(i,2),mod(j,2),abs(real(i-j,dp)+norbs),abs(real(i-j,dp)+norbs)

enddo
call bml_set_row(h_bml,i,row)
enddo

call bml_set_diagonal(h_bml,diagonal)

!Symmetrization
call bml_copy_new(h_bml,ht_bml)
call bml_transpose(h_bml,ht_bml)
call bml_print_matrix("h_bml",h_bml,0,10,0,10)
call bml_print_matrix("ht_bml",ht_bml,0,10,0,10)
call bml_add(h_bml,ht_bml,0.5d0,0.5d0,0.0d0)

end subroutine prg_twolevel_model

end module prg_modelham_mod