mirror of
https://github.com/LCPQ/quantum_package
synced 2024-10-19 22:41:48 +02:00
commit
29898effae
11
TODO
11
TODO
@ -42,3 +42,14 @@
|
||||
# EZFIO sans fork
|
||||
|
||||
Refaire les benchmarks
|
||||
|
||||
# Commande qp avec completion dans le shell
|
||||
* qp set => ezfio set
|
||||
* qp get => ezfio get
|
||||
* qp run => qp_run
|
||||
* qp srun => qp_run
|
||||
* qp mpirun => qp_run
|
||||
* qp edit => qp_edit
|
||||
* qp set_mo_class => qp_set_mo_class
|
||||
* qp set_frozen_core => qp_set_frozen_core
|
||||
|
||||
|
@ -4,6 +4,22 @@ qp_export_as_tgz
|
||||
|
||||
.. program:: qp_export_as_tgz
|
||||
|
||||
.. TODO
|
||||
In some HPC facilities, the access to the internet is limited for security reasons.
|
||||
In such an environment, the installation of |QP| is sometimes very painful because
|
||||
the OCaml compiler and the libraries can't be installed by a non-root user.
|
||||
|
||||
This command creates a self-contained binary distribution in the form of a `tar.gz` file
|
||||
that can be copied on another machine.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. code:: bash
|
||||
|
||||
qp_export_as_tgz
|
||||
|
||||
.. note::
|
||||
There can be conflicts due to the version of Glibc. The machine on which |QP| is
|
||||
compiled should be the oldest one.
|
||||
|
||||
|
||||
.. include:: /work.rst
|
||||
|
@ -25,6 +25,11 @@ export LD_LIBRARY_PATH=$(qp_prepend_export "LD_LIBRARY_PATH" "${QP_ROOT}"/lib:"$
|
||||
export LIBRARY_PATH=$(qp_prepend_export "LIBRARY_PATH" "${QP_ROOT}"/lib:"${QP_ROOT}"/lib64)
|
||||
export C_INCLUDE_PATH=$(qp_prepend_export "C_INCLUDE_PATH" "${QP_ROOT}"/include)
|
||||
|
||||
function qp() {
|
||||
ezfio $@
|
||||
}
|
||||
|
||||
# EZFIO completion
|
||||
if [[ $SHELL == "/bin/bash" ]] ; then
|
||||
if [[ -f ${QP_EZFIO}/Bash/ezfio.sh ]]; then
|
||||
source ${QP_EZFIO}/Bash/ezfio.sh
|
||||
@ -33,6 +38,7 @@ if [[ $SHELL == "/bin/bash" ]] ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
#### END Don't modify
|
||||
|
||||
|
||||
|
@ -176,10 +176,10 @@ sed "s!^export QP_ROOT=.*\$!export QP_ROOT=\$( cd \$(dirname "\${BASH_SOURCE}")
|
||||
echo "Creating the archive"
|
||||
# --------------------
|
||||
|
||||
tar --gzip --compress --file "${QPACKAGE_STATIC}".tar.gz quantum_package_static && rm --recursive --force -- "${QPACKAGE_STATIC}"
|
||||
tar --create --gzip --file "${QPACKAGE_STATIC}".tar.gz quantum_package_static && rm --recursive --force -- "${QPACKAGE_STATIC}"
|
||||
if [[ $? -ne 0 ]] ;
|
||||
then
|
||||
echo 'tar --gzip --compress --file "${QPACKAGE_STATIC}".tar.gz "${QPACKAGE_STATIC}" && rm --recursive --force -- "${QPACKAGE_STATIC}"'
|
||||
echo 'tar --create --gzip --file "${QPACKAGE_STATIC}".tar.gz "${QPACKAGE_STATIC}" && rm --recursive --force -- "${QPACKAGE_STATIC}"'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -49,7 +49,7 @@ fi
|
||||
# Check if the integrals can be read
|
||||
source ${QP_ROOT}/external/ezfio/Bash/ezfio.sh
|
||||
ezfio set_file $INPUT
|
||||
RW=$(ezfio get integrals_bielec disk_access_mo_integrals)
|
||||
RW=$(ezfio set mo_two_e_ints io_mo_two_e_integrals)
|
||||
if [[ $RW != Read ]]
|
||||
then
|
||||
echo "
|
||||
@ -60,7 +60,7 @@ Two-electron integrals were not saved to disk in a previous run.
|
||||
If the 4-index transformation takes time, you may consider
|
||||
killing this job and running
|
||||
|
||||
qp_run Four_idx_transform $INPUT
|
||||
qp_run four_idx_transform $INPUT
|
||||
|
||||
as a single-node job before re-submitting the current job.
|
||||
|
||||
|
@ -49,7 +49,7 @@ fi
|
||||
# Check if the integrals can be read
|
||||
source ${QP_ROOT}/external/ezfio/Bash/ezfio.sh
|
||||
ezfio set_file $INPUT
|
||||
RW=$(ezfio get integrals_bielec disk_access_mo_integrals)
|
||||
RW=$(ezfio get mo_two_e_ints io_mo_two_e_integrals)
|
||||
if [[ $RW != Read ]]
|
||||
then
|
||||
echo "
|
||||
@ -60,7 +60,7 @@ Two-electron integrals were not saved to disk in a previous run.
|
||||
If the 4-index transformation takes time, you may consider
|
||||
killing this job and running
|
||||
|
||||
qp_run Four_idx_transform $INPUT
|
||||
qp_run four_idx_transform $INPUT
|
||||
|
||||
as a single-node job before re-submitting the current job.
|
||||
|
||||
|
@ -257,8 +257,6 @@ subroutine ZMQ_pt2(E, pt2,relative_error, error, variance, norm, N_in)
|
||||
call make_selection_buffer_s2(b)
|
||||
endif
|
||||
call fill_H_apply_buffer_no_selection(b%cur,b%det,N_int,0)
|
||||
call copy_H_apply_buffer_to_wf()
|
||||
call save_wavefunction
|
||||
endif
|
||||
call delete_selection_buffer(b)
|
||||
|
||||
|
@ -5,7 +5,7 @@ subroutine run_stochastic_cipsi
|
||||
END_DOC
|
||||
integer :: i,j,k
|
||||
double precision, allocatable :: pt2(:), variance(:), norm(:), rpt2(:)
|
||||
integer :: N_det_before, N_occ_pattern_before, to_select
|
||||
integer :: to_select
|
||||
|
||||
double precision :: rss
|
||||
double precision, external :: memory_of_double
|
||||
@ -52,9 +52,6 @@ subroutine run_stochastic_cipsi
|
||||
call save_wavefunction
|
||||
endif
|
||||
|
||||
N_det_before = 0
|
||||
N_occ_pattern_before = 0
|
||||
|
||||
double precision :: correlation_energy_ratio
|
||||
double precision :: error(N_states)
|
||||
|
||||
@ -68,8 +65,6 @@ subroutine run_stochastic_cipsi
|
||||
write(*,'(A)') '--------------------------------------------------------------------------------'
|
||||
|
||||
|
||||
N_det_before = N_det
|
||||
N_occ_pattern_before = N_occ_pattern
|
||||
to_select = N_det
|
||||
to_select = max(N_states_diag, to_select)
|
||||
|
||||
@ -77,7 +72,7 @@ subroutine run_stochastic_cipsi
|
||||
variance = 0.d0
|
||||
norm = 0.d0
|
||||
call ZMQ_pt2(psi_energy_with_nucl_rep,pt2,relative_error,error, variance, &
|
||||
norm, to_select) ! Stochastic PT2
|
||||
norm, to_select) ! Stochastic PT2 and selection
|
||||
|
||||
correlation_energy_ratio = (psi_energy_with_nucl_rep(1) - hf_energy_ref) / &
|
||||
(psi_energy_with_nucl_rep(1) + pt2(1) - hf_energy_ref)
|
||||
@ -85,16 +80,20 @@ subroutine run_stochastic_cipsi
|
||||
|
||||
call save_energy(psi_energy_with_nucl_rep, pt2)
|
||||
call write_double(6,correlation_energy_ratio, 'Correlation ratio')
|
||||
call print_summary(psi_energy_with_nucl_rep(1:N_states),pt2,error,variance,norm,N_det_before,N_occ_pattern_before)
|
||||
call print_summary(psi_energy_with_nucl_rep,pt2,error,variance,norm,N_det,N_occ_pattern,N_states)
|
||||
|
||||
do k=1,N_states
|
||||
rpt2(:) = pt2(:)/(1.d0 + norm(k))
|
||||
enddo
|
||||
|
||||
call save_iterations(psi_energy_with_nucl_rep(1:N_states),rpt2,N_det_before)
|
||||
call save_iterations(psi_energy_with_nucl_rep(1:N_states),rpt2,N_det)
|
||||
call print_extrapolated_energy()
|
||||
N_iter += 1
|
||||
|
||||
! Add selected determinants
|
||||
call copy_H_apply_buffer_to_wf()
|
||||
call save_wavefunction
|
||||
|
||||
PROVIDE psi_coef
|
||||
PROVIDE psi_det
|
||||
PROVIDE psi_det_sorted
|
||||
@ -123,7 +122,7 @@ subroutine run_stochastic_cipsi
|
||||
rpt2(:) = pt2(:)/(1.d0 + norm(k))
|
||||
enddo
|
||||
|
||||
call print_summary(psi_energy_with_nucl_rep(1:N_states),pt2,error,variance,norm,N_det,N_occ_pattern)
|
||||
call print_summary(psi_energy_with_nucl_rep(1:N_states),pt2,error,variance,norm,N_det,N_occ_pattern,N_states)
|
||||
call save_iterations(psi_energy_with_nucl_rep(1:N_states),rpt2,N_det)
|
||||
call print_extrapolated_energy()
|
||||
|
||||
|
@ -1,16 +1,16 @@
|
||||
subroutine print_summary(e_,pt2_,error_,variance_,norm_,n_det_,n_occ_pattern_)
|
||||
subroutine print_summary(e_,pt2_,error_,variance_,norm_,n_det_,n_occ_pattern_,n_st)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Print the extrapolated energy in the output
|
||||
END_DOC
|
||||
|
||||
double precision, intent(in) :: e_(N_states), pt2_(N_states), variance_(N_states), norm_(N_states), error_(N_states)
|
||||
integer, intent(in) :: n_det_, n_occ_pattern_
|
||||
integer, intent(in) :: n_det_, n_occ_pattern_, n_st
|
||||
double precision, intent(in) :: e_(n_st), pt2_(n_st), variance_(n_st), norm_(n_st), error_(n_st)
|
||||
integer :: i, k
|
||||
integer :: N_states_p
|
||||
character*(9) :: pt2_string
|
||||
character*(512) :: fmt
|
||||
double precision :: f(N_states)
|
||||
double precision :: f(n_st)
|
||||
|
||||
if (do_pt2) then
|
||||
pt2_string = ' '
|
||||
@ -18,7 +18,7 @@ subroutine print_summary(e_,pt2_,error_,variance_,norm_,n_det_,n_occ_pattern_)
|
||||
pt2_string = '(approx)'
|
||||
endif
|
||||
|
||||
N_states_p = min(N_det_,N_states)
|
||||
N_states_p = min(N_det_,n_st)
|
||||
|
||||
do i=1,N_states_p
|
||||
f(i) = 1.d0/(1.d0+norm_(i))
|
||||
@ -57,7 +57,7 @@ subroutine print_summary(e_,pt2_,error_,variance_,norm_,n_det_,n_occ_pattern_)
|
||||
print *, ''
|
||||
|
||||
print *, 'N_det = ', N_det_
|
||||
print *, 'N_states = ', N_states
|
||||
print *, 'N_states = ', n_st
|
||||
if (s2_eig) then
|
||||
print *, 'N_sop = ', N_occ_pattern_
|
||||
endif
|
||||
@ -76,7 +76,7 @@ subroutine print_summary(e_,pt2_,error_,variance_,norm_,n_det_,n_occ_pattern_)
|
||||
enddo
|
||||
|
||||
print *, '-----'
|
||||
if(N_states.gt.1)then
|
||||
if(n_st.gt.1)then
|
||||
print *, 'Variational Energy difference (au | eV)'
|
||||
do i=2, N_states_p
|
||||
print*,'Delta E = ', (e_(i) - e_(1)), &
|
||||
|
Loading…
Reference in New Issue
Block a user