10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-06-24 14:12:16 +02:00
quantum_package/src/Hartree_Fock/diagonalize_fock.irp.f

21 lines
629 B
Fortran

subroutine diagonalize_fock()
implicit none
double precision, allocatable :: mo_coef_new(:,:), R(:,:),eigvalues(:)
!DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: mo_coef_new, R
allocate(R(mo_tot_num,mo_tot_num))
allocate(mo_coef_new(ao_num_align,mo_tot_num),eigvalues(mo_tot_num))
mo_coef_new = mo_coef
call lapack_diag(eigvalues,R,Fock_matrix_mo,mo_tot_num,mo_tot_num)
call dgemm('N','N',ao_num,mo_tot_num,mo_tot_num,1.d0,mo_coef_new,size(mo_coef_new,1),R,size(R,1),0.d0,mo_coef,size(mo_coef,1))
deallocate(mo_coef_new,R,eigvalues)
mo_label = "Canonical"
SOFT_TOUCH mo_coef mo_label
call clear_mo_map
end