2019-07-23 15:12:25 +02:00
|
|
|
program save_for_qmc
|
|
|
|
|
|
|
|
integer :: iunit
|
|
|
|
logical :: exists
|
|
|
|
double precision :: e_ref
|
|
|
|
|
|
|
|
! Determinants
|
|
|
|
read_wf = .True.
|
|
|
|
TOUCH read_wf
|
|
|
|
print *, "N_det = ", N_det
|
|
|
|
call write_spindeterminants
|
|
|
|
|
|
|
|
! Reference Energy
|
|
|
|
if (do_pseudo) then
|
|
|
|
call write_pseudopotential
|
|
|
|
endif
|
|
|
|
call system( &
|
|
|
|
'mkdir -p '//trim(ezfio_filename)//'/simulation ;' // &
|
|
|
|
'cp '//trim(ezfio_filename)//'/.version '//trim(ezfio_filename)//'/simulation/.version ; ' // &
|
|
|
|
'mkdir -p '//trim(ezfio_filename)//'/properties ;' // &
|
|
|
|
'cp '//trim(ezfio_filename)//'/.version '//trim(ezfio_filename)//'/properties/.version ; ' // &
|
|
|
|
'echo T > '//trim(ezfio_filename)//'/properties/e_loc' &
|
|
|
|
)
|
|
|
|
iunit = 13
|
|
|
|
open(unit=iunit,file=trim(ezfio_filename)//'/simulation/e_ref',action='write')
|
|
|
|
call ezfio_has_fci_energy_pt2(exists)
|
|
|
|
if (exists) then
|
|
|
|
call ezfio_get_fci_energy_pt2(e_ref)
|
|
|
|
else
|
|
|
|
call ezfio_has_fci_energy(exists)
|
|
|
|
if (exists) then
|
|
|
|
call ezfio_get_fci_energy(e_ref)
|
|
|
|
else
|
|
|
|
call ezfio_has_hartree_fock_energy(exists)
|
|
|
|
if (exists) then
|
|
|
|
call ezfio_get_hartree_fock_energy(e_ref)
|
|
|
|
else
|
|
|
|
e_ref = 0.d0
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
write(iunit,*) e_ref
|
|
|
|
close(iunit)
|
|
|
|
|
2023-05-31 11:01:37 +02:00
|
|
|
call export_trexio(.True.)
|
2019-07-23 15:12:25 +02:00
|
|
|
end
|
2023-03-09 10:50:44 +01:00
|
|
|
|
2022-10-04 14:25:43 +02:00
|
|
|
! ---
|