mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-11-04 05:03:50 +01:00
Update davidson guess for cfg.
This commit is contained in:
parent
8ba4afe455
commit
4064243da3
@ -265,36 +265,21 @@ subroutine davidson_diag_cfg_hjj(dets_in,u_in,H_jj,energies,dim_in,sze,sze_csf,N
|
|||||||
! ===================
|
! ===================
|
||||||
|
|
||||||
converged = .False.
|
converged = .False.
|
||||||
kk=1
|
call convertWFfromDETtoCSF(N_st_diag,u_in(1,1),U_csf(1,1))
|
||||||
do k=N_st+1,N_st_diag
|
do k=N_st+1,N_st_diag
|
||||||
do i=1,sze
|
do i=1,sze_csf
|
||||||
!call random_number(r1)
|
call random_number(r1)
|
||||||
!call random_number(r2)
|
call random_number(r2)
|
||||||
r1 = 0.5
|
|
||||||
r2 = 0.5
|
|
||||||
r1 = dsqrt(-2.d0*dlog(r1))
|
r1 = dsqrt(-2.d0*dlog(r1))
|
||||||
r2 = dtwo_pi*r2
|
r2 = dtwo_pi*r2
|
||||||
u_in(i,k) = r1*dcos(r2) * u_in(i,k-N_st)
|
U_csf(i,k) = r1*dcos(r2) * u_csf(i,k-N_st)
|
||||||
enddo
|
enddo
|
||||||
do while(POPCNT(AND(psi_det(1,1,kk),psi_det(1,2,kk))) .ne. 3)
|
U_csf(k,k) = u_csf(k,k) + 10.d0
|
||||||
kk=kk+1
|
|
||||||
end do
|
|
||||||
u_in(kk,k) = u_in(kk,k) + 10.d0
|
|
||||||
kk=kk+1
|
|
||||||
enddo
|
enddo
|
||||||
do k=1,N_st_diag
|
do k=1,N_st_diag
|
||||||
call normalize(u_in(1,k),sze)
|
call normalize(U_csf(1,k),sze_csf)
|
||||||
enddo
|
enddo
|
||||||
|
call convertWFfromCSFtoDET(N_st_diag,U_csf(1,1),U(1,1))
|
||||||
do k=1,N_st_diag
|
|
||||||
do i=1,sze
|
|
||||||
U(i,k) = u_in(i,k)
|
|
||||||
enddo
|
|
||||||
enddo
|
|
||||||
|
|
||||||
! Make random verctors eigenstates of S2
|
|
||||||
call convertWFfromDETtoCSF(N_st_diag,U,U_csf)
|
|
||||||
!call convertWFfromCSFtoDET(N_st_diag,U_csf,U)
|
|
||||||
|
|
||||||
do while (.not.converged)
|
do while (.not.converged)
|
||||||
itertot = itertot+1
|
itertot = itertot+1
|
||||||
|
Loading…
Reference in New Issue
Block a user