10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-26 14:23:43 +01:00
quantum_package/plugins/QMC/save_for_qmcchem.irp.f

46 lines
1.3 KiB
Fortran
Raw Normal View History

2015-05-21 10:15:13 +02:00
program save_for_qmc
2016-06-06 09:31:51 +02:00
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')
2017-07-14 03:12:46 +02:00
call ezfio_has_full_ci_zmq_energy_pt2(exists)
2016-06-06 09:31:51 +02:00
if (exists) then
2017-07-14 03:12:46 +02:00
call ezfio_get_full_ci_zmq_energy_pt2(e_ref)
2016-06-06 09:31:51 +02:00
else
2017-07-14 03:12:46 +02:00
call ezfio_has_full_ci_zmq_energy(exists)
2016-06-06 09:31:51 +02:00
if (exists) then
2017-07-14 03:12:46 +02:00
call ezfio_get_full_ci_zmq_energy(e_ref)
2016-06-06 09:31:51 +02:00
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)
2015-05-21 10:15:13 +02:00
end