mirror of
https://github.com/LCPQ/quantum_package
synced 2024-10-19 22:41:48 +02:00
Merge branch 'scemama-master' into toto
This commit is contained in:
commit
de690db59c
2
TODO
2
TODO
@ -5,7 +5,7 @@
|
||||
* dft_utils_one_body
|
||||
* dm_for_dft
|
||||
* integrals_erf
|
||||
* Molden format
|
||||
* Molden format : http://cheminf.cmbi.ru.nl/molden/molden_format.html
|
||||
* Virer tous les modules qui sont dans plugins
|
||||
* Permettre aux utilisateurs de facilement deposer des plugins dans plugins via une commande
|
||||
* Permettre de descendre plus bas dans l'arborescence de plugins pour permettre des `git clone` dans le repertoire plugins
|
||||
|
@ -12,7 +12,7 @@ Please source the quantum_package.rc file."
|
||||
;;
|
||||
|
||||
let bit_kind_size = lazy (
|
||||
let filename = root^"/src/Bitmask/bitmasks_module.f90" in
|
||||
let filename = root^"/src/bitmask/bitmasks_module.f90" in
|
||||
if not (Sys.file_exists_exn filename) then
|
||||
raise (Failure ("File "^filename^" not found"));
|
||||
|
||||
|
@ -526,7 +526,6 @@ subroutine save_wavefunction_general(ndet,nstates,psidet,dim_psicoef,psicoef)
|
||||
call ezfio_set_determinants_mo_label(mo_label)
|
||||
|
||||
allocate (psi_det_save(N_int,2,ndet))
|
||||
!$OMP PARALLEL DO DEFAULT(NONE) PRIVATE(i,j,k) SHARED(psi_det_save,psidet,ndet,N_int,accu_norm)
|
||||
do i=1,ndet
|
||||
do j=1,2
|
||||
do k=1,N_int
|
||||
@ -534,7 +533,6 @@ subroutine save_wavefunction_general(ndet,nstates,psidet,dim_psicoef,psicoef)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
!$OMP END PARALLEL DO
|
||||
call ezfio_set_determinants_psi_det(psi_det_save)
|
||||
deallocate (psi_det_save)
|
||||
|
||||
|
@ -23,7 +23,7 @@ subroutine write_time(iunit)
|
||||
call print_memory_usage()
|
||||
call cpu_time(ct)
|
||||
call wall_time(wt)
|
||||
write(6,'(A,F15.6,A,F15.6,A)') &
|
||||
write(6,'(A,F14.6,A,F14.6,A)') &
|
||||
'.. >>>>> [ WALL TIME: ', wt-output_wall_time_0, &
|
||||
' s ] [ CPU TIME: ', ct-output_cpu_time_0, ' s ] <<<<< ..'
|
||||
write(6,*)
|
||||
|
@ -315,6 +315,7 @@ subroutine select_singles_and_doubles(i_generator,hole_mask,particle_mask,fock_d
|
||||
integer(bit_kind), allocatable :: minilist(:, :, :), fullminilist(:, :, :)
|
||||
logical, allocatable :: banned(:,:,:), bannedOrb(:,:)
|
||||
|
||||
|
||||
double precision, allocatable :: mat(:,:,:)
|
||||
|
||||
logical :: monoAdo, monoBdo
|
||||
@ -664,6 +665,9 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d
|
||||
double precision :: e_pert, delta_E, val, Hii, sum_e_pert, tmp, alpha_h_psi, coef
|
||||
double precision, external :: diag_H_mat_elem_fock
|
||||
double precision :: E_shift
|
||||
! double precision, allocatable :: mat_inv(:,:,:)
|
||||
!
|
||||
! allocate(mat_inv(N_states,mo_tot_num,mo_tot_num))
|
||||
|
||||
logical, external :: detEq
|
||||
|
||||
@ -687,6 +691,7 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d
|
||||
if(bannedOrb(p1, s1)) cycle
|
||||
ib = 1
|
||||
if(sp /= 3) ib = p1+1
|
||||
! mat_inv(1:N_states,p1,ib:mo_tot_num) = 1.d0/mat(1:N_states,p1,ib:mo_tot_num)
|
||||
do p2=ib,mo_tot_num
|
||||
if(bannedOrb(p2, s2)) cycle
|
||||
if(banned(p1,p2)) cycle
|
||||
@ -707,7 +712,8 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d
|
||||
tmp = -tmp
|
||||
endif
|
||||
e_pert = 0.5d0 * (tmp - delta_E)
|
||||
coef = alpha_h_psi / delta_E
|
||||
coef = e_pert / alpha_h_psi
|
||||
! coef = e_pert * mat_inv(istate,p1,p2)
|
||||
pt2(istate) = pt2(istate) + e_pert
|
||||
variance(istate) = variance(istate) + alpha_h_psi * alpha_h_psi
|
||||
norm(istate) = norm(istate) + coef * coef
|
||||
@ -1194,18 +1200,17 @@ subroutine get_d0(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs)
|
||||
logical :: ok
|
||||
|
||||
integer :: bant
|
||||
double precision, allocatable :: hij_cache(:,:)
|
||||
allocate (hij_cache(mo_tot_num,2))
|
||||
double precision, allocatable :: hij_cache1(:), hij_cache2(:)
|
||||
allocate (hij_cache1(mo_tot_num),hij_cache2(mo_tot_num))
|
||||
bant = 1
|
||||
|
||||
|
||||
if(sp == 3) then ! AB
|
||||
h1 = p(1,1)
|
||||
h2 = p(1,2)
|
||||
|
||||
do p2=1, mo_tot_num
|
||||
if(bannedOrb(p2,2)) cycle
|
||||
call get_mo_bielec_integrals(p2,h1,h2,mo_tot_num,hij_cache(1,1),mo_integrals_map)
|
||||
call get_mo_bielec_integrals(p2,h1,h2,mo_tot_num,hij_cache1,mo_integrals_map)
|
||||
do p1=1, mo_tot_num
|
||||
if(bannedOrb(p1, 1)) cycle
|
||||
if(banned(p1, p2, bant)) cycle ! rentable?
|
||||
@ -1214,11 +1219,21 @@ subroutine get_d0(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs)
|
||||
call i_h_j(gen, det, N_int, hij)
|
||||
else
|
||||
phase = get_phase_bi(phasemask, 1, 2, h1, p1, h2, p2, N_int)
|
||||
hij = hij_cache(p1,1) * phase
|
||||
hij = hij_cache1(p1) * phase
|
||||
end if
|
||||
! if( (bannedOrb(p1, 1)).or.(banned(p1, p2, bant)) ) then
|
||||
! hij = 0.d0
|
||||
! else if(p1 /= h1 .and. p2 /= h2) then
|
||||
! hij = hij_cache1(p1) * get_phase_bi(phasemask, 1, 2, h1, p1, h2, p2, N_int)
|
||||
! else
|
||||
! call apply_particles(mask, 1,p1,2,p2, det, ok, N_int)
|
||||
! call i_h_j(gen, det, N_int, hij)
|
||||
! end if
|
||||
if (hij /= 0.d0) then
|
||||
do k=1,N_states
|
||||
mat(k, p1, p2) = mat(k, p1, p2) + coefs(k) * hij ! HOTSPOT
|
||||
enddo
|
||||
endif
|
||||
end do
|
||||
end do
|
||||
|
||||
@ -1227,8 +1242,8 @@ subroutine get_d0(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs)
|
||||
p2 = p(2,sp)
|
||||
do puti=1, mo_tot_num
|
||||
if(bannedOrb(puti, sp)) cycle
|
||||
call get_mo_bielec_integrals(puti,p2,p1,mo_tot_num,hij_cache(1,1),mo_integrals_map)
|
||||
call get_mo_bielec_integrals(puti,p1,p2,mo_tot_num,hij_cache(1,2),mo_integrals_map)
|
||||
call get_mo_bielec_integrals(puti,p2,p1,mo_tot_num,hij_cache1,mo_integrals_map)
|
||||
call get_mo_bielec_integrals(puti,p1,p2,mo_tot_num,hij_cache2,mo_integrals_map)
|
||||
do putj=puti+1, mo_tot_num
|
||||
if(bannedOrb(putj, sp)) cycle
|
||||
if(banned(puti, putj, bant)) cycle ! rentable?
|
||||
@ -1241,7 +1256,7 @@ subroutine get_d0(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs)
|
||||
enddo
|
||||
endif
|
||||
else
|
||||
hij = hij_cache(putj,1) - hij_cache(putj,2)
|
||||
hij = hij_cache1(putj) - hij_cache2(putj)
|
||||
if (hij /= 0.d0) then
|
||||
hij = hij * get_phase_bi(phasemask, sp, sp, puti, p1 , putj, p2, N_int)
|
||||
do k=1,N_states
|
||||
@ -1252,7 +1267,8 @@ subroutine get_d0(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs)
|
||||
end do
|
||||
end do
|
||||
end if
|
||||
deallocate(hij_cache)
|
||||
|
||||
deallocate(hij_cache1,hij_cache2)
|
||||
end
|
||||
|
||||
|
||||
|
@ -85,6 +85,26 @@ BEGIN_PROVIDER [ double precision, nucl_coord_transp, (3,nucl_num) ]
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, nucl_dist_inv, (nucl_num,nucl_num) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Inverse of the distance between nucleus I and nucleus J
|
||||
END_DOC
|
||||
|
||||
integer :: ie1, ie2, l
|
||||
|
||||
do ie1 = 1, nucl_num
|
||||
do ie2 = 1, nucl_num
|
||||
if(ie1 /= ie2) then
|
||||
nucl_dist_inv(ie2,ie1) = 1.d0/nucl_dist(ie2,ie1)
|
||||
else
|
||||
nucl_dist_inv(ie2,ie1) = 0.d0
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, nucl_dist_2, (nucl_num,nucl_num) ]
|
||||
&BEGIN_PROVIDER [ double precision, nucl_dist_vec_x, (nucl_num,nucl_num) ]
|
||||
&BEGIN_PROVIDER [ double precision, nucl_dist_vec_y, (nucl_num,nucl_num) ]
|
||||
@ -103,15 +123,6 @@ END_PROVIDER
|
||||
END_DOC
|
||||
|
||||
integer :: ie1, ie2, l
|
||||
integer,save :: ifirst = 0
|
||||
if (ifirst == 0) then
|
||||
ifirst = 1
|
||||
nucl_dist = 0.d0
|
||||
nucl_dist_2 = 0.d0
|
||||
nucl_dist_vec_x = 0.d0
|
||||
nucl_dist_vec_y = 0.d0
|
||||
nucl_dist_vec_z = 0.d0
|
||||
endif
|
||||
|
||||
do ie2 = 1,nucl_num
|
||||
do ie1 = 1,nucl_num
|
||||
@ -137,22 +148,6 @@ END_PROVIDER
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, positive_charge_barycentre,(3)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Centroid of the positive charges
|
||||
END_DOC
|
||||
integer :: l
|
||||
positive_charge_barycentre(1) = 0.d0
|
||||
positive_charge_barycentre(2) = 0.d0
|
||||
positive_charge_barycentre(3) = 0.d0
|
||||
do l = 1, nucl_num
|
||||
positive_charge_barycentre(1) += nucl_charge(l) * nucl_coord(l,1)
|
||||
positive_charge_barycentre(2) += nucl_charge(l) * nucl_coord(l,2)
|
||||
positive_charge_barycentre(3) += nucl_charge(l) * nucl_coord(l,3)
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, nuclear_repulsion ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
|
Binary file not shown.
@ -5,12 +5,12 @@ BEGIN_PROVIDER [ integer, qp_max_mem ]
|
||||
END_DOC
|
||||
character*(128) :: env
|
||||
|
||||
qp_max_mem = huge(1)/10
|
||||
qp_max_mem = 2000
|
||||
call getenv('QP_MAXMEM',env)
|
||||
if (trim(env) /= '') then
|
||||
read(env,*) qp_max_mem
|
||||
call write_int(6,qp_max_mem,'Target maximum memory')
|
||||
endif
|
||||
call write_int(6,qp_max_mem,'Target maximum memory (GB)')
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
@ -4,7 +4,7 @@ source $QP_ROOT/tests/bats/common.bats.sh
|
||||
|
||||
function run_FCI() {
|
||||
thresh=5.e-5
|
||||
test_exe FCI || skip
|
||||
test_exe fci || skip
|
||||
qp_edit -c $1
|
||||
ezfio set_file $1
|
||||
ezfio set perturbation do_pt2 True
|
||||
|
@ -11,7 +11,7 @@ function run_init() {
|
||||
|
||||
function run_HF() {
|
||||
thresh=1.e-8
|
||||
test_exe SCF || skip
|
||||
test_exe scf || skip
|
||||
qp_edit -c $1
|
||||
ezfio set_file $1
|
||||
ezfio set hartree_fock thresh_scf 1.e-10
|
||||
|
@ -11,7 +11,7 @@ function run_init() {
|
||||
|
||||
function run_HF() {
|
||||
thresh=1.e-7
|
||||
test_exe SCF || skip
|
||||
test_exe scf || skip
|
||||
qp_edit -c $1
|
||||
ezfio set_file $1
|
||||
ezfio set hartree_fock thresh_scf 2.e-8
|
||||
@ -23,7 +23,7 @@ function run_HF() {
|
||||
|
||||
function run_FCI() {
|
||||
thresh=5.e-5
|
||||
test_exe FCI || skip
|
||||
test_exe fci || skip
|
||||
qp_edit -c $1
|
||||
ezfio set_file $1
|
||||
ezfio set perturbation do_pt2 True
|
||||
|
Loading…
Reference in New Issue
Block a user