10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-07-08 12:25:57 +02:00
quantum_package/src/Hartree_Fock/SCF.irp.f

47 lines
1.1 KiB
FortranFixed
Raw Normal View History

2014-06-19 17:58:45 +02:00
2014-06-25 14:58:58 +02:00
program scf
call create_guess
2014-06-25 14:58:58 +02:00
call orthonormalize_mos
call run
2014-06-19 17:58:45 +02:00
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
2015-01-11 16:01:46 +01:00
TOUCH mo_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
2014-06-25 14:58:58 +02:00
subroutine run
2014-06-19 17:58:45 +02:00
2014-06-25 14:58:58 +02:00
use bitmasks
2014-06-19 22:34:56 +02:00
implicit none
BEGIN_DOC
! Run SCF calculation
END_DOC
2014-06-25 14:58:58 +02:00
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
2014-06-25 14:58:58 +02:00
thresh_SCF = 1.d-10
call damping_SCF
mo_label = "Canonical"
2015-01-11 16:01:46 +01:00
call mo_as_eigvectors_of_mo_matrix(Fock_matrix_mo,size(Fock_matrix_mo,1),size(Fock_matrix_mo,2),mo_label)
2014-06-25 14:58:58 +02:00
TOUCH mo_label mo_coef
call save_mos
2014-06-19 22:34:56 +02:00
2014-06-19 17:58:45 +02:00
end