2019-06-28 15:17:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-01 17:49:31 +02:00
|
|
|
BEGIN_PROVIDER [double precision, state_av_act_two_rdm_alpha_alpha_mo, (n_act_orb,n_act_orb,n_act_orb,n_act_orb)]
|
2019-06-28 15:17:04 +02:00
|
|
|
implicit none
|
|
|
|
double precision, allocatable :: state_weights(:)
|
2019-06-29 17:29:32 +02:00
|
|
|
BEGIN_DOC
|
2019-07-01 17:49:31 +02:00
|
|
|
! state_av_act_two_rdm_alpha_alpha_mo(i,j,k,l) = state average physicist two-body rdm restricted to the ACTIVE indices for alpha-alpha electron pairs
|
2019-06-29 17:29:32 +02:00
|
|
|
! = <Psi| a^{\dagger}_i a^{\dagger}_j a_l a_k |Psi>
|
|
|
|
END_DOC
|
2019-06-28 15:17:04 +02:00
|
|
|
allocate(state_weights(N_states))
|
2019-10-25 01:30:30 +02:00
|
|
|
state_weights = state_average_weight
|
2019-06-28 15:17:04 +02:00
|
|
|
integer :: ispin
|
|
|
|
! condition for alpha/beta spin
|
|
|
|
ispin = 1
|
2019-07-01 17:49:31 +02:00
|
|
|
state_av_act_two_rdm_alpha_alpha_mo = 0.D0
|
2019-07-04 16:16:57 +02:00
|
|
|
call orb_range_two_rdm_state_av(state_av_act_two_rdm_alpha_alpha_mo,n_act_orb,n_act_orb,list_act,list_act_reverse,state_weights,ispin,psi_coef,size(psi_coef,2),size(psi_coef,1))
|
2019-06-28 15:17:04 +02:00
|
|
|
|
|
|
|
END_PROVIDER
|
|
|
|
|
2019-07-01 17:49:31 +02:00
|
|
|
BEGIN_PROVIDER [double precision, state_av_act_two_rdm_beta_beta_mo, (n_act_orb,n_act_orb,n_act_orb,n_act_orb)]
|
2019-06-28 15:17:04 +02:00
|
|
|
implicit none
|
|
|
|
double precision, allocatable :: state_weights(:)
|
2019-06-29 17:29:32 +02:00
|
|
|
BEGIN_DOC
|
2019-07-01 17:49:31 +02:00
|
|
|
! state_av_act_two_rdm_beta_beta_mo(i,j,k,l) = state average physicist two-body rdm restricted to the ACTIVE indices for beta-beta electron pairs
|
2019-06-29 17:29:32 +02:00
|
|
|
! = <Psi| a^{\dagger}_i a^{\dagger}_j a_l a_k |Psi>
|
|
|
|
END_DOC
|
2019-06-28 15:17:04 +02:00
|
|
|
allocate(state_weights(N_states))
|
2019-10-25 01:30:30 +02:00
|
|
|
state_weights = state_average_weight
|
2019-06-28 15:17:04 +02:00
|
|
|
integer :: ispin
|
|
|
|
! condition for alpha/beta spin
|
|
|
|
ispin = 2
|
2019-07-01 17:49:31 +02:00
|
|
|
state_av_act_two_rdm_beta_beta_mo = 0.d0
|
2019-07-04 16:16:57 +02:00
|
|
|
call orb_range_two_rdm_state_av(state_av_act_two_rdm_beta_beta_mo,n_act_orb,n_act_orb,list_act,list_act_reverse,state_weights,ispin,psi_coef,size(psi_coef,2),size(psi_coef,1))
|
2019-06-28 15:17:04 +02:00
|
|
|
|
|
|
|
END_PROVIDER
|
|
|
|
|
2019-07-01 17:49:31 +02:00
|
|
|
BEGIN_PROVIDER [double precision, state_av_act_two_rdm_alpha_beta_mo, (n_act_orb,n_act_orb,n_act_orb,n_act_orb)]
|
2019-06-28 15:17:04 +02:00
|
|
|
implicit none
|
|
|
|
double precision, allocatable :: state_weights(:)
|
2019-06-29 17:29:32 +02:00
|
|
|
BEGIN_DOC
|
2019-07-01 17:49:31 +02:00
|
|
|
! state_av_act_two_rdm_alpha_beta_mo(i,j,k,l) = state average physicist two-body rdm restricted to the ACTIVE indices for alpha-beta electron pairs
|
2019-06-29 17:29:32 +02:00
|
|
|
! = <Psi| a^{\dagger}_{i,alpha} a^{\dagger}_{j,beta} a_{l,beta} a_{k,alpha} |Psi>
|
|
|
|
END_DOC
|
2019-06-28 15:17:04 +02:00
|
|
|
allocate(state_weights(N_states))
|
2019-10-25 01:30:30 +02:00
|
|
|
state_weights = state_average_weight
|
2019-06-28 15:17:04 +02:00
|
|
|
integer :: ispin
|
|
|
|
! condition for alpha/beta spin
|
|
|
|
print*,''
|
|
|
|
print*,''
|
|
|
|
print*,''
|
2019-07-01 17:49:31 +02:00
|
|
|
print*,'providint state_av_act_two_rdm_alpha_beta_mo '
|
2019-06-28 15:17:04 +02:00
|
|
|
ispin = 3
|
|
|
|
print*,'ispin = ',ispin
|
2019-07-01 17:49:31 +02:00
|
|
|
state_av_act_two_rdm_alpha_beta_mo = 0.d0
|
2019-07-04 16:16:57 +02:00
|
|
|
call orb_range_two_rdm_state_av(state_av_act_two_rdm_alpha_beta_mo,n_act_orb,n_act_orb,list_act,list_act_reverse,state_weights,ispin,psi_coef,size(psi_coef,2),size(psi_coef,1))
|
2019-06-28 15:17:04 +02:00
|
|
|
|
|
|
|
END_PROVIDER
|
|
|
|
|
|
|
|
|
2019-07-01 17:49:31 +02:00
|
|
|
BEGIN_PROVIDER [double precision, state_av_act_two_rdm_spin_trace_mo, (n_act_orb,n_act_orb,n_act_orb,n_act_orb)]
|
2019-06-28 15:17:04 +02:00
|
|
|
implicit none
|
2019-06-29 17:29:32 +02:00
|
|
|
BEGIN_DOC
|
2019-07-01 17:49:31 +02:00
|
|
|
! state_av_act_two_rdm_spin_trace_mo(i,j,k,l) = state average physicist spin trace two-body rdm restricted to the ACTIVE indices
|
2019-06-29 17:29:32 +02:00
|
|
|
! The active part of the two-electron energy can be computed as:
|
|
|
|
!
|
2019-07-01 17:49:31 +02:00
|
|
|
! \sum_{i,j,k,l = 1, n_act_orb} state_av_act_two_rdm_spin_trace_mo(i,j,k,l) * < ii jj | kk ll >
|
2019-06-29 17:29:32 +02:00
|
|
|
!
|
|
|
|
! with ii = list_act(i), jj = list_act(j), kk = list_act(k), ll = list_act(l)
|
|
|
|
END_DOC
|
2019-06-28 15:17:04 +02:00
|
|
|
double precision, allocatable :: state_weights(:)
|
|
|
|
allocate(state_weights(N_states))
|
2019-10-25 01:30:30 +02:00
|
|
|
state_weights = state_average_weight
|
2019-06-28 15:17:04 +02:00
|
|
|
integer :: ispin
|
|
|
|
! condition for alpha/beta spin
|
|
|
|
ispin = 4
|
2019-07-01 17:49:31 +02:00
|
|
|
state_av_act_two_rdm_spin_trace_mo = 0.d0
|
2019-06-28 20:45:07 +02:00
|
|
|
integer :: i
|
2019-07-04 00:40:02 +02:00
|
|
|
double precision :: wall_0,wall_1
|
|
|
|
call wall_time(wall_0)
|
|
|
|
print*,'providing the state average TWO-RDM ...'
|
2019-10-25 17:31:09 +02:00
|
|
|
print*,'psi_det_size = ',psi_det_size
|
|
|
|
print*,'N_det = ',N_det
|
|
|
|
call orb_range_two_rdm_state_av(state_av_act_two_rdm_spin_trace_mo,n_act_orb,n_act_orb,list_act,list_act_reverse,state_weights,ispin,psi_coef,N_states,size(psi_coef,1))
|
2019-06-28 15:17:04 +02:00
|
|
|
|
2019-07-04 00:40:02 +02:00
|
|
|
call wall_time(wall_1)
|
|
|
|
print*,'Time to provide the state average TWO-RDM',wall_1 - wall_0
|
2019-06-28 15:17:04 +02:00
|
|
|
END_PROVIDER
|
|
|
|
|