mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-21 11:03:29 +01:00
WIP
This commit is contained in:
parent
6377f4df63
commit
76b10b9bf2
@ -2,8 +2,6 @@
|
||||
|
||||
* Version 2.2
|
||||
|
||||
** New features
|
||||
|
||||
** Changes
|
||||
|
||||
- Python3 replaces Python2
|
||||
@ -73,6 +71,10 @@
|
||||
- S^2 in single precision
|
||||
- Added Shank function
|
||||
- Added utilities for periodic calculations
|
||||
- Added ~V_ne_psi_energy~
|
||||
- Added ~h_core_huess~ routine
|
||||
- Fixed Laplacians in real space (indices)
|
||||
-
|
||||
|
||||
ao_one_e_integral_zero
|
||||
banned_excitations
|
||||
|
@ -80,7 +80,7 @@ git:
|
||||
./create_git_sha1.sh
|
||||
|
||||
${QP_EZFIO}/Ocaml/ezfio.ml:
|
||||
$(NINJA) -C ${QP_ROOT}/config ${QP_ROOT}/lib/libezfio_irp.a
|
||||
ninja -C ${QP_ROOT}/config ${QP_ROOT}/lib/libezfio_irp.a
|
||||
|
||||
qp_edit.ml: ../scripts/ezfio_interface/qp_edit_template
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
! -*- mode: f90 -*-
|
||||
program pt2
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
@ -15,51 +16,51 @@ program pt2
|
||||
!
|
||||
END_DOC
|
||||
if (.not. is_zmq_slave) then
|
||||
read_wf = .True.
|
||||
threshold_generators = 1.d0
|
||||
SOFT_TOUCH read_wf threshold_generators
|
||||
PROVIDE mo_two_e_integrals_in_map
|
||||
PROVIDE psi_energy
|
||||
call run
|
||||
read_wf = .True.
|
||||
threshold_generators = 1.d0
|
||||
SOFT_TOUCH read_wf threshold_generators
|
||||
PROVIDE mo_two_e_integrals_in_map
|
||||
PROVIDE psi_energy
|
||||
call run
|
||||
else
|
||||
call run_slave_cipsi
|
||||
call run_slave_cipsi
|
||||
endif
|
||||
end
|
||||
end program pt2
|
||||
|
||||
subroutine run
|
||||
implicit none
|
||||
use selection_types
|
||||
integer :: i,j,k
|
||||
logical, external :: detEq
|
||||
|
||||
|
||||
type(pt2_type) :: pt2_data, pt2_data_err
|
||||
integer :: degree
|
||||
integer :: n_det_before, to_select
|
||||
double precision :: threshold_davidson_in
|
||||
|
||||
|
||||
double precision :: relative_error
|
||||
double precision, allocatable :: E_CI_before(:)
|
||||
|
||||
|
||||
allocate ( E_CI_before(N_states))
|
||||
call pt2_alloc(pt2_data, N_states)
|
||||
call pt2_alloc(pt2_data_err, N_states)
|
||||
|
||||
|
||||
E_CI_before(:) = psi_energy(:) + nuclear_repulsion
|
||||
relative_error=PT2_relative_error
|
||||
|
||||
|
||||
if (do_pt2) then
|
||||
call ZMQ_pt2(psi_energy_with_nucl_rep, pt2_data, pt2_data_err, relative_error, 0) ! Stochastic PT2
|
||||
call ZMQ_pt2(psi_energy_with_nucl_rep, pt2_data, pt2_data_err, relative_error, 0) ! Stochastic PT2
|
||||
else
|
||||
call ZMQ_selection(0, pt2_data)
|
||||
call ZMQ_selection(0, pt2_data)
|
||||
endif
|
||||
|
||||
call print_summary(psi_energy_with_nucl_rep(1:N_states), &
|
||||
pt2_data, pt2_data_err, N_det,N_configuration,N_states,psi_s2)
|
||||
|
||||
pt2_data, pt2_data_err, N_det,N_configuration,N_states,psi_s2)
|
||||
|
||||
call save_energy(E_CI_before, pt2_data % pt2)
|
||||
call pt2_dealloc(pt2_data)
|
||||
call pt2_dealloc(pt2_data_err)
|
||||
deallocate(E_CI_before)
|
||||
end
|
||||
end subroutine run
|
||||
|
||||
|
||||
|
@ -28,14 +28,14 @@ subroutine svd(A,LDA,U,LDU,D,Vt,LDVt,m,n)
|
||||
! Find optimal size for temp arrays
|
||||
allocate(work(1))
|
||||
lwork = -1
|
||||
call dgesvd('A','A', m, n, A_tmp, LDA, &
|
||||
call dgesvd('S','S', m, n, A_tmp, LDA, &
|
||||
D, U, LDU, Vt, LDVt, work, lwork, info)
|
||||
! /!\ int(WORK(1)) becomes negative when WORK(1) > 2147483648
|
||||
lwork = max(int(work(1)), 5*MIN(M,N))
|
||||
lwork = max(int(work(1)), 10*MIN(M,N))
|
||||
deallocate(work)
|
||||
|
||||
allocate(work(lwork))
|
||||
call dgesvd('A','A', m, n, A_tmp, LDA, &
|
||||
call dgesvd('S','S', m, n, A_tmp, LDA, &
|
||||
D, U, LDU, Vt, LDVt, work, lwork, info)
|
||||
deallocate(A_tmp,work)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user