mirror of
https://github.com/LCPQ/quantum_package
synced 2024-10-19 22:41:48 +02:00
Add new IO point for better restarting (#86)
* Add new IO point for beter restarting * Fix configure for bats * Fix missing file. Standardize the way to construct hamiltonien * Do not provide *_pseudo_integral if not needed. Remove false dependency in the dataflow graph * Add automatic generation of provider for disk_acess * Fix naming of provider from Disk_acess * Fix diskacess generation * Remove spurious files * Change logic in naming * Add more layer of io for ao_one_e_integrals * Add IO layer for MO one e fix AO one * Why not... * Update configure
This commit is contained in:
parent
d2179f5fab
commit
3c6942c690
65
config/ifort_h5.cfg
Normal file
65
config/ifort_h5.cfg
Normal file
@ -0,0 +1,65 @@
|
||||
# Common flags
|
||||
##############
|
||||
#
|
||||
# -mkl=[parallel|sequential] : Use the MKL library
|
||||
# --ninja : Allow the utilisation of ninja. It is mandatory !
|
||||
# --align=32 : Align all provided arrays on a 32-byte boundary
|
||||
#
|
||||
|
||||
[COMMON]
|
||||
FC : ifort
|
||||
LAPACK_LIB : -mkl=parallel
|
||||
IRPF90 : irpf90
|
||||
IRPF90_FLAGS : --ninja --align=32
|
||||
LIB : -lhdf5 -lz -lrt
|
||||
|
||||
# Global options
|
||||
################
|
||||
#
|
||||
# 1 : Activate
|
||||
# 0 : Deactivate
|
||||
#
|
||||
[OPTION]
|
||||
MODE : OPT ; [ OPT | PROFILE | DEBUG ] : Chooses the section below
|
||||
CACHE : 1 ; Enable cache_compile.py
|
||||
OPENMP : 1 ; Append OpenMP flags
|
||||
|
||||
# Optimization flags
|
||||
####################
|
||||
#
|
||||
# -xHost : Compile a binary optimized for the current architecture
|
||||
# -O2 : O3 not better than O2.
|
||||
# -ip : Inter-procedural optimizations
|
||||
# -ftz : Flushes denormal results to zero
|
||||
#
|
||||
[OPT]
|
||||
FC : -traceback
|
||||
FCFLAGS : -xAVX -O2 -ip -ftz -g
|
||||
|
||||
# Profiling flags
|
||||
#################
|
||||
#
|
||||
[PROFILE]
|
||||
FC : -p -g
|
||||
FCFLAGS : -xSSE4.2 -O2 -ip -ftz
|
||||
|
||||
# Debugging flags
|
||||
#################
|
||||
#
|
||||
# -traceback : Activate backtrace on runtime
|
||||
# -fpe0 : All floating point exaceptions
|
||||
# -C : Checks uninitialized variables, array subscripts, etc...
|
||||
# -g : Extra debugging information
|
||||
# -xSSE2 : Valgrind needs a very simple x86 executable
|
||||
#
|
||||
[DEBUG]
|
||||
FC : -g -traceback
|
||||
FCFLAGS : -xSSE2 -C -fpe0
|
||||
|
||||
# OpenMP flags
|
||||
#################
|
||||
#
|
||||
[OPENMP]
|
||||
FC : -qopenmp
|
||||
IRPF90_FLAGS : --openmp
|
||||
|
6
configure
vendored
6
configure
vendored
@ -15,13 +15,16 @@ Usage:
|
||||
|
||||
Options:
|
||||
-c <file>, --config <file> define a configuration file, in
|
||||
"${QP_ROOT}/config/"
|
||||
"${QP_ROOT}/config/".
|
||||
-h, --help print the help message
|
||||
-i <package>, --install <package> install <package>. Use at your own risk.
|
||||
|
||||
Example:
|
||||
./configure -c config/gfortran.cfg
|
||||
./configure -c config/gfortran.cfg -i all
|
||||
|
||||
Note:
|
||||
- Using different configuration files for installing dependencies and compiling QPs can improve the user experience.
|
||||
|
||||
EOF
|
||||
exit
|
||||
@ -291,6 +294,7 @@ EOF
|
||||
"https://github.com/bats-core/bats-core/archive/v1.1.0.tar.gz" \
|
||||
"${QP_ROOT}"/external/bats.tar.gz
|
||||
(
|
||||
cd "${QP_ROOT}"/external
|
||||
tar -zxf bats.tar.gz
|
||||
(
|
||||
cd bats-core-1.1.0/
|
||||
|
@ -318,7 +318,7 @@ def create_ezfio_provider(dict_ezfio_cfg):
|
||||
return [code, ...]
|
||||
"""
|
||||
|
||||
from ezfio_generate_provider import EZFIO_Provider
|
||||
from ezfio_generate_provider import EZFIO_Provider, gen_ezfio_provider_disk_access
|
||||
dict_code_provider = dict()
|
||||
|
||||
ez_p = EZFIO_Provider()
|
||||
@ -330,12 +330,24 @@ def create_ezfio_provider(dict_ezfio_cfg):
|
||||
ez_p.set_ezfio_dir(dict_info['ezfio_dir'])
|
||||
ez_p.set_ezfio_name(dict_info['ezfio_name'])
|
||||
ez_p.set_output("6")
|
||||
# ez_p.set_output("output_%s" % dict_info['module'].lower)
|
||||
|
||||
# (nuclei.nucl_num,pseudo.klocmax) => (nucl_num,klocmax)
|
||||
ez_p.set_size(re.sub(r'\w+\.', "", dict_info['size']))
|
||||
|
||||
dict_code_provider[provider_name] = str(ez_p) + "\n"
|
||||
str_ = str(ez_p) + "\n"
|
||||
if dict_info['type'].fancy == 'Disk_access':
|
||||
|
||||
allowed_prefix = ['disk_access', 'io']
|
||||
assert (any(provider_name.startswith(p) for p in allowed_prefix))
|
||||
|
||||
provider_name_c = provider_name
|
||||
for p in allowed_prefix:
|
||||
if provider_name_c.startswith(p):
|
||||
provider_name_c = provider_name_c.replace(p+'_','',1)
|
||||
|
||||
str_ += gen_ezfio_provider_disk_access(provider_name, provider_name_c)
|
||||
|
||||
dict_code_provider[provider_name] = str_
|
||||
|
||||
return dict_code_provider
|
||||
|
||||
|
@ -10,6 +10,32 @@ fetched from the EZFIO file.
|
||||
|
||||
import sys
|
||||
|
||||
def gen_ezfio_provider_disk_access(name_ref, name):
|
||||
data = """
|
||||
BEGIN_PROVIDER [ logical, read_{name} ]
|
||||
&BEGIN_PROVIDER [ logical, write_{name} ]
|
||||
|
||||
BEGIN_DOC
|
||||
! One level of abstraction for {name}
|
||||
END_DOC
|
||||
|
||||
if ({name_ref}.EQ.'Read') then
|
||||
read_{name} = .True.
|
||||
write_{name} = .False.
|
||||
else if ({name_ref}.EQ.'Write') then
|
||||
read_{name} = .False.
|
||||
write_{name} = .True.
|
||||
else if ({name_ref}.EQ.'None') then
|
||||
read_{name} = .False.
|
||||
write_{name} = .False.
|
||||
else
|
||||
print *, '{name_ref} has a wrong type'
|
||||
stop 1
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
"""
|
||||
return data.format(name=name,name_ref=name_ref)
|
||||
|
||||
class EZFIO_Provider(object):
|
||||
|
||||
|
@ -4,28 +4,60 @@ doc: Nucleus-electron integrals in |AO| basis set
|
||||
size: (ao_basis.ao_num,ao_basis.ao_num)
|
||||
interface: ezfio
|
||||
|
||||
[io_ao_one_integrals_nuclear]
|
||||
type: Disk_access
|
||||
doc: Read/Write |AO| one-electron nuclear integrals from/to disk [ Write | Read | None ]
|
||||
interface: ezfio,provider,ocaml
|
||||
default: None
|
||||
|
||||
|
||||
[integral_kinetic]
|
||||
type: double precision
|
||||
doc: Kinetic energy integrals in |AO| basis set
|
||||
size: (ao_basis.ao_num,ao_basis.ao_num)
|
||||
interface: ezfio
|
||||
|
||||
[io_ao_one_integrals_kinetic]
|
||||
type: Disk_access
|
||||
doc: Read/Write |AO| one-electron kinetic integrals from/to disk [ Write | Read | None ]
|
||||
interface: ezfio,provider,ocaml
|
||||
default: None
|
||||
|
||||
|
||||
[integral_pseudo]
|
||||
type: double precision
|
||||
doc: Pseudopotential integrals in |AO| basis set
|
||||
size: (ao_basis.ao_num,ao_basis.ao_num)
|
||||
interface: ezfio
|
||||
|
||||
[io_ao_one_integrals_pseudo]
|
||||
type: Disk_access
|
||||
doc: Read/Write |AO| one-electron pseudo integrals from/to disk [ Write | Read | None ]
|
||||
interface: ezfio,provider,ocaml
|
||||
default: None
|
||||
|
||||
|
||||
[integral_overlap]
|
||||
type: double precision
|
||||
doc: Overlap integrals in |AO| basis set
|
||||
size: (ao_basis.ao_num,ao_basis.ao_num)
|
||||
interface: ezfio
|
||||
|
||||
[io_ao_one_integrals_overlap]
|
||||
type: Disk_access
|
||||
doc: Read/Write |AO| one-electron overlap integrals from/to disk [ Write | Read | None ]
|
||||
interface: ezfio,provider,ocaml
|
||||
default: None
|
||||
|
||||
|
||||
[integral_combined]
|
||||
type: double precision
|
||||
doc: Combined integrals in |MO| basis set
|
||||
size: (ao_basis.ao_num,ao_basis.ao_num)
|
||||
interface: ezfio
|
||||
|
||||
[disk_access_ao_one_integrals]
|
||||
type: Disk_access
|
||||
doc: Read/Write |AO| one-electron integrals from/to disk [ Write | Read | None ]
|
||||
interface: ezfio,provider,ocaml
|
||||
default: None
|
||||
|
||||
|
||||
|
@ -5,11 +5,25 @@
|
||||
BEGIN_DOC
|
||||
! Array of the one-electron Hamiltonian on the |AO| basis.
|
||||
END_DOC
|
||||
do j = 1, ao_num
|
||||
do i = 1, ao_num
|
||||
ao_mono_elec_integral(i,j) = ao_nucl_elec_integral(i,j) + ao_kinetic_integral(i,j) + ao_pseudo_integral(i,j)
|
||||
enddo
|
||||
ao_mono_elec_integral_diag(j) = ao_mono_elec_integral(j,j)
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
IF (read_ao_one_integrals) THEN
|
||||
call ezfio_get_ao_one_e_integrals_integral_combined(ao_mono_elec_integral)
|
||||
ELSE
|
||||
ao_mono_elec_integral = ao_nucl_elec_integral + ao_kinetic_integral
|
||||
|
||||
IF (DO_PSEUDO) THEN
|
||||
ao_mono_elec_integral += ao_pseudo_integral
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
DO j = 1, ao_num
|
||||
ao_mono_elec_integral_diag(j) = ao_mono_elec_integral(j,j)
|
||||
ENDDO
|
||||
|
||||
IF (write_ao_one_integrals) THEN
|
||||
call ezfio_set_ao_one_e_integrals_integral_combined(ao_mono_elec_integral)
|
||||
print *, 'AO integrals combined written to disk'
|
||||
ENDIF
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
ao_overlap_x = 0.d0
|
||||
ao_overlap_y = 0.d0
|
||||
ao_overlap_z = 0.d0
|
||||
if (read_ao_one_integrals) then
|
||||
if (read_ao_one_integrals_overlap) then
|
||||
call ezfio_get_ao_one_e_integrals_integral_overlap(ao_overlap(1:ao_num, 1:ao_num))
|
||||
print *, 'AO overlap integrals read from disk'
|
||||
else
|
||||
@ -63,7 +63,7 @@
|
||||
enddo
|
||||
!$OMP END PARALLEL DO
|
||||
endif
|
||||
if (write_ao_one_integrals) then
|
||||
if (write_ao_one_integrals_overlap) then
|
||||
call ezfio_set_ao_one_e_integrals_integral_overlap(ao_overlap(1:ao_num, 1:ao_num))
|
||||
print *, 'AO overlap integrals written to disk'
|
||||
endif
|
||||
|
@ -126,7 +126,7 @@ BEGIN_PROVIDER [double precision, ao_kinetic_integral, (ao_num,ao_num)]
|
||||
END_DOC
|
||||
integer :: i,j,k,l
|
||||
|
||||
if (read_ao_one_integrals) then
|
||||
if (read_ao_one_integrals_kinetic) then
|
||||
call ezfio_get_ao_one_e_integrals_integral_kinetic(ao_kinetic_integral)
|
||||
print *, 'AO kinetic integrals read from disk'
|
||||
else
|
||||
@ -140,7 +140,7 @@ BEGIN_PROVIDER [double precision, ao_kinetic_integral, (ao_num,ao_num)]
|
||||
enddo
|
||||
!$OMP END PARALLEL DO
|
||||
endif
|
||||
if (write_ao_one_integrals) then
|
||||
if (write_ao_one_integrals_kinetic) then
|
||||
call ezfio_set_ao_one_e_integrals_integral_kinetic(ao_kinetic_integral)
|
||||
print *, 'AO kinetic integrals written to disk'
|
||||
endif
|
||||
|
@ -12,7 +12,7 @@ BEGIN_PROVIDER [ double precision, ao_nucl_elec_integral, (ao_num,ao_num)]
|
||||
integer :: i,j,k,l,n_pt_in,m
|
||||
double precision :: overlap_x,overlap_y,overlap_z,overlap,dx,NAI_pol_mult
|
||||
|
||||
if (read_ao_one_integrals) then
|
||||
if (read_ao_one_integrals_nuclear) then
|
||||
call ezfio_get_ao_one_e_integrals_integral_nuclear(ao_nucl_elec_integral)
|
||||
print *, 'AO N-e integrals read from disk'
|
||||
else
|
||||
@ -76,7 +76,7 @@ BEGIN_PROVIDER [ double precision, ao_nucl_elec_integral, (ao_num,ao_num)]
|
||||
!$OMP END DO
|
||||
!$OMP END PARALLEL
|
||||
endif
|
||||
if (write_ao_one_integrals) then
|
||||
if (write_ao_one_integrals_nuclear) then
|
||||
call ezfio_set_ao_one_e_integrals_integral_nuclear(ao_nucl_elec_integral)
|
||||
print *, 'AO N-e integrals written to disk'
|
||||
endif
|
||||
|
@ -4,7 +4,7 @@ BEGIN_PROVIDER [ double precision, ao_pseudo_integral, (ao_num,ao_num)]
|
||||
! Pseudo-potential integrals in the |AO| basis set.
|
||||
END_DOC
|
||||
|
||||
if (read_ao_one_integrals) then
|
||||
if (read_ao_one_integrals_pseudo) then
|
||||
call ezfio_get_ao_one_e_integrals_integral_pseudo(ao_pseudo_integral)
|
||||
print *, 'AO pseudopotential integrals read from disk'
|
||||
else
|
||||
@ -20,7 +20,7 @@ BEGIN_PROVIDER [ double precision, ao_pseudo_integral, (ao_num,ao_num)]
|
||||
endif
|
||||
endif
|
||||
|
||||
if (write_ao_one_integrals) then
|
||||
if (write_ao_one_integrals_pseudo) then
|
||||
call ezfio_set_ao_one_e_integrals_integral_pseudo(ao_pseudo_integral)
|
||||
print *, 'AO pseudopotential integrals written to disk'
|
||||
endif
|
||||
|
@ -1,28 +0,0 @@
|
||||
BEGIN_PROVIDER [ logical, read_ao_one_integrals ]
|
||||
&BEGIN_PROVIDER [ logical, write_ao_one_integrals ]
|
||||
|
||||
BEGIN_DOC
|
||||
! If |true|, read/write one-electrons from/to disk.
|
||||
END_DOC
|
||||
implicit none
|
||||
|
||||
if (disk_access_ao_one_integrals.EQ.'Read') then
|
||||
read_ao_one_integrals = .True.
|
||||
write_ao_one_integrals = .False.
|
||||
|
||||
else if (disk_access_ao_one_integrals.EQ.'Write') then
|
||||
read_ao_one_integrals = .False.
|
||||
write_ao_one_integrals = .True.
|
||||
|
||||
else if (disk_access_ao_one_integrals.EQ.'None') then
|
||||
read_ao_one_integrals = .False.
|
||||
write_ao_one_integrals = .False.
|
||||
|
||||
else
|
||||
print *, 'bielec_integrals/disk_access_ao_integrals has a wrong type'
|
||||
stop 1
|
||||
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
|
@ -1,27 +0,0 @@
|
||||
BEGIN_PROVIDER [ logical, read_ao_integrals_erf ]
|
||||
&BEGIN_PROVIDER [ logical, write_ao_integrals_erf ]
|
||||
implicit none
|
||||
|
||||
BEGIN_DOC
|
||||
! Flag to read or write the |AO| erf integrals
|
||||
END_DOC
|
||||
|
||||
if (disk_access_ao_integrals_erf.EQ.'Read') then
|
||||
read_ao_integrals_erf = .True.
|
||||
write_ao_integrals_erf = .False.
|
||||
|
||||
else if (disk_access_ao_integrals_erf.EQ.'Write') then
|
||||
read_ao_integrals_erf = .False.
|
||||
write_ao_integrals_erf = .True.
|
||||
|
||||
else if (disk_access_ao_integrals_erf.EQ.'None') then
|
||||
read_ao_integrals_erf = .False.
|
||||
write_ao_integrals_erf = .False.
|
||||
|
||||
else
|
||||
print *, 'disk_access_ao_integrals_erf has a wrong type'
|
||||
stop 1
|
||||
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
@ -1,27 +0,0 @@
|
||||
BEGIN_PROVIDER [ logical, read_ao_integrals ]
|
||||
&BEGIN_PROVIDER [ logical, write_ao_integrals ]
|
||||
|
||||
BEGIN_DOC
|
||||
! Flag to read or write the |AO| integrals
|
||||
END_DOC
|
||||
implicit none
|
||||
|
||||
if (disk_access_ao_integrals.EQ.'Read') then
|
||||
read_ao_integrals = .True.
|
||||
write_ao_integrals = .False.
|
||||
|
||||
else if (disk_access_ao_integrals.EQ.'Write') then
|
||||
read_ao_integrals = .False.
|
||||
write_ao_integrals = .True.
|
||||
|
||||
else if (disk_access_ao_integrals.EQ.'None') then
|
||||
read_ao_integrals = .False.
|
||||
write_ao_integrals = .False.
|
||||
|
||||
else
|
||||
print *, 'disk_access_ao_integrals has a wrong type'
|
||||
stop 1
|
||||
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
@ -4,18 +4,57 @@ doc: Nucleus-electron integrals in |MO| basis set
|
||||
size: (mo_basis.mo_tot_num,mo_basis.mo_tot_num)
|
||||
interface: ezfio
|
||||
|
||||
[io_mo_one_integrals_nuclear]
|
||||
type: Disk_access
|
||||
doc: Read/Write |MO| one-electron nuclear integrals from/to disk [ Write | Read | None ]
|
||||
interface: ezfio,provider,ocaml
|
||||
default: None
|
||||
|
||||
|
||||
[integral_kinetic]
|
||||
type: double precision
|
||||
doc: Kinetic energy integrals in |MO| basis set
|
||||
size: (mo_basis.mo_tot_num,mo_basis.mo_tot_num)
|
||||
interface: ezfio
|
||||
|
||||
[io_mo_one_integrals_kinetic]
|
||||
type: Disk_access
|
||||
doc: Read/Write |MO| one-electron kinetic integrals from/to disk [ Write | Read | None ]
|
||||
interface: ezfio,provider,ocaml
|
||||
default: None
|
||||
|
||||
|
||||
|
||||
[integral_pseudo]
|
||||
type: double precision
|
||||
doc: Pseudopotential integrals in |MO| basis set
|
||||
size: (mo_basis.mo_tot_num,mo_basis.mo_tot_num)
|
||||
interface: ezfio
|
||||
|
||||
[io_mo_one_integrals_pseudo]
|
||||
type: Disk_access
|
||||
doc: Read/Write |MO| one-electron pseudo integrals from/to disk [ Write | Read | None ]
|
||||
interface: ezfio,provider,ocaml
|
||||
default: None
|
||||
|
||||
[integral_overlap]
|
||||
type: double precision
|
||||
doc: Overlap integrals in |MO| basis set
|
||||
size: (mo_basis.mo_tot_num,mo_basis.mo_tot_num)
|
||||
interface: ezfio
|
||||
|
||||
[io_mo_one_integrals_overlap]
|
||||
type: Disk_access
|
||||
doc: Read/Write |MO| one-electron overlap integrals from/to disk [ Write | Read | None ]
|
||||
interface: ezfio,provider,ocaml
|
||||
default: None
|
||||
|
||||
|
||||
[integral_combined]
|
||||
type: double precision
|
||||
doc: Combined integrals in |MO| basis set
|
||||
size: (mo_basis.mo_tot_num,mo_basis.mo_tot_num)
|
||||
interface: ezfio
|
||||
|
||||
[disk_access_mo_one_integrals]
|
||||
type: Disk_access
|
||||
|
@ -4,7 +4,7 @@ BEGIN_PROVIDER [double precision, mo_kinetic_integral, (mo_tot_num,mo_tot_num)]
|
||||
! Kinetic energy integrals in the MO basis
|
||||
END_DOC
|
||||
|
||||
if (read_mo_one_integrals) then
|
||||
if (read_mo_one_integrals_kinetic) then
|
||||
call ezfio_get_mo_one_e_integrals_integral_kinetic(mo_kinetic_integral)
|
||||
print *, 'MO kinetic integrals read from disk'
|
||||
else
|
||||
@ -15,7 +15,7 @@ BEGIN_PROVIDER [double precision, mo_kinetic_integral, (mo_tot_num,mo_tot_num)]
|
||||
size(mo_kinetic_integral,1) &
|
||||
)
|
||||
endif
|
||||
if (write_mo_one_integrals) then
|
||||
if (write_mo_one_integrals_kinetic) then
|
||||
call ezfio_set_mo_one_e_integrals_integral_kinetic(mo_kinetic_integral)
|
||||
print *, 'MO kinetic integrals written to disk'
|
||||
endif
|
||||
|
@ -7,20 +7,20 @@ BEGIN_PROVIDER [ double precision, mo_mono_elec_integral,(mo_tot_num,mo_tot_num)
|
||||
END_DOC
|
||||
print*,'Providing the mono electronic integrals'
|
||||
|
||||
IF (do_pseudo) THEN
|
||||
do j = 1, mo_tot_num
|
||||
do i = 1, mo_tot_num
|
||||
mo_mono_elec_integral(i,j) = mo_nucl_elec_integral(i,j) + mo_kinetic_integral(i,j) &
|
||||
+ mo_pseudo_integral(i,j)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
IF (read_mo_one_integrals) THEN
|
||||
call ezfio_get_mo_one_e_integrals_integral_combined(mo_mono_elec_integral)
|
||||
ELSE
|
||||
do j = 1, mo_tot_num
|
||||
do i = 1, mo_tot_num
|
||||
mo_mono_elec_integral(i,j) = mo_nucl_elec_integral(i,j) + mo_kinetic_integral(i,j)
|
||||
enddo
|
||||
enddo
|
||||
mo_mono_elec_integral = mo_nucl_elec_integral + mo_kinetic_integral
|
||||
|
||||
IF (DO_PSEUDO) THEN
|
||||
mo_mono_elec_integral += mo_pseudo_integral
|
||||
ENDIF
|
||||
|
||||
ENDIF
|
||||
|
||||
IF (write_mo_one_integrals) THEN
|
||||
call ezfio_set_mo_one_e_integrals_integral_combined(mo_mono_elec_integral)
|
||||
print *, 'MO integrals combined written to disk'
|
||||
ENDIF
|
||||
|
||||
END IF
|
||||
END_PROVIDER
|
||||
|
@ -4,6 +4,13 @@ BEGIN_PROVIDER [ double precision, mo_overlap,(mo_tot_num,mo_tot_num)]
|
||||
integer :: i,j,n,l
|
||||
double precision :: f
|
||||
integer :: lmax
|
||||
|
||||
|
||||
if (read_mo_one_integrals_overlap) then
|
||||
call ezfio_get_mo_one_e_integrals_integral_overlap(mo_kinetic_integral)
|
||||
print *, 'MO kinetic overlap read from disk'
|
||||
else
|
||||
|
||||
lmax = (ao_num/4) * 4
|
||||
!$OMP PARALLEL DO SCHEDULE(STATIC) DEFAULT(NONE) &
|
||||
!$OMP PRIVATE(i,j,n,l) &
|
||||
@ -29,5 +36,12 @@ BEGIN_PROVIDER [ double precision, mo_overlap,(mo_tot_num,mo_tot_num)]
|
||||
enddo
|
||||
enddo
|
||||
!$OMP END PARALLEL DO
|
||||
endif
|
||||
|
||||
if (write_mo_one_integrals_overlap) then
|
||||
call ezfio_set_mo_one_e_integrals_integral_overlap(mo_kinetic_integral)
|
||||
print *, 'MO kinetic integrals written to disk'
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
@ -4,7 +4,7 @@ BEGIN_PROVIDER [double precision, mo_nucl_elec_integral, (mo_tot_num,mo_tot_num)
|
||||
! Nucleus-electron interaction on the |MO| basis
|
||||
END_DOC
|
||||
|
||||
if (read_mo_one_integrals) then
|
||||
if (read_mo_one_integrals_nuclear) then
|
||||
call ezfio_get_mo_one_e_integrals_integral_nuclear(mo_nucl_elec_integral)
|
||||
print *, 'MO N-e integrals read from disk'
|
||||
else
|
||||
@ -15,7 +15,7 @@ BEGIN_PROVIDER [double precision, mo_nucl_elec_integral, (mo_tot_num,mo_tot_num)
|
||||
size(mo_nucl_elec_integral,1) &
|
||||
)
|
||||
endif
|
||||
if (write_mo_one_integrals) then
|
||||
if (write_mo_one_integrals_nuclear) then
|
||||
call ezfio_set_mo_one_e_integrals_integral_nuclear(mo_nucl_elec_integral)
|
||||
print *, 'MO N-e integrals written to disk'
|
||||
endif
|
||||
|
@ -4,18 +4,21 @@ BEGIN_PROVIDER [double precision, mo_pseudo_integral, (mo_tot_num,mo_tot_num)]
|
||||
! interaction nuclear electron on the MO basis
|
||||
END_DOC
|
||||
|
||||
if (read_mo_one_integrals) then
|
||||
if (read_mo_one_integrals_pseudo) then
|
||||
call ezfio_get_mo_one_e_integrals_integral_pseudo(mo_pseudo_integral)
|
||||
print *, 'MO pseudopotential integrals read from disk'
|
||||
else
|
||||
else if (do_pseudo) then
|
||||
call ao_to_mo( &
|
||||
ao_pseudo_integral, &
|
||||
size(ao_pseudo_integral,1), &
|
||||
mo_pseudo_integral, &
|
||||
size(mo_pseudo_integral,1) &
|
||||
)
|
||||
else
|
||||
mo_pseudo_integral = 0.d0
|
||||
endif
|
||||
if (write_mo_one_integrals) then
|
||||
|
||||
if (write_mo_one_integrals_pseudo) then
|
||||
call ezfio_set_mo_one_e_integrals_integral_pseudo(mo_pseudo_integral)
|
||||
print *, 'MO pseudopotential integrals written to disk'
|
||||
endif
|
||||
|
@ -1,28 +0,0 @@
|
||||
BEGIN_PROVIDER [ logical, read_mo_one_integrals ]
|
||||
&BEGIN_PROVIDER [ logical, write_mo_one_integrals ]
|
||||
|
||||
BEGIN_DOC
|
||||
! One level of abstraction for disk_access_mo_integrals
|
||||
END_DOC
|
||||
implicit none
|
||||
|
||||
if (disk_access_mo_one_integrals.EQ.'Read') then
|
||||
read_mo_one_integrals = .True.
|
||||
write_mo_one_integrals = .False.
|
||||
|
||||
else if (disk_access_mo_one_integrals.EQ.'Write') then
|
||||
read_mo_one_integrals = .False.
|
||||
write_mo_one_integrals = .True.
|
||||
|
||||
else if (disk_access_mo_one_integrals.EQ.'None') then
|
||||
read_mo_one_integrals = .False.
|
||||
write_mo_one_integrals = .False.
|
||||
|
||||
else
|
||||
print *, 'mo_one_e_integrals/disk_access_mo_one_integrals has a wrong type'
|
||||
stop 1
|
||||
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
|
@ -1,27 +0,0 @@
|
||||
BEGIN_PROVIDER [ logical, read_mo_integrals_erf ]
|
||||
&BEGIN_PROVIDER [ logical, write_mo_integrals_erf ]
|
||||
implicit none
|
||||
|
||||
BEGIN_DOC
|
||||
! Flag to read or write the |MO| erf integrals
|
||||
END_DOC
|
||||
|
||||
if (disk_access_mo_integrals_erf.EQ.'Read') then
|
||||
read_mo_integrals_erf = .True.
|
||||
write_mo_integrals_erf = .False.
|
||||
|
||||
else if (disk_access_mo_integrals_erf.EQ.'Write') then
|
||||
read_mo_integrals_erf = .False.
|
||||
write_mo_integrals_erf = .True.
|
||||
|
||||
else if (disk_access_mo_integrals_erf.EQ.'None') then
|
||||
read_mo_integrals_erf = .False.
|
||||
write_mo_integrals_erf = .False.
|
||||
|
||||
else
|
||||
print *, 'disk_access_mo_integrals_erf has a wrong type'
|
||||
stop 1
|
||||
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
@ -1071,7 +1071,7 @@ end
|
||||
!$OMP REDUCTION(+:mo_bielec_integral_jj_from_ao,mo_bielec_integral_jj_exchange_from_ao)
|
||||
|
||||
allocate( int_value(ao_num), int_idx(ao_num), &
|
||||
iqrs(mo_tot_num,ao_num), iqis(mo_tot_num), iqri(mo_tot_num),&
|
||||
iqrs(mo_tot_num,ao_num), iqis(mo_tot_num), iqri(mo_tot_num), &
|
||||
iqsr(mo_tot_num,ao_num) )
|
||||
|
||||
!$OMP DO SCHEDULE (guided)
|
||||
@ -1192,9 +1192,9 @@ END_PROVIDER
|
||||
|
||||
|
||||
!$OMP PARALLEL DEFAULT(NONE) &
|
||||
!$OMP PRIVATE (i0,j0,i,j,p,q,r,s,integral,c,n,pp,int_value,int_idx,&
|
||||
!$OMP PRIVATE (i0,j0,i,j,p,q,r,s,integral,c,n,pp,int_value,int_idx, &
|
||||
!$OMP iqrs, iqsr,iqri,iqis) &
|
||||
!$OMP SHARED(n_virt_orb,mo_tot_num,list_virt,mo_coef_transp,ao_num,&
|
||||
!$OMP SHARED(n_virt_orb,mo_tot_num,list_virt,mo_coef_transp,ao_num, &
|
||||
!$OMP ao_integrals_threshold,do_direct_integrals) &
|
||||
!$OMP REDUCTION(+:mo_bielec_integral_vv_from_ao,mo_bielec_integral_vv_exchange_from_ao)
|
||||
|
||||
@ -1339,7 +1339,5 @@ subroutine clear_mo_map
|
||||
call map_deinit(mo_integrals_map)
|
||||
FREE mo_integrals_map mo_bielec_integral_jj mo_bielec_integral_jj_anti
|
||||
FREE mo_bielec_integral_jj_exchange mo_bielec_integrals_in_map
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
@ -1,27 +0,0 @@
|
||||
BEGIN_PROVIDER [ logical, read_mo_integrals ]
|
||||
&BEGIN_PROVIDER [ logical, write_mo_integrals ]
|
||||
|
||||
BEGIN_DOC
|
||||
! Flag to read or write the |MO| integrals
|
||||
END_DOC
|
||||
implicit none
|
||||
|
||||
if (disk_access_mo_integrals.EQ.'Read') then
|
||||
read_mo_integrals = .True.
|
||||
write_mo_integrals = .False.
|
||||
|
||||
else if (disk_access_mo_integrals.EQ.'Write') then
|
||||
read_mo_integrals = .False.
|
||||
write_mo_integrals = .True.
|
||||
|
||||
else if (disk_access_mo_integrals.EQ.'None') then
|
||||
read_mo_integrals = .False.
|
||||
write_mo_integrals = .False.
|
||||
|
||||
else
|
||||
print *, 'disk_access_mo_integrals has a wrong type'
|
||||
stop 1
|
||||
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
Loading…
Reference in New Issue
Block a user