diff --git a/.travis.yml b/.travis.yml index 43eee06c..0e5f92ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ before_script: - sudo apt-get install graphviz script: - - ./configure.py --production ./config/gfortran.cfg + - ./configure --production ./config/gfortran.cfg - source ./quantum_package.rc - ninja - cd ocaml ; make ; cd - diff --git a/config/gfortran.cfg b/config/gfortran.cfg index 2e1206d4..d84d8486 100644 --- a/config/gfortran.cfg +++ b/config/gfortran.cfg @@ -29,21 +29,20 @@ OPENMP : 1 ; Append OpenMP flags # Optimization flags #################### # -# -march=native : Compile a binary optimized for the current architecture # -Ofast : Disregard strict standards compliance. Enables all -O3 optimizations. # It also enables optimizations that are not valid # for all standard-compliant programs. It turns on # -ffast-math and the Fortran-specific # -fno-protect-parens and -fstack-arrays. [OPT] -FCFLAGS : -Ofast -march=native +FCFLAGS : -Ofast # Profiling flags ################# # [PROFILE] FC : -p -g -FCFLAGS : -Ofast -march=native +FCFLAGS : -Ofast # Debugging flags ################# diff --git a/configure.py b/configure similarity index 92% rename from configure.py rename to configure index 76410b1a..b810f600 100755 --- a/configure.py +++ b/configure @@ -4,14 +4,22 @@ Usage: configure (--production | --development) + Options: - config_file A config file will all the information for the compilation - (Fortran Compiler, FLag, ...) - --production You cannot compile only one module with this flag. - but the compilation will be lighting fast + + config_file A config file with all the information for the compilation + Example config_files are given in config/ + + --production You can only compile all the modules with this flag, + but the compilation will be lighting fast + --development It will create a build.ninja for each directory - who containt a binary, than you can compile then - individualy if you want + who contains a binary, than you can compile then + individualy if you want + +Example: + + ./configure config/gfortran.cfg --production """ @@ -37,6 +45,8 @@ QP_ROOT = os.getcwd() QP_ROOT_BIN = join(QP_ROOT, "bin") QP_ROOT_INSTALL = join(QP_ROOT, "install") +os.environ["PATH"] = os.environ["PATH"] + ":"+QP_ROOT_BIN + d_dependency = { "ocaml": ["m4", "curl", "zlib", "patch", "gcc"], "m4": ["make"], @@ -62,7 +72,7 @@ path_github = {"head": "http://github.com/", "tail": "archive/master.tar.gz"} ocaml = Info( url='http://raw.github.com/ocaml/opam/master/shell/opam_installer.sh', - description=' ocaml (it will take some time roughly 20min)', + description=' Ocaml, Opam and the Core library (it will take some time roughly 20min)', default_path=join(QP_ROOT_BIN, "opam")) m4 = Info( @@ -87,12 +97,12 @@ path = Info( irpf90 = Info( url='{head}/LCPQ/irpf90/{tail}'.format(**path_github), - description=' irpf90', + description=' IRPF90', default_path=join(QP_ROOT_BIN, "irpf90")) docopt = Info( url='{head}/docopt/docopt/{tail}'.format(**path_github), - description=' docop', + description=' docopt', default_path=join(QP_ROOT_INSTALL, "docopt")) resultsFile = Info( @@ -108,7 +118,7 @@ ninja = Info( emsl = Info( url='{head}/LCPQ/EMSL_Basis_Set_Exchange_Local/{tail}'.format(** path_github), - description=' emsl', + description=' EMSL basis set library', default_path=join(QP_ROOT_INSTALL, "emsl")) ezfio = Info( @@ -118,7 +128,7 @@ ezfio = Info( d_info = dict() -for m in ["ocaml", "m4", "curl", "zlib", "path", "irpf90", "docopt", +for m in ["ocaml", "m4", "curl", "zlib", "path", "irpf90", "docopt", "resultsFile", "ninja", "emsl", "ezfio"]: exec ("d_info['{0}']={0}".format(m)) @@ -178,7 +188,7 @@ def checking(d_dependency): print "To old version (need >2.5). Abort" sys.exit(1) - def check_availabiliy(binary): + def check_availability(binary): """ If avalabie return the path who can can't find the binary else return 0 @@ -228,7 +238,7 @@ def checking(d_dependency): for i in d_dependency.keys(): print "Checking {0:>{1}}...".format(i, length), - r = check_availabiliy(i) + r = check_availability(i) if r: print "[ OK ] ( {0} )".format(r.strip()) l_installed[i] = r.strip() @@ -289,7 +299,7 @@ _|_ | | _> |_ (_| | | (_| |_ | (_) | | d_print = { "install_ninja": "Install ninja...", "build": "Creating build.ninja...", - "install": "Installing the dependancy through ninja..." + "install": "Installing the dependency through ninja..." } length = max(map(len, d_print.values())) @@ -339,15 +349,15 @@ _|_ | | _> |_ (_| | | (_| |_ | (_) | | ""] # Build to install - l_dependancy = [d_info[i].default_path for i in d_dependency[need] + l_dependency = [d_info[i].default_path for i in d_dependency[need] if i in l_install_descendant] - str_dependancy = " ".join(l_dependancy) + str_dependency = " ".join(l_dependency) rule = "install" if need != "ocaml" else "install_verbose" l_build += ["build {0}: {1} {2} {3}".format(default_path, rule, archive_path, - str_dependancy), + str_dependency), " target = {0}".format(need), " descr = {0}".format(descr), ""] diff --git a/doc/code_architecture/Script.md b/doc/code_architecture/Script.md index 6c5ff34a..ba918f78 100644 --- a/doc/code_architecture/Script.md +++ b/doc/code_architecture/Script.md @@ -12,7 +12,7 @@ For more information you can type `ei_handler.py -h` # `module_handler.py` This script in located in `$QP_ROOT/scripts/module/`. -It provide all the resource related to the tree dependancy of the modules. +It provide all the resource related to the tree dependency of the modules. If more useful as a librairy than a cli. It have some usefull property: diff --git a/install/scripts/install_ocaml.sh b/install/scripts/install_ocaml.sh index 34410c62..5c9bb89e 100755 --- a/install/scripts/install_ocaml.sh +++ b/install/scripts/install_ocaml.sh @@ -32,7 +32,10 @@ export LIBRARY_PATH=${QP_ROOT}/lib:${LIBRARY_PATH} export C_INCLUDE_PATH=${QP_ROOT}/lib:${C_INCLUDE_PATH} source ${HOME}/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true -${QP_ROOT}/bin/opam install ${PACKAGES} -y -q || exit 1 + +NCPUs=$(cat /proc/cpuinfo | grep -i MHz | wc -l) +${QP_ROOT}/bin/opam install -j ${NCPUs} ${PACKAGES} -y -q || exit 1 + rm -f ../_build/ocaml.log exit 0 diff --git a/install/scripts/install_zlib.sh b/install/scripts/install_zlib.sh index 26139f5c..06ce67f3 100755 --- a/install/scripts/install_zlib.sh +++ b/install/scripts/install_zlib.sh @@ -14,6 +14,8 @@ function _install() make install prefix=$QP_ROOT/install/${TARGET} || exit 1 ln -s -f $QP_ROOT/install/${TARGET}/lib/libz.so $QP_ROOT/lib || exit 1 ln -s -f $QP_ROOT/install/${TARGET}/lib/libz.a $QP_ROOT/lib || exit 1 + ln -s -f $QP_ROOT/install/${TARGET}/include/zlib.h $QP_ROOT/lib || exit 1 + ln -s -f $QP_ROOT/install/${TARGET}/include/zconf.h $QP_ROOT/lib || exit 1 } source scripts/build.sh diff --git a/ocaml/.gitignore b/ocaml/.gitignore index e63d3ecc..cbd77939 100644 --- a/ocaml/.gitignore +++ b/ocaml/.gitignore @@ -5,6 +5,7 @@ qptypes_generator.byte _build qp_basis_clean.native qp_create_ezfio_from_xyz.native +qp_edit.native qp_print.native qp_run.native qp_set_ddci.native @@ -32,6 +33,7 @@ test_molecule test_point3d qp_basis_clean qp_create_ezfio_from_xyz +qp_edit qp_print qp_run qp_set_ddci diff --git a/ocaml/Makefile b/ocaml/Makefile index 6bf8d81b..53a750b6 100644 --- a/ocaml/Makefile +++ b/ocaml/Makefile @@ -72,7 +72,7 @@ Qptypes.ml: qptypes_generator.byte ./qptypes_generator.byte > Qptypes.ml ${QP_ROOT}/install/EZFIO/Ocaml/ezfio.ml: - $(MAKE) -C ${QP_ROOT}/install/src ezfio + $(NINJA) -C ${QP_ROOT}/install/EZFIO Input_auto_generated.ml qp_edit.ml: ei_handler.py ocaml_global diff --git a/ocaml/Qpackage.ml b/ocaml/Qpackage.ml index ef4476c6..3656327f 100644 --- a/ocaml/Qpackage.ml +++ b/ocaml/Qpackage.ml @@ -109,7 +109,11 @@ let get_ezfio_default directory data = let dirname = root^"/data/ezfio_defaults/" in let rec aux = function - | [] -> raise Not_found + | [] -> + begin + Printf.printf "%s/%s not found\n%!" directory data; + raise Not_found + end | filename :: tail -> let filename = dirname^filename diff --git a/scripts/compilation/qp_create_ninja.py b/scripts/compilation/qp_create_ninja.py index 05cc4be3..9277b276 100755 --- a/scripts/compilation/qp_create_ninja.py +++ b/scripts/compilation/qp_create_ninja.py @@ -38,10 +38,10 @@ header = r"""# # # https://github.com/LCPQ/quantum_package, # -# Generated automatically by {0}.".format(__file__) +# Generated automatically by {0} # # -""" +""".format(__file__) # __ # /__ | _ |_ _. | _. ._ o _. |_ | _ _ diff --git a/src/CID_selected/README.rst b/src/CID_selected/README.rst index ad309857..5a56d57a 100644 --- a/src/CID_selected/README.rst +++ b/src/CID_selected/README.rst @@ -33,120 +33,120 @@ Documentation Assume N_int is already provided. -`h_apply_cisd_selection_dipole_moment_z `_ +`h_apply_cisd_selection_dipole_moment_z `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_dipole_moment_z_diexc `_ +`h_apply_cisd_selection_dipole_moment_z_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_dipole_moment_z_monoexc `_ +`h_apply_cisd_selection_dipole_moment_z_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet `_ +`h_apply_cisd_selection_epstein_nesbet `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_2x2 `_ +`h_apply_cisd_selection_epstein_nesbet_2x2 `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_2x2_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_2x2_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_2x2_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_2x2_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2 `_ +`h_apply_cisd_selection_epstein_nesbet_sc2 `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_sc2_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_projected `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_projected `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_sc2_projected_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_projected_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_projected_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_projected_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_h_core `_ +`h_apply_cisd_selection_h_core `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_h_core_diexc `_ +`h_apply_cisd_selection_h_core_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_h_core_monoexc `_ +`h_apply_cisd_selection_h_core_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. diff --git a/src/CISD_selected/README.rst b/src/CISD_selected/README.rst index 230df80c..00ef10bb 100644 --- a/src/CISD_selected/README.rst +++ b/src/CISD_selected/README.rst @@ -33,120 +33,120 @@ Documentation Assume N_int is already provided. -`h_apply_cisd_selection_dipole_moment_z `_ +`h_apply_cisd_selection_dipole_moment_z `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_dipole_moment_z_diexc `_ +`h_apply_cisd_selection_dipole_moment_z_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_dipole_moment_z_monoexc `_ +`h_apply_cisd_selection_dipole_moment_z_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet `_ +`h_apply_cisd_selection_epstein_nesbet `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_2x2 `_ +`h_apply_cisd_selection_epstein_nesbet_2x2 `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_2x2_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_2x2_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_2x2_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_2x2_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2 `_ +`h_apply_cisd_selection_epstein_nesbet_sc2 `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_sc2_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_projected `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_projected `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_sc2_projected_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_projected_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_projected_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_projected_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_h_core `_ +`h_apply_cisd_selection_h_core `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_h_core_diexc `_ +`h_apply_cisd_selection_h_core_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_h_core_monoexc `_ +`h_apply_cisd_selection_h_core_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. diff --git a/src/Hartree_Fock/EZFIO.cfg b/src/Hartree_Fock/EZFIO.cfg index 6410df46..e2b0ea5a 100644 --- a/src/Hartree_Fock/EZFIO.cfg +++ b/src/Hartree_Fock/EZFIO.cfg @@ -20,8 +20,3 @@ default: Huckel type: double precision doc: Calculated HF energy interface: output - -[energy_sdfsdf] -type: double precision -doc: Calculated HF energy -interface: output