10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-06-24 14:12:24 +02:00

Merge pull request #109 from kgasperich/features_kpts

davidson fix
This commit is contained in:
Kevin Gasperich 2020-05-26 16:25:37 -05:00 committed by GitHub
commit a4889b6821
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 6 deletions

View File

@ -481,7 +481,7 @@ BEGIN_PROVIDER [ complex*16, S_half_kpts, (ao_num_per_kpt,ao_num_per_kpt,kpt_num
allocate(U(ao_num_per_kpt,ao_num_per_kpt),Vt(ao_num_per_kpt,ao_num_per_kpt),D(ao_num_per_kpt))
do kk=1,kpt_num
call svd_complex(ao_overlap_kpts(1,1,k),size(ao_overlap_kpts,1),U,size(U,1),D,Vt,size(Vt,1),ao_num_per_kpt,ao_num_per_kpt)
call svd_complex(ao_overlap_kpts(1,1,kk),size(ao_overlap_kpts,1),U,size(U,1),D,Vt,size(Vt,1),ao_num_per_kpt,ao_num_per_kpt)
do i=1,ao_num_per_kpt
D(i) = dsqrt(D(i))

View File

@ -1040,6 +1040,15 @@ subroutine davidson_diag_hjj_sjj_complex(dets_in,u_in,H_jj,s2_out,energies,dim_i
y = (0.d0,0.d0)
s_ = (0.d0,0.d0)
s_tmp = (0.d0,0.d0)
W = (0.d0,0.d0)
S = (0.e0,0.e0)
S_d = (0.d0,0.d0)
h_p = (0.d0,0.d0)
residual_norm = 0.d0
s2 = 0.d0
y_s = (0.e0,0.e0)
lambda = 0.d0
ASSERT (N_st > 0)

View File

@ -797,9 +797,9 @@ subroutine H_S2_u_0_nstates_openmp_complex(v_0,s_0,u_0,N_st,sze)
! istart, iend, ishift, istep are used in ZMQ parallelization.
END_DOC
integer, intent(in) :: N_st,sze
complex*16, intent(out) :: v_0(sze,N_st), s_0(sze,N_st)
complex*16, intent(inout) :: u_0(sze,N_st)
!complex*16, intent(inout) :: v_0(sze,N_st), s_0(sze,N_st), u_0(sze,N_st)
!complex*16, intent(out) :: v_0(sze,N_st), s_0(sze,N_st)
!complex*16, intent(inout) :: u_0(sze,N_st)
complex*16, intent(inout) :: v_0(sze,N_st), s_0(sze,N_st), u_0(sze,N_st)
integer :: k
complex*16, allocatable :: u_t(:,:), v_t(:,:), s_t(:,:)
!DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: u_t
@ -884,7 +884,8 @@ subroutine H_S2_u_0_nstates_openmp_work_complex_$N_int(v_t,s_t,u_t,N_st,sze,ista
complex*16, intent(in) :: u_t(N_st,N_det)
complex*16, intent(out) :: v_t(N_st,sze), s_t(N_st,sze)
complex*16 :: hij, sij
complex*16 :: hij
double precision :: sij
integer :: i,j,k,l,kk
integer :: k_a, k_b, l_a, l_b, m_a, m_b
integer :: istate
@ -1389,7 +1390,7 @@ compute_singles=.True.
double precision, external :: diag_H_mat_elem, diag_S_mat_elem
hij = dcmplx(diag_H_mat_elem(tmp_det,$N_int),0.d0)
sij = dcmplx(diag_S_mat_elem(tmp_det,$N_int),0.d0)
sij = diag_s_mat_elem(tmp_det,$N_int)
!DIR$ LOOP COUNT AVG(4)
do l=1,N_st
v_t(l,k_a) = v_t(l,k_a) + hij * u_t(l,k_a)