9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-07 05:53:37 +01:00

Added seniority keyword in cipsi

This commit is contained in:
Anthony Scemama 2020-12-10 10:43:13 +01:00
parent 21d42dc7d7
commit ec874e2615
2 changed files with 19 additions and 1 deletions

View File

@ -821,6 +821,19 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d
enddo enddo
endif endif
if (seniority >= 0) then
!TODO : Check if 1st determinant should be used for all states
integer :: s
s = 0
do k=1,N_int
s = s + popcnt(ieor(det(k,1),det(k,2)))
enddo
if (s > seniority) then
e_pert(:) = 0.d0
endif
endif
! ! Gram-Schmidt using input overlap matrix ! ! Gram-Schmidt using input overlap matrix
! do istate=1,N_states ! do istate=1,N_states
@ -900,6 +913,7 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d
! w = dble(n) * w ! w = dble(n) * w
if(w <= buf%mini) then if(w <= buf%mini) then
call add_to_selection_buffer(buf, det, w) call add_to_selection_buffer(buf, det, w)
end if end if

View File

@ -10,4 +10,8 @@ doc: Calculated |FCI| energy + |PT2|
interface: ezfio interface: ezfio
size: (determinants.n_states) size: (determinants.n_states)
[seniority]
type: integer
doc: Using -1 selects all determinants
interface: ezfio,ocaml,provider
default: -1