BiInt => Bielec_integrals

This commit is contained in:
Thomas Applencourt 2015-03-31 09:58:25 +02:00
parent 951a4e35e0
commit 0a8d393dbc
39 changed files with 109 additions and 118 deletions

View File

@ -1,9 +0,0 @@
bielec_integrals
read_ao_integrals False
read_mo_integrals False
write_ao_integrals False
write_mo_integrals False
threshold_ao 1.e-15
threshold_mo 1.e-15
direct False

View File

@ -1,5 +0,0 @@
cisd_sc2_selected
n_det_max_cisd_sc2 10000
pt2_max 1.e-4
do_pt2_end True

View File

@ -1,5 +1,13 @@
#!/bin/bash
# Convert a old ezfio file (with option.irp.f ezfio_default)
# into a new EZFIO.cfg type
# Hartree Fock
# Changin the case, don't know if is needed or not
mv $1/Hartree_Fock $1/hartree_fock
mv $1/hartree_Fock/thresh_SCF $1/hartree_fock/thresh_scf
mv $1/hartree_Fock/thresh_SCF $1/hartree_fock/thresh_scf
# BiInts
mv $1/bi_integrals $1/bielect_integrals

View File

@ -304,7 +304,7 @@ def save_ezfio_provider(path_head, dict_code_provider):
l_output += [code for code in dict_code_provider.values()]
output = "\n".join(l_output)
output = "\n\n".join(l_output)
if output != old_output:
with open(path, "w") as f:
@ -366,7 +366,8 @@ def create_ezfio_stuff(dict_ezfio_cfg, config_or_default="config"):
for provider_name, provider_info in sorted(dict_ezfio_cfg.iteritems()):
# Get the value from dict
name_raw = provider_name.lower()
name_raw = provider_info["ezfio_name"].lower()
fortran_type_raw = provider_info["type"].fortran
if "size" in provider_info and not provider_info["size"] == "1":

View File

