mirror of
https://github.com/LCPQ/quantum_package
synced 2024-08-24 21:41:46 +02:00
Added DDCI
This commit is contained in:
parent
0aadde30a0
commit
7c8201a950
@ -1,10 +1,15 @@
|
|||||||
[energy]
|
[energy]
|
||||||
type: double precision
|
type: double precision
|
||||||
doc: "Calculated CAS-SD energy"
|
doc: Calculated CAS-SD energy
|
||||||
interface: ezfio
|
interface: ezfio
|
||||||
|
|
||||||
[energy_pt2]
|
[energy_pt2]
|
||||||
type: double precision
|
type: double precision
|
||||||
doc: "Calculated selected CAS-SD energy with PT2 correction"
|
doc: Calculated selected CAS-SD energy with PT2 correction
|
||||||
interface: ezfio
|
interface: ezfio
|
||||||
|
|
||||||
|
[do_ddci]
|
||||||
|
type: logical
|
||||||
|
doc: If true, remove purely inactive double excitations
|
||||||
|
interface: ezfio,provider,ocaml
|
||||||
|
default: False
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
! DO NOT MODIFY BY HAND
|
|
||||||
! Created by $QP_ROOT/scripts/ezfio_interface/ei_handler.py
|
|
||||||
! from file /home/scemama/quantum_package/src/CAS_SD_ZMQ/EZFIO.cfg
|
|
||||||
|
|
@ -50,8 +50,6 @@ subroutine run_selection_slave(thread,iproc,energy)
|
|||||||
else
|
else
|
||||||
if(N /= buf%N) stop "N changed... wtf man??"
|
if(N /= buf%N) stop "N changed... wtf man??"
|
||||||
end if
|
end if
|
||||||
!print *, "psi_selectors_coef ", psi_selectors_coef(N_det_selectors-5:N_det_selectors, 1)
|
|
||||||
!call debug_det(psi_selectors(1,1,N_det_selectors), N_int)
|
|
||||||
do i_generator=i_generator_start,i_generator_max,step
|
do i_generator=i_generator_start,i_generator_max,step
|
||||||
call select_connected(i_generator,energy,pt2,buf)
|
call select_connected(i_generator,energy,pt2,buf)
|
||||||
enddo
|
enddo
|
||||||
|
@ -635,20 +635,20 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d
|
|||||||
use selection_types
|
use selection_types
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
integer, intent(in) :: i_generator, sp, h1, h2
|
integer, intent(in) :: i_generator, sp, h1, h2
|
||||||
double precision, intent(in) :: mat(N_states, mo_tot_num, mo_tot_num)
|
double precision, intent(in) :: mat(N_states, mo_tot_num, mo_tot_num)
|
||||||
logical, intent(in) :: bannedOrb(mo_tot_num, 2), banned(mo_tot_num, mo_tot_num)
|
logical, intent(in) :: bannedOrb(mo_tot_num, 2), banned(mo_tot_num, mo_tot_num)
|
||||||
double precision, intent(in) :: fock_diag_tmp(mo_tot_num)
|
double precision, intent(in) :: fock_diag_tmp(mo_tot_num)
|
||||||
double precision, intent(in) :: E0(N_states)
|
double precision, intent(in) :: E0(N_states)
|
||||||
double precision, intent(inout) :: pt2(N_states)
|
double precision, intent(inout) :: pt2(N_states)
|
||||||
type(selection_buffer), intent(inout) :: buf
|
type(selection_buffer), intent(inout) :: buf
|
||||||
logical :: ok
|
logical :: ok
|
||||||
integer :: s1, s2, p1, p2, ib, j, istate
|
integer :: s1, s2, p1, p2, ib, j, istate
|
||||||
integer(bit_kind) :: mask(N_int, 2), det(N_int, 2)
|
integer(bit_kind) :: mask(N_int, 2), det(N_int, 2)
|
||||||
double precision :: e_pert, delta_E, val, Hii, max_e_pert,tmp
|
double precision :: e_pert, delta_E, val, Hii, max_e_pert,tmp
|
||||||
double precision, external :: diag_H_mat_elem_fock
|
double precision, external :: diag_H_mat_elem_fock
|
||||||
|
|
||||||
logical, external :: detEq
|
logical, external :: detEq
|
||||||
|
|
||||||
|
|
||||||
if(sp == 3) then
|
if(sp == 3) then
|
||||||
@ -670,11 +670,18 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d
|
|||||||
if(banned(p1,p2)) cycle
|
if(banned(p1,p2)) cycle
|
||||||
if(mat(1, p1, p2) == 0d0) cycle
|
if(mat(1, p1, p2) == 0d0) cycle
|
||||||
call apply_particles(mask, s1, p1, s2, p2, det, ok, N_int)
|
call apply_particles(mask, s1, p1, s2, p2, det, ok, N_int)
|
||||||
logical, external :: is_in_wavefunction
|
logical, external :: is_in_wavefunction
|
||||||
if (is_in_wavefunction(det,N_int)) then
|
if (is_in_wavefunction(det,N_int)) then
|
||||||
cycle
|
stop 'is_in_wf'
|
||||||
endif
|
cycle
|
||||||
|
endif
|
||||||
|
|
||||||
|
if (do_ddci) then
|
||||||
|
integer, external :: is_a_two_holes_two_particles
|
||||||
|
if (is_a_two_holes_two_particles(det)) then
|
||||||
|
cycle
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
Hii = diag_H_mat_elem_fock(psi_det_generators(1,1,i_generator),det,fock_diag_tmp,N_int)
|
Hii = diag_H_mat_elem_fock(psi_det_generators(1,1,i_generator),det,fock_diag_tmp,N_int)
|
||||||
max_e_pert = 0d0
|
max_e_pert = 0d0
|
||||||
@ -1232,7 +1239,6 @@ subroutine ZMQ_selection(N_in, pt2)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
integer :: i_generator, i_generator_start, i_generator_max, step
|
integer :: i_generator, i_generator_start, i_generator_max, step
|
||||||
! step = int(max(1.,10*elec_num/mo_tot_num)
|
|
||||||
|
|
||||||
step = int(5000000.d0 / dble(N_int * N_states * elec_num * elec_num * mo_tot_num * mo_tot_num ))
|
step = int(5000000.d0 / dble(N_int * N_states * elec_num * elec_num * mo_tot_num * mo_tot_num ))
|
||||||
step = max(1,step)
|
step = max(1,step)
|
||||||
|
@ -38,7 +38,7 @@ default: False
|
|||||||
type: logical
|
type: logical
|
||||||
doc: Force the wave function to be an eigenfunction of S^2
|
doc: Force the wave function to be an eigenfunction of S^2
|
||||||
interface: ezfio,provider,ocaml
|
interface: ezfio,provider,ocaml
|
||||||
default: False
|
default: True
|
||||||
|
|
||||||
[threshold_generators]
|
[threshold_generators]
|
||||||
type: Threshold
|
type: Threshold
|
||||||
|
Loading…
Reference in New Issue
Block a user