mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-09 20:48:47 +01:00
slow but working experimental lambda
This commit is contained in:
parent
8be7b96633
commit
79cbe7b7f1
@ -31,14 +31,14 @@ OPENMP : 1 ; Append OpenMP flags
|
|||||||
# -ftz : Flushes denormal results to zero
|
# -ftz : Flushes denormal results to zero
|
||||||
#
|
#
|
||||||
[OPT]
|
[OPT]
|
||||||
FCFLAGS : -xAVX -O2 -ip -ftz -g
|
FCFLAGS : -xSSE4.2 -O2 -ip -ftz -g
|
||||||
|
|
||||||
# Profiling flags
|
# Profiling flags
|
||||||
#################
|
#################
|
||||||
#
|
#
|
||||||
[PROFILE]
|
[PROFILE]
|
||||||
FC : -p -g
|
FC : -p -g
|
||||||
FCFLAGS : -xAVX -O2 -ip -ftz
|
FCFLAGS : -xSSE4.2 -O2 -ip -ftz
|
||||||
|
|
||||||
# Debugging flags
|
# Debugging flags
|
||||||
#################
|
#################
|
||||||
|
@ -15,7 +15,7 @@ use bitmasks
|
|||||||
delta_ij_mrcc = 0d0
|
delta_ij_mrcc = 0d0
|
||||||
delta_ii_mrcc = 0d0
|
delta_ii_mrcc = 0d0
|
||||||
i_state = 1
|
i_state = 1
|
||||||
provide hh_shortcut psi_det_size lambda_mrcc
|
provide hh_shortcut psi_det_size! lambda_mrcc
|
||||||
!$OMP PARALLEL DO default(none) schedule(dynamic) &
|
!$OMP PARALLEL DO default(none) schedule(dynamic) &
|
||||||
!$OMP shared(psi_det_generators, N_det_generators, hh_exists, pp_exists, N_int, hh_shortcut) &
|
!$OMP shared(psi_det_generators, N_det_generators, hh_exists, pp_exists, N_int, hh_shortcut) &
|
||||||
!$OMP shared(N_states, N_det_non_ref, N_det_ref, delta_ii_mrcc, delta_ij_mrcc) &
|
!$OMP shared(N_states, N_det_non_ref, N_det_ref, delta_ii_mrcc, delta_ij_mrcc) &
|
||||||
@ -545,7 +545,7 @@ END_PROVIDER
|
|||||||
double precision, external :: get_dij
|
double precision, external :: get_dij
|
||||||
integer i_state, degree
|
integer i_state, degree
|
||||||
|
|
||||||
provide lambda_mrcc
|
!provide lambda_mrcc
|
||||||
do i_state = 1, N_states
|
do i_state = 1, N_states
|
||||||
!$OMP PARALLEL DO default(none) schedule(dynamic) private(j,k,Hjk,Hki,degree) shared(no_mono_dressing,lambda_mrcc,i_state, N_det_non_ref,psi_ref, psi_non_ref,N_int,delta_cas,N_det_ref)
|
!$OMP PARALLEL DO default(none) schedule(dynamic) private(j,k,Hjk,Hki,degree) shared(no_mono_dressing,lambda_mrcc,i_state, N_det_non_ref,psi_ref, psi_non_ref,N_int,delta_cas,N_det_ref)
|
||||||
do i=1,N_det_ref
|
do i=1,N_det_ref
|
||||||
|
@ -55,7 +55,7 @@ subroutine mrsc2_dressing_slave(thread,iproc)
|
|||||||
logical, external :: is_in_wavefunction, isInCassd, detEq
|
logical, external :: is_in_wavefunction, isInCassd, detEq
|
||||||
integer,allocatable :: komon(:)
|
integer,allocatable :: komon(:)
|
||||||
logical :: komoned
|
logical :: komoned
|
||||||
|
double precision, external :: get_dij
|
||||||
|
|
||||||
zmq_to_qp_run_socket = new_zmq_to_qp_run_socket()
|
zmq_to_qp_run_socket = new_zmq_to_qp_run_socket()
|
||||||
zmq_socket_push = new_zmq_push_socket(thread)
|
zmq_socket_push = new_zmq_push_socket(thread)
|
||||||
@ -124,14 +124,14 @@ subroutine mrsc2_dressing_slave(thread,iproc)
|
|||||||
if(h_(J,i) == 0.d0) cycle
|
if(h_(J,i) == 0.d0) cycle
|
||||||
if(h_(i_I,i) == 0.d0) cycle
|
if(h_(i_I,i) == 0.d0) cycle
|
||||||
|
|
||||||
ok = .false.
|
!ok = .false.
|
||||||
do i_state=1, N_states
|
!do i_state=1, N_states
|
||||||
if(lambda_mrcc(i_state, i) /= 0d0) then
|
! if(lambda_mrcc(i_state, i) /= 0d0) then
|
||||||
ok = .true.
|
! ok = .true.
|
||||||
exit
|
! exit
|
||||||
end if
|
! end if
|
||||||
end do
|
!end do
|
||||||
if(.not. ok) cycle
|
!if(.not. ok) cycle
|
||||||
!
|
!
|
||||||
|
|
||||||
komon(0) += 1
|
komon(0) += 1
|
||||||
@ -144,7 +144,8 @@ subroutine mrsc2_dressing_slave(thread,iproc)
|
|||||||
! if(I_i == J) phase_Ii = phase_Ji
|
! if(I_i == J) phase_Ii = phase_Ji
|
||||||
|
|
||||||
do i_state = 1,N_states
|
do i_state = 1,N_states
|
||||||
dkI = h_(J,i) * h_(i_I,i) * lambda_mrcc(i_state, i)
|
dkI = h_(J,i) * get_dij(psi_ref(1,1,i_I), psi_non_ref(1,1,i), N_int)
|
||||||
|
!dkI = h_(J,i) * h_(i_I,i) * lambda_mrcc(i_state, i)
|
||||||
dleat(i_state, kn, 1) = dkI
|
dleat(i_state, kn, 1) = dkI
|
||||||
dleat(i_state, kn, 2) = dkI
|
dleat(i_state, kn, 2) = dkI
|
||||||
end do
|
end do
|
||||||
@ -169,24 +170,20 @@ subroutine mrsc2_dressing_slave(thread,iproc)
|
|||||||
!if(isInCassd(det_tmp, N_int)) cycle
|
!if(isInCassd(det_tmp, N_int)) cycle
|
||||||
|
|
||||||
do i_state = 1, N_states
|
do i_state = 1, N_states
|
||||||
if(lambda_mrcc(i_state, i) == 0d0) cycle
|
!if(lambda_mrcc(i_state, i) == 0d0) cycle
|
||||||
|
|
||||||
|
|
||||||
! call get_excitation(det_tmp,psi_non_ref(1,1,l),exc_IJ,degree2,phase_al,N_int)
|
!contrib = h_(i_I,k) * lambda_mrcc(i_state, k) * dleat(i_state, m, 2)! * phase_al
|
||||||
contrib = h_(i_I,k) * lambda_mrcc(i_state, k) * dleat(i_state, m, 2)! * phase_al
|
contrib = get_dij(psi_ref(1,1,i_I), psi_non_ref(1,1,k), N_int) * dleat(i_state, m, 2)
|
||||||
! if(l /= det_cepa0_idx(linked(ll, J))) stop "SPTPqsdT"
|
|
||||||
delta(i_state,ll,1) += contrib
|
delta(i_state,ll,1) += contrib
|
||||||
if(dabs(psi_ref_coef(i_I,i_state)).ge.5.d-5) then
|
if(dabs(psi_ref_coef(i_I,i_state)).ge.5.d-5) then
|
||||||
delta(i_state,0,1) -= contrib * ci_inv(i_state) * psi_non_ref_coef(l,i_state)
|
delta(i_state,0,1) -= contrib * ci_inv(i_state) * psi_non_ref_coef(l,i_state)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if(I_i == J) cycle
|
if(I_i == J) cycle
|
||||||
! call get_excitation(det_tmp,psi_non_ref(1,1,k),exc_IJ,degree2,phase_al,N_int)
|
!contrib = h_(J,l) * lambda_mrcc(i_state, l) * dleat(i_state, m, 1)! * phase_al
|
||||||
! cj_inv(i_state) = 1.d0 / psi_ref_coef(J,i_state)
|
contrib = get_dij(psi_ref(1,1,J), psi_non_ref(1,1,l), N_int) * dleat(i_state, m, 1)
|
||||||
contrib = h_(J,l) * lambda_mrcc(i_state, l) * dleat(i_state, m, 1)! * phase_al
|
|
||||||
! if(k /= linked(kk, I_i)) stop "SPTPT"
|
|
||||||
delta(i_state,kk,2) += contrib
|
delta(i_state,kk,2) += contrib
|
||||||
!delta(i_state,det_cepa0_idx(k),2) += contrib
|
|
||||||
if(dabs(psi_ref_coef(J,i_state)).ge.5.d-5) then
|
if(dabs(psi_ref_coef(J,i_state)).ge.5.d-5) then
|
||||||
delta(i_state,0,2) -= contrib * cj_inv(i_state) * psi_non_ref_coef(k,i_state)
|
delta(i_state,0,2) -= contrib * cj_inv(i_state) * psi_non_ref_coef(k,i_state)
|
||||||
end if
|
end if
|
||||||
|
Loading…
Reference in New Issue
Block a user