mirror of
https://github.com/LCPQ/quantum_package
synced 2024-08-26 14:31:44 +02:00
init shiftedbk
This commit is contained in:
parent
22b2870b9f
commit
1a0f36dfa5
@ -774,6 +774,7 @@ subroutine get_d2(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs)
|
||||
|
||||
if(tip == 3) then
|
||||
puti = p(1, mi)
|
||||
if(bannedOrb(puti, mi)) return
|
||||
do i = 1, 3
|
||||
putj = p(i, ma)
|
||||
if(banned(putj,puti,bant)) cycle
|
||||
@ -796,11 +797,12 @@ subroutine get_d2(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs)
|
||||
h2 = h(1,2)
|
||||
do j = 1,2
|
||||
putj = p(j, 2)
|
||||
if(bannedOrb(putj, 2)) cycle
|
||||
p2 = p(turn2(j), 2)
|
||||
do i = 1,2
|
||||
puti = p(i, 1)
|
||||
|
||||
if(banned(puti,putj,bant)) cycle
|
||||
if(banned(puti,putj,bant) .or. bannedOrb(puti,1)) cycle
|
||||
p1 = p(turn2(i), 1)
|
||||
|
||||
hij = mo_bielec_integral(p1, p2, h1, h2) * get_phase_bi(phasemask, 1, 2, h1, p1, h2, p2)
|
||||
@ -815,8 +817,10 @@ subroutine get_d2(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs)
|
||||
h2 = h(2, ma)
|
||||
do i=1,3
|
||||
puti = p(i, ma)
|
||||
if(bannedOrb(puti,ma)) cycle
|
||||
do j=i+1,4
|
||||
putj = p(j, ma)
|
||||
if(bannedOrb(putj,ma)) cycle
|
||||
if(banned(puti,putj,1)) cycle
|
||||
|
||||
i1 = turn2d(1, i, j)
|
||||
@ -833,7 +837,9 @@ subroutine get_d2(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs)
|
||||
p1 = p(1, mi)
|
||||
do i=1,3
|
||||
puti = p(turn3(1,i), ma)
|
||||
if(bannedOrb(puti,ma)) cycle
|
||||
putj = p(turn3(2,i), ma)
|
||||
if(bannedOrb(putj,ma)) cycle
|
||||
if(banned(puti,putj,1)) cycle
|
||||
p2 = p(i, ma)
|
||||
|
||||
|
@ -376,7 +376,7 @@ subroutine generate_singles_and_doubles(delta_ij_loc, i_generator, bitmask_index
|
||||
!print *, "IND1", indexes(1,:)
|
||||
!print *, "IND2", indexes_end(1,:)
|
||||
!stop
|
||||
call alpha_callback_mask(delta_ij_loc, sp, mask, bannedOrb, banned, indexes, indexes_end, abuf, siz, iproc)
|
||||
call alpha_callback_mask(delta_ij_loc, i_generator, sp, mask, bannedOrb, banned, indexes, indexes_end, abuf, siz, iproc)
|
||||
|
||||
!call dress_with_alpha_buffer(delta_ij_loc, minilist, interesting(0), abuf, n)
|
||||
end if
|
||||
@ -388,12 +388,12 @@ subroutine generate_singles_and_doubles(delta_ij_loc, i_generator, bitmask_index
|
||||
end subroutine
|
||||
|
||||
|
||||
subroutine alpha_callback_mask(delta_ij_loc, sp, mask, bannedOrb, banned, indexes, indexes_end, rabuf, siz, iproc)
|
||||
subroutine alpha_callback_mask(delta_ij_loc, i_gen, sp, mask, bannedOrb, banned, indexes, indexes_end, rabuf, siz, iproc)
|
||||
use bitmasks
|
||||
implicit none
|
||||
|
||||
double precision,intent(inout) :: delta_ij_loc(N_states,N_det,2)
|
||||
integer, intent(in) :: sp, indexes(0:mo_tot_num, 0:mo_tot_num), siz, iproc
|
||||
integer, intent(in) :: sp, indexes(0:mo_tot_num, 0:mo_tot_num), siz, iproc, i_gen
|
||||
integer, intent(in) :: indexes_end(0:mo_tot_num, 0:mo_tot_num), rabuf(*)
|
||||
logical, intent(in) :: bannedOrb(mo_tot_num,2), banned(mo_tot_num, mo_tot_num)
|
||||
integer(bit_kind), intent(in) :: mask(N_int, 2)
|
||||
@ -491,7 +491,7 @@ subroutine alpha_callback_mask(delta_ij_loc, sp, mask, bannedOrb, banned, indexe
|
||||
call apply_particles(mask, s1, i, s2, j, alpha, ok, N_int)
|
||||
!if(.not. ok) stop "non existing alpha......"
|
||||
!print *, "willcall", st4-1, size(labuf)
|
||||
call dress_with_alpha_buffer(delta_ij_loc, labuf, det_minilist, st4-1, alpha, iproc)
|
||||
call dress_with_alpha_buffer(delta_ij_loc, i_gen, labuf, det_minilist, st4-1, alpha, iproc)
|
||||
!call dress_with_alpha_buffer(delta_ij_loc, abuf, siz, alpha, 1)
|
||||
end if
|
||||
end do
|
||||
|
@ -285,9 +285,9 @@ subroutine dress_collector(zmq_socket_pull, E, relative_error, delta, delta_s2,
|
||||
call wall_time(time)
|
||||
if ((dabs(eqt) < relative_error .and. cps_N(cur_cp) >= 30) .or. total_computed == N_det_generators) then
|
||||
! Termination
|
||||
print ""
|
||||
print *,""
|
||||
print "(A10,I5,F15.7,E12.4,F10.2)", "grepme", cur_cp, E+E0+avg, eqt, time-time0
|
||||
print ""
|
||||
print *,""
|
||||
if (zmq_abort(zmq_to_qp_run_socket) == -1) then
|
||||
call sleep(1)
|
||||
if (zmq_abort(zmq_to_qp_run_socket) == -1) then
|
||||
@ -297,9 +297,9 @@ subroutine dress_collector(zmq_socket_pull, E, relative_error, delta, delta_s2,
|
||||
else
|
||||
if (cur_cp > old_cur_cp) then
|
||||
old_cur_cp = cur_cp
|
||||
print ""
|
||||
print *,""
|
||||
print "(A10,I5,F15.7,E12.4,F10.2)", "grepme", cur_cp, E+E0+avg, eqt, time-time0
|
||||
print ""
|
||||
print *,""
|
||||
endif
|
||||
endif
|
||||
end if
|
||||
|
@ -21,7 +21,7 @@ END_PROVIDER
|
||||
|
||||
|
||||
|
||||
subroutine dress_with_alpha_buffer(delta_ij_loc, minilist, det_minilist, n_minilist, alpha, iproc)
|
||||
subroutine dress_with_alpha_buffer(delta_ij_loc, i_gen, minilist, det_minilist, n_minilist, alpha, iproc)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
@ -32,7 +32,7 @@ subroutine dress_with_alpha_buffer(delta_ij_loc, minilist, det_minilist, n_minil
|
||||
!alpha : alpha determinant
|
||||
END_DOC
|
||||
integer(bit_kind), intent(in) :: alpha(N_int,2), det_minilist(N_int, 2, n_minilist)
|
||||
integer,intent(in) :: minilist(n_minilist), n_minilist, iproc
|
||||
integer,intent(in) :: minilist(n_minilist), n_minilist, iproc, i_gen
|
||||
double precision, intent(inout) :: delta_ij_loc(N_states,N_det,2)
|
||||
|
||||
|
||||
@ -190,9 +190,9 @@ subroutine dress_with_alpha_buffer(delta_ij_loc, minilist, det_minilist, n_minil
|
||||
do i_state=1,N_states
|
||||
hdress = dIa(i_state) * hla * psi_ref_coef(i_I,i_state)
|
||||
sdress = dIa(i_state) * sla * psi_ref_coef(i_I,i_state)
|
||||
!$OMP ATOMIC
|
||||
!!!$OMP ATOMIC
|
||||
delta_ij_loc(i_state,k_sd,1) += hdress
|
||||
!$OMP ATOMIC
|
||||
!!!$OMP ATOMIC
|
||||
delta_ij_loc(i_state,k_sd,2) += sdress
|
||||
enddo
|
||||
enddo
|
||||
|
1
plugins/shiftedbk/NEEDED_CHILDREN_MODULES
Normal file
1
plugins/shiftedbk/NEEDED_CHILDREN_MODULES
Normal file
@ -0,0 +1 @@
|
||||
dress_zmq
|
12
plugins/shiftedbk/README.rst
Normal file
12
plugins/shiftedbk/README.rst
Normal file
@ -0,0 +1,12 @@
|
||||
=========
|
||||
shiftedbk
|
||||
=========
|
||||
|
||||
Needed Modules
|
||||
==============
|
||||
.. Do not edit this section It was auto-generated
|
||||
.. by the `update_README.py` script.
|
||||
Documentation
|
||||
=============
|
||||
.. Do not edit this section It was auto-generated
|
||||
.. by the `update_README.py` script.
|
60
plugins/shiftedbk/shifted_bk.irp.f
Normal file
60
plugins/shiftedbk/shifted_bk.irp.f
Normal file
@ -0,0 +1,60 @@
|
||||
|
||||
program mrcc_sto
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! TODO
|
||||
END_DOC
|
||||
call dress_zmq()
|
||||
end
|
||||
|
||||
|
||||
! BEGIN_PROVIDER [ double precision, hij_cache_, (N_det,Nproc) ]
|
||||
!&BEGIN_PROVIDER [ double precision, sij_cache_, (N_det,Nproc) ]
|
||||
BEGIN_PROVIDER [ double precision, fock_diag_tmp_, (2,mo_tot_num+1,Nproc) ]
|
||||
&BEGIN_PROVIDER [ integer, current_generator_, (Nproc) ]
|
||||
implicit none
|
||||
! allocate(fock_diag_tmp(2,mo_tot_num+1))
|
||||
current_generator_(:) = 0
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
|
||||
subroutine dress_with_alpha_buffer(delta_ij_loc, i_gen, minilist, det_minilist, n_minilist, alpha, iproc)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
!delta_ij_loc(:,:,1) : dressing column for H
|
||||
!delta_ij_loc(:,:,2) : dressing column for S2
|
||||
!minilist : indices of determinants connected to alpha ( in psi_det_sorted )
|
||||
!n_minilist : size of minilist
|
||||
!alpha : alpha determinant
|
||||
END_DOC
|
||||
integer(bit_kind), intent(in) :: alpha(N_int,2), det_minilist(N_int, 2, n_minilist)
|
||||
integer,intent(in) :: minilist(n_minilist), n_minilist, iproc, i_gen
|
||||
double precision, intent(inout) :: delta_ij_loc(N_states,N_det,2)
|
||||
double precision :: hii, hij, sij, delta_e
|
||||
double precision, external :: diag_H_mat_elem_fock
|
||||
integer :: i,j,k,l,m, l_sd
|
||||
|
||||
|
||||
if(current_generator_(iproc) /= i_gen) then
|
||||
current_generator_(iproc) = i_gen
|
||||
call build_fock_tmp(fock_diag_tmp_(1,1,iproc),psi_det_generators(1,1,i_gen),N_int)
|
||||
end if
|
||||
!return
|
||||
hii = diag_H_mat_elem_fock(psi_det_generators(1,1,i_gen),alpha,fock_diag_tmp_(1,1,iproc),N_int)
|
||||
|
||||
|
||||
do l_sd=1,n_minilist
|
||||
call i_h_j_s2(alpha,det_minilist(1,1,l_sd),N_int,hij, sij)
|
||||
do i=1,N_states
|
||||
delta_ij_loc(i, minilist(l_sd), 1) += hij / hii * psi_coef(minilist(l_sd), i)
|
||||
end do
|
||||
end do
|
||||
end subroutine
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user