4
1
mirror of https://github.com/pfloos/quack synced 2024-09-27 03:51:04 +02:00
quack/src/HF/mo_guess.f90

49 lines
931 B
Fortran
Raw Normal View History

2022-02-02 15:06:51 +01:00
subroutine mo_guess(nBas,guess_type,S,Hc,X,c)
2019-10-05 22:06:25 +02:00
! Guess of the molecular orbitals for HF calculation
implicit none
! Input variables
integer,intent(in) :: nBas
integer,intent(in) :: guess_type
double precision,intent(in) :: S(nBas,nBas)
double precision,intent(in) :: Hc(nBas,nBas)
double precision,intent(in) :: X(nBas,nBas)
! Output variables
2023-11-03 19:48:12 +01:00
double precision,intent(inout) :: c(nBas,nBas)
2019-10-05 22:06:25 +02:00
2023-11-03 15:56:18 +01:00
if(guess_type == 0) then
2019-10-05 22:06:25 +02:00
2023-11-03 15:56:18 +01:00
write(*,*) 'Reading HF coefficients...'
2023-11-03 19:48:12 +01:00
c(:,:) = c(:,:)
2023-11-03 15:56:18 +01:00
elseif(guess_type == 1) then
write(*,*) 'Core guess...'
2022-02-02 15:06:51 +01:00
call core_guess(nBas,Hc,X,c)
2019-10-05 22:06:25 +02:00
elseif(guess_type == 2) then
2023-11-03 15:56:18 +01:00
write(*,*) 'Huckel guess...'
2022-02-02 15:06:51 +01:00
call huckel_guess(nBas,S,Hc,X,c)
2019-10-05 22:06:25 +02:00
elseif(guess_type == 3) then
call random_number(c)
2023-11-03 15:56:18 +01:00
write(*,*) 'Random guess...'
2023-10-26 18:00:16 +02:00
c(:,:) = 2d0*c(:,:) - 1d0
2020-01-08 10:17:19 +01:00
else
print*,'Wrong guess option'
stop
2019-10-05 22:06:25 +02:00
endif
end subroutine