mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-03 10:05:57 +01:00
Introduced DSYEVR
This commit is contained in:
parent
5f9e60668c
commit
c23ca86017
@ -2,7 +2,7 @@
|
||||
type: Threshold
|
||||
doc: Threshold on the magnitude of the smallest eigenvalues of the overlap matrix in the AO basis
|
||||
interface: ezfio,provider,ocaml
|
||||
default: 1.e-5
|
||||
default: 1.e-6
|
||||
|
||||
[max_dim_diis]
|
||||
type: integer
|
||||
|
@ -98,10 +98,11 @@ END_DOC
|
||||
double precision :: level_shift_save
|
||||
level_shift_save = level_shift
|
||||
do while (Delta_Energy_SCF > 0.d0)
|
||||
level_shift = level_shift + 0.05d0
|
||||
level_shift = level_shift + 0.1d0
|
||||
MO_coef = eigenvectors_Fock_matrix_MO
|
||||
TOUCH MO_coef level_shift
|
||||
Delta_Energy_SCF = HF_energy - energy_SCF_previous
|
||||
energy_SCF = HF_energy
|
||||
if (level_shift-level_shift_save > 0.5d0) exit
|
||||
enddo
|
||||
level_shift = level_shift_save
|
||||
@ -235,7 +236,7 @@ END_DOC
|
||||
stop 'bug in DIIS'
|
||||
endif
|
||||
|
||||
if (rcond > 1.d-10) then
|
||||
if (rcond > 1.d-12) then
|
||||
|
||||
! Compute extrapolated Fock matrix
|
||||
|
||||
|
@ -61,9 +61,16 @@
|
||||
lwork = -1
|
||||
liwork = -1
|
||||
|
||||
call dsyevd( 'V', 'U', mo_tot_num, F, &
|
||||
size(F,1), diagonal_Fock_matrix_mo, &
|
||||
work, lwork, iwork, liwork, info)
|
||||
|
||||
integer :: m, ISUPPZ(mo_tot_num)
|
||||
call dsyevr('V', 'A', 'U', mo_tot_num, F, size(F,1), &
|
||||
-100.d0, 100.d0, 1, mo_tot_num, 0.d0, &
|
||||
m, diagonal_Fock_matrix_mo, &
|
||||
eigenvectors_Fock_matrix_mo, &
|
||||
size(eigenvectors_Fock_matrix_mo,1), &
|
||||
isuppz, work, lwork, iwork, liwork, info)
|
||||
|
||||
|
||||
|
||||
if (info /= 0) then
|
||||
print *, irp_here//' DSYEVD failed : ', info
|
||||
@ -76,22 +83,22 @@
|
||||
|
||||
allocate(work(lwork))
|
||||
allocate(iwork(liwork) )
|
||||
call dsyevd( 'V', 'U', mo_tot_num, F, &
|
||||
size(F,1), diagonal_Fock_matrix_mo, &
|
||||
work, lwork, iwork, liwork, info)
|
||||
|
||||
call dsyevr('V', 'A', 'U', mo_tot_num, F, size(F,1), &
|
||||
-100.d0, 100.d0, 1, mo_tot_num, 0.d0, &
|
||||
m, diagonal_Fock_matrix_mo, &
|
||||
eigenvectors_Fock_matrix_mo, &
|
||||
size(eigenvectors_Fock_matrix_mo,1), &
|
||||
isuppz, work, lwork, iwork, liwork, info)
|
||||
|
||||
deallocate(iwork)
|
||||
|
||||
|
||||
if (info /= 0) then
|
||||
call dsyev( 'V', 'L', mo_tot_num, F, &
|
||||
size(F,1), diagonal_Fock_matrix_mo, &
|
||||
work, lwork, info)
|
||||
|
||||
if (info /= 0) then
|
||||
print *, irp_here//' DSYEV failed : ', info
|
||||
stop 1
|
||||
endif
|
||||
endif
|
||||
|
||||
F(1:mo_tot_num,1:mo_tot_num) = eigenvectors_Fock_matrix_mo(1:mo_tot_num,1:mo_tot_num)
|
||||
|
||||
call dgemm('N','N',ao_num,mo_tot_num,mo_tot_num, 1.d0, &
|
||||
mo_coef, size(mo_coef,1), F, size(F,1), &
|
||||
|
Loading…
Reference in New Issue
Block a user