From 39aca82195260e04f6f0845493a2d161a447145a Mon Sep 17 00:00:00 2001 From: Thomas Applencourt Date: Thu, 25 Jun 2015 16:52:08 +0200 Subject: [PATCH] Modify gitignore --- .gitignore | 15 ++--- install/.gitignore | 10 ++++ plugins/CAS_SD/.gitignore | 41 +++++++------- plugins/CID/.gitignore | 43 +++++++------- plugins/CID_SC2_selected/.gitignore | 53 +++++++++-------- plugins/CID_selected/.gitignore | 50 ++++++++--------- plugins/CIS/.gitignore | 43 +++++++------- plugins/CISD/.gitignore | 43 +++++++------- plugins/DDCI_selected/.gitignore | 41 +++++++------- plugins/FCIdump/.gitignore | 35 ++++++------ plugins/Full_CI/.gitignore | 41 +++++++------- plugins/Generators_CAS/.gitignore | 24 +++++--- plugins/Generators_full/.gitignore | 26 ++++++--- plugins/Hartree_Fock/.gitignore | 35 ++++++------ plugins/Hartree_Fock/test | 0 plugins/MP2/.gitignore | 41 +++++++------- plugins/MRCC/.gitignore | 41 +++++++------- plugins/Perturbation/.gitignore | 27 ++++++--- plugins/Properties/.gitignore | 24 +++++--- plugins/Selectors_full/.gitignore | 26 ++++++--- plugins/SingleRefMethod/.gitignore | 20 ++++--- scripts/compilation/qp_create_ninja.py | 38 ++++++++++++- scripts/module/clean_modules.sh | 37 ------------ scripts/module/module_handler.py | 67 +++++++++++++--------- scripts/qp_include.sh | 78 -------------------------- src/.gitignore | 27 ++++++++- src/AO_Basis/.gitignore | 16 +++--- src/Bitmask/.gitignore | 19 ++++--- src/Determinants/.gitignore | 36 ++++++------ src/Electrons/.gitignore | 14 ++--- src/Ezfio_files/.gitignore | 13 ++--- src/Ezfio_files/README.rst | 60 ++++++-------------- src/Integrals_Bielec/.gitignore | 21 ++++--- src/Integrals_Monoelec/.gitignore | 27 +++++---- src/MOGuess/.gitignore | 29 +++++----- src/MO_Basis/.gitignore | 18 +++--- src/Nuclei/.gitignore | 15 ++--- src/Pseudo/.gitignore | 16 +++--- src/Utils/.gitignore | 13 ++--- 39 files changed, 612 insertions(+), 611 deletions(-) create mode 100644 install/.gitignore delete mode 100644 plugins/Hartree_Fock/test delete mode 100755 scripts/module/clean_modules.sh delete mode 100644 scripts/qp_include.sh diff --git a/.gitignore b/.gitignore index bc1d7d13..9d79d718 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,8 @@ quantum_package.rc -EZFIO/ -irpf90/ -EMSL_Basis/ -ninja/ -bin/ -*.log quantum_package_static.tar.gz -resultsFile -opam_installer.sh -*.mod -*.p build.ninja .ninja_log -.ninja_deps \ No newline at end of file +.ninja_deps +bin/ +lib/ +config/qp_create_ninja.pickle \ No newline at end of file diff --git a/install/.gitignore b/install/.gitignore new file mode 100644 index 00000000..60fbede4 --- /dev/null +++ b/install/.gitignore @@ -0,0 +1,10 @@ +config/qp_create_ninja.pickle +Downloads +_build +docopt +emsl +EZFIO +irpf90 +resultsFile +zlib +build.ninja \ No newline at end of file diff --git a/plugins/CAS_SD/.gitignore b/plugins/CAS_SD/.gitignore index 7f8eb5f0..ed6b1e0b 100644 --- a/plugins/CAS_SD/.gitignore +++ b/plugins/CAS_SD/.gitignore @@ -1,32 +1,31 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps -Pseudo -Integrals_Monoelec -Generators_CAS -Bitmask -Integrals_Bielec -AOs -Selectors_full -MOs -Hartree_Fock +ezfio_interface.irp.f +Ezfio_files Perturbation Determinants -Electrons Utils -Properties -Nuclei +Integrals_Monoelec +MO_Basis +Selectors_full +Integrals_Bielec +Pseudo +Bitmask +Generators_CAS +AO_Basis +Electrons MOGuess -Ezfio_files +Nuclei +Hartree_Fock +Properties cas_sd_selected -cas_sd +cas_sd \ No newline at end of file diff --git a/plugins/CID/.gitignore b/plugins/CID/.gitignore index 2baec9eb..638efebf 100644 --- a/plugins/CID/.gitignore +++ b/plugins/CID/.gitignore @@ -1,30 +1,29 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps -Pseudo -Integrals_Monoelec -Bitmask -Integrals_Bielec -AOs -Selectors_full -MOs -Hartree_Fock -Determinants -Electrons -Utils -Nuclei -MOGuess -SingleRefMethod +ezfio_interface.irp.f Ezfio_files +Determinants +Integrals_Monoelec +MO_Basis +Selectors_full +Utils +Pseudo +AO_Basis +Bitmask +SingleRefMethod +Electrons +MOGuess +Nuclei +Hartree_Fock +Integrals_Bielec cid -cid_lapack +cid_lapack \ No newline at end of file diff --git a/plugins/CID_SC2_selected/.gitignore b/plugins/CID_SC2_selected/.gitignore index 6e8f2ab1..c030dc88 100644 --- a/plugins/CID_SC2_selected/.gitignore +++ b/plugins/CID_SC2_selected/.gitignore @@ -1,35 +1,32 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps -CID_selected -Pseudo -Integrals_Monoelec -Bitmask -CID -Integrals_Bielec -CISD_selected -AOs -Selectors_full -MOs -Hartree_Fock -Perturbation -CISD -Determinants -Electrons -Utils -Properties -Nuclei -MOGuess -SingleRefMethod +ezfio_interface.irp.f Ezfio_files -cid_sc2_selection +Perturbation +Determinants +Integrals_Monoelec +MO_Basis +Selectors_full +SingleRefMethod +Utils +CID +Pseudo +Properties +Bitmask +AO_Basis +Electrons +MOGuess +CID_selected +Nuclei +Hartree_Fock +Integrals_Bielec +cid_sc2_selection \ No newline at end of file diff --git a/plugins/CID_selected/.gitignore b/plugins/CID_selected/.gitignore index 7b859906..9a0bd11e 100644 --- a/plugins/CID_selected/.gitignore +++ b/plugins/CID_selected/.gitignore @@ -1,33 +1,31 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps -Pseudo -Integrals_Monoelec -Bitmask -CID -Integrals_Bielec -AOs -Selectors_full -MOs -Hartree_Fock -Perturbation -CISD -Determinants -Electrons -Utils -Properties -Nuclei -MOGuess -SingleRefMethod +ezfio_interface.irp.f Ezfio_files -cid_selection +Perturbation +Determinants +Utils +Integrals_Monoelec +MO_Basis +Selectors_full +Integrals_Bielec +CID +Pseudo +AO_Basis +Bitmask +SingleRefMethod +Electrons +MOGuess +Nuclei +Hartree_Fock +Properties +cid_selection \ No newline at end of file diff --git a/plugins/CIS/.gitignore b/plugins/CIS/.gitignore index cb171efd..eb36f1dc 100644 --- a/plugins/CIS/.gitignore +++ b/plugins/CIS/.gitignore @@ -1,30 +1,29 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps -Pseudo -Integrals_Monoelec -Bitmask -Integrals_Bielec -AOs -Selectors_full -MOs -Hartree_Fock -Determinants -Electrons -Utils -Nuclei -MOGuess -SingleRefMethod +ezfio_interface.irp.f Ezfio_files +Determinants +Integrals_Monoelec +MO_Basis +Selectors_full +Utils +Pseudo +AO_Basis +Bitmask +SingleRefMethod +Electrons +MOGuess +Nuclei +Hartree_Fock +Integrals_Bielec super_ci -cis +cis \ No newline at end of file diff --git a/plugins/CISD/.gitignore b/plugins/CISD/.gitignore index 31d392bd..1a10284f 100644 --- a/plugins/CISD/.gitignore +++ b/plugins/CISD/.gitignore @@ -1,30 +1,29 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps -Pseudo -Integrals_Monoelec -Bitmask -Integrals_Bielec -AOs -Selectors_full -MOs -Hartree_Fock -Determinants -Electrons -Utils -Nuclei -MOGuess -SingleRefMethod +ezfio_interface.irp.f Ezfio_files +Determinants +Integrals_Monoelec +MO_Basis +Selectors_full +Utils +Pseudo +AO_Basis +Bitmask +SingleRefMethod +Electrons +MOGuess +Nuclei +Hartree_Fock +Integrals_Bielec cisd_lapack -cisd +cisd \ No newline at end of file diff --git a/plugins/DDCI_selected/.gitignore b/plugins/DDCI_selected/.gitignore index ec84a605..22fb64a1 100644 --- a/plugins/DDCI_selected/.gitignore +++ b/plugins/DDCI_selected/.gitignore @@ -1,31 +1,30 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps -Pseudo -Integrals_Monoelec -Generators_CAS -Bitmask -Integrals_Bielec -AOs -Selectors_full -MOs -Hartree_Fock +ezfio_interface.irp.f +Ezfio_files Perturbation Determinants -Electrons Utils -Properties -Nuclei +Integrals_Monoelec +MO_Basis +Selectors_full +Integrals_Bielec +Pseudo +Bitmask +Generators_CAS +AO_Basis +Electrons MOGuess -Ezfio_files -ddci +Nuclei +Hartree_Fock +Properties +ddci \ No newline at end of file diff --git a/plugins/FCIdump/.gitignore b/plugins/FCIdump/.gitignore index a637734f..795f6850 100644 --- a/plugins/FCIdump/.gitignore +++ b/plugins/FCIdump/.gitignore @@ -1,25 +1,24 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps -Pseudo -Integrals_Monoelec -Bitmask -Integrals_Bielec -AOs -MOs -Determinants -Electrons -Utils -Nuclei +ezfio_interface.irp.f Ezfio_files -fcidump +Determinants +Integrals_Monoelec +MO_Basis +Utils +Pseudo +Bitmask +AO_Basis +Electrons +Nuclei +Integrals_Bielec +fcidump \ No newline at end of file diff --git a/plugins/Full_CI/.gitignore b/plugins/Full_CI/.gitignore index df7eac39..5ebe1571 100644 --- a/plugins/Full_CI/.gitignore +++ b/plugins/Full_CI/.gitignore @@ -1,34 +1,33 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps -Generators_full -Pseudo -Integrals_Monoelec -Bitmask -Integrals_Bielec -AOs -Selectors_full -MOs -Hartree_Fock +ezfio_interface.irp.f +Ezfio_files Perturbation Determinants -Electrons Utils -Properties -Nuclei +Integrals_Monoelec +MO_Basis +Selectors_full +Integrals_Bielec +Pseudo +Generators_full +Bitmask +AO_Basis +Electrons MOGuess -Ezfio_files +Nuclei +Hartree_Fock +Properties target_pt2 full_ci var_pt2_ratio -full_ci_no_skip +full_ci_no_skip \ No newline at end of file diff --git a/plugins/Generators_CAS/.gitignore b/plugins/Generators_CAS/.gitignore index 955ad80c..1b17a42a 100644 --- a/plugins/Generators_CAS/.gitignore +++ b/plugins/Generators_CAS/.gitignore @@ -1,13 +1,23 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps +ezfio_interface.irp.f +Ezfio_files +Determinants +Integrals_Monoelec +MO_Basis +Utils +Pseudo +Bitmask +AO_Basis +Electrons +Nuclei +Integrals_Bielec \ No newline at end of file diff --git a/plugins/Generators_full/.gitignore b/plugins/Generators_full/.gitignore index 955ad80c..8d85dede 100644 --- a/plugins/Generators_full/.gitignore +++ b/plugins/Generators_full/.gitignore @@ -1,13 +1,25 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps +ezfio_interface.irp.f +Ezfio_files +Determinants +Integrals_Monoelec +MO_Basis +Utils +Pseudo +Bitmask +AO_Basis +Electrons +MOGuess +Nuclei +Hartree_Fock +Integrals_Bielec \ No newline at end of file diff --git a/plugins/Hartree_Fock/.gitignore b/plugins/Hartree_Fock/.gitignore index 0197ab71..c6be1d0d 100644 --- a/plugins/Hartree_Fock/.gitignore +++ b/plugins/Hartree_Fock/.gitignore @@ -1,26 +1,25 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps -Pseudo -Integrals_Monoelec -Bitmask -Integrals_Bielec -AOs -MOs -Electrons -Utils -Nuclei -MOGuess +ezfio_interface.irp.f Ezfio_files +Integrals_Monoelec +MO_Basis +Integrals_Bielec +Pseudo +Bitmask +AO_Basis +Electrons +MOGuess +Nuclei +Utils Huckel_guess -SCF +SCF \ No newline at end of file diff --git a/plugins/Hartree_Fock/test b/plugins/Hartree_Fock/test deleted file mode 100644 index e69de29b..00000000 diff --git a/plugins/MP2/.gitignore b/plugins/MP2/.gitignore index 999f9390..2b9a8b38 100644 --- a/plugins/MP2/.gitignore +++ b/plugins/MP2/.gitignore @@ -1,31 +1,30 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps -Pseudo -Integrals_Monoelec -Bitmask -Integrals_Bielec -AOs -Selectors_full -MOs -Hartree_Fock +ezfio_interface.irp.f +Ezfio_files Perturbation Determinants -Electrons Utils -Properties -Nuclei -MOGuess +Integrals_Monoelec +MO_Basis +Selectors_full +Integrals_Bielec +Pseudo +AO_Basis +Bitmask SingleRefMethod -Ezfio_files -mp2 +Electrons +MOGuess +Nuclei +Hartree_Fock +Properties +mp2 \ No newline at end of file diff --git a/plugins/MRCC/.gitignore b/plugins/MRCC/.gitignore index d634568f..21d10223 100644 --- a/plugins/MRCC/.gitignore +++ b/plugins/MRCC/.gitignore @@ -1,31 +1,30 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps -Generators_full -Pseudo -Integrals_Monoelec -Bitmask -Integrals_Bielec -AOs -Selectors_full -MOs -Hartree_Fock +ezfio_interface.irp.f +Ezfio_files Perturbation Determinants -Electrons Utils -Properties -Nuclei +Integrals_Monoelec +MO_Basis +Selectors_full +Integrals_Bielec +Pseudo +Generators_full +Bitmask +AO_Basis +Electrons MOGuess -Ezfio_files -mrcc +Nuclei +Hartree_Fock +Properties +mrcc \ No newline at end of file diff --git a/plugins/Perturbation/.gitignore b/plugins/Perturbation/.gitignore index 955ad80c..effe9ffc 100644 --- a/plugins/Perturbation/.gitignore +++ b/plugins/Perturbation/.gitignore @@ -1,13 +1,26 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps +ezfio_interface.irp.f +Ezfio_files +Determinants +Integrals_Monoelec +MO_Basis +Utils +Pseudo +Properties +Bitmask +AO_Basis +Electrons +MOGuess +Nuclei +Hartree_Fock +Integrals_Bielec \ No newline at end of file diff --git a/plugins/Properties/.gitignore b/plugins/Properties/.gitignore index 955ad80c..1b17a42a 100644 --- a/plugins/Properties/.gitignore +++ b/plugins/Properties/.gitignore @@ -1,13 +1,23 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps +ezfio_interface.irp.f +Ezfio_files +Determinants +Integrals_Monoelec +MO_Basis +Utils +Pseudo +Bitmask +AO_Basis +Electrons +Nuclei +Integrals_Bielec \ No newline at end of file diff --git a/plugins/Selectors_full/.gitignore b/plugins/Selectors_full/.gitignore index 955ad80c..8d85dede 100644 --- a/plugins/Selectors_full/.gitignore +++ b/plugins/Selectors_full/.gitignore @@ -1,13 +1,25 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps +ezfio_interface.irp.f +Ezfio_files +Determinants +Integrals_Monoelec +MO_Basis +Utils +Pseudo +Bitmask +AO_Basis +Electrons +MOGuess +Nuclei +Hartree_Fock +Integrals_Bielec \ No newline at end of file diff --git a/plugins/SingleRefMethod/.gitignore b/plugins/SingleRefMethod/.gitignore index 955ad80c..d85c570a 100644 --- a/plugins/SingleRefMethod/.gitignore +++ b/plugins/SingleRefMethod/.gitignore @@ -1,13 +1,19 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps +ezfio_interface.irp.f +Ezfio_files +MO_Basis +Utils +Bitmask +AO_Basis +Electrons +Nuclei \ No newline at end of file diff --git a/scripts/compilation/qp_create_ninja.py b/scripts/compilation/qp_create_ninja.py index 2c0c68b4..d9707dfb 100755 --- a/scripts/compilation/qp_create_ninja.py +++ b/scripts/compilation/qp_create_ninja.py @@ -257,7 +257,7 @@ def ninja_ezfio_rule(): install_lib_ezfio = join(QP_ROOT, 'install', 'EZFIO', "lib", "libezfio.a") l_cmd = ["cd {0}".format(QP_EZFIO)] + l_flag - l_cmd += ["ninja && ln -sf {0} {1}".format(install_lib_ezfio, EZFIO_LIB)] + l_cmd += ["rm -f make.config ; ninja && ln -sf {0} {1}".format(install_lib_ezfio, EZFIO_LIB)] l_string = ["rule build_ezfio", " command = {0}".format(" ; ".join(l_cmd)), @@ -320,6 +320,37 @@ def ninja_symlink_build(path_module, l_symlink): return l_string +# +# _ o _|_ o _ ._ _ ._ _ +# o (_| | |_ | (_| | | (_) | (/_ +# _| _| +def ninja_gitignore_rule(): + """ + Return the command to create the gitignore + """ + return ["rule build_gitignore", + " command = module_handler.py create_git_ignore $module_rel", + " description = Create gitignore for $module_rel", ""] + + +def ninja_gitignore_build(path_module, l_symlink, d_binaries): + """ + """ + + path_gitignore = join(path_module.abs, ".gitignore") + + l_b = [i.abs for i in d_binaries[path_module]] + l_sym = [i.destination for i in l_symlink] + + l_string = ["build {0}: build_gitignore {1} || {2}".format(path_gitignore, + " ".join(l_b), + " ".join(l_sym)), + " module_rel = {0}".format(path_module.rel), + ""] + + return l_string + + # _ _ _ # o ._ ._ _|_ (_| / \ ._ _ _. | _ # | | |_) | | \_/ o | | | (_| |< (/_ @@ -700,7 +731,7 @@ def create_build_ninja_module(path_module): " pool = console", " description = Compile all the module", ""] - l_string += ["rule make_clean", " command = clean_modules.sh", + l_string += ["rule make_clean", " command = module_handler.py clean {0}".format(path_module.rel), " description = Cleaning module {0}".format(path_module.rel), ""] @@ -787,6 +818,7 @@ if __name__ == "__main__": l_string += ninja_irpf90_make_rule() l_string += ninja_readme_rule() + l_string += ninja_gitignore_rule() l_string += ninja_binaries_rule() @@ -871,6 +903,8 @@ if __name__ == "__main__": l_string += ninja_binaries_build(module_to_compile, l_children, d_binaries) + l_string += ninja_gitignore_build(module_to_compile, l_symlink, d_binaries) + with open(join(QP_ROOT, "config", "build.ninja"), "w+") as f: f.write(header) f.write("\n".join(l_string)) diff --git a/scripts/module/clean_modules.sh b/scripts/module/clean_modules.sh deleted file mode 100755 index 4eae11c4..00000000 --- a/scripts/module/clean_modules.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# -# Cleans a module directory - -if [[ -z ${QP_ROOT} ]] -then - print "The QP_ROOT environment variable is not set." - print "Please reload the quantum_package.rc file." - exit -1 -fi -source ${QP_ROOT}/scripts/qp_include.sh - -function do_clean() -{ - rm -rf -- \ - IRPF90_temp IRPF90_man \ - $(module_handler.py print_descendant) include \ - ezfio_interface.irp.f irpf90.make irpf90_entities tags $(ls_exe) *.mod -} - -if [[ -z $1 ]] -then - check_current_dir_is_module - do_clean -else - check_current_dir_is_src - for i in $@ - do - if [[ -d $i ]] - then - cd $i - do_clean - cd $OLDPWD - fi - done -fi - diff --git a/scripts/module/module_handler.py b/scripts/module/module_handler.py index 9a9910f6..8301e0b1 100755 --- a/scripts/module/module_handler.py +++ b/scripts/module/module_handler.py @@ -7,6 +7,7 @@ Usage: module_handler.py print_descendant [...] module_handler.py create_png [...] module_handler.py clean [...] + module_handler.py create_git_ignore [...] Options: print_descendant Print the genealogy of the NEEDED_CHILDREN_MODULES @@ -18,6 +19,7 @@ Options: import os import sys import os.path +import shutil try: from docopt import docopt @@ -34,6 +36,10 @@ def is_module(path_module): "NEEDED_CHILDREN_MODULES")) +def is_exe(fpath): + return os.path.isfile(fpath) and os.access(fpath, os.X_OK) + + def get_dict_child(l_root_abs=None): """Loop over MODULE in QP_ROOT/src, open all the NEEDED_CHILDREN_MODULES and create a dict[MODULE] = [sub module needed, ...] @@ -227,37 +233,48 @@ if __name__ == '__main__': if arguments["create_png"]: m.create_png(l_module) - if arguments["clean"]: + if arguments["clean"] or arguments["create_git_ignore"]: + + l_dir = ['IRPF90_temp', 'IRPF90_man'] + l_file = ["irpf90_entities", "tags", "irpf90.make", + "Makefile", "Makefile.depend", + "build.ninja", ".ninja_log", ".ninja_deps", + "ezfio_interface.irp.f"] + for module in l_module: module_abs = os.path.realpath(os.path.join(QP_SRC, module)) + l_symlink = m.l_descendant_unique([module]) + l_exe = [f for f in os.listdir(module_abs) if is_exe(os.path.join(module_abs,f))] - import shutil + if arguments["clean"]: + for f in l_dir: + try: + shutil.rmtree(os.path.join(module_abs, f)) + except: + pass - for f in ['IRPF90_temp', 'IRPF90_man']: - try: - shutil.rmtree(os.path.join(module_abs, f)) - except: - pass + for symlink in l_symlink: + try: + os.unlink(os.path.join(module_abs, symlink)) + except: + pass - for symlink in m.l_descendant_unique([module]): - try: - os.unlink(os.path.join(module_abs,symlink)) - except: - pass - - for f in ["irpf90_entities", "tags", "irpf90.make", "Makefile"]: - try: - os.remove(os.path.join(module_abs,f)) - except: - pass - - for f in os.listdir(module_abs): - - def is_exe(fpath): - return os.path.isfile(fpath) and os.access(fpath, os.X_OK) - - if is_exe(f): + for f in l_file: try: os.remove(os.path.join(module_abs, f)) except: pass + + for f in l_exe: + + try: + os.remove(os.path.join(module_abs, f)) + except: + pass + + if arguments["create_git_ignore"]: + path = os.path.join(module_abs, ".gitignore") + + with open(path, "w+") as f: + f.write("# Automatically created by {0} \n".format(__file__)) + f.write("\n".join(l_dir + l_file + l_symlink + l_exe)) diff --git a/scripts/qp_include.sh b/scripts/qp_include.sh deleted file mode 100644 index f67e942f..00000000 --- a/scripts/qp_include.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash -# -# Useful functions in all scripts - -# Make a list unique -function unique_list() -{ - for d in $@ - do - echo $d - done | sort | uniq -} - -function check_current_dir_is_src() -{ - if [[ "${PWD}" == "${QP_ROOT}/src" ]] - then - return 0 - else - echo "Current directory should be \$QP_ROOT/src" - exit -1 - fi -} - -function check_current_dir_is_module() -{ - # If the prefix ${QP_ROOT}/src/ can be removed from $PWD, it means that - # $PWD is somewhere below ${QP_ROOT}/src/ so it is a module. - # If the prefix ${QP_ROOT}/src/ can not be removed from $PWD, then - # "${PWD##${QP_ROOT}/src/}" == "$PWD". - - if [[ "${PWD##${QP_ROOT}/src/}" != "$PWD" ]] - then - return 0 - else - echo "You are not in a submodule" - exit -1 - fi -} - -# List of executables in the current directory -function ls_exe() -{ - find . -perm /u+x -type f -} - -function asksure() { - echo -n $@ "(Y/N) " - answer=w - while [[ $answer != [YyNn] ]] - do - read answer - [[ $answer = [Yy] ]] && retval=0 || retval=1 - done - return $retval -} - -function error() -{ - echo "-------------------- Error --------------------" - printf "$@\n" - echo "-----------------------------------------------" - exit -1 -} - -if [[ -z ${DEBUG} ]] -then - function info () - { - : - } -else - function info () - { - echo "$@" - } -fi - diff --git a/src/.gitignore b/src/.gitignore index 1f87bdc1..9bba1426 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,2 +1,25 @@ -Makefile.config -ezfio_interface.irp.f +CAS_SD +CID +CID_SC2_selected +CID_selected +CIS +CISD +CISD_SC2_selected +CISD_selected +DDCI_selected +DensityMatrix +FCIdump +Full_CI +Generators_CAS +Generators_full +Generators_restart +Hartree_Fock +Molden +MP2 +MRCC +Perturbation +Properties +QmcChem +Selectors_full +Selectors_no_sorted +SingleRefMethod diff --git a/src/AO_Basis/.gitignore b/src/AO_Basis/.gitignore index 955ad80c..7305be49 100644 --- a/src/AO_Basis/.gitignore +++ b/src/AO_Basis/.gitignore @@ -1,13 +1,15 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps +ezfio_interface.irp.f +Nuclei +Ezfio_files +Utils \ No newline at end of file diff --git a/src/Bitmask/.gitignore b/src/Bitmask/.gitignore index 955ad80c..2b7b2272 100644 --- a/src/Bitmask/.gitignore +++ b/src/Bitmask/.gitignore @@ -1,13 +1,18 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps +ezfio_interface.irp.f +Ezfio_files +MO_Basis +Utils +AO_Basis +Electrons +Nuclei \ No newline at end of file diff --git a/src/Determinants/.gitignore b/src/Determinants/.gitignore index c8587494..06120dcd 100644 --- a/src/Determinants/.gitignore +++ b/src/Determinants/.gitignore @@ -1,32 +1,30 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps -Pseudo -Integrals_Monoelec -Bitmask -Integrals_Bielec -AOs -MOs -Electrons -Utils -Nuclei +ezfio_interface.irp.f Ezfio_files +Integrals_Monoelec +MO_Basis +Utils +Pseudo +Bitmask +AO_Basis +Electrons +Nuclei +Integrals_Bielec guess_triplet guess_singlet truncate_wf save_natorb -save_for_qmcchem -program_beginer_determinants +program_initial_determinants save_for_casino det_svd -guess_doublet +guess_doublet \ No newline at end of file diff --git a/src/Electrons/.gitignore b/src/Electrons/.gitignore index 955ad80c..b2bd2f7f 100644 --- a/src/Electrons/.gitignore +++ b/src/Electrons/.gitignore @@ -1,13 +1,13 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps +ezfio_interface.irp.f +Ezfio_files \ No newline at end of file diff --git a/src/Ezfio_files/.gitignore b/src/Ezfio_files/.gitignore index 955ad80c..85ad9d4e 100644 --- a/src/Ezfio_files/.gitignore +++ b/src/Ezfio_files/.gitignore @@ -1,13 +1,12 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps +ezfio_interface.irp.f \ No newline at end of file diff --git a/src/Ezfio_files/README.rst b/src/Ezfio_files/README.rst index 13b9f3f0..65ccb7e8 100644 --- a/src/Ezfio_files/README.rst +++ b/src/Ezfio_files/README.rst @@ -54,103 +54,79 @@ Documentation Output file for CID_selected -`output_cis `_ - Output file for CIS - - -`output_cisd `_ - Output file for CISD - - `output_cpu_time_0 `_ Initial CPU and wall times when printing in the output files -`output_ddci_selected `_ - Output file for DDCI_selected - - -`output_determinants `_ +`output_determinants `_ Output file for Determinants -`output_electrons `_ +`output_electrons `_ Output file for Electrons -`output_ezfio_files `_ +`output_ezfio_files `_ Output file for Ezfio_files -`output_fcidump `_ - Output file for FCIdump - - -`output_full_ci `_ - Output file for Full_CI - - -`output_generators_cas `_ +`output_generators_cas `_ Output file for Generators_CAS -`output_generators_full `_ +`output_generators_full `_ Output file for Generators_full -`output_hartree_fock `_ +`output_hartree_fock `_ Output file for Hartree_Fock -`output_integrals_bielec `_ +`output_integrals_bielec `_ Output file for Integrals_Bielec -`output_integrals_monoelec `_ +`output_integrals_monoelec `_ Output file for Integrals_Monoelec -`output_mo_basis `_ +`output_mo_basis `_ Output file for MO_Basis -`output_moguess `_ +`output_moguess `_ Output file for MOGuess -`output_mp2 `_ - Output file for MP2 - - -`output_mrcc `_ +`output_mrcc `_ Output file for MRCC -`output_nuclei `_ +`output_nuclei `_ Output file for Nuclei -`output_perturbation `_ +`output_perturbation `_ Output file for Perturbation -`output_properties `_ +`output_properties `_ Output file for Properties -`output_pseudo `_ +`output_pseudo `_ Output file for Pseudo -`output_selectors_full `_ +`output_selectors_full `_ Output file for Selectors_full -`output_singlerefmethod `_ +`output_singlerefmethod `_ Output file for SingleRefMethod -`output_utils `_ +`output_utils `_ Output file for Utils diff --git a/src/Integrals_Bielec/.gitignore b/src/Integrals_Bielec/.gitignore index 955ad80c..54da4aed 100644 --- a/src/Integrals_Bielec/.gitignore +++ b/src/Integrals_Bielec/.gitignore @@ -1,13 +1,20 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps +ezfio_interface.irp.f +Ezfio_files +MO_Basis +Utils +Pseudo +Bitmask +AO_Basis +Electrons +Nuclei \ No newline at end of file diff --git a/src/Integrals_Monoelec/.gitignore b/src/Integrals_Monoelec/.gitignore index 5cb6d504..6a1ebe1f 100644 --- a/src/Integrals_Monoelec/.gitignore +++ b/src/Integrals_Monoelec/.gitignore @@ -1,22 +1,21 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps -Pseudo -AOs -MOs -Electrons -Utils -Nuclei +ezfio_interface.irp.f Ezfio_files +MO_Basis +Utils +Pseudo +AO_Basis +Electrons +Nuclei check_orthonormality -save_ortho_mos +save_ortho_mos \ No newline at end of file diff --git a/src/MOGuess/.gitignore b/src/MOGuess/.gitignore index f87a185b..e57e3bac 100644 --- a/src/MOGuess/.gitignore +++ b/src/MOGuess/.gitignore @@ -1,22 +1,21 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps -Pseudo -Integrals_Monoelec -AOs -MOs -Electrons -Utils -Nuclei +ezfio_interface.irp.f Ezfio_files -H_CORE_guess +Integrals_Monoelec +MO_Basis +Utils +Pseudo +AO_Basis +Electrons +Nuclei +H_CORE_guess \ No newline at end of file diff --git a/src/MO_Basis/.gitignore b/src/MO_Basis/.gitignore index 955ad80c..8eb04d30 100644 --- a/src/MO_Basis/.gitignore +++ b/src/MO_Basis/.gitignore @@ -1,13 +1,17 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps +ezfio_interface.irp.f +Utils +Nuclei +AO_Basis +Electrons +Ezfio_files \ No newline at end of file diff --git a/src/Nuclei/.gitignore b/src/Nuclei/.gitignore index 955ad80c..f09c71f7 100644 --- a/src/Nuclei/.gitignore +++ b/src/Nuclei/.gitignore @@ -1,13 +1,14 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps +ezfio_interface.irp.f +Ezfio_files +Utils \ No newline at end of file diff --git a/src/Pseudo/.gitignore b/src/Pseudo/.gitignore index 955ad80c..7305be49 100644 --- a/src/Pseudo/.gitignore +++ b/src/Pseudo/.gitignore @@ -1,13 +1,15 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps +ezfio_interface.irp.f +Nuclei +Ezfio_files +Utils \ No newline at end of file diff --git a/src/Utils/.gitignore b/src/Utils/.gitignore index 955ad80c..85ad9d4e 100644 --- a/src/Utils/.gitignore +++ b/src/Utils/.gitignore @@ -1,13 +1,12 @@ -# -# Do not modify this file. Add your ignored files to the gitignore -# (without the dot at the beginning) file. -# +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man -irpf90.make -tags -Makefile.depend irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend build.ninja .ninja_log .ninja_deps +ezfio_interface.irp.f \ No newline at end of file