10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-23 04:43:45 +01:00

Merge branch 'dev' into csf

This commit is contained in:
Anthony Scemama 2020-12-11 00:14:00 +01:00
commit 434a8f11ec
4 changed files with 59 additions and 8 deletions

4
.gitmodules vendored
View File

@ -1,6 +1,6 @@
[submodule "external/ezfio"]
path = external/ezfio
url = https://gitlab.com/scemama/ezfio
url = https://gitlab.com/scemama/ezfio.git
[submodule "external/irpf90"]
path = external/irpf90
url = https://gitlab.com/scemama/irpf90
url = https://gitlab.com/scemama/irpf90.git

View File

@ -3,3 +3,28 @@ type: logical
doc: If true, computes the one- and two-body rdms with perturbation theory
interface: ezfio,provider,ocaml
default: False
[seniority_max]
type: integer
doc: Maximum number of allowed open shells. Using -1 selects all determinants
interface: ezfio,ocaml,provider
default: -1
[excitation_max]
type: integer
doc: Maximum number of excitation with respect to the Hartree-Fock determinant. Using -1 selects all determinants
interface: ezfio,ocaml,provider
default: -1
[excitation_alpha_max]
type: integer
doc: Maximum number of excitation for alpha determinants with respect to the Hartree-Fock determinant. Using -1 selects all determinants
interface: ezfio,ocaml,provider
default: -1
[excitation_beta_max]
type: integer
doc: Maximum number of excitation for beta determinants with respect to the Hartree-Fock determinant. Using -1 selects all determinants
interface: ezfio,ocaml,provider
default: -1

View File

@ -678,11 +678,6 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d
double precision :: delta_E, val, Hii, w, tmp, alpha_h_psi
double precision, external :: diag_H_mat_elem_fock
double precision :: E_shift
logical, external :: detEq
double precision, allocatable :: values(:)
integer, allocatable :: keys(:,:)
integer :: nkeys
double precision :: s_weight(N_states,N_states)
do jstate=1,N_states
do istate=1,N_states
@ -761,6 +756,36 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d
if (.not.is_a_1h1p(det)) cycle
endif
if (seniority_max >= 0) then
integer :: s
s = 0
do k=1,N_int
s = s + popcnt(ieor(det(k,1),det(k,2)))
enddo
if (s > seniority_max) cycle
endif
if (excitation_max >= 0) then
integer :: degree
call get_excitation_degree(ref_bitmask(1,1),det(1,1),degree,N_int)
if (degree > excitation_max) cycle
endif
if (excitation_alpha_max >= 0) then
call get_excitation_degree_spin(ref_bitmask(1,1),det(1,1),degree,N_int)
if (degree > excitation_alpha_max) cycle
endif
if (excitation_beta_max >= 0) then
call get_excitation_degree_spin(ref_bitmask(1,2),det(1,2),degree,N_int)
if (degree > excitation_beta_max) cycle
endif
Hii = diag_H_mat_elem_fock(psi_det_generators(1,1,i_generator),det,fock_diag_tmp,N_int)
w = 0d0
@ -822,6 +847,7 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d
endif
! ! Gram-Schmidt using input overlap matrix
! do istate=1,N_states
! do jstate=1,istate-1
@ -900,6 +926,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

View File

@ -10,4 +10,3 @@ doc: Calculated |FCI| energy + |PT2|
interface: ezfio
size: (determinants.n_states)