From 2546cdd317cd4483d927c0e561806587001158b0 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 5 May 2021 17:01:21 +0200 Subject: [PATCH 1/8] Add LIB files in plugins --- RELEASE_NOTES.org | 12 ++++++------ scripts/compilation/qp_create_ninja | 9 +++++++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/RELEASE_NOTES.org b/RELEASE_NOTES.org index e5fb24a7..f9dbcbb0 100644 --- a/RELEASE_NOTES.org +++ b/RELEASE_NOTES.org @@ -29,7 +29,7 @@ - Disk-based Davidson when too much memory is required - Fixed bug in DIIS - Fixed bug in molden (Au -> Angs) - + *** User interface - Added ~qp_basis~ script to install a basis set from the ~bse~ @@ -38,7 +38,7 @@ ~psi_coef_qp_edit~ to accelerate the opening of qp_edit with large wave functions - Removed ~etc/ninja.rc~ - - Added flag to specify if the AOs are normalized + - Added flag to specify if the AOs are normalized - Added flag to specify if the primitive Gaussians are normalized - Added ~lin_dep_cutoff~, the cutoff for linear dependencies - Davidson convergence threshold can be adapted from PT2 @@ -51,7 +51,7 @@ - Added ~print_energy~ - Added ~print_hamiltonian~ - Added input for two body RDM - - Added keyword ~save_wf_after_selection~ + - Added keyword ~save_wf_after_selection~ *** Code @@ -75,11 +75,11 @@ - Added ~V_ne_psi_energy~ - Added ~h_core_guess~ routine - Fixed Laplacians in real space (indices) - - + - Added LIB file to add extra libs in plugin ao_one_e_integral_zero banned_excitations - - + + diff --git a/scripts/compilation/qp_create_ninja b/scripts/compilation/qp_create_ninja index 38f7e765..0a7f4b71 100755 --- a/scripts/compilation/qp_create_ninja +++ b/scripts/compilation/qp_create_ninja @@ -108,6 +108,15 @@ def ninja_create_env_variable(pwd_config_file): lib_usr = get_compilation_option(pwd_config_file, "LIB") str_lib = " ".join([lib_lapack, EZFIO_LIB, ZMQ_LIB, LIB, lib_usr]) + + # Read all LIB files in modules + targetPattern = r"src/**/LIB" + for libfile in glob.glob(targetPattern): + content = "" + with open(libfile,'r') as f: + content = f.read() + str_lib += " "+content + l_string.append("LIB = {0} ".format(str_lib)) l_string.append("") From d3699eed5ad2c85688e4d3fb1864cdfedbdfb8bf Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 5 May 2021 17:56:46 +0200 Subject: [PATCH 2/8] Fix for LIB --- scripts/compilation/qp_create_ninja | 10 ++++++---- scripts/ezfio_interface/ezfio_generate_provider.py | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/compilation/qp_create_ninja b/scripts/compilation/qp_create_ninja index 0a7f4b71..a132bc9e 100755 --- a/scripts/compilation/qp_create_ninja +++ b/scripts/compilation/qp_create_ninja @@ -110,12 +110,14 @@ def ninja_create_env_variable(pwd_config_file): str_lib = " ".join([lib_lapack, EZFIO_LIB, ZMQ_LIB, LIB, lib_usr]) # Read all LIB files in modules - targetPattern = r"src/**/LIB" - for libfile in glob.glob(targetPattern): + libfile = "LIB" + try: content = "" with open(libfile,'r') as f: - content = f.read() - str_lib += " "+content + content = f.read() + str_lib += " "+content + except IOError: + pass l_string.append("LIB = {0} ".format(str_lib)) diff --git a/scripts/ezfio_interface/ezfio_generate_provider.py b/scripts/ezfio_interface/ezfio_generate_provider.py index 4b43a88a..6b49955b 100755 --- a/scripts/ezfio_interface/ezfio_generate_provider.py +++ b/scripts/ezfio_interface/ezfio_generate_provider.py @@ -82,6 +82,8 @@ END_PROVIDER mpi_correspondance = {"integer": "MPI_INTEGER", "integer*8": "MPI_INTEGER8", "character*(32)": "MPI_CHARACTER", + "character*(64)": "MPI_CHARACTER", + "character*(256)": "MPI_CHARACTER", "logical": "MPI_LOGICAL", "double precision": "MPI_DOUBLE_PRECISION"} From a9d23e88f8cc83f4f6221deb94c315506a31ebda Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 6 May 2021 13:34:16 +0200 Subject: [PATCH 3/8] Add providers for trexio --- src/mo_one_e_ints/pot_mo_pseudo_ints.irp.f | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/mo_one_e_ints/pot_mo_pseudo_ints.irp.f b/src/mo_one_e_ints/pot_mo_pseudo_ints.irp.f index 179b33ed..f4c1012d 100644 --- a/src/mo_one_e_ints/pot_mo_pseudo_ints.irp.f +++ b/src/mo_one_e_ints/pot_mo_pseudo_ints.irp.f @@ -26,3 +26,43 @@ BEGIN_PROVIDER [double precision, mo_pseudo_integrals, (mo_num,mo_num)] END_PROVIDER +BEGIN_PROVIDER [double precision, mo_pseudo_integrals_local, (mo_num,mo_num)] + implicit none + BEGIN_DOC + ! Pseudopotential integrals in |MO| basis + END_DOC + + if (do_pseudo) then + call ao_to_mo( & + ao_pseudo_integrals_local, & + size(ao_pseudo_integrals_local,1), & + mo_pseudo_integrals_local, & + size(mo_pseudo_integrals_local,1) & + ) + else + mo_pseudo_integrals_local = 0.d0 + endif + +END_PROVIDER + + +BEGIN_PROVIDER [double precision, mo_pseudo_integrals_non_local, (mo_num,mo_num)] + implicit none + BEGIN_DOC + ! Pseudopotential integrals in |MO| basis + END_DOC + + if (do_pseudo) then + call ao_to_mo( & + ao_pseudo_integrals_non_local, & + size(ao_pseudo_integrals_non_local,1), & + mo_pseudo_integrals_non_local, & + size(mo_pseudo_integrals_non_local,1) & + ) + else + mo_pseudo_integrals_non_local = 0.d0 + endif + +END_PROVIDER + + From 7fa1527a3de79015fc70aac4053ed84cc1ab50fc Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Sun, 16 May 2021 01:32:55 +0200 Subject: [PATCH 4/8] Move restore_symm keyword --- RELEASE_NOTES.org | 2 ++ bin/qp_export_as_tgz | 6 ++++-- src/mo_one_e_ints/EZFIO.cfg | 7 ------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/RELEASE_NOTES.org b/RELEASE_NOTES.org index f9dbcbb0..02176ffa 100644 --- a/RELEASE_NOTES.org +++ b/RELEASE_NOTES.org @@ -52,6 +52,8 @@ - Added ~print_hamiltonian~ - Added input for two body RDM - Added keyword ~save_wf_after_selection~ + - Added a ~restore_symm~ flag to enforce the restoration of + symmetry in matrices *** Code diff --git a/bin/qp_export_as_tgz b/bin/qp_export_as_tgz index 7332d1ed..20624dba 100755 --- a/bin/qp_export_as_tgz +++ b/bin/qp_export_as_tgz @@ -99,7 +99,9 @@ function find_libs () { } function find_exec () { - find ${QP_ROOT}/$1 -perm /u+x -type f + for i in $@ ; do + find ${QP_ROOT}/$i -perm /u+x -type f + done } @@ -119,7 +121,7 @@ fi echo "Copying binary files" # -------------------- -FORTRAN_EXEC=$(find_exec src) +FORTRAN_EXEC=$(find_exec src/*/) if [[ -z $FORTRAN_EXEC ]] ; then error 'No Fortran binaries found.' exit 1 diff --git a/src/mo_one_e_ints/EZFIO.cfg b/src/mo_one_e_ints/EZFIO.cfg index ca4dabf4..d58b3da1 100644 --- a/src/mo_one_e_ints/EZFIO.cfg +++ b/src/mo_one_e_ints/EZFIO.cfg @@ -47,10 +47,3 @@ type: Disk_access doc: Read/Write |MO| one-electron integrals from/to disk [ Write | Read | None ] interface: ezfio,provider,ocaml default: None - - -[restore_symm] -type: logical -doc: If true, try to find symmetry in the MO coefficient matrices -interface: ezfio,provider,ocaml -default: True From c226ffd9dfdbd05f822884f932956cd356191808 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Sun, 16 May 2021 11:24:05 +0200 Subject: [PATCH 5/8] forgot file --- src/utils/EZFIO.cfg | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/utils/EZFIO.cfg diff --git a/src/utils/EZFIO.cfg b/src/utils/EZFIO.cfg new file mode 100644 index 00000000..7d367f0c --- /dev/null +++ b/src/utils/EZFIO.cfg @@ -0,0 +1,5 @@ +[restore_symm] +type: logical +doc: If true, try to find symmetry in the MO coefficient matrices +interface: ezfio,provider,ocaml +default: False From bb0743ac1ee439f387809e83f6927883aa320275 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 19 May 2021 18:38:11 +0200 Subject: [PATCH 6/8] Updated IRPF90 --- etc/local.rc | 2 +- external/irpf90 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/local.rc b/etc/local.rc index 954b315b..0e212c24 100644 --- a/etc/local.rc +++ b/etc/local.rc @@ -19,4 +19,4 @@ # export QP_NIC=lo # export QP_NIC=ib0 - +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/scemama/TREX/trexio/_install/lib diff --git a/external/irpf90 b/external/irpf90 index 132a4a16..33ca5e10 160000 --- a/external/irpf90 +++ b/external/irpf90 @@ -1 +1 @@ -Subproject commit 132a4a1661c9878d21dcbf0ac14f7fe9a3b110d0 +Subproject commit 33ca5e1018f3bbb5e695e6ee558f5dac0753b271 From 1dc2350b328decf2b2b35f4fe5cdcf61e0d85e9d Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 19 May 2021 18:43:48 +0200 Subject: [PATCH 7/8] revert etc/local.rc --- etc/local.rc | 1 - 1 file changed, 1 deletion(-) diff --git a/etc/local.rc b/etc/local.rc index 0e212c24..182599c6 100644 --- a/etc/local.rc +++ b/etc/local.rc @@ -19,4 +19,3 @@ # export QP_NIC=lo # export QP_NIC=ib0 -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/scemama/TREX/trexio/_install/lib From 3ceea5e8b27b1ce82286ac8254964fd8e784e6df Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 20 May 2021 18:19:44 +0200 Subject: [PATCH 8/8] Comment in 2rdm --- src/two_body_rdm/two_e_dm_mo.irp.f | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/two_body_rdm/two_e_dm_mo.irp.f b/src/two_body_rdm/two_e_dm_mo.irp.f index 19e8d75e..4dadd2e6 100644 --- a/src/two_body_rdm/two_e_dm_mo.irp.f +++ b/src/two_body_rdm/two_e_dm_mo.irp.f @@ -5,18 +5,14 @@ BEGIN_PROVIDER [double precision, two_e_dm_mo, (mo_num,mo_num,mo_num,mo_num)] ! ! ! - ! WHERE ALL ORBITALS (i,j,k,l) BELONGS TO ALL OCCUPIED ORBITALS : core, inactive and active + ! where the indices (i,j,k,l) belong to all MOs. ! - ! THE NORMALIZATION (i.e. sum of diagonal elements) IS SET TO N_{elec} * (N_{elec} - 1)/2 + ! The normalization (i.e. sum of diagonal elements) is set to $N_{elec} * (N_{elec} - 1)/2$ ! - ! !!!!! WARNING !!!!! ALL SLATER DETERMINANTS IN PSI_DET MUST BELONG TO AN ACTIVE SPACE DEFINED BY "list_act" + ! !!!!! WARNING !!!!! IF "no_core_density" then all elements involving at least one CORE MO are set to zero + ! The state-averaged two-electron energy : ! - ! !!!!! WARNING !!!!! IF "no_core_density" then all elements involving at least one CORE MO is set to zero - ! The two-electron energy of each state can be computed as: - ! - ! \sum_{i,j,k,l = 1, n_core_inact_act_orb} two_e_dm_mo(i,j,k,l,istate) * < ii jj | kk ll > - ! - ! with ii = list_core_inact_act(i), jj = list_core_inact_act(j), kk = list_core_inact_act(k), ll = list_core_inact_act(l) + ! \sum_{i,j,k,l = 1, mo_num} two_e_dm_mo(i,j,k,l) * < ii jj | kk ll > END_DOC two_e_dm_mo = 0.d0 integer :: i,j,k,l,iorb,jorb,korb,lorb,istate