9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-18 11:23:38 +01:00

added complex scf density matrix

This commit is contained in:
Kevin Gasperich 2020-01-28 11:46:54 -06:00
parent 2a386ffa41
commit b950e40df4
2 changed files with 42 additions and 1 deletions

View File

@ -18,7 +18,7 @@ subroutine huckel_guess_complex
A(i,j) = c * ao_overlap_complex(i,j) * (ao_one_e_integrals_diag(i) + ao_one_e_integrals_diag(j)) A(i,j) = c * ao_overlap_complex(i,j) * (ao_one_e_integrals_diag(i) + ao_one_e_integrals_diag(j))
enddo enddo
A(j,j) = ao_one_e_integrals_diag(j) + dble(ao_two_e_integral_alpha_complex(j,j)) A(j,j) = ao_one_e_integrals_diag(j) + dble(ao_two_e_integral_alpha_complex(j,j))
if (dabs(dimag(ao_two_e_integral_alpha_complex)) .gt. 1.0d-10) then if (dabs(dimag(ao_two_e_integral_alpha_complex(j,j))) .gt. 1.0d-10) then
stop 'diagonal elements of ao_bi_elec_integral_alpha should be real' stop 'diagonal elements of ao_bi_elec_integral_alpha should be real'
endif endif
enddo enddo

View File

@ -0,0 +1,41 @@
BEGIN_PROVIDER [complex*16, SCF_density_matrix_ao_alpha_complex, (ao_num,ao_num) ]
implicit none
BEGIN_DOC
! $C.C^t$ over $\alpha$ MOs
END_DOC
call zgemm('N','C',ao_num,ao_num,elec_alpha_num,(1.d0,0.d0), &
mo_coef_complex, size(mo_coef_complex,1), &
mo_coef_complex, size(mo_coef_complex,1), (0.d0,0.d0), &
SCF_density_matrix_ao_alpha_complex, size(SCF_density_matrix_ao_alpha_complex,1))
END_PROVIDER
BEGIN_PROVIDER [ complex*16, SCF_density_matrix_ao_beta_complex, (ao_num,ao_num) ]
implicit none
BEGIN_DOC
! $C.C^t$ over $\beta$ MOs
END_DOC
call zgemm('N','C',ao_num,ao_num,elec_beta_num,(1.d0,0.d0), &
mo_coef_complex, size(mo_coef_complex,1), &
mo_coef_complex, size(mo_coef_complex,1), (0.d0,0.d0), &
SCF_density_matrix_ao_beta_complex, size(SCF_density_matrix_ao_beta_complex,1))
END_PROVIDER
BEGIN_PROVIDER [ complex*16, SCF_density_matrix_ao_complex, (ao_num,ao_num) ]
implicit none
BEGIN_DOC
! Sum of $\alpha$ and $\beta$ density matrices
END_DOC
ASSERT (size(SCF_density_matrix_ao_complex,1) == size(SCF_density_matrix_ao_alpha_complex,1))
if (elec_alpha_num== elec_beta_num) then
SCF_density_matrix_ao_complex = SCF_density_matrix_ao_alpha_complex + SCF_density_matrix_ao_alpha_complex
else
ASSERT (size(SCF_density_matrix_ao_complex,1) == size(SCF_density_matrix_ao_beta_complex ,1))
SCF_density_matrix_ao_complex = SCF_density_matrix_ao_alpha_complex + SCF_density_matrix_ao_beta_complex
endif
END_PROVIDER