mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-23 03:53:29 +01:00
added complex scf density matrix
This commit is contained in:
parent
2a386ffa41
commit
b950e40df4
@ -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))
|
||||
enddo
|
||||
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'
|
||||
endif
|
||||
enddo
|
||||
|
41
src/scf_utils/scf_density_matrix_ao_complex.irp.f
Normal file
41
src/scf_utils/scf_density_matrix_ao_complex.irp.f
Normal 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
|
||||
|
Loading…
Reference in New Issue
Block a user