10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-05 05:33:56 +01:00
quantum_package/plugins/Hartree_Fock/HF_density_matrix_ao.irp.f

42 lines
1.3 KiB
Fortran
Raw Normal View History

2017-06-27 20:41:54 +02:00
BEGIN_PROVIDER [double precision, HF_density_matrix_ao_alpha, (ao_num,ao_num) ]
2015-06-17 18:22:08 +02:00
implicit none
BEGIN_DOC
2017-09-14 11:36:27 +02:00
! S^{-1}.P_alpha.S^{-1}
2015-06-17 18:22:08 +02:00
END_DOC
call dgemm('N','T',ao_num,ao_num,elec_alpha_num,1.d0, &
mo_coef, size(mo_coef,1), &
mo_coef, size(mo_coef,1), 0.d0, &
HF_density_matrix_ao_alpha, size(HF_density_matrix_ao_alpha,1))
END_PROVIDER
2017-06-27 20:41:54 +02:00
BEGIN_PROVIDER [ double precision, HF_density_matrix_ao_beta, (ao_num,ao_num) ]
2015-06-17 18:22:08 +02:00
implicit none
BEGIN_DOC
2017-09-14 11:36:27 +02:00
! S^{-1}.P_beta.S^{-1}
2015-06-17 18:22:08 +02:00
END_DOC
call dgemm('N','T',ao_num,ao_num,elec_beta_num,1.d0, &
mo_coef, size(mo_coef,1), &
mo_coef, size(mo_coef,1), 0.d0, &
HF_density_matrix_ao_beta, size(HF_density_matrix_ao_beta,1))
END_PROVIDER
2017-06-27 20:41:54 +02:00
BEGIN_PROVIDER [ double precision, HF_density_matrix_ao, (ao_num,ao_num) ]
2015-06-17 18:22:08 +02:00
implicit none
BEGIN_DOC
2017-09-14 11:36:27 +02:00
! S^{-1}.P.S^{-1} where P = C.C^t
2015-06-17 18:22:08 +02:00
END_DOC
ASSERT (size(HF_density_matrix_ao,1) == size(HF_density_matrix_ao_alpha,1))
if (elec_alpha_num== elec_beta_num) then
HF_density_matrix_ao = HF_density_matrix_ao_alpha + HF_density_matrix_ao_alpha
else
ASSERT (size(HF_density_matrix_ao,1) == size(HF_density_matrix_ao_beta ,1))
HF_density_matrix_ao = HF_density_matrix_ao_alpha + HF_density_matrix_ao_beta
endif
END_PROVIDER