mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-03 18:16:12 +01:00
Do an H_core guess in Hartree-Fock is MOs don't exist
This commit is contained in:
parent
e3fff202b8
commit
85cf60bc97
@ -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
|
||||
|
@ -1,13 +1,34 @@
|
||||
|
||||
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
|
||||
|
@ -39,13 +39,6 @@ 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)
|
||||
@ -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_coef = 0.d0
|
||||
mo_label = 'no_label'
|
||||
endif
|
||||
else
|
||||
! Orthonormalized AO basis
|
||||
mo_coef = 0.
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
|
Loading…
Reference in New Issue
Block a user