@ -29,7 +29,6 @@ BEGIN_PROVIDER [ %(type)s, %(name)s ]
endif
%(write)s
END_PROVIDER
""".strip()

View File

@ -1,9 +0,0 @@
bielec_integrals
read_ao_integrals logical
read_mo_integrals logical
write_ao_integrals logical
write_mo_integrals logical
threshold_ao double precision
threshold_mo double precision
direct logical

View File

@ -1,46 +0,0 @@
BEGIN_SHELL [ /usr/bin/python ]
from ezfio_with_default import EZFIO_Provider
T = EZFIO_Provider()
T.set_type ( "logical" )
T.set_name ( "do_direct_integrals" )
T.set_doc ( "If true, compute integrals on the fly" )
T.set_ezfio_dir ( "bielec_integrals" )
T.set_ezfio_name( "direct" )
T.set_output ( "output_biints" )
print T
T.set_type ( "logical" )
T.set_name ( "write_mo_integrals" )
T.set_doc ( "If true, write MO integrals in EZFIO" )
T.set_ezfio_name( "write_mo_integrals" )
print T
T.set_name ( "write_ao_integrals" )
T.set_doc ( "If true, write AO integrals in EZFIO" )
T.set_ezfio_name( "write_ao_integrals" )
print T
T.set_name ( "read_mo_integrals" )
T.set_doc ( "If true, read MO integrals in EZFIO" )
T.set_ezfio_name( "read_mo_integrals" )
print T
T.set_name ( "read_ao_integrals" )
T.set_doc ( "If true, read AO integrals in EZFIO" )
T.set_ezfio_name( "read_ao_integrals" )
print T
T.set_type ( "double precision" )
T.set_name ( "ao_integrals_threshold" )
T.set_doc ( "If <pq|rs> < ao_integrals_threshold, <pq|rs> = 0" )
T.set_ezfio_name( "threshold_ao" )
print T
T.set_name ( "mo_integrals_threshold" )
T.set_doc ( "If <ij|kl> < mo_integrals_threshold, <ij|kl> = 0" )
T.set_ezfio_name( "threshold_mo" )
print T
END_SHELL

View File

@ -0,0 +1,44 @@
[do_direct_integrals]
type: logical
doc: If true, compute integrals on the fly
interface: input
default: False
ezfio_name: direct
[write_ao_integrals]
type: logical
doc: If true, write AO integrals in EZFIO
interface: input
default: False
[write_mo_integrals]
type: logical
doc: If true, write MO integrals in EZFIO
interface: input
default: False
[read_ao_integrals]
type: logical
doc: If true, read AO integrals in EZFIO
interface: input
default: False
[read_mo_integrals]
type: logical
doc: If true, read MO integrals in EZFIO
interface: input
default: False
[ao_integrals_threshold]
type: Threshold
doc: If <pq|rs> < ao_integrals_threshold => <pq|rs> = 0
interface: input
default: 1.e-15
ezfio_name: threshold_ao
[mo_integrals_threshold]
type: Threshold
doc: If <ij|kl> < ao_integrals_threshold => <ij|lk> = 0
interface: input
default: 1.e-15
ezfio_name: threshold_mo

View File

@ -356,7 +356,7 @@ BEGIN_PROVIDER [ logical, ao_bielec_integrals_in_map ]
integer :: load_ao_integrals
print*,'Reading the AO integrals'
if (load_ao_integrals(trim(ezfio_filename)//'/work/ao_integrals.bin') == 0) then
write(output_BiInts,*) 'AO integrals provided'
write(output_bielec_integrals,*) 'AO integrals provided'
ao_bielec_integrals_in_map = .True.
return
endif
@ -374,7 +374,7 @@ BEGIN_PROVIDER [ logical, ao_bielec_integrals_in_map ]
PROVIDE progress_bar
call omp_init_lock(lock)
lmax = ao_num*(ao_num+1)/2
write(output_BiInts,*) 'Providing the AO integrals'
write(output_bielec_integrals,*) 'Providing the AO integrals'
call wall_time(wall_0)
call wall_time(wall_1)
call cpu_time(cpu_1)
@ -385,7 +385,7 @@ BEGIN_PROVIDER [ logical, ao_bielec_integrals_in_map ]
!$OMP DEFAULT(NONE) &
!$OMP SHARED (ao_num, jl_pairs, ao_integrals_map,thresh, &
!$OMP cpu_1,wall_1,lock, lmax,n_centers,ao_nucl, &
!$OMP ao_overlap_abs,ao_overlap,output_BiInts,abort_here, &
!$OMP ao_overlap_abs,ao_overlap,output_bielec_integrals,abort_here, &
!$OMP wall_0,progress_bar,progress_value)
allocate(buffer_i(size_buffer))
@ -452,7 +452,7 @@ IRP_ENDIF
if (thread_num == 0) then
if (wall_2 - wall_0 > 1.d0) then
wall_0 = wall_2
write(output_BiInts,*) 100.*float(kk)/float(lmax), '% in ', &
write(output_bielec_integrals,*) 100.*float(kk)/float(lmax), '% in ', &
wall_2-wall_1, 's', map_mb(ao_integrals_map) ,'MB'
progress_value = dble(map_mb(ao_integrals_map))
endif
@ -469,21 +469,21 @@ IRP_ENDIF
stop 'Aborting in AO integrals calculation'
endif
IRP_IF COARRAY
write(output_BiInts,*) 'Communicating the map'
write(output_bielec_integrals,*) 'Communicating the map'
call communicate_ao_integrals()
IRP_ENDIF COARRAY
write(output_BiInts,*) 'Sorting the map'
write(output_bielec_integrals,*) 'Sorting the map'
call map_sort(ao_integrals_map)
call cpu_time(cpu_2)
call wall_time(wall_2)
integer(map_size_kind) :: get_ao_map_size, ao_map_size
ao_map_size = get_ao_map_size()
write(output_BiInts,*) 'AO integrals provided:'
write(output_BiInts,*) ' Size of AO map : ', map_mb(ao_integrals_map) ,'MB'
write(output_BiInts,*) ' Number of AO integrals :', ao_map_size
write(output_BiInts,*) ' cpu time :',cpu_2 - cpu_1, 's'
write(output_BiInts,*) ' wall time :',wall_2 - wall_1, 's ( x ', (cpu_2-cpu_1)/(wall_2-wall_1+tiny(1.d0)), ' )'
write(output_bielec_integrals,*) 'AO integrals provided:'
write(output_bielec_integrals,*) ' Size of AO map : ', map_mb(ao_integrals_map) ,'MB'
write(output_bielec_integrals,*) ' Number of AO integrals :', ao_map_size
write(output_bielec_integrals,*) ' cpu time :',cpu_2 - cpu_1, 's'
write(output_bielec_integrals,*) ' wall time :',wall_2 - wall_1, 's ( x ', (cpu_2-cpu_1)/(wall_2-wall_1+tiny(1.d0)), ' )'
ao_bielec_integrals_in_map = .True.
if (write_ao_integrals) then

View File

@ -13,7 +13,7 @@ BEGIN_PROVIDER [ type(map_type), ao_integrals_map ]
call bielec_integrals_index(ao_num,ao_num,ao_num,ao_num,key_max)
sze = key_max
call map_init(ao_integrals_map,sze)
write(output_BiInts,*) 'AO map initialized'
write(output_bielec_integrals,*) 'AO map initialized'
END_PROVIDER
subroutine bielec_integrals_index(i,j,k,l,i1)
@ -244,7 +244,7 @@ BEGIN_PROVIDER [ type(map_type), mo_integrals_map ]
call bielec_integrals_index(mo_tot_num,mo_tot_num,mo_tot_num,mo_tot_num,key_max)
sze = key_max
call map_init(mo_integrals_map,sze)
write(output_BiInts,*) 'MO map initialized'
write(output_bielec_integrals,*) 'MO map initialized'
END_PROVIDER
subroutine insert_into_ao_integrals_map(n_integrals, &

View File

@ -31,7 +31,7 @@ BEGIN_PROVIDER [ logical, mo_bielec_integrals_in_map ]
integer :: load_mo_integrals
print*,'Reading the MO integrals'
if (load_mo_integrals(trim(ezfio_filename)//'/work/mo_integrals.bin') == 0) then
write(output_BiInts,*) 'MO integrals provided'
write(output_bielec_integrals,*) 'MO integrals provided'
return
endif
endif
@ -84,8 +84,8 @@ subroutine add_integrals_to_map(mask_ijkl)
call bitstring_to_list( mask_ijkl(1,4), list_ijkl(1,4), n_l, N_int )
size_buffer = min(ao_num*ao_num*ao_num,16000000)
write(output_BiInts,*) 'Providing the molecular integrals '
write(output_BiInts,*) 'Buffers : ', 8.*(mo_tot_num_align*(n_j)*(n_k+1) + mo_tot_num_align +&
write(output_bielec_integrals,*) 'Providing the molecular integrals '
write(output_bielec_integrals,*) 'Buffers : ', 8.*(mo_tot_num_align*(n_j)*(n_k+1) + mo_tot_num_align +&
ao_num+ao_num*ao_num+ size_buffer*3)/(1024*1024), 'MB / core'
call wall_time(wall_1)
@ -99,7 +99,7 @@ subroutine add_integrals_to_map(mask_ijkl)
!$OMP wall_0,thread_num) &
!$OMP DEFAULT(NONE) &
!$OMP SHARED(size_buffer,ao_num,mo_tot_num,n_i,n_j,n_k,n_l,mo_tot_num_align,&
!$OMP mo_coef_transp,output_BiInts, &
!$OMP mo_coef_transp,output_bielec_integrals, &
!$OMP mo_coef_transp_is_built, list_ijkl, &
!$OMP mo_coef_is_built, wall_1, abort_here, &
!$OMP mo_coef,mo_integrals_threshold,ao_integrals_map,mo_integrals_map,progress_bar,progress_value)
@ -272,7 +272,7 @@ IRP_ENDIF
if (thread_num == 0) then
if (wall_2 - wall_0 > 1.d0) then
wall_0 = wall_2
write(output_BiInts,*) 100.*float(l1)/float(ao_num), '% in ', &
write(output_bielec_integrals,*) 100.*float(l1)/float(ao_num), '% in ', &
wall_2-wall_1, 's', map_mb(mo_integrals_map) ,'MB'
progress_value = dble(map_mb(mo_integrals_map))
@ -291,7 +291,7 @@ IRP_ENDIF
stop 'Aborting in MO integrals calculation'
endif
IRP_IF COARRAY
write(output_BiInts,*) 'Communicating the map'
write(output_bielec_integrals,*) 'Communicating the map'
call communicate_mo_integrals()
IRP_ENDIF
call map_unique(mo_integrals_map)
@ -304,11 +304,11 @@ IRP_ENDIF
deallocate(list_ijkl)
write(output_BiInts,*)'Molecular integrals provided:'
write(output_BiInts,*)' Size of MO map ', map_mb(mo_integrals_map) ,'MB'
write(output_BiInts,*)' Number of MO integrals: ', mo_map_size
write(output_BiInts,*)' cpu time :',cpu_2 - cpu_1, 's'
write(output_BiInts,*)' wall time :',wall_2 - wall_1, 's ( x ', (cpu_2-cpu_1)/(wall_2-wall_1), ')'
write(output_bielec_integrals,*)'Molecular integrals provided:'
write(output_bielec_integrals,*)' Size of MO map ', map_mb(mo_integrals_map) ,'MB'
write(output_bielec_integrals,*)' Number of MO integrals: ', mo_map_size
write(output_bielec_integrals,*)' cpu time :',cpu_2 - cpu_1, 's'
write(output_bielec_integrals,*)' wall time :',wall_2 - wall_1, 's ( x ', (cpu_2-cpu_1)/(wall_2-wall_1), ')'
if (write_mo_integrals) then
call dump_mo_integrals(trim(ezfio_filename)//'/work/mo_integrals.bin')

View File

@ -1,2 +1,2 @@
AOs BiInts Bitmask Dets Electrons Ezfio_files Generators_CAS Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full Utils
AOs Bielec_integrals Bitmask Dets Electrons Ezfio_files Generators_CAS Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full Utils

View File

@ -1,3 +1,3 @@
AOs BiInts Bitmask Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Selectors_full SingleRefMethod Utils
AOs Bielec_integrals Bitmask Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Selectors_full SingleRefMethod Utils

View File

@ -1,2 +1,2 @@
AOs BiInts Bitmask CISD CISD_selected Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full SingleRefMethod Utils
AOs Bielec_integrals Bitmask CISD CISD_selected Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full SingleRefMethod Utils

View File

@ -1,2 +1,2 @@
AOs BiInts Bitmask CISD Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full SingleRefMethod Utils
AOs Bielec_integrals Bitmask CISD Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full SingleRefMethod Utils

View File

@ -1,2 +1,2 @@
AOs BiInts Bitmask Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Selectors_full SingleRefMethod Utils
AOs Bielec_integrals Bitmask Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Selectors_full SingleRefMethod Utils

View File

@ -1,2 +1,2 @@
AOs BiInts Bitmask Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Selectors_full SingleRefMethod Utils
AOs Bielec_integrals Bitmask Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Selectors_full SingleRefMethod Utils

View File

@ -1,2 +1,2 @@
AOs BiInts Bitmask CISD CISD_selected Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full SingleRefMethod Utils
AOs Bielec_integrals Bitmask CISD CISD_selected Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full SingleRefMethod Utils

View File

@ -1,2 +1,2 @@
AOs BiInts Bitmask CISD Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full SingleRefMethod Utils
AOs Bielec_integrals Bitmask CISD Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full SingleRefMethod Utils

View File

@ -1,2 +1,2 @@
AOs BiInts Bitmask Dets Electrons Ezfio_files Generators_CAS Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full Utils
AOs Bielec_integrals Bitmask Dets Electrons Ezfio_files Generators_CAS Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full Utils

View File

@ -1 +1 @@
AOs BiInts Bitmask Electrons Ezfio_files MonoInts MOs Nuclei Output Utils
AOs Bielec_integrals Bitmask Electrons Ezfio_files MonoInts MOs Nuclei Output Utils

View File

@ -1 +1 @@
AOs BiInts Bitmask Dets Electrons Ezfio_files MonoInts MOs Nuclei Output Utils
AOs Bielec_integrals Bitmask Dets Electrons Ezfio_files MonoInts MOs Nuclei Output Utils

View File

@ -1,2 +1,2 @@
AOs BiInts Bitmask Dets Electrons Ezfio_files Generators_full Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full Utils
AOs Bielec_integrals Bitmask Dets Electrons Ezfio_files Generators_full Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full Utils

View File

@ -1 +1 @@
AOs BiInts Bitmask Dets Electrons Ezfio_files MonoInts MOs Nuclei Output Utils
AOs Bielec_integrals Bitmask Dets Electrons Ezfio_files MonoInts MOs Nuclei Output Utils

View File

@ -1,2 +1,2 @@
AOs BiInts Bitmask Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Utils
AOs Bielec_integrals Bitmask Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Utils

View File

@ -1 +1 @@
AOs BiInts Bitmask Dets Electrons Ezfio_files MonoInts MOs Nuclei Output Utils
AOs Bielec_integrals Bitmask Dets Electrons Ezfio_files MonoInts MOs Nuclei Output Utils

View File

@ -1 +1 @@
AOs BiInts Bitmask Electrons Ezfio_files MonoInts MOGuess MOs Nuclei Output Utils
AOs Bielec_integrals Bitmask Electrons Ezfio_files MonoInts MOGuess MOs Nuclei Output Utils

View File

@ -1,2 +1,2 @@
AOs BiInts Bitmask Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full SingleRefMethod Utils
AOs Bielec_integrals Bitmask Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full SingleRefMethod Utils

View File

@ -1 +1 @@
AOs BiInts Bitmask CID CID_SC2_selected CID_selected CIS CISD CISD_selected CISD_SC2_selected Dets Electrons Ezfio_files Full_CI Generators_full Hartree_Fock MOGuess MonoInts MOs MP2 Nuclei Output Selectors_full Utils Molden FCIdump Generators_CAS CAS_SD_selected DDCI_selected
AOs Bielec_integrals Bitmask CID CID_SC2_selected CID_selected CIS CISD CISD_selected CISD_SC2_selected Dets Electrons Ezfio_files Full_CI Generators_full Hartree_Fock MOGuess MonoInts MOs MP2 Nuclei Output Selectors_full Utils Molden FCIdump Generators_CAS CAS_SD_selected DDCI_selected

View File

@ -1,2 +1,2 @@
AOs BiInts Bitmask Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Properties Utils
AOs Bielec_integrals Bitmask Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Properties Utils

View File

@ -1 +1 @@
AOs BiInts Bitmask Dets Electrons Ezfio_files MonoInts MOs Nuclei Output Utils
AOs Bielec_integrals Bitmask Dets Electrons Ezfio_files MonoInts MOs Nuclei Output Utils

View File

@ -1,2 +1,2 @@
AOs BiInts Bitmask Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Utils
AOs Bielec_integrals Bitmask Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Utils

View File

@ -1 +1 @@
AOs BiInts Bitmask Dets Electrons Ezfio_files MonoInts MOs Nuclei Output Utils
AOs Bielec_integrals Bitmask Dets Electrons Ezfio_files MonoInts MOs Nuclei Output Utils

View File

@ -82,6 +82,14 @@ def run_hf(geo, basis):
# ~#~#~#~#~#~#~#~#~#~#~#~#~ #
# S e t _ p a r a m e t e r #
# ~#~#~#~#~#~#~#~#~#~#~#~#~ #
ezfio.bielec_integrals_direct = False
ezfio.bielec_integrals_threshold_ao = 1.e-15
ezfio.bielec_integrals_write_ao_integrals = False
ezfio.bielec_integrals_read_ao_integrals = False
ezfio.bielec_integrals_threshold_mo = 1.e-15
ezfio.bielec_integrals_write_mo_integrals = False
ezfio.bielec_integrals_read_mo_integrals = False
ezfio.hartree_fock_mo_guess_type = "Huckel"
ezfio.hartree_fock_thresh_scf = 1.e-10