diff --git a/src/cipsi/selection.irp.f b/src/cipsi/selection.irp.f index fd434c1e..2c35a98f 100644 --- a/src/cipsi/selection.irp.f +++ b/src/cipsi/selection.irp.f @@ -821,6 +821,19 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d enddo 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 ! 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 + if(w <= buf%mini) then call add_to_selection_buffer(buf, det, w) end if diff --git a/src/fci/EZFIO.cfg b/src/fci/EZFIO.cfg index d5526673..69b6c502 100644 --- a/src/fci/EZFIO.cfg +++ b/src/fci/EZFIO.cfg @@ -10,4 +10,8 @@ doc: Calculated |FCI| energy + |PT2| interface: ezfio size: (determinants.n_states) - +[seniority] +type: integer +doc: Using -1 selects all determinants +interface: ezfio,ocaml,provider +default: -1