diff --git a/input/options b/input/options index 1256f09..5919d78 100644 --- a/input/options +++ b/input/options @@ -1,5 +1,5 @@ # HF: maxSCF thresh DIIS n_diis guess_type ortho_type mix_guess level_shift stability - 256 0.0000001 T 5 2 1 F 1.0 F + 512 0.0000001 T 5 2 1 F 1.0 F # MP: # CC: maxSCF thresh DIIS n_diis @@ -15,6 +15,6 @@ # ACFDT: AC Kx XBS F F T # BSE: BSE dBSE dTDA evDyn - T T T T + T T T F # MCMP2: nMC nEq nWalk dt nPrint iSeed doDrift 1000000 100000 10 0.3 10000 1234 T diff --git a/src/HF/RHF.f90 b/src/HF/RHF.f90 index 0e3989e..1935de6 100644 --- a/src/HF/RHF.f90 +++ b/src/HF/RHF.f90 @@ -204,6 +204,10 @@ subroutine RHF(maxSCF,thresh,max_diis,guess_type,level_shift,nNuc,ZNuc,rNuc,ENuc call dipole_moment(nBas,P,nNuc,ZNuc,rNuc,dipole_int,dipole) call print_RHF(nBas,nO,e,C,ENuc,ET,EV,EJ,EK,ERHF,dipole) +! dump orbitals for potential restart + + call dump_orbitals(nBas,c) + ! Compute Vx for post-HF calculations call mo_fock_exchange_potential(nBas,c,P,ERI,Vx) diff --git a/src/HF/dump_orbitals.f90 b/src/HF/dump_orbitals.f90 new file mode 100644 index 0000000..8888f03 --- /dev/null +++ b/src/HF/dump_orbitals.f90 @@ -0,0 +1,36 @@ +subroutine dump_orbitals(nBas,c) + +! Write orbitals in a file + + implicit none + include 'parameters.h' + +! Input variables + + integer,intent(in) :: nBas + +! Local variables + + integer :: mu,p + +! Output variables + + double precision,intent(out) :: c(nBas,nBas) + +! Open file with orbitals + + open(unit=12,file='int/MO.dat') + +! Dump orbitals + + do mu=1,nBas + do p=1,nBas + if(abs(c(mu,p)) > 1d-15) write(12,'(I6,I6,F20.15)') mu,p,c(mu,p) + enddo + enddo + +! Close file + + 12 close(unit=12) + +end subroutine dump_orbitals diff --git a/src/HF/mo_guess.f90 b/src/HF/mo_guess.f90 index 387f371..298d737 100644 --- a/src/HF/mo_guess.f90 +++ b/src/HF/mo_guess.f90 @@ -20,7 +20,11 @@ subroutine mo_guess(nBas,guess_type,S,Hc,X,c) double precision,intent(out) :: c(nBas,nBas) - if(guess_type == 1) then + if(guess_type == 0) then + + call read_guess(nBas,c) + + elseif(guess_type == 1) then call core_guess(nBas,Hc,X,c) diff --git a/src/HF/read_guess.f90 b/src/HF/read_guess.f90 new file mode 100644 index 0000000..8cb8ba2 --- /dev/null +++ b/src/HF/read_guess.f90 @@ -0,0 +1,50 @@ +subroutine read_guess(nBas,c) + +! Read the orbitals from a file + + implicit none + include 'parameters.h' + +! Input variables + + integer,intent(in) :: nBas + +! Local variables + + logical :: debug + integer :: mu,p + double precision :: coeff + +! Output variables + + double precision,intent(out) :: c(nBas,nBas) + +! Open file with orbitals + + debug = .false. + + open(unit=12,file='int/MO.dat') + +! Read coefficients + + c(:,:) = 0d0 + do + read(12,*,end=12) mu,p,coeff + c(mu,p) = coeff + c(mu,p) = coeff + enddo + +! Close file + + 12 close(unit=12) + +! Print results + if(debug) then + write(*,'(A28)') '----------------------' + write(*,'(A28)') 'Orbitals' + write(*,'(A28)') '----------------------' + call matout(nBas,nBas,c) + write(*,*) + endif + +end subroutine read_guess