mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-25 04:53:32 +01:00
Merge branch 'dev' into features_spack
This commit is contained in:
commit
a712441069
2
configure
vendored
2
configure
vendored
@ -314,7 +314,6 @@ printf "\e[m\n"
|
||||
|
||||
if [[ -f ${QP_ROOT}/build.ninja ]] ; then
|
||||
[[ -z ${TRAVIS} ]] && echo "You can now run ${QP_ROOT}/bin/qpsh to enter in the QP shell mode :)"
|
||||
else
|
||||
echo ""
|
||||
echo "${QP_ROOT}/build.ninja does not exist,"
|
||||
echo "you need to specify the COMPILATION configuration file."
|
||||
@ -324,4 +323,3 @@ fi
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
|
@ -11,7 +11,6 @@ declarations
|
||||
decls_main
|
||||
deinit_thread
|
||||
init_main
|
||||
filter_integrals
|
||||
filter2p
|
||||
filter2h2p_double
|
||||
filter2h2p_single
|
||||
@ -106,12 +105,6 @@ class H_apply(object):
|
||||
s["do_double_excitations"] = d[do_double_exc]
|
||||
s["keys_work"] += "call fill_H_apply_buffer_no_selection(key_idx,keys_out,N_int,iproc)"
|
||||
|
||||
s["filter_integrals"] = "array_pairs = .True."
|
||||
if SingleRef:
|
||||
s["filter_integrals"] = """
|
||||
call get_mo_bielec_integrals_existing_ik(i_a,j_a,mo_num,array_pairs,mo_integrals_map)
|
||||
"""
|
||||
|
||||
s["generate_psi_guess"] = """
|
||||
! Sort H_jj to find the N_states lowest states
|
||||
integer :: i
|
||||
|
@ -783,6 +783,8 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d
|
||||
norm(istate) = norm(istate) + coef * coef
|
||||
|
||||
!!!DEBUG
|
||||
! pt2(istate) = pt2(istate) - e_pert + alpha_h_psi**2/delta_E
|
||||
!
|
||||
! integer :: k
|
||||
! double precision :: alpha_h_psi_2,hij
|
||||
! alpha_h_psi_2 = 0.d0
|
||||
|
34
src/tools/print_energy.irp.f
Normal file
34
src/tools/print_energy.irp.f
Normal file
@ -0,0 +1,34 @@
|
||||
program print_energy
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Prints the energy of the wave function stored in the |EZFIO| directory.
|
||||
END_DOC
|
||||
|
||||
! this has to be done in order to be sure that N_det, psi_det and
|
||||
! psi_coef_sorted are the wave function stored in the |EZFIO| directory.
|
||||
read_wf = .True.
|
||||
touch read_wf
|
||||
call run
|
||||
end
|
||||
|
||||
subroutine run
|
||||
implicit none
|
||||
integer :: i
|
||||
double precision :: i_H_psi_array(N_states)
|
||||
double precision :: E(N_states)
|
||||
double precision :: norm(N_states)
|
||||
|
||||
E(:) = nuclear_repulsion
|
||||
norm(:) = 0.d0
|
||||
do i=1,N_det
|
||||
call i_H_psi(psi_det(1,1,i), psi_det, psi_coef, N_int, N_det, &
|
||||
size(psi_coef,1), N_states, i_H_psi_array)
|
||||
norm(:) += psi_coef(i,:)**2
|
||||
E(:) += i_H_psi_array(:) * psi_coef(i,:)
|
||||
enddo
|
||||
|
||||
print *, 'Energy:'
|
||||
do i=1,N_states
|
||||
print *, E(i)/norm(i)
|
||||
enddo
|
||||
end
|
29
src/tools/print_hamiltonian.irp.f
Normal file
29
src/tools/print_hamiltonian.irp.f
Normal file
@ -0,0 +1,29 @@
|
||||
program print_hamiltonian
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Prints the Hamiltonian matrix defined in the space of determinants
|
||||
! present in the |EZFIO| directory.
|
||||
END_DOC
|
||||
|
||||
! this has to be done in order to be sure that N_det, psi_det and
|
||||
! psi_coef_sorted are the wave function stored in the |EZFIO| directory.
|
||||
read_wf = .True.
|
||||
touch read_wf
|
||||
call run
|
||||
end
|
||||
|
||||
subroutine run
|
||||
implicit none
|
||||
integer :: i, j
|
||||
double precision :: hij
|
||||
|
||||
do j=1,N_det
|
||||
do i=1,N_det
|
||||
call i_H_j(psi_det(1,1,i), psi_det(1,1,j), N_int, hij)
|
||||
if (dabs(hij) > 1.d-20) then
|
||||
print *, i, j, hij
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
|
||||
end
|
Loading…
Reference in New Issue
Block a user