diff --git a/plugins/Hartree_Fock/debug_libint.irp.f b/plugins/Hartree_Fock/debug_libint.irp.f index bfbb4027..14bfb33b 100644 --- a/plugins/Hartree_Fock/debug_libint.irp.f +++ b/plugins/Hartree_Fock/debug_libint.irp.f @@ -12,6 +12,7 @@ integer :: n1,n2,n3,n4 integer :: f1,f2,f3,f4,f1234 + PROVIDE has_libint ! =================== ! ! Loop over the shell ! ! =================== ! @@ -85,7 +86,6 @@ !Verify with the manu's one ref = ao_bielec_integral(bf1,bf2,bf3,bf4) - if ( (ABS(ABS(ref) - ABS(libint)).GE.1e-6) ) THEN print*, bf1,bf2,bf3,bf4 print*,"r", ref @@ -94,6 +94,7 @@ print*,"l/r", libint/ref print*,"n", norm + if ( (ABS(ABS(ref) - ABS(libint)) >= 1.e-6) ) THEN call exit(1) end if diff --git a/src/Integrals_Bielec/q_package.ezfio_config b/src/Integrals_Bielec/q_package.ezfio_config index 8c64c790..35cba011 100644 --- a/src/Integrals_Bielec/q_package.ezfio_config +++ b/src/Integrals_Bielec/q_package.ezfio_config @@ -4,3 +4,5 @@ work save empty logical +libint + empty logical diff --git a/src/Integrals_Monoelec/shell.irp.f b/src/Integrals_Monoelec/shell.irp.f index b91476e1..6972bbc3 100644 --- a/src/Integrals_Monoelec/shell.irp.f +++ b/src/Integrals_Monoelec/shell.irp.f @@ -1,30 +1,45 @@ use libint_module -BEGIN_PROVIDER [ logical, libint_initialized ] - implicit none - BEGIN_DOC - ! if true, libint is initialized - END_DOC - call init_libint(trim(ezfio_filename)//char((0))) +BEGIN_PROVIDER [ logical, has_libint ] + implicit none + BEGIN_DOC + ! If true, use libint + END_DOC + character :: y + call getenv('QP_LIBINT', y) + if (y=='1') then + has_libint = .True. + call init_libint(trim(ezfio_filename)//char((0))) + else + PROVIDE ezfio_filename + has_libint = .False. + endif + END_PROVIDER BEGIN_PROVIDER [ integer, shell_num ] - implicit none - BEGIN_DOC - ! Number of shells - END_DOC - PROVIDE libint_initialized - shell_num = get_nb_shell() - + implicit none + BEGIN_DOC + ! Number of shells + END_DOC + if (has_libint) then + shell_num = get_nb_shell() + else + stop 'shell_num not implemented without libint' + endif + END_PROVIDER BEGIN_PROVIDER [ integer, shell_idx, (2,shell_num) ] - implicit none - BEGIN_DOC - ! Contains the 1st and last AO index in each shell - END_DOC - PROVIDE libint_initialized - call map_shell_to_basis_function_interval(2*shell_num,shell_idx) + implicit none + BEGIN_DOC + ! Contains the 1st and last AO index in each shell + END_DOC + if (has_libint) then + call map_shell_to_basis_function_interval(2*shell_num,shell_idx) + else + stop 'shell_idx not implemented without libint' + endif END_PROVIDER