10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-13 17:43:55 +01:00
quantum_package/plugins/MRCC_Utils/mrcc_general.irp.f
2015-07-28 16:58:41 +02:00

31 lines
812 B
Fortran

subroutine run_mrcc
implicit none
integer :: i,j
double precision :: E_new, E_old, delta_e
integer :: iteration
E_new = 0.d0
delta_E = 1.d0
iteration = 0
do while (delta_E > 100.d0*davidson_threshold)
iteration += 1
print *, '==========================='
print *, 'MRCC Iteration', iteration
print *, '==========================='
print *, ''
E_old = sum(ci_energy_dressed)
call write_double(6,ci_energy_dressed(1),"MRCC energy")
call diagonalize_ci_dressed
E_new = sum(ci_energy_dressed)
delta_E = dabs(E_new - E_old)
if (iteration > 20) then
exit
endif
call save_wavefunction
enddo
call write_double(6,ci_energy_dressed(1),"Final MRCC energy")
call ezfio_set_mrcc_energy(ci_energy_dressed(1))
call save_wavefunction
end