9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-30 15:15:38 +01:00

Added JSON in FCI_TC

This commit is contained in:
Anthony Scemama 2023-04-24 01:22:24 +02:00
parent dd5291d90d
commit 918839fbf6
3 changed files with 25 additions and 11 deletions

View File

@ -94,7 +94,15 @@ subroutine run_stochastic_cipsi
call ZMQ_pt2(E_denom, pt2_data, pt2_data_err, relative_error,to_select) ! Stochastic PT2 and selection
! stop
N_iter += 1
call print_summary(psi_energy_with_nucl_rep, &
pt2_data, pt2_data_err, N_det,N_configuration,N_states,psi_s2)
call save_energy(psi_energy_with_nucl_rep, pt2_data % pt2)
call increment_n_iter(psi_energy_with_nucl_rep, pt2_data)
call print_extrapolated_energy()
call print_mol_properties()
call write_cipsi_json(pt2_data,pt2_data_err)
if (qp_stop()) exit

View File

@ -62,6 +62,7 @@ subroutine run_cipsi_tc
endif
endif
! ---
write(json_unit,json_array_open_fmt) 'fci_tc'
if (do_pt2) then
call run_stochastic_cipsi
@ -69,6 +70,11 @@ subroutine run_cipsi_tc
call run_cipsi
endif
write(json_unit,json_dict_uopen_fmt)
write(json_unit,json_dict_close_fmtx)
write(json_unit,json_array_close_fmtx)
call json_close
else
PROVIDE mo_bi_ortho_tc_one_e mo_bi_ortho_tc_two_e pt2_min_parallel_tasks
if(elec_alpha_num+elec_beta_num.ge.3)then

View File

@ -12,9 +12,9 @@ subroutine get_H_tc_s2_l0_r0(l_0,r_0,N_st,sze,energies, s2)
! istart, iend, ishift, istep are used in ZMQ parallelization.
END_DOC
integer, intent(in) :: N_st,sze
double precision, intent(in) :: l_0(sze,N_st), r_0(sze,N_st)
double precision, intent(inout) :: l_0(sze,N_st), r_0(sze,N_st)
double precision, intent(out) :: energies(N_st), s2(N_st)
logical :: do_right
logical :: do_right
integer :: istate
double precision, allocatable :: s_0(:,:), v_0(:,:)
double precision :: u_dot_v, norm
@ -40,7 +40,7 @@ subroutine H_tc_s2_u_0_opt(v_0,s_0,u_0,N_st,sze)
END_DOC
integer, intent(in) :: N_st,sze
double precision, intent(inout) :: v_0(sze,N_st), u_0(sze,N_st), s_0(sze,N_st)
logical :: do_right
logical :: do_right
do_right = .True.
call H_tc_s2_u_0_nstates_openmp(v_0,s_0,u_0,N_st,sze, do_right)
end
@ -57,7 +57,7 @@ subroutine H_tc_s2_dagger_u_0_opt(v_0,s_0,u_0,N_st,sze)
END_DOC
integer, intent(in) :: N_st,sze
double precision, intent(inout) :: v_0(sze,N_st), u_0(sze,N_st), s_0(sze,N_st)
logical :: do_right
logical :: do_right
do_right = .False.
call H_tc_s2_u_0_nstates_openmp(v_0,s_0,u_0,N_st,sze, do_right)
end
@ -77,7 +77,7 @@ subroutine H_tc_s2_u_0_nstates_openmp(v_0,s_0,u_0,N_st,sze, do_right)
END_DOC
integer, intent(in) :: N_st,sze
double precision, intent(inout) :: v_0(sze,N_st), u_0(sze,N_st), s_0(sze,N_st)
logical, intent(in) :: do_right
logical, intent(in) :: do_right
integer :: k
double precision, allocatable :: u_t(:,:), v_t(:,:), s_t(:,:)
!DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: u_t
@ -124,7 +124,7 @@ subroutine H_tc_s2_u_0_nstates_openmp_work(v_t,s_t,u_t,N_st,sze,istart,iend,ishi
use bitmasks
implicit none
BEGIN_DOC
! Computes $v_t = H | u_t\rangle$
! Computes $v_t = H | u_t\rangle$
!
! Default should be 1,N_det,0,1
!
@ -132,7 +132,7 @@ subroutine H_tc_s2_u_0_nstates_openmp_work(v_t,s_t,u_t,N_st,sze,istart,iend,ishi
END_DOC
integer, intent(in) :: N_st,sze,istart,iend,ishift,istep
double precision, intent(in) :: u_t(N_st,N_det)
logical, intent(in) :: do_right
logical, intent(in) :: do_right
double precision, intent(out) :: v_t(N_st,sze), s_t(N_st,sze)
@ -165,7 +165,7 @@ subroutine H_tc_s2_u_0_nstates_openmp_work_$N_int(v_t,s_t,u_t,N_st,sze,istart,ie
END_DOC
integer, intent(in) :: N_st,sze,istart,iend,ishift,istep
double precision, intent(in) :: u_t(N_st,N_det)
logical, intent(in) :: do_right
logical, intent(in) :: do_right
double precision, intent(out) :: v_t(N_st,sze), s_t(N_st,sze)
double precision :: hij, sij
@ -542,7 +542,7 @@ compute_singles=.True.
lrow = psi_bilinear_matrix_rows(l_a)
ASSERT (lrow <= N_det_alpha_unique)
tmp_det2(1:N_int,1) = psi_det_alpha_unique(1:N_int, lrow)
tmp_det2(1:N_int,1) = psi_det_alpha_unique(1:N_int, lrow)
! call i_H_j( tmp_det, tmp_det2, $N_int, hij)
! call i_H_j_double_spin( tmp_det(1,1), psi_det_alpha_unique(1, lrow), $N_int, hij)
if(do_right)then
@ -693,7 +693,7 @@ compute_singles=.True.
lcol = psi_bilinear_matrix_transp_columns(l_b)
ASSERT (lcol <= N_det_beta_unique)
tmp_det2(1:N_int,2) = psi_det_beta_unique(1:N_int, lcol)
tmp_det2(1:N_int,2) = psi_det_beta_unique(1:N_int, lcol)
! call i_H_j( tmp_det, tmp_det2, $N_int, hij)
! call i_H_j_double_spin( tmp_det(1,2), psi_det_beta_unique(1, lcol), $N_int, hij)
if(do_right)then