mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-21 11:03:29 +01:00
Orthogonalize MOs
This commit is contained in:
parent
69dfa85277
commit
6b2020d40d
@ -47,22 +47,23 @@ subroutine create_guess
|
||||
PROVIDE ezfio_filename
|
||||
call ezfio_has_mo_basis_mo_coef(exists)
|
||||
if (.not.exists) then
|
||||
mo_label = 'Guess'
|
||||
if (mo_guess_type == "HCore") then
|
||||
mo_coef = ao_ortho_lowdin_coef
|
||||
TOUCH mo_coef
|
||||
mo_label = 'Guess'
|
||||
call mo_as_eigvectors_of_mo_matrix(mo_one_e_integrals, &
|
||||
size(mo_one_e_integrals,1), &
|
||||
size(mo_one_e_integrals,2), &
|
||||
mo_label,1,.false.)
|
||||
call nullify_small_elements(ao_num, mo_num, mo_coef, size(mo_coef,1), 1.d-10)
|
||||
SOFT_TOUCH mo_coef mo_label
|
||||
SOFT_TOUCH mo_coef
|
||||
else if (mo_guess_type == "Huckel") then
|
||||
call huckel_guess
|
||||
else
|
||||
print *, 'Unrecognized MO guess type : '//mo_guess_type
|
||||
stop 1
|
||||
endif
|
||||
SOFT_TOUCH mo_label
|
||||
endif
|
||||
end
|
||||
|
||||
@ -77,7 +78,7 @@ subroutine run
|
||||
|
||||
integer :: i_it, i, j, k
|
||||
|
||||
mo_label = "Orthonormalized"
|
||||
mo_label = 'Near-Canonical'
|
||||
|
||||
call Roothaan_Hall_SCF
|
||||
call ezfio_set_hartree_fock_energy(SCF_energy)
|
||||
|
@ -4,7 +4,7 @@ subroutine hcore_guess
|
||||
END_DOC
|
||||
implicit none
|
||||
character*(64) :: label
|
||||
label = "Guess"
|
||||
label = 'Guess'
|
||||
call mo_as_eigvectors_of_mo_matrix(mo_one_e_integrals, &
|
||||
size(mo_one_e_integrals,1), &
|
||||
size(mo_one_e_integrals,2),label,1,.false.)
|
||||
|
@ -26,6 +26,7 @@ subroutine huckel_guess
|
||||
TOUCH Fock_matrix_ao_alpha Fock_matrix_ao_beta
|
||||
mo_coef = eigenvectors_fock_matrix_mo
|
||||
call nullify_small_elements(ao_num, mo_num, mo_coef, size(mo_coef,1), 1.d-12 )
|
||||
call orthonormalize_mos
|
||||
SOFT_TOUCH mo_coef
|
||||
call save_mos
|
||||
deallocate(A)
|
||||
|
@ -153,7 +153,7 @@ END_DOC
|
||||
enddo
|
||||
|
||||
if (iteration_SCF < n_it_SCF_max) then
|
||||
mo_label = "Canonical"
|
||||
mo_label = 'Canonical'
|
||||
endif
|
||||
!
|
||||
! End of Main SCF loop
|
||||
@ -164,7 +164,8 @@ END_DOC
|
||||
write(6,*)
|
||||
|
||||
if(.not.frozen_orb_scf)then
|
||||
call mo_as_eigvectors_of_mo_matrix(Fock_matrix_mo,size(Fock_matrix_mo,1),size(Fock_matrix_mo,2),mo_label,1,.true.)
|
||||
call mo_as_eigvectors_of_mo_matrix(Fock_matrix_mo,size(Fock_matrix_mo,1), &
|
||||
size(Fock_matrix_mo,2),mo_label,1,.true.)
|
||||
call nullify_small_elements(ao_num, mo_num, mo_coef, size(mo_coef,1), 1.d-10)
|
||||
call orthonormalize_mos
|
||||
call save_mos
|
||||
@ -305,7 +306,7 @@ END_DOC
|
||||
Fock_matrix_AO_(i,j) = 0.d0
|
||||
enddo
|
||||
do k=1,dim_DIIS
|
||||
if (dabs(X_vector_DIIS(k)) < 1.d-12) cycle
|
||||
if (dabs(X_vector_DIIS(k)) < 1.d-10) cycle
|
||||
do i=1,ao_num
|
||||
Fock_matrix_AO_(i,j) = Fock_matrix_AO_(i,j) + &
|
||||
X_vector_DIIS(k)*Fock_matrix_DIIS(i,j,dim_DIIS-k+1)
|
||||
|
Loading…
Reference in New Issue
Block a user