Minor changes

This commit is contained in:
Anthony Scemama 2020-12-15 23:46:19 +01:00
parent 623d131438
commit c413f07691
6 changed files with 19 additions and 133 deletions

View File

@ -1,36 +0,0 @@
det : dans la fonction d'onde vec
csf : dans la fonctions d'onde vec
conf_det : Nconf x Ndet'(conf)
conf_csf : Nconf x Ncsf'(conf)
csf'(conf) : dans une conf (N_somo(conf) + N_domo(conf))
det'(conf) : dans une conf (N_somo(conf) + N_domo(conf))
det''(conf) : probleme modele avec N_somo(conf)
csf''(conf) : probleme modele avec N_somo(conf)
* [0/2]
- [ ] Precalculer dans la base des configurations
W_pq = \sum_{K} <Psi | E_pq | K>
K> configuration \in SOMO-SOMO SOMO-DOMO DOMO-VMO SOMO-VMO
W : matrice mono x mono
- [ ] Fonction conf ->
- [ ] Compute <i|H|j> in conf basis
- [ ] Function hij_conf(i,j) -> matrix Ndet_ixM
(1,Ndet) (Ndet,Ndet) (Ndet,1) -> E
for i=1,Nconf
for j=1,Nconf
(i,Ndet') [(Ndet',Ndet'') (Ndet'',Ndet'') (Ndet'',Ndet')] (Ndet',j) -> E
(i,Ncsf') (Ncsf',Ncsf'') [(Ncsf'',Ndet'') (Ndet'',Ndet'') (Ndet'',Ncsf'')] (Ncsf'',Ncsf') (Ncsf',j) -> E
<psi | [\sum_K E_pq | K>< K | E_rs] | Psi>
C.D^t
K : toutes les mono
<ij|kl> = \sum_m <ij|mj><ml|kl>

View File

@ -220,16 +220,16 @@ end = struct
type t =
| EN
| HF
| SOP
| CFG
[@@deriving sexp]
let to_string = function
| EN -> \"EN\"
| HF -> \"HF\"
| SOP -> \"SOP\"
| CFG -> \"CFG\"
let of_string s =
match (String.lowercase_ascii s) with
| \"sop\" -> SOP
| \"cfg\" -> CFG
| \"en\" -> EN
| \"hf\" -> HF
| _ -> raise (Invalid_argument (\"Wrong Perturbation type : \"^s))

View File

@ -698,81 +698,3 @@ subroutine insert_into_ao_integrals_map(n_integrals,buffer_i, buffer_values)
end
!subroutine dump_ao_integrals(filename)
! use map_module
! implicit none
! BEGIN_DOC
! ! Save to disk the |AO| integrals
! END_DOC
! character*(*), intent(in) :: filename
! integer(cache_key_kind), pointer :: key(:)
! real(integral_kind), pointer :: val(:)
! integer*8 :: i,j, n
! if (.not.mpi_master) then
! return
! endif
! call ezfio_set_work_empty(.False.)
! open(unit=66,file=filename,FORM='unformatted')
! write(66) integral_kind, key_kind
! write(66) ao_integrals_map%sorted, ao_integrals_map%map_size, &
! ao_integrals_map%n_elements
! do i=0_8,ao_integrals_map%map_size
! write(66) ao_integrals_map%map(i)%sorted, ao_integrals_map%map(i)%map_size,&
! ao_integrals_map%map(i)%n_elements
! enddo
! do i=0_8,ao_integrals_map%map_size
! key => ao_integrals_map%map(i)%key
! val => ao_integrals_map%map(i)%value
! n = ao_integrals_map%map(i)%n_elements
! write(66) (key(j), j=1,n), (val(j), j=1,n)
! enddo
! close(66)
!
!end
!integer function load_ao_integrals(filename)
! implicit none
! BEGIN_DOC
! ! Read from disk the |AO| integrals
! END_DOC
! character*(*), intent(in) :: filename
! integer*8 :: i
! integer(cache_key_kind), pointer :: key(:)
! real(integral_kind), pointer :: val(:)
! integer :: iknd, kknd
! integer*8 :: n, j
! load_ao_integrals = 1
! open(unit=66,file=filename,FORM='unformatted',STATUS='UNKNOWN')
! read(66,err=98,end=98) iknd, kknd
! if (iknd /= integral_kind) then
! print *, 'Wrong integrals kind in file :', iknd
! stop 1
! endif
! if (kknd /= key_kind) then
! print *, 'Wrong key kind in file :', kknd
! stop 1
! endif
! read(66,err=98,end=98) ao_integrals_map%sorted, ao_integrals_map%map_size,&
! ao_integrals_map%n_elements
! do i=0_8, ao_integrals_map%map_size
! read(66,err=99,end=99) ao_integrals_map%map(i)%sorted, &
! ao_integrals_map%map(i)%map_size, ao_integrals_map%map(i)%n_elements
! call cache_map_reallocate(ao_integrals_map%map(i),ao_integrals_map%map(i)%map_size)
! enddo
! do i=0_8, ao_integrals_map%map_size
! key => ao_integrals_map%map(i)%key
! val => ao_integrals_map%map(i)%value
! n = ao_integrals_map%map(i)%n_elements
! read(66,err=99,end=99) (key(j), j=1,n), (val(j), j=1,n)
! enddo
! call map_sort(ao_integrals_map)
! load_ao_integrals = 0
! return
! 99 continue
! call map_deinit(ao_integrals_map)
! 98 continue
! stop 'Problem reading ao_integrals_map file in work/'
!
!end
!

View File

@ -1162,17 +1162,17 @@ subroutine compute_ao_integrals_jl(j,l,n_integrals,buffer_i,buffer_value)
! Parallel client for AO integrals
END_DOC
integer, intent(in) :: j,l
integer,intent(out) :: n_integrals
integer(key_kind),intent(out) :: buffer_i(ao_num*ao_num)
integer, intent(in) :: j,l
integer,intent(out) :: n_integrals
integer(key_kind),intent(out) :: buffer_i(ao_num*ao_num)
real(integral_kind),intent(out) :: buffer_value(ao_num*ao_num)
logical, external :: ao_two_e_integral_zero
integer :: i,k
double precision :: ao_two_e_integral,cpu_1,cpu_2, wall_1, wall_2
double precision :: integral, wall_0
double precision :: thr
integer :: kk, m, j1, i1
logical, external :: ao_two_e_integral_zero
integer :: i,k
double precision :: ao_two_e_integral,cpu_1,cpu_2, wall_1, wall_2
double precision :: integral, wall_0
double precision :: thr
integer :: kk, m, j1, i1
thr = ao_integrals_threshold

View File

@ -730,6 +730,12 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d
if(bannedOrb(p2, s2)) cycle
if(banned(p1,p2)) cycle
if(pseudo_sym)then
if(dabs(mat(1, p1, p2)).lt.thresh_sym)then
w = 0.d0
endif
endif
val = maxval(abs(mat(1:N_states, p1, p2)))
if( val == 0d0) cycle
call apply_particles(mask, s1, p1, s2, p2, det, ok, N_int)
@ -918,12 +924,6 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d
end do
if(pseudo_sym)then
if(dabs(mat(1, p1, p2)).lt.thresh_sym)then
w = 0.d0
endif
endif
! w = dble(n) * w

View File

@ -243,7 +243,7 @@ subroutine $subroutine_diexcOrg(key_in,key_mask,hole_1,particl_1,hole_2, particl
! Build array of the non-zero integrals of second excitation
$filter_integrals
if (ispin == 1) then
if (ispin == 1) then
integer :: jjj
i=0