10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-06-23 05:32:13 +02:00

Do an H_core guess in Hartree-Fock is MOs don't exist

This commit is contained in:
Anthony Scemama 2015-01-04 22:29:19 +01:00
parent e3fff202b8
commit 85cf60bc97
3 changed files with 32 additions and 11 deletions

View File

@ -1 +1 @@
AOs BiInts Bitmask Electrons Ezfio_files MonoInts MOs Nuclei Output Utils
AOs BiInts Bitmask Electrons Ezfio_files MonoInts MOGuess MOs Nuclei Output Utils

View File

@ -1,19 +1,40 @@
program scf
call create_guess
call orthonormalize_mos
call run
end
subroutine create_guess
implicit none
BEGIN_DOC
! Create an H_core guess if no MOs are present in the EZFIO directory
END_DOC
logical :: exists
PROVIDE ezfio_filename
call ezfio_has_mo_basis_mo_coef(exists)
if (.not.exists) then
mo_coef = ao_ortho_lowdin_coef
mo_label = 'Guess'
call mo_as_eigvectors_of_mo_matrix(mo_mono_elec_integral,size(mo_mono_elec_integral,1),size(mo_mono_elec_integral,2),mo_label)
SOFT_TOUCH mo_coef mo_label
endif
end
subroutine run
use bitmasks
implicit none
BEGIN_DOC
! Run SCF calculation
END_DOC
double precision :: SCF_energy_before,SCF_energy_after,diag_H_mat_elem,get_mo_bielec_integral
double precision :: E0
integer :: i_it, i, j, k
E0 = HF_energy
thresh_SCF = 1.d-10
call damping_SCF
mo_label = "Canonical"

View File

@ -39,14 +39,7 @@ END_PROVIDER
logical :: exists
PROVIDE ezfio_filename
!Label
call ezfio_has_mo_basis_mo_label(exists)
if (exists) then
call ezfio_get_mo_basis_mo_label(mo_label)
else
mo_label = 'no_label'
endif
! Coefs
call ezfio_has_mo_basis_mo_coef(exists)
if (exists) then
@ -62,8 +55,15 @@ END_PROVIDER
enddo
enddo
deallocate(buffer)
call ezfio_has_mo_basis_mo_label(exists)
if (exists) then
call ezfio_get_mo_basis_mo_label(mo_label)
else
mo_label = 'no_label'
endif
else
mo_coef = 0.d0
! Orthonormalized AO basis
mo_coef = 0.
endif
END_PROVIDER