diff --git a/configure b/configure index 6e73d312..58367ac5 100755 --- a/configure +++ b/configure @@ -45,7 +45,7 @@ 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 +os.environ["PATH"] = os.environ["PATH"] + ":" + QP_ROOT_BIN d_dependency = { "ocaml": ["m4", "curl", "zlib", "patch", "gcc"], @@ -72,7 +72,8 @@ 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, Opam and the Core library (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( @@ -128,12 +129,12 @@ 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)) -def find_path(bin_, l_installed): +def find_path(bin_, l_installed, var_for_qp_root=False): """Use the global variable * l_installed * d_info @@ -143,6 +144,10 @@ def find_path(bin_, l_installed): locate = l_installed[bin_] except KeyError: locate = d_info[bin_].default_path + + if var_for_qp_root: + locate = locate.replace(QP_ROOT, "${QP_ROOT}") + return locate @@ -158,7 +163,8 @@ def check_output(*popenargs, **kwargs): >>> check_output(['/usr/bin/python', '--version']) Python 2.6.2 """ - process = subprocess.Popen(stdout=subprocess.PIPE,stderr=subprocess.PIPE, *popenargs, **kwargs) + process = subprocess.Popen(stdout=subprocess.PIPE, + stderr=subprocess.PIPE, *popenargs, **kwargs) output, unused_err = process.communicate() retcode = process.poll() if retcode: @@ -277,7 +283,8 @@ def installation(l_install_descendant): def create_rule_ninja(): l_rules = [ - "rule download", " command = wget --no-check-certificate ${url} -O ${out} -o /dev/null", + "rule download", + " command = wget --no-check-certificate ${url} -O ${out} -o /dev/null", " description = Downloading ${descr}", "" ] @@ -429,12 +436,15 @@ def create_ninja_and_rc(l_installed): if os.path.isdir(path): l_python.append(path) - l_rc = [ 'export QP_ROOT={0}'.format(QP_ROOT) ] + \ - [ i.replace(QP_ROOT,"${QP_ROOT}") for i in - [ - 'export QP_EZFIO={0}'.format(find_path('ezfio', l_installed)), - 'export IRPF90={0}'.format(find_path("irpf90", l_installed)), - 'export NINJA={0}'.format(find_path("ninja", l_installed)), + path_ezfio = find_path('ezfio', l_installed, var_for_qp_root=True) + path_irpf90 = find_path("irpf90", l_installed, var_for_qp_root=True) + path_ninja = find_path("ninja", l_installed, var_for_qp_root=True) + + l_rc = [ + 'export QP_ROOT={0}'.format(QP_ROOT), + 'export QP_EZFIO={0}'.format(path_ezfio), + 'export IRPF90={0}'.format(path_irpf90), + 'export NINJA={0}'.format(path_ninja), 'export QP_PYTHON={0}'.format(":".join(l_python)), "", 'export PYTHONPATH="${QP_PYTHON}":"${PYTHONPATH}"', 'export PATH="${QP_PYTHON}":"${QP_ROOT}"/bin:"${QP_ROOT}"/ocaml:"${PATH}"', @@ -443,7 +453,7 @@ def create_ninja_and_rc(l_installed): 'source ${QP_ROOT}/install/EZFIO/Bash/ezfio.sh', "", 'source ${HOME}/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true', "" - ] ] + ] path = join(QP_ROOT, "quantum_package.rc") with open(path, "w+") as f: @@ -451,16 +461,14 @@ def create_ninja_and_rc(l_installed): print "[ OK ] ({0})".format(path) - print str_info("build"), - command = ['bash', '-c', 'source {0} && env'.format(path)] - proc = subprocess.Popen(command, stdout=subprocess.PIPE) - for line in proc.stdout: (key, _, value) = line.partition("=") os.environ[key] = value.strip() + print str_info("build"), + qp_create_ninja = os.path.join(QP_ROOT, "scripts", "compilation", "qp_create_ninja.py") @@ -474,7 +482,6 @@ def create_ninja_and_rc(l_installed): def recommendation(): - print "Last Step:" path = join(QP_ROOT, "quantum_package.rc") print "Now :" print " source {0}".format(path) diff --git a/ocaml/Makefile b/ocaml/Makefile index 53a750b6..07803368 100644 --- a/ocaml/Makefile +++ b/ocaml/Makefile @@ -18,7 +18,7 @@ MLIFILES=$(wildcard *.mli) ALL_TESTS=$(patsubst %.ml,%.byte,$(wildcard test_*.ml)) ALL_EXE=$(patsubst %.ml,%.native,$(wildcard qp_*.ml)) qp_edit.native -.PHONY: executables default +.PHONY: executables default remake_executables default: $(ALL_TESTS) $(ALL_EXE) .gitignore @@ -34,7 +34,7 @@ default: $(ALL_TESTS) $(ALL_EXE) .gitignore executables: $(QP_ROOT)/data/executables -$(QP_ROOT)/data/executables: +$(QP_ROOT)/data/executables: remake_executables $(QP_ROOT)/scripts/module/create_executables_list.sh external_libs: diff --git a/plugins/Casino/.gitignore b/plugins/Casino/.gitignore new file mode 100644 index 00000000..acf88165 --- /dev/null +++ b/plugins/Casino/.gitignore @@ -0,0 +1,23 @@ +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py +IRPF90_temp +IRPF90_man +irpf90_entities +tags +irpf90.make +Makefile +Makefile.depend +.ninja_log +.ninja_deps +ezfio_interface.irp.f +Ezfio_files +Determinants +Integrals_Monoelec +MO_Basis +Utils +Pseudo +Bitmask +AO_Basis +Electrons +Nuclei +Integrals_Bielec +save_for_casino \ No newline at end of file diff --git a/plugins/Casino/NEEDED_CHILDREN_MODULES b/plugins/Casino/NEEDED_CHILDREN_MODULES new file mode 100644 index 00000000..aae89501 --- /dev/null +++ b/plugins/Casino/NEEDED_CHILDREN_MODULES @@ -0,0 +1 @@ +Determinants diff --git a/plugins/Casino/README.rst b/plugins/Casino/README.rst new file mode 100644 index 00000000..02d9dc66 --- /dev/null +++ b/plugins/Casino/README.rst @@ -0,0 +1,27 @@ +====== +Casino +====== + +Documentation +============= + +.. Do not edit this section. It was auto-generated from the +.. by the `update_README.py` script. + +`prog_save_casino `_ + Undocumented + + +`save_casino `_ + Undocumented + +Needed Modules +============== + +.. Do not edit this section. It was auto-generated from the +.. by the `update_README.py` script. + +.. image:: tree_dependency.png + +* `Determinants `_ + diff --git a/src/Determinants/save_for_casino.irp.f b/plugins/Casino/save_for_casino.irp.f similarity index 100% rename from src/Determinants/save_for_casino.irp.f rename to plugins/Casino/save_for_casino.irp.f diff --git a/plugins/Casino/tree_dependency.png b/plugins/Casino/tree_dependency.png new file mode 100644 index 00000000..98994c93 Binary files /dev/null and b/plugins/Casino/tree_dependency.png differ diff --git a/plugins/Full_CI/.gitignore b/plugins/Full_CI/.gitignore index d2c39df7..57302ebb 100644 --- a/plugins/Full_CI/.gitignore +++ b/plugins/Full_CI/.gitignore @@ -1,4 +1,4 @@ -# Automatically created by /home/scemama/quantum_package/scripts/module/module_handler.py +# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py IRPF90_temp IRPF90_man irpf90_entities @@ -27,6 +27,6 @@ Nuclei Hartree_Fock Properties target_pt2 -full_ci_no_skip +full_ci var_pt2_ratio -full_ci \ No newline at end of file +full_ci_no_skip \ No newline at end of file diff --git a/plugins/Perturbation/README.rst b/plugins/Perturbation/README.rst index 7be62489..9162e94b 100644 --- a/plugins/Perturbation/README.rst +++ b/plugins/Perturbation/README.rst @@ -85,92 +85,92 @@ Documentation Undocumented -`perturb_buffer_by_mono_delta_rho_one_point `_ +`perturb_buffer_by_mono_delta_rho_one_point `_ Applly pertubration ``delta_rho_one_point`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_by_mono_dipole_moment_z `_ +`perturb_buffer_by_mono_dipole_moment_z `_ Applly pertubration ``dipole_moment_z`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_by_mono_epstein_nesbet `_ +`perturb_buffer_by_mono_epstein_nesbet `_ Applly pertubration ``epstein_nesbet`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_by_mono_epstein_nesbet_2x2 `_ +`perturb_buffer_by_mono_epstein_nesbet_2x2 `_ Applly pertubration ``epstein_nesbet_2x2`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_by_mono_epstein_nesbet_sc2 `_ +`perturb_buffer_by_mono_epstein_nesbet_sc2 `_ Applly pertubration ``epstein_nesbet_sc2`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_by_mono_epstein_nesbet_sc2_no_projected `_ +`perturb_buffer_by_mono_epstein_nesbet_sc2_no_projected `_ Applly pertubration ``epstein_nesbet_sc2_no_projected`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_by_mono_epstein_nesbet_sc2_projected `_ +`perturb_buffer_by_mono_epstein_nesbet_sc2_projected `_ Applly pertubration ``epstein_nesbet_sc2_projected`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_by_mono_h_core `_ +`perturb_buffer_by_mono_h_core `_ Applly pertubration ``h_core`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_by_mono_moller_plesset `_ +`perturb_buffer_by_mono_moller_plesset `_ Applly pertubration ``moller_plesset`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_delta_rho_one_point `_ +`perturb_buffer_delta_rho_one_point `_ Applly pertubration ``delta_rho_one_point`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_dipole_moment_z `_ +`perturb_buffer_dipole_moment_z `_ Applly pertubration ``dipole_moment_z`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_epstein_nesbet `_ +`perturb_buffer_epstein_nesbet `_ Applly pertubration ``epstein_nesbet`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_epstein_nesbet_2x2 `_ +`perturb_buffer_epstein_nesbet_2x2 `_ Applly pertubration ``epstein_nesbet_2x2`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_epstein_nesbet_sc2 `_ +`perturb_buffer_epstein_nesbet_sc2 `_ Applly pertubration ``epstein_nesbet_sc2`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_epstein_nesbet_sc2_no_projected `_ +`perturb_buffer_epstein_nesbet_sc2_no_projected `_ Applly pertubration ``epstein_nesbet_sc2_no_projected`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_epstein_nesbet_sc2_projected `_ +`perturb_buffer_epstein_nesbet_sc2_projected `_ Applly pertubration ``epstein_nesbet_sc2_projected`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_h_core `_ +`perturb_buffer_h_core `_ Applly pertubration ``h_core`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_moller_plesset `_ +`perturb_buffer_moller_plesset `_ Applly pertubration ``moller_plesset`` to the buffer of determinants generated in the H_apply routine. diff --git a/scripts/module/qp_install_module.py b/scripts/module/qp_install_module.py index 8aad1ae1..3240e142 100755 --- a/scripts/module/qp_install_module.py +++ b/scripts/module/qp_install_module.py @@ -23,10 +23,10 @@ try: from module_handler import get_l_module_descendant from update_README import Doc_key, Needed_key from qp_path import QP_SRC, QP_PLUGINS - except ImportError: - print "source .quantum_package.rc" - raise + print "Please check if you have source the .quantum_package.rc" + print "(`source .quantum_package.rc`)" + print sys.exit(1) def save_new_module(path, l_child): @@ -79,7 +79,7 @@ if __name__ == '__main__': l_children = arguments[""] - path = os.path.join(QP_SRC, arguments[""]) + path = os.path.join(QP_PLUGINS, arguments[""][0]) print "You will create the module:" print path @@ -103,6 +103,7 @@ if __name__ == '__main__': print l_child_reduce save_new_module(path, l_child_reduce) + print "This was a plugin, you can install it now" elif arguments["download"]: pass # d_local = get_dict_child([QP_SRC]) diff --git a/src/Determinants/README.rst b/src/Determinants/README.rst index e44c6fcf..e081f0ed 100644 --- a/src/Determinants/README.rst +++ b/src/Determinants/README.rst @@ -605,10 +605,6 @@ Documentation Undocumented -`prog_save_casino `_ - Undocumented - - `psi_average_norm_contrib `_ Contribution of determinants to the state-averaged density @@ -815,10 +811,6 @@ Documentation z component of the Spin -`save_casino `_ - Undocumented - - `save_natorb `_ Undocumented diff --git a/src/Ezfio_files/README.rst b/src/Ezfio_files/README.rst index e23bf778..2b3fd735 100644 --- a/src/Ezfio_files/README.rst +++ b/src/Ezfio_files/README.rst @@ -38,8 +38,8 @@ Documentation Output file for Bitmask -`output_cas_sd `_ - Output file for CAS_SD +`output_casino `_ + Output file for Casino `output_cpu_time_0 `_ @@ -62,63 +62,51 @@ Documentation Output file for Full_CI -`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_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_qmcchem `_ - Output file for QmcChem - - -`output_selectors_full `_ +`output_selectors_full `_ Output file for Selectors_full -`output_utils `_ +`output_utils `_ Output file for Utils