diff --git a/.gitignore b/.gitignore index ccf29a14..82145000 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ bin/ lib/ config/qp_create_ninja.pickle src/*/.gitignore +ezfio_interface.irp.f diff --git a/ocaml/qp_export.ml b/ocaml/qp_export.ml new file mode 100644 index 00000000..d3d7153e --- /dev/null +++ b/ocaml/qp_export.ml @@ -0,0 +1,176 @@ +open Core +open Qptypes + +let get_data () = + let mos = + Input.Mo_basis.read () + in + let molecule = + let e = + match Input.Electrons.read () with + | Some x -> x + | None -> failwith "No electrons" + in + { Molecule.nuclei = + begin + match Input.Nuclei_by_hand.read () with + | None -> failwith "No nuclei" + | Some l -> Input.Nuclei_by_hand.to_atom_list l + end ; + Molecule.elec_alpha = e.Input.Electrons.elec_alpha_num ; + Molecule.elec_beta = e.Input.Electrons.elec_beta_num ; + } + in + let charge = + Molecule.get_charge molecule + |> Charge.to_int + and mult = + Molecule.get_multiplicity molecule + |> Multiplicity.to_int + in + let hf = + if mult = 0 then "RHF" else "ROHF" + in + let guess = + if mos = None then `Huckel else `Read + in + (mos, molecule, charge, mult, hf, guess) + + + + +let run_g09 () = + let (mos, molecule, charge, mult, hf, guess) = + get_data () + in + let guess = + match guess with + | `Read -> "cards" + | `Huckel -> "huckel" + in + let result = [ + Printf.sprintf "# %s/Gen guess=%s" hf guess; + "" ; + Molecule.name molecule ; + "" ; + Printf.sprintf "%d %d" charge mult ; + Printf.sprintf "%s" ( + match String.split ~on:'\n' @@ Molecule.to_xyz molecule with + | _ :: _ :: rest -> String.concat ~sep:"\n" rest + | _ -> assert false + ); + ""; + begin + match Input.Ao_basis.read () with + | Some x -> Input.Ao_basis.to_basis x + | None -> failwith "No basis" + end + |> Basis.to_string ~fmt:Gto.Gaussian ~ele_array:(List.map ~f:(fun x -> x.Atom.element) + molecule.Molecule.nuclei |> Array.of_list) ; + ""; + begin + match mos with + | None -> "" + | Some mos' -> + begin + Printf.sprintf "(E20.12)\n%s\n 0" + ( + Array.map mos'.Input.Mo_basis.mo_coef ~f:(fun x -> + Array.map x ~f:(fun y -> Printf.sprintf "%20.12E" (MO_coef.to_float y)) + |> Array.to_list + |> String.concat ~sep:"\n") + |> Array.mapi ~f:(fun i -> Printf.sprintf "%5d\n%s" (i+1)) + |> Array.to_list + |> String.concat ~sep:"\n" + ) + end + end; + "" ; "" ; + "" ; "" ; + ] + in + List.iter ~f:(fun x -> print_endline x) result + + + + +let run_gamess () = + failwith "Not yet implemented" +(* TODO + let (mos, molecule, charge, mult, hf, guess) = + get_data () + in + let guess = + match guess with + | `Read -> "MOREAD" + | `Huckel -> "HUCKEL" + in + and coord = + Printf.sprintf "%s" ( + match String.split ~on:'\n' @@ Molecule.to_xyz molecule with + | _ :: _ :: rest -> String.concat ~sep:"\n" rest + | _ -> assert false + ); + and basis = + begin + match !read_data.basis with + | None |> failwith "No basis set defined in command line" + | Some b |> b + end + and typ = !read_data.typ + and vecfile = + begin + match !read_data.filename with + | None |> "" + | Some filename |> filename + end + and nstate = !read_data.nstate + and guess = !read_data.guess + in + + let system = + Gamess.{ mult ; charge ; basis ; coord } + in + Gamess.create_input ~vecfile ~system ~guess ~nstate typ + |> print_endline +*) + + +let spec = + let open Command.Spec in + empty + +> flag "-gamess" no_arg ~doc:"GAMESS(US) input" + +> flag "-g09" no_arg ~doc:"Gaussian 09 input" + +> anon ("ezfio_file" %: string) + +let command = + Command.basic_spec + ~summary: "Quantum Package command" + ~readme:(fun () -> + " +Exports the computed data for other programs. + ") + spec + (fun gamess g09 ezfio_file () -> + let count_flags l = + List.fold_left ~f:(fun a x -> + if x then a+1 else a) ~init:0 l + in + let () = + match count_flags [ g09 ; gamess ] with + | 0 -> raise (Invalid_argument "No file format specified") + | 1 -> () + | _ -> raise (Invalid_argument "Too many file formats specified") + in + Ezfio.set_file ezfio_file; + if g09 then + run_g09 () + else if gamess then + run_gamess () + ) + + +let () = + Command.run command; + exit 0 + diff --git a/plugins/FCIdump/NEEDED_CHILDREN_MODULES b/plugins/FCIdump/NEEDED_CHILDREN_MODULES deleted file mode 100644 index 00cd3e16..00000000 --- a/plugins/FCIdump/NEEDED_CHILDREN_MODULES +++ /dev/null @@ -1 +0,0 @@ -Determinants DavidsonUndressed diff --git a/plugins/FCIdump/README.rst b/plugins/FCIdump/README.rst deleted file mode 100644 index 4c1908c9..00000000 --- a/plugins/FCIdump/README.rst +++ /dev/null @@ -1,44 +0,0 @@ -============== -FCIdump Module -============== - -Interface for the `NECI `_ Full-CI QMC program. - -Documentation -============= - -.. Do not edit this section. It was auto-generated from the -.. by the `update_README.py` script. - -`fcidump `_ - 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 `_ - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Determinants `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`fcidump `_ - Undocumented - diff --git a/plugins/Molden/.gitignore b/plugins/Molden/.gitignore deleted file mode 100644 index 4302ee4e..00000000 --- a/plugins/Molden/.gitignore +++ /dev/null @@ -1,19 +0,0 @@ -# Automatically created by $QP_ROOT/scripts/module/module_handler.py -.ninja_deps -.ninja_log -AO_Basis -Electrons -Ezfio_files -IRPF90_man -IRPF90_temp -MO_Basis -MPI -Makefile -Makefile.depend -Nuclei -Utils -ezfio_interface.irp.f -irpf90.make -irpf90_entities -print_mo -tags \ No newline at end of file diff --git a/plugins/Molden/NEEDED_CHILDREN_MODULES b/plugins/Molden/NEEDED_CHILDREN_MODULES deleted file mode 100644 index 80d0af12..00000000 --- a/plugins/Molden/NEEDED_CHILDREN_MODULES +++ /dev/null @@ -1 +0,0 @@ -MO_Basis Utils diff --git a/plugins/Molden/README.rst b/plugins/Molden/README.rst deleted file mode 100644 index 05a8d23a..00000000 --- a/plugins/Molden/README.rst +++ /dev/null @@ -1,76 +0,0 @@ -============= -Molden Module -============= - -Documentation -============= - -.. Do not edit this section. It was auto-generated from the -.. by the `update_README.py` script. - -`print_mos `_ - Undocumented - - -`write_ao_basis `_ - Undocumented - - -`write_geometry `_ - Undocumented - - -`write_intro_gamess `_ - Undocumented - - -`write_mo_basis `_ - Undocumented - -Needed Modules -============== - -.. Do not edit this section. It was auto-generated from the -.. by the `update_README.py` script. - -.. image:: tree_dependency.png - -* `MO_Basis `_ -* `Utils `_ - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `MO_Basis `_ -* `Utils `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`print_mos `_ - Undocumented - - -`write_ao_basis `_ - Undocumented - - -`write_geometry `_ - Undocumented - - -`write_intro_gamess `_ - Undocumented - - -`write_mo_basis `_ - Undocumented - diff --git a/plugins/eginer/All_singles/NEEDED_CHILDREN_MODULES b/plugins/eginer/All_singles/NEED similarity index 100% rename from plugins/eginer/All_singles/NEEDED_CHILDREN_MODULES rename to plugins/eginer/All_singles/NEED diff --git a/plugins/eginer/CASSD/NEEDED_CHILDREN_MODULES b/plugins/eginer/CASSD/NEED similarity index 100% rename from plugins/eginer/CASSD/NEEDED_CHILDREN_MODULES rename to plugins/eginer/CASSD/NEED diff --git a/plugins/eginer/CID/NEEDED_CHILDREN_MODULES b/plugins/eginer/CID/NEED similarity index 100% rename from plugins/eginer/CID/NEEDED_CHILDREN_MODULES rename to plugins/eginer/CID/NEED diff --git a/plugins/eginer/CID_SC2_selected/NEEDED_CHILDREN_MODULES b/plugins/eginer/CID_SC2_selected/NEED similarity index 100% rename from plugins/eginer/CID_SC2_selected/NEEDED_CHILDREN_MODULES rename to plugins/eginer/CID_SC2_selected/NEED diff --git a/plugins/eginer/CID_selected/NEEDED_CHILDREN_MODULES b/plugins/eginer/CID_selected/NEED similarity index 100% rename from plugins/eginer/CID_selected/NEEDED_CHILDREN_MODULES rename to plugins/eginer/CID_selected/NEED diff --git a/plugins/eginer/CISD_SC2/NEEDED_CHILDREN_MODULES b/plugins/eginer/CISD_SC2/NEED similarity index 100% rename from plugins/eginer/CISD_SC2/NEEDED_CHILDREN_MODULES rename to plugins/eginer/CISD_SC2/NEED diff --git a/plugins/eginer/CISD_SC2_selected/NEEDED_CHILDREN_MODULES b/plugins/eginer/CISD_SC2_selected/NEED similarity index 100% rename from plugins/eginer/CISD_SC2_selected/NEEDED_CHILDREN_MODULES rename to plugins/eginer/CISD_SC2_selected/NEED diff --git a/plugins/eginer/CISD_selected/NEEDED_CHILDREN_MODULES b/plugins/eginer/CISD_selected/NEED similarity index 100% rename from plugins/eginer/CISD_selected/NEEDED_CHILDREN_MODULES rename to plugins/eginer/CISD_selected/NEED diff --git a/plugins/eginer/DFT_Utils/NEEDED_CHILDREN_MODULES b/plugins/eginer/DFT_Utils/NEED similarity index 100% rename from plugins/eginer/DFT_Utils/NEEDED_CHILDREN_MODULES rename to plugins/eginer/DFT_Utils/NEED diff --git a/plugins/FCIdump/.gitignore b/plugins/eginer/Determinant_tools/.gitignore similarity index 100% rename from plugins/FCIdump/.gitignore rename to plugins/eginer/Determinant_tools/.gitignore diff --git a/plugins/eginer/Generators_restart/NEEDED_CHILDREN_MODULES b/plugins/eginer/Determinant_tools/NEED similarity index 100% rename from plugins/eginer/Generators_restart/NEEDED_CHILDREN_MODULES rename to plugins/eginer/Determinant_tools/NEED diff --git a/plugins/eginer/Determinant_tools/README.rst b/plugins/eginer/Determinant_tools/README.rst new file mode 100644 index 00000000..3f8bdad6 --- /dev/null +++ b/plugins/eginer/Determinant_tools/README.rst @@ -0,0 +1,12 @@ +================= +Determinant_tools +================= + +Needed Modules +============== +.. Do not edit this section It was auto-generated +.. by the `update_README.py` script. +Documentation +============= +.. Do not edit this section It was auto-generated +.. by the `update_README.py` script. diff --git a/src/Determinants/guess_doublet.irp.f b/plugins/eginer/Determinant_tools/guess_doublet.irp.f similarity index 100% rename from src/Determinants/guess_doublet.irp.f rename to plugins/eginer/Determinant_tools/guess_doublet.irp.f diff --git a/src/Determinants/guess_singlet.irp.f b/plugins/eginer/Determinant_tools/guess_singlet.irp.f similarity index 100% rename from src/Determinants/guess_singlet.irp.f rename to plugins/eginer/Determinant_tools/guess_singlet.irp.f diff --git a/src/Determinants/guess_triplet.irp.f b/plugins/eginer/Determinant_tools/guess_triplet.irp.f similarity index 100% rename from src/Determinants/guess_triplet.irp.f rename to plugins/eginer/Determinant_tools/guess_triplet.irp.f diff --git a/src/Determinants/print_bitmask.irp.f b/plugins/eginer/Determinant_tools/print_bitmask.irp.f similarity index 100% rename from src/Determinants/print_bitmask.irp.f rename to plugins/eginer/Determinant_tools/print_bitmask.irp.f diff --git a/src/Determinants/print_holes_particles.irp.f b/plugins/eginer/Determinant_tools/print_holes_particles.irp.f similarity index 100% rename from src/Determinants/print_holes_particles.irp.f rename to plugins/eginer/Determinant_tools/print_holes_particles.irp.f diff --git a/src/Determinants/print_wf.irp.f b/plugins/eginer/Determinant_tools/print_wf.irp.f similarity index 100% rename from src/Determinants/print_wf.irp.f rename to plugins/eginer/Determinant_tools/print_wf.irp.f diff --git a/src/Determinants/save_only_singles.irp.f b/plugins/eginer/Determinant_tools/save_only_singles.irp.f similarity index 100% rename from src/Determinants/save_only_singles.irp.f rename to plugins/eginer/Determinant_tools/save_only_singles.irp.f diff --git a/plugins/eginer/Dressed_Ref_Hamiltonian/NEEDED_CHILDREN_MODULES b/plugins/eginer/Dressed_Ref_Hamiltonian/NEED similarity index 100% rename from plugins/eginer/Dressed_Ref_Hamiltonian/NEEDED_CHILDREN_MODULES rename to plugins/eginer/Dressed_Ref_Hamiltonian/NEED diff --git a/plugins/eginer/FOBOCI/NEEDED_CHILDREN_MODULES b/plugins/eginer/FOBOCI/NEED similarity index 100% rename from plugins/eginer/FOBOCI/NEEDED_CHILDREN_MODULES rename to plugins/eginer/FOBOCI/NEED diff --git a/tests/bats/foboci.bats b/plugins/eginer/FOBOCI/foboci.bats similarity index 100% rename from tests/bats/foboci.bats rename to plugins/eginer/FOBOCI/foboci.bats diff --git a/plugins/eginer/Full_CI/NEEDED_CHILDREN_MODULES b/plugins/eginer/Full_CI/NEED similarity index 100% rename from plugins/eginer/Full_CI/NEEDED_CHILDREN_MODULES rename to plugins/eginer/Full_CI/NEED diff --git a/plugins/eginer/Orbital_Entanglement/NEEDED_CHILDREN_MODULES b/plugins/eginer/Generators_restart/NEED similarity index 100% rename from plugins/eginer/Orbital_Entanglement/NEEDED_CHILDREN_MODULES rename to plugins/eginer/Generators_restart/NEED diff --git a/plugins/eginer/MRPT/NEEDED_CHILDREN_MODULES b/plugins/eginer/MRPT/NEED similarity index 100% rename from plugins/eginer/MRPT/NEEDED_CHILDREN_MODULES rename to plugins/eginer/MRPT/NEED diff --git a/plugins/eginer/MRPT_Utils/NEEDED_CHILDREN_MODULES b/plugins/eginer/MRPT_Utils/NEED similarity index 100% rename from plugins/eginer/MRPT_Utils/NEEDED_CHILDREN_MODULES rename to plugins/eginer/MRPT_Utils/NEED diff --git a/plugins/eginer/OVB/NEEDED_CHILDREN_MODULES b/plugins/eginer/OVB/NEED similarity index 100% rename from plugins/eginer/OVB/NEEDED_CHILDREN_MODULES rename to plugins/eginer/OVB/NEED diff --git a/plugins/eginer/OVB_effective_Hamiltonian/NEEDED_CHILDREN_MODULES b/plugins/eginer/OVB_effective_Hamiltonian/NEED similarity index 100% rename from plugins/eginer/OVB_effective_Hamiltonian/NEEDED_CHILDREN_MODULES rename to plugins/eginer/OVB_effective_Hamiltonian/NEED diff --git a/src/Davidson/NEEDED_CHILDREN_MODULES b/plugins/eginer/Orbital_Entanglement/NEED similarity index 100% rename from src/Davidson/NEEDED_CHILDREN_MODULES rename to plugins/eginer/Orbital_Entanglement/NEED diff --git a/plugins/eginer/Properties/NEEDED_CHILDREN_MODULES b/plugins/eginer/Properties/NEED similarity index 100% rename from plugins/eginer/Properties/NEEDED_CHILDREN_MODULES rename to plugins/eginer/Properties/NEED diff --git a/plugins/eginer/loc_cele/NEEDED_CHILDREN_MODULES b/plugins/eginer/loc_cele/NEED similarity index 100% rename from plugins/eginer/loc_cele/NEEDED_CHILDREN_MODULES rename to plugins/eginer/loc_cele/NEED diff --git a/plugins/eginer/multistate/NEED b/plugins/eginer/multistate/NEED new file mode 100644 index 00000000..c551a41c --- /dev/null +++ b/plugins/eginer/multistate/NEED @@ -0,0 +1 @@ +DavidsonUndressed diff --git a/src/dress_zmq/README.rst b/plugins/eginer/multistate/README.rst similarity index 87% rename from src/dress_zmq/README.rst rename to plugins/eginer/multistate/README.rst index c272405c..114dde90 100644 --- a/src/dress_zmq/README.rst +++ b/plugins/eginer/multistate/README.rst @@ -1,6 +1,6 @@ -========= -dress_zmq -========= +========== +multistate +========== Needed Modules ============== diff --git a/src/DavidsonUndressed/diag_restart_save_all_states.irp.f b/plugins/eginer/multistate/diag_restart_save_all_states.irp.f similarity index 100% rename from src/DavidsonUndressed/diag_restart_save_all_states.irp.f rename to plugins/eginer/multistate/diag_restart_save_all_states.irp.f diff --git a/src/DavidsonUndressed/diag_restart_save_lowest_state.irp.f b/plugins/eginer/multistate/diag_restart_save_lowest_state.irp.f similarity index 100% rename from src/DavidsonUndressed/diag_restart_save_lowest_state.irp.f rename to plugins/eginer/multistate/diag_restart_save_lowest_state.irp.f diff --git a/src/DavidsonUndressed/diag_restart_save_one_state.irp.f b/plugins/eginer/multistate/diag_restart_save_one_state.irp.f similarity index 100% rename from src/DavidsonUndressed/diag_restart_save_one_state.irp.f rename to plugins/eginer/multistate/diag_restart_save_one_state.irp.f diff --git a/src/DavidsonUndressed/diagonalize_restart_and_save_two_states.irp.f b/plugins/eginer/multistate/diagonalize_restart_and_save_two_states.irp.f similarity index 100% rename from src/DavidsonUndressed/diagonalize_restart_and_save_two_states.irp.f rename to plugins/eginer/multistate/diagonalize_restart_and_save_two_states.irp.f diff --git a/src/DavidsonUndressed/guess_lowest_state.irp.f b/plugins/eginer/multistate/guess_lowest_state.irp.f similarity index 100% rename from src/DavidsonUndressed/guess_lowest_state.irp.f rename to plugins/eginer/multistate/guess_lowest_state.irp.f diff --git a/plugins/eginer/multistate/multistate.main.irp.f b/plugins/eginer/multistate/multistate.main.irp.f new file mode 100644 index 00000000..d8c13e4c --- /dev/null +++ b/plugins/eginer/multistate/multistate.main.irp.f @@ -0,0 +1,38 @@ +program multistate + implicit none + BEGIN_DOC +! TODO + END_DOC + print *, ' _/ ' + print *, ' -:\_?, _Jm####La ' + print *, 'J"(:" > _]#AZ#Z#UUZ##, ' + print *, '_,::./ %(|i%12XmX1*1XL _?, ' + print *, ' \..\ _\(vmWQwodY+ia%lnL _",/ ( ' + print *, ' .:< ]J=mQD?WXn|,)nr" ' + print *, ' 4XZ#Xov1v}=)vnXAX1nnv;1n" ' + print *, ' ]XX#ZXoovvvivnnnlvvo2*i7 ' + print *, ' "23Z#1S2oo2XXSnnnoSo2>v" ' + print *, ' miX#L -~`""!!1}oSoe|i7 ' + print *, ' 4cn#m, v221=|v[ ' + print *, ' ]hI3Zma,;..__wXSe=+vo ' + print *, ' ]Zov*XSUXXZXZXSe||vo2 ' + print *, ' ]Z#>=|< ' + print *, ' -ziiiii||||||+||==+> ' + print *, ' -%|+++||=|=+|=|==/ ' + print *, ' -a>====+|====-:- ' + print *, ' "~,- -- /- ' + print *, ' -. )> ' + print *, ' .~ +- ' + print *, ' . .... : . ' + print *, ' -------~ ' + print *, '' +end diff --git a/src/DavidsonUndressed/print_H_matrix_restart.irp.f b/plugins/eginer/multistate/print_H_matrix_restart.irp.f similarity index 100% rename from src/DavidsonUndressed/print_H_matrix_restart.irp.f rename to plugins/eginer/multistate/print_H_matrix_restart.irp.f diff --git a/plugins/garniron/mrcepa0/NEEDED_CHILDREN_MODULES b/plugins/garniron/mrcepa0/NEED similarity index 100% rename from plugins/garniron/mrcepa0/NEEDED_CHILDREN_MODULES rename to plugins/garniron/mrcepa0/NEED diff --git a/tests/bats/mrcepa0.bats b/plugins/garniron/mrcepa0/mrcepa0.bats similarity index 100% rename from tests/bats/mrcepa0.bats rename to plugins/garniron/mrcepa0/mrcepa0.bats diff --git a/plugins/loos/NOFT/NEEDED_CHILDREN_MODULES b/plugins/loos/NOFT/NEED similarity index 100% rename from plugins/loos/NOFT/NEEDED_CHILDREN_MODULES rename to plugins/loos/NOFT/NEED diff --git a/plugins/tapplencourt/QMCPack/NEEDED_CHILDREN_MODULES b/plugins/tapplencourt/QMCPack/NEED similarity index 100% rename from plugins/tapplencourt/QMCPack/NEEDED_CHILDREN_MODULES rename to plugins/tapplencourt/QMCPack/NEED diff --git a/plugins/tapplencourt/pyscf/NEEDED_CHILDREN_MODULES b/plugins/tapplencourt/pyscf/NEED similarity index 100% rename from plugins/tapplencourt/pyscf/NEEDED_CHILDREN_MODULES rename to plugins/tapplencourt/pyscf/NEED diff --git a/plugins/tapplencourt/read_integral/NEEDED_CHILDREN_MODULES b/plugins/tapplencourt/read_integral/NEED similarity index 100% rename from plugins/tapplencourt/read_integral/NEEDED_CHILDREN_MODULES rename to plugins/tapplencourt/read_integral/NEED diff --git a/scripts/compilation/qp_create_ninja.py b/scripts/compilation/qp_create_ninja.py index fd20c3dc..9b36e2bc 100755 --- a/scripts/compilation/qp_create_ninja.py +++ b/scripts/compilation/qp_create_ninja.py @@ -81,6 +81,7 @@ def real_join(*args): # _ # |_ ._ _. ._ o _. |_ | _ _ # |_ | | \/ \/ (_| | | (_| |_) | (/_ _> +# def ninja_create_env_variable(pwd_config_file): """ Return some ninja variable with the env variable expanded @@ -335,6 +336,7 @@ def ninja_symlink_build(path_module, l_symlink): # _ o _|_ o _ ._ _ ._ _ # o (_| | |_ | (_| | | (_) | (/_ # _| _| +# def ninja_gitignore_rule(): """ Return the command to create the gitignore @@ -368,6 +370,7 @@ def ninja_gitignore_build(path_module, d_binaries, l_symlink): # o ._ ._ _|_ (_| / \ ._ _ _. | _ # | | |_) | | \_/ o | | | (_| |< (/_ # | +# def get_l_file_for_module(path_module): ''' return the list of irp.f in a module @@ -514,41 +517,6 @@ def ninja_irpf90_make_build(path_module, l_needed_molule, d_irp): return l_string -def ninja_readme_rule(): - """ - Rule for creation the readme. - For not dealted the readme when ninja -t clean and the generator option - """ - l_string = ["rule build_readme", - " command = qp_update_readme.py $module_abs --root_module $module_root", - " description = update_README $module_rel", - " generator = 1", ""] - - return l_string - - -def ninja_readme_build(path_module, d_irp, dict_root_path): - """ - Rule for creation the readme - """ - path_readme = join(path_module.abs, "README.rst") - root_module = dict_root_path[module] - - tags = join(root_module.abs, "tags") - str_depend = " ".join(d_irp[path_module]["l_depend"]) - - tree = join(path_module.abs, "tree_dependency.png") - - l_string = ["build {0}: build_readme {1} {2} {3}".format(path_readme, - tags, - str_depend, - tree), - " module_root = {0}".format(root_module.abs), - " module_abs = {0}".format(path_module.abs), - " module_rel = {0}".format(path_module.rel), ""] - - return l_string - # _ # |_) o ._ _. ._ @@ -685,47 +653,10 @@ def ninja_module_build(path_module, d_binaries): l_abs_bin = [binary.abs for binary in d_binaries[path_module]] path_readme = os.path.join(path_module.abs, "README.rst") - path_png = os.path.join(path_module.abs, "tree_dependency.png") - l_string = ["build module_{0}: phony {1} {2} {3}".format(path_module.rel, + l_string = ["build module_{0}: phony {1} {2}".format(path_module.rel, " ".join(l_abs_bin), - path_readme, - path_png), ""] - - return l_string - - -# ___ -# | ._ _ _ _| _ ._ _ ._ _| _ ._ _ o _ _ -# | | (/_ (/_ (_| (/_ |_) (/_ | | (_| (/_ | | (_ | (/_ _> -# | -def ninja_dot_tree_rule(): - """ - Rule for creating the binaries - """ - # ~#~#~ # - # c m d # - # ~#~#~ # - - l_cmd = ["cd $module_abs", "module_handler.py create_png"] - - l_string = [ - "rule build_dot_tree", " command = {0}".format(" ; ".join(l_cmd)), - " generator = 1", - " description = Generating Png representation of the Tree Dependencies of $module_rel", - "" - ] - - return l_string - - -def ninja_dot_tree_build(path_module, l_module): - - path_tree = join(path_module.abs, "tree_dependency.png") - l_dep = [join(path.abs, "NEEDED_CHILDREN_MODULES") for path in l_module] - l_string = ["build {0}: build_dot_tree {1}".format(path_tree, " ".join(l_dep)), - " module_abs = {0}".format(path_module.abs), - " module_rel = {0}".format(path_module.rel), ""] + path_readme), ""] return l_string @@ -847,7 +778,6 @@ if __name__ == "__main__": l_string += ninja_symlink_rule() l_string += ninja_irpf90_make_rule() - l_string += ninja_readme_rule() l_string += ninja_gitignore_rule() l_string += ninja_binaries_rule() @@ -855,8 +785,6 @@ if __name__ == "__main__": l_string += ninja_ezfio_config_rule() l_string += ninja_ezfio_rule() - l_string += ninja_dot_tree_rule() - # _ # |_) o | _| _ _ ._ _ ._ _. | # |_) |_| | | (_| (_| (/_ | | (/_ | (_| | @@ -892,22 +820,9 @@ if __name__ == "__main__": # M o d u l e _ t o _ i r p # # ~#~#~#~#~#~#~#~#~#~#~#~#~ # - if arguments["--production"]: + d_binaries = get_dict_binaries(l_all_module, mode="development") + l_module = d_binaries.keys() - d_binaries = get_dict_binaries(l_all_module, mode="production") - l_module = d_binaries.keys() - - elif arguments["--development"]: - - d_binaries = get_dict_binaries(l_all_module, mode="development") - l_module = d_binaries.keys() - - for module in l_all_module: - # ~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~ # - # d o t _ t r e e & r e a d m e # - # ~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~ # - l_string += ninja_dot_tree_build(module, l_all_module) - l_string += ninja_readme_build(module, d_irp, dict_root_path) # ~#~#~#~#~#~#~#~#~#~#~#~#~#~#~ # # C h e c k _ c o h e r e n c y # @@ -935,6 +850,9 @@ if __name__ == "__main__": # ~#~#~#~#~#~#~#~#~#~#~#~ # for module_to_compile in l_module: + + if module_to_compile.rel == "dummy": + continue # ~#~#~#~#~#~#~#~ # # S y m l i n k # @@ -953,14 +871,13 @@ if __name__ == "__main__": l_string += ninja_binaries_build(module_to_compile, l_children, d_binaries) - if arguments["--development"]: - l_string += ninja_module_build(module_to_compile, d_binaries) + l_string += ninja_module_build(module_to_compile, d_binaries) - l_string += ninja_gitignore_build(module_to_compile, d_binaries, - l_symlink) + l_string += ninja_gitignore_build(module_to_compile, d_binaries, + l_symlink) - save_subninja_file(module_to_compile) + save_subninja_file(module_to_compile) # ~#~#~#~#~ # # S a v e s # diff --git a/scripts/ezfio_interface/ezfio_generate_provider.py b/scripts/ezfio_interface/ezfio_generate_provider.py index d6dcc716..d521338e 100755 --- a/scripts/ezfio_interface/ezfio_generate_provider.py +++ b/scripts/ezfio_interface/ezfio_generate_provider.py @@ -26,6 +26,7 @@ BEGIN_PROVIDER [ %(type)s, %(name)s %(size)s ] %(test_null_size)s call ezfio_has_%(ezfio_dir)s_%(ezfio_name)s(has) if (has) then + write(6,'(A)') '.. >>>>> [ IO READ: %(name)s ] <<<<< ..' call ezfio_get_%(ezfio_dir)s_%(ezfio_name)s(%(name)s) else print *, '%(ezfio_dir)s/%(ezfio_name)s not found in EZFIO file' @@ -89,9 +90,6 @@ END_PROVIDER name = self.name l_write = ["", " call write_time(%(output)s)", - " if (mpi_master) then", - " write(%(output)s, *) 'Read %(name)s'", - " endif", ""] self.write = "\n".join(l_write) % locals() diff --git a/scripts/module/module_handler.py b/scripts/module/module_handler.py index 9e7e3c04..49d709ab 100755 --- a/scripts/module/module_handler.py +++ b/scripts/module/module_handler.py @@ -10,11 +10,10 @@ Usage: module_handler.py create_git_ignore [...] Options: - print_descendant Print the genealogy of the NEEDED_CHILDREN_MODULES - aka (children, subchildren, etc) + print_descendant Print the genealogy of the needed modules create_png Create a png of the file - NEEDED_CHILDREN_MODULES The path of NEEDED_CHILDREN_MODULES - by default try to open the file in the current path + NEED The path of NEED file. + by default try to open the file in the current path """ import os import sys @@ -30,13 +29,11 @@ except ImportError: def is_module(path_module_rel): - return os.path.isfile(os.path.join(QP_SRC, path_module_rel, - "NEEDED_CHILDREN_MODULES")) + return os.path.isfile(os.path.join(QP_SRC, path_module_rel, "NEED")) def is_plugin(path_module_rel): - return os.path.isfile(os.path.join(QP_PLUGINS, path_module_rel, - "NEEDED_CHILDREN_MODULES")) + return os.path.isfile(os.path.join(QP_PLUGINS, path_module_rel, "NEED")) def is_exe(fpath): @@ -44,7 +41,7 @@ def is_exe(fpath): def get_dict_child(l_root_abs=None): - """Loop over MODULE in QP_ROOT/src, open all the NEEDED_CHILDREN_MODULES + """Loop over MODULE in QP_ROOT/src, open all the NEED and create a dict[MODULE] = [sub module needed, ...] """ d_ref = dict() @@ -57,7 +54,7 @@ def get_dict_child(l_root_abs=None): module_abs = os.path.join(root_abs, module_rel) try: - path_file = os.path.join(module_abs, "NEEDED_CHILDREN_MODULES") + path_file = os.path.join(module_abs, "NEED") with open(path_file, "r") as f: l_children = f.read().split() @@ -131,7 +128,7 @@ class ModuleHandler(): d[module_name] = get_l_module_descendant(d_child, d_child[module_name]) except KeyError: - print "Check NEEDED_CHILDREN_MODULES for {0}".format( + print "Check NEED for {0}".format( module_name) sys.exit(1) @@ -238,7 +235,7 @@ if __name__ == '__main__': for module in l_module: if not is_module(module): print "{0} is not a valide module. Abort".format(module) - print "No NEEDED_CHILDREN_MODULES in it" + print "No NEED in it" sys.exit(1) m = ModuleHandler() diff --git a/scripts/module/qp_module.py b/scripts/module/qp_module.py index e6baeee4..774a9e51 100755 --- a/scripts/module/qp_module.py +++ b/scripts/module/qp_module.py @@ -20,7 +20,6 @@ try: from docopt import docopt from module_handler import ModuleHandler, get_dict_child from module_handler import get_l_module_descendant - from qp_update_readme import D_KEY from qp_path import QP_SRC, QP_PLUGINS, QP_ROOT except ImportError: print "Please check if you have sourced the ${QP_ROOT}/quantum_package.rc" @@ -40,7 +39,7 @@ def save_new_module(path, l_child): print "The module ({0}) already exists...".format(path) sys.exit(1) - with open(os.path.join(path, "NEEDED_CHILDREN_MODULES"), "w") as f: + with open(os.path.join(path, "NEED"), "w") as f: f.write(" ".join(l_child)) f.write("\n") @@ -54,49 +53,15 @@ def save_new_module(path, l_child): with open(os.path.join(path, "README.rst"), "w") as f: f.write(header + "\n") - f.write(D_KEY["needed_module"]) - f.write(D_KEY["documentation"]) - with open(os.path.join(path, "%s.main.irp.f"%(module_name) ), "w") as f: + with open(os.path.join(path, "%s.irp.f"%(module_name) ), "w") as f: f.write("program {0}".format(module_name) ) f.write(""" implicit none BEGIN_DOC ! TODO END_DOC - print *, ' _/ ' - print *, ' -:\_?, _Jm####La ' - print *, 'J"(:" > _]#AZ#Z#UUZ##, ' - print *, '_,::./ %(|i%12XmX1*1XL _?, ' - print *, ' \..\ _\(vmWQwodY+ia%lnL _",/ ( ' - print *, ' .:< ]J=mQD?WXn|,)nr" ' - print *, ' 4XZ#Xov1v}=)vnXAX1nnv;1n" ' - print *, ' ]XX#ZXoovvvivnnnlvvo2*i7 ' - print *, ' "23Z#1S2oo2XXSnnnoSo2>v" ' - print *, ' miX#L -~`""!!1}oSoe|i7 ' - print *, ' 4cn#m, v221=|v[ ' - print *, ' ]hI3Zma,;..__wXSe=+vo ' - print *, ' ]Zov*XSUXXZXZXSe||vo2 ' - print *, ' ]Z#>=|< ' - print *, ' -ziiiii||||||+||==+> ' - print *, ' -%|+++||=|=+|=|==/ ' - print *, ' -a>====+|====-:- ' - print *, ' "~,- -- /- ' - print *, ' -. )> ' - print *, ' .~ +- ' - print *, ' . .... : . ' - print *, ' -------~ ' - print *, '' -end + print *, 'Hello world' """) def main(arguments): diff --git a/src/AO_Basis/NEEDED_CHILDREN_MODULES b/src/AO_Basis/NEED similarity index 100% rename from src/AO_Basis/NEEDED_CHILDREN_MODULES rename to src/AO_Basis/NEED diff --git a/src/AO_Basis/README.rst b/src/AO_Basis/README.rst index 1f3f67b9..6615e2d4 100644 --- a/src/AO_Basis/README.rst +++ b/src/AO_Basis/README.rst @@ -30,231 +30,3 @@ Assumptions * The AO coefficients in the EZFIO files are not necessarily normalized and are normalized after reading -Needed Modules -============== - -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - -.. image:: tree_dependency.png - -* `Nuclei `_ - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Nuclei `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`ao_cartesian `_ - If true, use AOs in Cartesian coordinates (6d,10f,...) - - -`ao_coef `_ - Primitive coefficients, read from input. Those should not be used directly, as the MOs are expressed on the basis of **normalized** AOs. - - -`ao_coef_normalization_factor `_ - Coefficients including the AO normalization - - -`ao_coef_normalization_libint_factor `_ - Coefficients including the AO normalization - - -`ao_coef_normalized `_ - Coefficients including the AO normalization - - -`ao_coef_normalized_ordered `_ - Sorted primitives to accelerate 4 index MO transformation - - -`ao_coef_normalized_ordered_transp `_ - Transposed ao_coef_normalized_ordered - - -`ao_expo `_ - Exponents for each primitive of each AO - - -`ao_expo_ordered `_ - Sorted primitives to accelerate 4 index MO transformation - - -`ao_expo_ordered_transp `_ - Transposed ao_expo_ordered - - -`ao_l `_ - ao_l = l value of the AO: a+b+c in x^a y^b z^c - - -`ao_l_char `_ - ao_l = l value of the AO: a+b+c in x^a y^b z^c - - -`ao_l_char_space `_ - Undocumented - - -`ao_l_max `_ - ao_l = l value of the AO: a+b+c in x^a y^b z^c - - -`ao_md5 `_ - MD5 key, specific of the AO basis - - -`ao_nucl `_ - Index of the nucleus on which the AO is centered - - -`ao_num `_ - number of AOs - - -`ao_num_align `_ - Number of atomic orbitals align - - -`ao_overlap `_ - Overlap between atomic basis functions: - :math:`\int \chi_i(r) \chi_j(r) dr)` - - -`ao_overlap_abs `_ - Overlap between absolute value of atomic basis functions: - :math:`\int |\chi_i(r)| |\chi_j(r)| dr)` - - -`ao_overlap_x `_ - Overlap between atomic basis functions: - :math:`\int \chi_i(r) \chi_j(r) dr)` - - -`ao_overlap_y `_ - Overlap between atomic basis functions: - :math:`\int \chi_i(r) \chi_j(r) dr)` - - -`ao_overlap_z `_ - Overlap between atomic basis functions: - :math:`\int \chi_i(r) \chi_j(r) dr)` - - -`ao_power `_ - Powers of x, y and z for each AO - - -`ao_power_index `_ - Unique index given to a triplet of powers: - .br - 1/2 (l-n_x)*(l-n_x+1) + n_z + 1 - - -`ao_prim_num `_ - Number of primitives per atomic orbital - - -`ao_prim_num_max `_ - Undocumented - - -`ao_prim_num_max_align `_ - Number of primitives per atomic orbital aligned - - -`ao_value `_ - return the value of the ith ao at point r - - -`cart_to_sphe_0 `_ - Spherical -> Cartesian Transformation matrix for l=0 - - -`cart_to_sphe_1 `_ - Spherical -> Cartesian Transformation matrix for l=1 - - -`cart_to_sphe_2 `_ - Spherical -> Cartesian Transformation matrix for l=2 - - -`cart_to_sphe_3 `_ - Spherical -> Cartesian Transformation matrix for l=3 - - -`cart_to_sphe_4 `_ - Spherical -> Cartesian Transformation matrix for l=4 - - -`cart_to_sphe_5 `_ - Spherical -> Cartesian Transformation matrix for l=5 - - -`cart_to_sphe_6 `_ - Spherical -> Cartesian Transformation matrix for l=6 - - -`cart_to_sphe_7 `_ - Spherical -> Cartesian Transformation matrix for l=7 - - -`cart_to_sphe_8 `_ - Spherical -> Cartesian Transformation matrix for l=8 - - -`cart_to_sphe_9 `_ - Spherical -> Cartesian Transformation matrix for l=9 - - -`give_all_aos_at_r `_ - gives the values of aos at a given point r - - -`l_to_charater `_ - character corresponding to the "L" value of an AO orbital - - -`n_aos_max `_ - Number of AOs per atom - - -`n_pt_max_i_x `_ - Undocumented - - -`n_pt_max_integrals `_ - Undocumented - - -`nucl_aos `_ - List of AOs attached on each atom - - -`nucl_list_shell_aos `_ - Index of the shell type Aos and of the corresponding Aos - Per convention, for P,D,F and G AOs, we take the index - of the AO with the the corresponding power in the "X" axis - - -`nucl_n_aos `_ - Number of AOs per atom - - -`nucl_num_shell_aos `_ - Index of the shell type Aos and of the corresponding Aos - Per convention, for P,D,F and G AOs, we take the index - of the AO with the the corresponding power in the "X" axis - diff --git a/src/AO_one_e_integrals/NEEDED_CHILDREN_MODULES b/src/AO_one_e_integrals/NEED similarity index 100% rename from src/AO_one_e_integrals/NEEDED_CHILDREN_MODULES rename to src/AO_one_e_integrals/NEED diff --git a/src/AO_one_e_integrals/README.rst b/src/AO_one_e_integrals/README.rst index 0001ebbd..b5ce063e 100644 --- a/src/AO_one_e_integrals/README.rst +++ b/src/AO_one_e_integrals/README.rst @@ -4,11 +4,3 @@ AO_one_e_integrals All the one-electron integrals in AO basis are here. -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. diff --git a/src/Bitmask/NEEDED_CHILDREN_MODULES b/src/Bitmask/NEED similarity index 100% rename from src/Bitmask/NEEDED_CHILDREN_MODULES rename to src/Bitmask/NEED diff --git a/src/Bitmask/README.rst b/src/Bitmask/README.rst index c8c6863b..b260bd5b 100644 --- a/src/Bitmask/README.rst +++ b/src/Bitmask/README.rst @@ -33,461 +33,3 @@ Assumptions - -Needed Modules -============== - -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - -.. image:: tree_dependency.png - -* `MO_Basis `_ - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `MO_Basis `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`bitstring_to_hexa `_ - Transform a bit string to a string in hexadecimal format for printing - - -`bitstring_to_list `_ - Gives the inidices(+1) of the bits set to 1 in the bit string - - -`bitstring_to_str `_ - Transform a bit string to a string for printing - - -`cas_bitmask `_ - Bitmasks for CAS reference determinants. (N_int, alpha/beta, CAS reference) - - -`closed_shell_ref_bitmask `_ - Undocumented - - -`core_bitmask `_ - Core + deleted orbitals bitmask - - -`core_inact_act_bitmask_4 `_ - Undocumented - - -`core_inact_virt_bitmask `_ - Reunion of the inactive and virtual bitmasks - - -`debug_det `_ - Subroutine to print the content of a determinant in '+-' notation and - hexadecimal representation. - - -`debug_spindet `_ - Subroutine to print the content of a determinant in '+-' notation and - hexadecimal representation. - - -`full_ijkl_bitmask `_ - Bitmask to include all possible MOs - - -`full_ijkl_bitmask_4 `_ - Undocumented - - -`generators_bitmask `_ - Bitmasks for generator determinants. - (N_int, alpha/beta, hole/particle, generator). - .br - 3rd index is : - .br - * 1 : hole for single exc - .br - * 2 : particle for single exc - .br - * 3 : hole for 1st exc of double - .br - * 4 : particle for 1st exc of double - .br - * 5 : hole for 2nd exc of double - .br - * 6 : particle for 2nd exc of double - .br - - -`generators_bitmask_restart `_ - Bitmasks for generator determinants. - (N_int, alpha/beta, hole/particle, generator). - .br - 3rd index is : - .br - * 1 : hole for single exc - .br - * 2 : particle for single exc - .br - * 3 : hole for 1st exc of double - .br - * 4 : particle for 1st exc of double - .br - * 5 : hole for 2nd exc of double - .br - * 6 : particle for 2nd exc of double - .br - - -`hf_bitmask `_ - Hartree Fock bit mask - - -`i_bitmask_gen `_ - Current bitmask for the generators - - -`inact_bitmask `_ - inact_bitmask : Bitmask of the inactive orbitals which are supposed to be doubly excited - in post CAS methods - n_inact_orb : Number of inactive orbitals - virt_bitmask : Bitmaks of vritual orbitals which are supposed to be recieve electrons - in post CAS methods - n_virt_orb : Number of virtual orbitals - - -`inact_virt_bitmask `_ - Reunion of the inactive and virtual bitmasks - - -`index_holes_bitmask `_ - Index of the holes in the generators_bitmasks - - -`index_particl_bitmask `_ - Index of the holes in the generators_bitmasks - - -`initialize_bitmask_to_restart_ones `_ - Initialization of the generators_bitmask to the restart bitmask - - -`is_a_1h `_ - Undocumented - - -`is_a_1h1p `_ - Undocumented - - -`is_a_1h2p `_ - Undocumented - - -`is_a_1p `_ - Undocumented - - -`is_a_2h `_ - Undocumented - - -`is_a_2h1p `_ - Undocumented - - -`is_a_2p `_ - Undocumented - - -`is_a_two_holes_two_particles `_ - logical function that returns True if the determinant 'key_in' - belongs to the 2h-2p excitation class of the DDCI space - this is calculated using the CAS_bitmask that defines the active - orbital space, the inact_bitmasl that defines the inactive oribital space - and the virt_bitmask that defines the virtual orbital space - - -`is_i_in_virtual `_ - Undocumented - - -`is_the_hole_in_det `_ - Undocumented - - -`is_the_particl_in_det `_ - Undocumented - - -`list_act `_ - list_act(i) = index of the ith active orbital - .br - list_act_reverse : reverse list of active orbitals - list_act_reverse(i) = 0 ::> not an active - list_act_reverse(i) = k ::> IS the kth active orbital - - -`list_act_reverse `_ - list_act(i) = index of the ith active orbital - .br - list_act_reverse : reverse list of active orbitals - list_act_reverse(i) = 0 ::> not an active - list_act_reverse(i) = k ::> IS the kth active orbital - - -`list_core `_ - List of the core orbitals that are never excited in post CAS method - - -`list_core_inact `_ - Undocumented - - -`list_core_inact_act `_ - Undocumented - - -`list_core_inact_act_reverse `_ - Undocumented - - -`list_core_inact_reverse `_ - Undocumented - - -`list_core_reverse `_ - List of the core orbitals that are never excited in post CAS method - - -`list_inact `_ - list_inact : List of the inactive orbitals which are supposed to be doubly excited - in post CAS methods - list_virt : List of vritual orbitals which are supposed to be recieve electrons - in post CAS methods - list_inact_reverse : reverse list of inactive orbitals - list_inact_reverse(i) = 0 ::> not an inactive - list_inact_reverse(i) = k ::> IS the kth inactive - list_virt_reverse : reverse list of virtual orbitals - list_virt_reverse(i) = 0 ::> not an virtual - list_virt_reverse(i) = k ::> IS the kth virtual - - -`list_inact_reverse `_ - list_inact : List of the inactive orbitals which are supposed to be doubly excited - in post CAS methods - list_virt : List of vritual orbitals which are supposed to be recieve electrons - in post CAS methods - list_inact_reverse : reverse list of inactive orbitals - list_inact_reverse(i) = 0 ::> not an inactive - list_inact_reverse(i) = k ::> IS the kth inactive - list_virt_reverse : reverse list of virtual orbitals - list_virt_reverse(i) = 0 ::> not an virtual - list_virt_reverse(i) = k ::> IS the kth virtual - - -`list_to_bitstring `_ - Returns the physical string "string(N_int,2)" from the array of - occupations "list(N_int*bit_kind_size,2) - - -`list_virt `_ - list_inact : List of the inactive orbitals which are supposed to be doubly excited - in post CAS methods - list_virt : List of vritual orbitals which are supposed to be recieve electrons - in post CAS methods - list_inact_reverse : reverse list of inactive orbitals - list_inact_reverse(i) = 0 ::> not an inactive - list_inact_reverse(i) = k ::> IS the kth inactive - list_virt_reverse : reverse list of virtual orbitals - list_virt_reverse(i) = 0 ::> not an virtual - list_virt_reverse(i) = k ::> IS the kth virtual - - -`list_virt_reverse `_ - list_inact : List of the inactive orbitals which are supposed to be doubly excited - in post CAS methods - list_virt : List of vritual orbitals which are supposed to be recieve electrons - in post CAS methods - list_inact_reverse : reverse list of inactive orbitals - list_inact_reverse(i) = 0 ::> not an inactive - list_inact_reverse(i) = k ::> IS the kth inactive - list_virt_reverse : reverse list of virtual orbitals - list_virt_reverse(i) = 0 ::> not an virtual - list_virt_reverse(i) = k ::> IS the kth virtual - - -`modify_bitmasks_for_hole `_ - modify the generators_bitmask in order that one can only excite - the electrons occupying i_hole - - -`modify_bitmasks_for_hole_in_out `_ - modify the generators_bitmask in order that one can only excite - the electrons occupying i_hole - - -`modify_bitmasks_for_particl `_ - modify the generators_bitmask in order that one can only excite - the electrons to the orbital i_part - - -`n_act_orb `_ - number of active orbitals - - -`n_cas_bitmask `_ - Number of bitmasks for CAS - - -`n_core_inact_act_orb `_ - Reunion of the core, inactive and active bitmasks - - -`n_core_inact_orb `_ - Undocumented - - -`n_core_orb `_ - Core + deleted orbitals bitmask - - -`n_core_orb_allocate `_ - Undocumented - - -`n_generators_bitmask `_ - Number of bitmasks for generators - - -`n_generators_bitmask_restart `_ - Number of bitmasks for generators - - -`n_inact_orb `_ - inact_bitmask : Bitmask of the inactive orbitals which are supposed to be doubly excited - in post CAS methods - n_inact_orb : Number of inactive orbitals - virt_bitmask : Bitmaks of vritual orbitals which are supposed to be recieve electrons - in post CAS methods - n_virt_orb : Number of virtual orbitals - - -`n_inact_orb_allocate `_ - Undocumented - - -`n_int `_ - Number of 64-bit integers needed to represent determinants as binary strings - - -`n_virt_orb `_ - inact_bitmask : Bitmask of the inactive orbitals which are supposed to be doubly excited - in post CAS methods - n_inact_orb : Number of inactive orbitals - virt_bitmask : Bitmaks of vritual orbitals which are supposed to be recieve electrons - in post CAS methods - n_virt_orb : Number of virtual orbitals - - -`n_virt_orb_allocate `_ - Undocumented - - -`number_of_holes `_ - Function that returns the number of holes in the inact space - - -`number_of_holes_verbose `_ - function that returns the number of holes in the inact space - - -`number_of_particles `_ - function that returns the number of particles in the virtual space - - -`number_of_particles_verbose `_ - function that returns the number of particles in the inact space - - -`print_det `_ - Subroutine to print the content of a determinant using the '+-' notation - - -`print_generators_bitmasks_holes `_ - Undocumented - - -`print_generators_bitmasks_holes_for_one_generator `_ - Undocumented - - -`print_generators_bitmasks_particles `_ - Undocumented - - -`print_generators_bitmasks_particles_for_one_generator `_ - Undocumented - - -`print_spindet `_ - Subroutine to print the content of a determinant using the '+-' notation - - -`ref_bitmask `_ - Reference bit mask, used in Slater rules, chosen as Hartree-Fock bitmask - - -`reunion_of_bitmask `_ - Reunion of the inactive, active and virtual bitmasks - - -`reunion_of_cas_inact_bitmask `_ - Reunion of the inactive, active and virtual bitmasks - - -`reunion_of_core_inact_act_bitmask `_ - Reunion of the core, inactive and active bitmasks - - -`reunion_of_core_inact_bitmask `_ - Reunion of the core and inactive and virtual bitmasks - - -`set_bitmask_hole_as_input `_ - set the generators_bitmask for the holes - as the input_bimask - - -`set_bitmask_particl_as_input `_ - set the generators_bitmask for the particles - as the input_bimask - - -`unpaired_alpha_electrons `_ - Bitmask reprenting the unpaired alpha electrons in the HF_bitmask - - -`virt_bitmask `_ - inact_bitmask : Bitmask of the inactive orbitals which are supposed to be doubly excited - in post CAS methods - n_inact_orb : Number of inactive orbitals - virt_bitmask : Bitmaks of vritual orbitals which are supposed to be recieve electrons - in post CAS methods - n_virt_orb : Number of virtual orbitals - - -`virt_bitmask_4 `_ - Undocumented - diff --git a/src/CIS/cis.irp.f b/src/CIS/CIS.irp.f similarity index 100% rename from src/CIS/cis.irp.f rename to src/CIS/CIS.irp.f diff --git a/src/CIS/NEEDED_CHILDREN_MODULES b/src/CIS/NEED similarity index 100% rename from src/CIS/NEEDED_CHILDREN_MODULES rename to src/CIS/NEED diff --git a/src/CIS/README.rst b/src/CIS/README.rst index 60a36cdb..8958fec8 100644 --- a/src/CIS/README.rst +++ b/src/CIS/README.rst @@ -7,85 +7,3 @@ Assumptions * The molecular orbitals are assumed orthonormal -Documentation -============= - -.. Do not edit this section. It was auto-generated from the -.. by the `update_README.py` script. - -`cis `_ - Undocumented - - -`h_apply_cis `_ - 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_cis_diexc `_ - Generate all double excitations of key_in using the bit masks of holes and - particles. - Assume N_int is already provided. - - -`h_apply_cis_monoexc `_ - Generate all single excitations of key_in using the bit masks of holes and - particles. - Assume N_int is already provided. - - -`super_ci `_ - Undocumented - -Needed Modules -============== - -.. Do not edit this section. It was auto-generated from the -.. by the `update_README.py` script. - -.. image:: tree_dependency.png - -* `Selectors_full `_ -* `SingleRefMethod `_ - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Selectors_full `_ -* `SingleRefMethod `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`cis `_ - Undocumented - - -`h_apply_cis `_ - 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_cis_diexc `_ - Generate all double excitations of key_in using the bit masks of holes and - particles. - Assume N_int is already provided. - - -`h_apply_cis_monoexc `_ - Generate all single excitations of key_in using the bit masks of holes and - particles. - Assume N_int is already provided. - - -`super_ci `_ - Undocumented - diff --git a/src/CISD/cisd.irp.f b/src/CISD/CISD.irp.f similarity index 100% rename from src/CISD/cisd.irp.f rename to src/CISD/CISD.irp.f diff --git a/src/CISD/NEEDED_CHILDREN_MODULES b/src/CISD/NEED similarity index 100% rename from src/CISD/NEEDED_CHILDREN_MODULES rename to src/CISD/NEED diff --git a/src/CISD/README.rst b/src/CISD/README.rst index af772201..2024b7c8 100644 --- a/src/CISD/README.rst +++ b/src/CISD/README.rst @@ -9,77 +9,4 @@ This is a test directory which builds a CISD by setting the follwoing rules: These rules are set in the ``H_apply.irp.f`` file. -Needed Modules -============== - -.. Do not edit this section. It was auto-generated from the -.. by the `update_README.py` script. - -.. image:: tree_dependency.png - -* `Selectors_full `_ -* `SingleRefMethod `_ - -Documentation -============= - -.. Do not edit this section. It was auto-generated from the -.. by the `update_README.py` script. - -`h_apply_cisd `_ - 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_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_monoexc `_ - Generate all single excitations of key_in using the bit masks of holes and - particles. - Assume N_int is already provided. - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Selectors_full `_ -* `SingleRefMethod `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -h_apply_cisd - 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_diexc - Undocumented - - -h_apply_cisd_diexcorg - Generate all double excitations of key_in using the bit masks of holes and - particles. - Assume N_int is already provided. - - -h_apply_cisd_diexcp - Undocumented - - -h_apply_cisd_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/Generators_CAS/NEEDED_CHILDREN_MODULES b/src/Davidson/NEED similarity index 100% rename from src/Generators_CAS/NEEDED_CHILDREN_MODULES rename to src/Davidson/NEED diff --git a/src/Davidson/README.rst b/src/Davidson/README.rst index 19499c1f..67e4b457 100644 --- a/src/Davidson/README.rst +++ b/src/Davidson/README.rst @@ -7,325 +7,3 @@ be defined and the DavidsonDressed module should be used. If no dressing is requ the Davidson module should be used, and it has a default null dressing vector. -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Determinants `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`ci_eigenvectors `_ - Eigenvectors/values of the CI matrix - - -`ci_eigenvectors_s2 `_ - Eigenvectors/values of the CI matrix - - -`ci_electronic_energy `_ - Eigenvectors/values of the CI matrix - - -`ci_energy `_ - N_states lowest eigenvalues of the CI matrix - - -`davidson_collector `_ - Undocumented - - -`davidson_converged `_ - True if the Davidson algorithm is converged - - -`davidson_criterion `_ - Can be : [ energy | residual | both | wall_time | cpu_time | iterations ] - - -`davidson_diag `_ - Davidson diagonalization. - .br - dets_in : bitmasks corresponding to determinants - .br - u_in : guess coefficients on the various states. Overwritten - on exit - .br - dim_in : leftmost dimension of u_in - .br - sze : Number of determinants - .br - N_st : Number of eigenstates - .br - iunit : Unit number for the I/O - .br - Initial guess vectors are not necessarily orthonormal - - -`davidson_diag_hjj `_ - Davidson diagonalization with specific diagonal elements of the H matrix - .br - H_jj : specific diagonal H matrix elements to diagonalize de Davidson - .br - dets_in : bitmasks corresponding to determinants - .br - u_in : guess coefficients on the various states. Overwritten - on exit - .br - dim_in : leftmost dimension of u_in - .br - sze : Number of determinants - .br - N_st : Number of eigenstates - .br - N_st_diag : Number of states in which H is diagonalized - .br - iunit : Unit for the I/O - .br - Initial guess vectors are not necessarily orthonormal - - -`davidson_diag_hjj_sjj `_ - Davidson diagonalization with specific diagonal elements of the H matrix - .br - H_jj : specific diagonal H matrix elements to diagonalize de Davidson - .br - S2_out : Output : s^2 - .br - dets_in : bitmasks corresponding to determinants - .br - u_in : guess coefficients on the various states. Overwritten - on exit - .br - dim_in : leftmost dimension of u_in - .br - sze : Number of determinants - .br - N_st : Number of eigenstates - .br - N_st_diag : Number of states in which H is diagonalized. Assumed > sze - .br - iunit : Unit for the I/O - .br - Initial guess vectors are not necessarily orthonormal - - -`davidson_diag_hs2 `_ - Davidson diagonalization. - .br - dets_in : bitmasks corresponding to determinants - .br - u_in : guess coefficients on the various states. Overwritten - on exit - .br - dim_in : leftmost dimension of u_in - .br - sze : Number of determinants - .br - N_st : Number of eigenstates - .br - iunit : Unit number for the I/O - .br - Initial guess vectors are not necessarily orthonormal - - -`davidson_pull_results `_ - Undocumented - - -`davidson_push_results `_ - Undocumented - - -`davidson_run_slave `_ - Undocumented - - -`davidson_slave `_ - Undocumented - - -`davidson_slave_inproc `_ - Undocumented - - -`davidson_slave_tcp `_ - Undocumented - - -`davidson_slave_work `_ - Undocumented - - -`davidson_sze_max `_ - Number of micro-iterations before re-contracting - - -`det_inf `_ - Ordering function for determinants - - -`diag_and_save `_ - Undocumented - - -`diagonalize_ci `_ - Replace the coefficients of the CI states by the coefficients of the - eigenstates of the CI matrix - - -`disk_based_davidson `_ - If true, disk space is used to store the vectors - - -`distributed_davidson `_ - If true, use the distributed algorithm - - -`find_reference `_ - Undocumented - - -`first_guess `_ - Select all the determinants with the lowest energy as a starting point. - - -`h_s2_u_0_nstates `_ - Computes v_0 = H|u_0> and s_0 = S^2 |u_0> - .br - n : number of determinants - .br - H_jj : array of - .br - S2_jj : array of - - -`h_s2_u_0_nstates_openmp `_ - Computes v_0 = H|u_0> and s_0 = S^2 |u_0> - .br - Assumes that the determinants are in psi_det - .br - istart, iend, ishift, istep are used in ZMQ parallelization. - - -`h_s2_u_0_nstates_openmp_work `_ - Computes v_t = H|u_t> and s_t = S^2 |u_t> - .br - Default should be 1,N_det,0,1 - - -`h_s2_u_0_nstates_openmp_work_1 `_ - Computes v_t = H|u_t> and s_t = S^2 |u_t> - .br - Default should be 1,N_det,0,1 - - -`h_s2_u_0_nstates_openmp_work_2 `_ - Computes v_t = H|u_t> and s_t = S^2 |u_t> - .br - Default should be 1,N_det,0,1 - - -`h_s2_u_0_nstates_openmp_work_3 `_ - Computes v_t = H|u_t> and s_t = S^2 |u_t> - .br - Default should be 1,N_det,0,1 - - -`h_s2_u_0_nstates_openmp_work_4 `_ - Computes v_t = H|u_t> and s_t = S^2 |u_t> - .br - Default should be 1,N_det,0,1 - - -`h_s2_u_0_nstates_openmp_work_n_int `_ - Computes v_t = H|u_t> and s_t = S^2 |u_t> - .br - Default should be 1,N_det,0,1 - - -`h_s2_u_0_nstates_test `_ - Undocumented - - -`h_s2_u_0_nstates_zmq `_ - Computes v_0 = H|u_0> and s_0 = S^2 |u_0> - .br - n : number of determinants - .br - H_jj : array of - .br - S2_jj : array of - - -`h_u_0_nstates `_ - Computes v_0 = H|u_0> - .br - n : number of determinants - .br - H_jj : array of - .br - - -`n_states_diag `_ - Number of states to consider during the Davdison diagonalization - - -`nthreads_davidson `_ - Number of threads for Davdison - - -`print_h_matrix_restart `_ - Undocumented - - -`provide_everything `_ - Undocumented - - -`psi_energy `_ - Energy of the current wave function - - -`routine `_ - Undocumented - - -`sort_dets_ab `_ - Uncodumented : TODO - - -`sort_dets_ab_v `_ - Uncodumented : TODO - - -`sort_dets_ba_v `_ - Uncodumented : TODO - - -`state_following `_ - If true, the states are re-ordered to match the input states - - -`tamiser `_ - Uncodumented : TODO - - -`threshold_davidson `_ - Thresholds of Davidson's algorithm - - -`u_0_h_u_0 `_ - Computes e_0 = / - .br - n : number of determinants - .br - diff --git a/src/DavidsonDressed/NEEDED_CHILDREN_MODULES b/src/DavidsonDressed/NEED similarity index 100% rename from src/DavidsonDressed/NEEDED_CHILDREN_MODULES rename to src/DavidsonDressed/NEED diff --git a/src/DavidsonDressed/README.rst b/src/DavidsonDressed/README.rst index ce9c78ba..6b7d8a89 100644 --- a/src/DavidsonDressed/README.rst +++ b/src/DavidsonDressed/README.rst @@ -4,11 +4,3 @@ DavidsonDressed Davidson with single-column dressing -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. diff --git a/src/DavidsonUndressed/NEEDED_CHILDREN_MODULES b/src/DavidsonUndressed/NEED similarity index 100% rename from src/DavidsonUndressed/NEEDED_CHILDREN_MODULES rename to src/DavidsonUndressed/NEED diff --git a/src/DavidsonUndressed/README.rst b/src/DavidsonUndressed/README.rst index e11d0703..6cdc58ff 100644 --- a/src/DavidsonUndressed/README.rst +++ b/src/DavidsonUndressed/README.rst @@ -4,11 +4,3 @@ DavidsonUndressed Module for main files with undressed Davidson -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. diff --git a/src/DavidsonUndressed/davidson_slave.irp.f b/src/DavidsonUndressed/davidson_slave.irp.f deleted file mode 100644 index ecd4a395..00000000 --- a/src/DavidsonUndressed/davidson_slave.irp.f +++ /dev/null @@ -1,124 +0,0 @@ -program selection_slave - implicit none - BEGIN_DOC -! Helper program to compute the PT2 in distributed mode. - END_DOC - - call omp_set_nested(.false.) - read_wf = .False. - distributed_davidson = .False. - SOFT_TOUCH read_wf distributed_davidson - call provide_everything - call switch_qp_run_to_master - call run_wf -end - -subroutine provide_everything - PROVIDE H_apply_buffer_allocated mo_bielec_integrals_in_map psi_det_sorted_bit n_states zmq_context N_states_diag - PROVIDE mo_tot_num N_int ci_energy mpi_master zmq_state zmq_context - PROVIDE psi_det psi_coef state_average_weight - PROVIDE N_det -end - -subroutine run_wf - use f77_zmq - - implicit none - IRP_IF MPI - include 'mpif.h' - IRP_ENDIF - - integer(ZMQ_PTR), external :: new_zmq_to_qp_run_socket - integer(ZMQ_PTR) :: zmq_to_qp_run_socket - double precision :: energy(N_states) - character*(64) :: states(3) - character*(64) :: old_state - integer :: rc, i, ierr - double precision :: t0, t1 - - integer, external :: zmq_get_dvector, zmq_get_N_det_generators - integer, external :: zmq_get8_dvector - integer, external :: zmq_get_ivector - integer, external :: zmq_get_psi, zmq_get_N_det_selectors, zmq_get_psi_bilinear - integer, external :: zmq_get_psi_notouch - integer, external :: zmq_get_N_states_diag - - zmq_context = f77_zmq_ctx_new () - states(1) = 'davidson' - old_state = 'Waiting' - - zmq_to_qp_run_socket = new_zmq_to_qp_run_socket() - - PROVIDE psi_det psi_coef state_average_weight mpi_master - PROVIDE zmq_state N_det - PROVIDE N_states N_states_diag psi_energy - - IRP_IF MPI - call MPI_BARRIER(MPI_COMM_WORLD, ierr) - IRP_ENDIF - do - - if (mpi_master) then - call wait_for_states(states,zmq_state,size(states)) - if (zmq_state(1:64) == old_state(1:64)) then - call sleep(1) - cycle - else - old_state(1:64) = zmq_state(1:64) - endif - print *, trim(zmq_state) - endif - - IRP_IF MPI_DEBUG - print *, irp_here, mpi_rank - call MPI_BARRIER(MPI_COMM_WORLD, ierr) - IRP_ENDIF - IRP_IF MPI - call MPI_BCAST (zmq_state, 128, MPI_CHARACTER, 0, MPI_COMM_WORLD, ierr) - if (ierr /= MPI_SUCCESS) then - print *, irp_here, 'error in broadcast of zmq_state' - endif - IRP_ENDIF - - if(zmq_state(1:7) == 'Stopped') then - exit - endif - - - if (zmq_state(1:8) == 'davidson') then - - ! Davidson - ! -------- - - call wall_time(t0) - if (zmq_get_N_states_diag(zmq_to_qp_run_socket,1) == -1) cycle - if (zmq_get_psi(zmq_to_qp_run_socket,1) == -1) cycle - if (zmq_get_dvector(zmq_to_qp_run_socket,1,'energy',energy,N_states_diag) == -1) cycle - - call wall_time(t1) - if (mpi_master) then - call write_double(6,(t1-t0),'Broadcast time') - endif - - call omp_set_nested(.True.) - call davidson_slave_tcp(0) - call omp_set_nested(.False.) - print *, 'Davidson done' - IRP_IF MPI - call MPI_BARRIER(MPI_COMM_WORLD, ierr) - if (ierr /= MPI_SUCCESS) then - print *, irp_here, 'error in barrier' - endif - IRP_ENDIF - print *, 'All Davidson done' - - endif - - end do - IRP_IF MPI - call MPI_finalize(ierr) - IRP_ENDIF -end - - - diff --git a/src/DavidsonUndressed/print_energy.irp.f b/src/DavidsonUndressed/print_energy.irp.f deleted file mode 100644 index 94165560..00000000 --- a/src/DavidsonUndressed/print_energy.irp.f +++ /dev/null @@ -1,27 +0,0 @@ -program print_energy - implicit none - read_wf = .true. - touch read_wf - provide mo_bielec_integrals_in_map psi_coef psi_det psi_bilinear_matrix_transp_values - double precision :: time1, time0 - call wall_time(time0) - call routine - call wall_time(time1) - print *, 'Wall time :' , time1 - time0 -end - -subroutine routine - implicit none - integer :: i,j - double precision :: accu,hij - - print*, 'psi_energy = ',psi_energy + nuclear_repulsion - accu = 0.d0 -! do i = 1,N_det -! do j = 1,N_det -! call i_H_j(psi_det(1,1,j),psi_det(1,1,i),N_int,hij) -! accu += psi_coef(i,1) * psi_coef(j,1) * hij -! enddo -! enddo -! print*, 'accu = ',accu + nuclear_repulsion -end diff --git a/src/Determinants/NEEDED_CHILDREN_MODULES b/src/Determinants/NEED similarity index 100% rename from src/Determinants/NEEDED_CHILDREN_MODULES rename to src/Determinants/NEED diff --git a/src/Determinants/README.rst b/src/Determinants/README.rst index 9fac5112..f7d2eb02 100644 --- a/src/Determinants/README.rst +++ b/src/Determinants/README.rst @@ -1,1538 +1,5 @@ -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Integrals_Monoelec `_ -* `Integrals_Bielec `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`a_operator `_ - Needed for diag_H_mat_elem - - -`abs_psi_coef_max `_ - Max and min values of the coefficients - - -`abs_psi_coef_min `_ - Max and min values of the coefficients - - -`ac_operator `_ - Needed for diag_H_mat_elem - - -`add_values_to_two_body_dm_map `_ - Adds values to the map of two_body_dm according to some bitmask - - -`apply_excitation `_ - Undocumented - - -`apply_hole `_ - Undocumented - - -`apply_holes `_ - Undocumented - - -`apply_mono `_ - Undocumented - - -`apply_particle `_ - Undocumented - - -`apply_particles `_ - Undocumented - - -`au0_h_au0 `_ - Undocumented - - -`bi_elec_ref_bitmask_energy `_ - Energy of the reference bitmask used in Slater rules - - -`bitstring_to_list_ab `_ - Gives the inidices(+1) of the bits set to 1 in the bit string - For alpha/beta determinants - - -`bitstring_to_list_ab_old `_ - Gives the inidices(+1) of the bits set to 1 in the bit string - For alpha/beta determinants - - -`build_fock_tmp `_ - Build the diagonal of the Fock matrix corresponding to a generator - determinant. F_00 is = E0. - - -`clear_bit_to_integer `_ - Undocumented - - -`compute_diag_two_body_dm_ab `_ - Undocumented - - -`compute_diag_two_body_dm_ab_act `_ - Undocumented - - -`compute_diag_two_body_dm_ab_core `_ - Undocumented - - -`compute_diag_two_body_dm_ab_core_act `_ - Undocumented - - -`compute_extra_diag_two_body_dm_ab `_ - compute the extra diagonal contribution to the alpha/bet two body density at r1, r2 - - -`compute_extra_diag_two_body_dm_ab_act `_ - compute the extra diagonal contribution to the two body density at r1, r2 - involving ONLY THE ACTIVE PART, which means that the four index of the excitations - involved in the two body density matrix are ACTIVE - - -`compute_extra_diag_two_body_dm_ab_core_act `_ - compute the extra diagonal contribution to the two body density at r1, r2 - involving ONLY THE ACTIVE PART, which means that the four index of the excitations - involved in the two body density matrix are ACTIVE - - -`connected_to_ref `_ - Undocumented - - -`connected_to_ref_by_mono `_ - Undocumented - - -`copy_h_apply_buffer_to_wf `_ - Copies the H_apply buffer to psi_coef. - After calling this subroutine, N_det, psi_det and psi_coef need to be touched - - -`copy_psi_bilinear_to_psi `_ - Overwrites psi_det and psi_coef with the wf in bilinear order - - -`create_microlist `_ - Undocumented - - -`create_minilist `_ - Undocumented - - -`create_minilist_find_previous `_ - Undocumented - - -`create_wf_of_psi_bilinear_matrix `_ - Generate a wave function containing all possible products - of alpha and beta determinants - - -`decode_exc `_ - Decodes the exc arrays returned by get_excitation. - h1,h2 : Holes - p1,p2 : Particles - s1,s2 : Spins (1:alpha, 2:beta) - degree : Degree of excitation - - -`decode_exc_spin `_ - Decodes the exc arrays returned by get_excitation. - h1,h2 : Holes - p1,p2 : Particles - - -`det_alpha_norm `_ - Norm of the alpha and beta spin determinants in the wave function: - .br - ||Da||_i \sum_j C_{ij}**2 - - -`det_beta_norm `_ - Norm of the alpha and beta spin determinants in the wave function: - .br - ||Da||_i \sum_j C_{ij}**2 - - -`det_coef `_ - det_coef - - -`det_occ `_ - det_occ - - -`det_search_key `_ - Return an integer*8 corresponding to a determinant index for searching - - -`det_to_occ_pattern `_ - Transform a determinant to an occupation pattern - - -`detcmp `_ - Undocumented - - -`deteq `_ - Undocumented - - -`diag_algorithm `_ - Diagonalization algorithm (Davidson or Lapack) - - -`diag_h_mat_elem `_ - Computes - - -`diag_h_mat_elem_au0_h_au0 `_ - Computes for any determinant i. Used for wave functions with an additional electron. - - -`diag_h_mat_elem_fock `_ - Computes when i is at most a double excitation from - a reference. - - -`diag_s_mat_elem `_ - Returns - - -`diagonalize_s2_betweenstates `_ - You enter with nstates vectors in u_0 that may be coupled by S^2 - The subroutine diagonalize the S^2 operator in the basis of these states. - The vectors that you obtain in output are no more coupled by S^2, - which does not necessary mean that they are eigenfunction of S^2. - n,nmax,nstates = number of determinants, physical dimension of the arrays and number of states - keys_tmp = array of integer(bit_kind) that represents the determinants - psi_coefs(i,j) = coeff of the ith determinant in the jth state - VECTORS ARE SUPPOSED TO BE ORTHONORMAL IN INPUT - - -`do_mono_excitation `_ - Apply the mono excitation operator : a^{dager}_(i_particle) a_(i_hole) of spin = ispin - on key_in - ispin = 1 == alpha - ispin = 2 == beta - i_ok = 1 == the excitation is possible - i_ok = -1 == the excitation is not possible - - -`do_spin_flip `_ - flip the spin ispin in the orbital i_flip - on key_in - ispin = 1 == alpha - ispin = 2 == beta - i_ok = 1 == the flip is possible - i_ok = -1 == the flip is not possible - - -`double_exc_bitmask `_ - double_exc_bitmask(:,1,i) is the bitmask for holes of excitation 1 - double_exc_bitmask(:,2,i) is the bitmask for particles of excitation 1 - double_exc_bitmask(:,3,i) is the bitmask for holes of excitation 2 - double_exc_bitmask(:,4,i) is the bitmask for particles of excitation 2 - for a given couple of hole/particle excitations i. - - -`doubly_occ_empty_in_couple `_ - n_couples is the number of couples of orbitals to be checked - couples(i,1) = first orbital of the ith couple - couples(i,2) = second orbital of the ith couple - returns the array couples_out - couples_out(i) = .True. if det_in contains - an orbital empty in the ith couple AND - an orbital doubly occupied in the ith couple - - -`doubly_occ_empty_in_couple_and_no_hund_elsewhere `_ - n_couples is the number of couples of orbitals to be checked - couples(i,1) = first orbital of the ith couple - couples(i,2) = second orbital of the ith couple - returns the array couples_out - couples_out(i) = .True. if det_in contains - an orbital empty in the ith couple AND - an orbital doubly occupied in the ith couple - - -`expected_s2 `_ - Expected value of S2 : S*(S+1) - - -`fill_h_apply_buffer_no_selection `_ - Fill the H_apply buffer with determiants for CISD - - -`filter_connected `_ - Filters out the determinants that are not connected by H - .br - returns the array idx which contains the index of the - .br - determinants in the array key1 that interact - .br - via the H operator with key2. - .br - idx(0) is the number of determinants that interact with key1 - - -`filter_connected_i_h_psi0 `_ - returns the array idx which contains the index of the - .br - determinants in the array key1 that interact - .br - via the H operator with key2. - .br - idx(0) is the number of determinants that interact with key1 - - -`filter_connected_i_h_psi0_sc2 `_ - standard filter_connected_i_H_psi but returns in addition - .br - the array of the index of the non connected determinants to key1 - .br - in order to know what double excitation can be repeated on key1 - .br - idx_repeat(0) is the number of determinants that can be used - .br - to repeat the excitations - - -`filter_not_connected `_ - Returns the array idx which contains the index of the - .br - determinants in the array key1 that DO NOT interact - .br - via the H operator with key2. - .br - idx(0) is the number of determinants that DO NOT interact with key1 - - -`flip_generators `_ - Undocumented - - -`fock_operator_closed_shell_ref_bitmask `_ - Undocumented - - -`generate_all_alpha_beta_det_products `_ - Create a wave function from all possible alpha x beta determinants - - -`get_all_spin_doubles `_ - .br - Returns the indices of all the double excitations in the list of - unique alpha determinants. - .br - - -`get_all_spin_doubles_1 `_ - .br - Returns the indices of all the double excitations in the list of - unique alpha determinants. - .br - - -`get_all_spin_doubles_2 `_ - .br - Returns the indices of all the double excitations in the list of - unique alpha determinants. - .br - - -`get_all_spin_doubles_3 `_ - .br - Returns the indices of all the double excitations in the list of - unique alpha determinants. - .br - - -`get_all_spin_doubles_4 `_ - .br - Returns the indices of all the double excitations in the list of - unique alpha determinants. - .br - - -`get_all_spin_doubles_n_int `_ - .br - Returns the indices of all the double excitations in the list of - unique alpha determinants. - .br - - -`get_all_spin_singles `_ - .br - Returns the indices of all the single excitations in the list of - unique alpha determinants. - .br - - -`get_all_spin_singles_1 `_ - .br - Returns the indices of all the single excitations in the list of - unique alpha determinants. - .br - - -`get_all_spin_singles_2 `_ - .br - Returns the indices of all the single excitations in the list of - unique alpha determinants. - .br - - -`get_all_spin_singles_3 `_ - .br - Returns the indices of all the single excitations in the list of - unique alpha determinants. - .br - - -`get_all_spin_singles_4 `_ - .br - Returns the indices of all the single excitations in the list of - unique alpha determinants. - .br - - -`get_all_spin_singles_and_doubles `_ - .br - Returns the indices of all the single and double excitations in the list of - unique alpha determinants. - .br - /!\ : The buffer is transposed ! - .br - - -`get_all_spin_singles_and_doubles_1 `_ - .br - Returns the indices of all the single and double excitations in the list of - unique alpha determinants. - .br - /!\ : The buffer is transposed ! - .br - - -`get_all_spin_singles_and_doubles_2 `_ - .br - Returns the indices of all the single and double excitations in the list of - unique alpha determinants. - .br - /!\ : The buffer is transposed ! - .br - - -`get_all_spin_singles_and_doubles_3 `_ - .br - Returns the indices of all the single and double excitations in the list of - unique alpha determinants. - .br - /!\ : The buffer is transposed ! - .br - - -`get_all_spin_singles_and_doubles_4 `_ - .br - Returns the indices of all the single and double excitations in the list of - unique alpha determinants. - .br - /!\ : The buffer is transposed ! - .br - - -`get_all_spin_singles_and_doubles_n_int `_ - .br - Returns the indices of all the single and double excitations in the list of - unique alpha determinants. - .br - /!\ : The buffer is transposed ! - .br - - -`get_all_spin_singles_n_int `_ - .br - Returns the indices of all the single excitations in the list of - unique alpha determinants. - .br - - -`get_double_excitation `_ - Returns the two excitation operators between two doubly excited determinants and the phase - - -`get_double_excitation_phase `_ - Undocumented - - -`get_double_excitation_spin `_ - Returns the two excitation operators between two doubly excited spin-determinants - and the phase - - -`get_excitation `_ - Returns the excitation operators between two determinants and the phase - - -`get_excitation_degree `_ - Returns the excitation degree between two determinants - - -`get_excitation_degree_spin `_ - Returns the excitation degree between two determinants - - -`get_excitation_degree_vector `_ - Applies get_excitation_degree to an array of determinants - - -`get_excitation_degree_vector_double_alpha_beta `_ - Applies get_excitation_degree to an array of determinants and return only the mono excitations - and the connections through exchange integrals - - -`get_excitation_degree_vector_mono `_ - Applies get_excitation_degree to an array of determinants and return only the mono excitations - - -`get_excitation_degree_vector_mono_or_exchange `_ - Applies get_excitation_degree to an array of determinants and return only the mono excitations - and the connections through exchange integrals - - -`get_excitation_degree_vector_mono_or_exchange_verbose `_ - Applies get_excitation_degree to an array of determinants and return only the mono excitations - and the connections through exchange integrals - - -`get_excitation_spin `_ - Returns the excitation operators between two determinants and the phase - - -`get_get_two_body_dm_ab_map_elements `_ - Returns multiple elements of the \rho_{ijkl}^{\alpha \beta }, all - i for j,k,l fixed. - - -`get_index_in_psi_det_alpha_unique `_ - Returns the index of the determinant in the ``psi_det_alpha_unique`` array - - -`get_index_in_psi_det_beta_unique `_ - Returns the index of the determinant in the ``psi_det_beta_unique`` array - - -`get_index_in_psi_det_sorted_bit `_ - Returns the index of the determinant in the ``psi_det_sorted_bit`` array - - -`get_mono_excitation `_ - Returns the excitation operator between two singly excited determinants and the phase - - -`get_mono_excitation_from_fock `_ - Undocumented - - -`get_mono_excitation_spin `_ - Returns the excitation operator between two singly excited determinants and the phase - - -`get_occ_from_key `_ - Returns a list of occupation numbers from a bitstring - - -`get_phase `_ - Returns the phase between key1 and key2 - - -`get_s2 `_ - Returns - - -`get_two_body_dm_ab_map_element `_ - Returns one value of the wo body density matrix \rho_{ijkl}^{\alpha \beta} defined as : - \rho_{ijkl}^{\alpha \beta } = <\Psi|a^{\dagger}_{i\alpha} a^{\dagger}_{j\beta} a_{k\beta} a_{l\alpha}|\Psi> - - -`get_uj_s2_ui `_ - returns the matrix elements of S^2 "s2(i,j)" between the "nstates" states - psi_coefs_tmp(:,i) and psi_coefs_tmp(:,j) - - -`getmobiles `_ - Undocumented - - -`give_index_of_doubly_occ_in_active_space `_ - Undocumented - - -`h_apply_buffer_allocated `_ - Buffer of determinants/coefficients/perturbative energy for H_apply. - Uninitialized. Filled by H_apply subroutines. - - -`h_apply_buffer_lock `_ - Buffer of determinants/coefficients/perturbative energy for H_apply. - Uninitialized. Filled by H_apply subroutines. - - -`h_matrix_all_dets `_ - H matrix on the basis of the slater determinants defined by psi_det - - -`h_matrix_cas `_ - Undocumented - - -`h_u_0_stored `_ - Computes v_0 = H|u_0> - .br - n : number of determinants - .br - uses the big_matrix_stored array - - -`i_h_j `_ - Returns where i and j are determinants - - -`i_h_j_double_alpha_beta `_ - Returns where i and j are determinants differing by an opposite-spin double excitation - - -`i_h_j_double_spin `_ - Returns where i and j are determinants differing by a same-spin double excitation - - -`i_h_j_mono_spin `_ - Returns where i and j are determinants differing by a single excitation - - -`i_h_j_phase_out `_ - Returns where i and j are determinants - - -`i_h_j_verbose `_ - Returns where i and j are determinants - - -`i_h_psi `_ - Computes = \sum_J c_J . - .br - Uses filter_connected_i_H_psi0 to get all the |J> to which |i> - is connected. - The i_H_psi_minilist is much faster but requires to build the - minilists - - -`i_h_psi_minilist `_ - Computes = \sum_J c_J . - .br - Uses filter_connected_i_H_psi0 to get all the |J> to which |i> - is connected. The |J> are searched in short pre-computed lists. - - -`i_h_psi_sc2 `_ - for the various Nstate - .br - returns in addition - .br - the array of the index of the non connected determinants to key1 - .br - in order to know what double excitation can be repeated on key1 - .br - idx_repeat(0) is the number of determinants that can be used - .br - to repeat the excitations - - -`i_h_psi_sc2_verbose `_ - for the various Nstate - .br - returns in addition - .br - the array of the index of the non connected determinants to key1 - .br - in order to know what double excitation can be repeated on key1 - .br - idx_repeat(0) is the number of determinants that can be used - .br - to repeat the excitations - - -`i_h_psi_sec_ord `_ - for the various Nstates - - -`i_s2_psi_minilist `_ - Computes = \sum_J c_J . - .br - Uses filter_connected_i_H_psi0 to get all the |J> to which |i> - is connected. The |J> are searched in short pre-computed lists. - - -`idx_cas `_ - CAS wave function, defined from the application of the CAS bitmask on the - determinants. idx_cas gives the indice of the CAS determinant in psi_det. - - -`idx_non_cas `_ - Set of determinants which are not part of the CAS, defined from the application - of the CAS bitmask on the determinants. - idx_non_cas gives the indice of the determinant in psi_det. - - -`insert_into_two_body_dm_ab_map `_ - Create new entry into two_body_dm_ab_map, or accumulate in an existing entry - - -`insert_into_two_body_dm_big_array `_ - Undocumented - - -`is_connected_to `_ - Undocumented - - -`is_connected_to_by_mono `_ - Undocumented - - -`is_generable_cassd `_ - Undocumented - - -`is_in_wavefunction `_ - True if the determinant ``det`` is in the wave function - - -`is_spin_flip_possible `_ - returns .True. if the spin-flip of spin ispin in the orbital i_flip is possible - on key_in - - -`kinetic_ref_bitmask_energy `_ - Energy of the reference bitmask used in Slater rules - - -`make_s2_eigenfunction `_ - Undocumented - - -`max_degree_exc `_ - Maximum degree of excitation in the wf - - -`mo_energy_expval `_ - Third index is spin. - Fourth index is 1:creation, 2:annihilation - - -`mono_elec_ref_bitmask_energy `_ - Energy of the reference bitmask used in Slater rules - - -`n_closed_shell `_ - Undocumented - - -`n_closed_shell_cas `_ - Undocumented - - -`n_det `_ - Number of determinants in the wave function - - -`n_det_alpha_unique `_ - Unique alpha determinants - - -`n_det_beta_unique `_ - Unique beta determinants - - -`n_det_cas `_ - CAS wave function, defined from the application of the CAS bitmask on the - determinants. idx_cas gives the indice of the CAS determinant in psi_det. - - -`n_det_max `_ - Max number of determinants in the wave function - - -`n_det_max_jacobi `_ - Maximum number of determinants diagonalized by Jacobi - - -`n_det_max_property `_ - Max number of determinants in the wave function when you select for a given property - - -`n_det_max_stored `_ - Maximum number of determinants for which the full H matrix is stored. Be careful, the memory requested scales as 10*n_det_max_stored**2. For instance, 90000 determinants represent a matrix of size 60 Gb. - - -`n_det_non_cas `_ - Set of determinants which are not part of the CAS, defined from the application - of the CAS bitmask on the determinants. - idx_non_cas gives the indice of the determinant in psi_det. - - -`n_double_exc_bitmasks `_ - Number of double excitation bitmasks - - -`n_occ_pattern `_ - array of the occ_pattern present in the wf - psi_occ_pattern(:,1,j) = jth occ_pattern of the wave function : represent all the single occupations - psi_occ_pattern(:,2,j) = jth occ_pattern of the wave function : represent all the double occupations - - -`n_open_shell `_ - Undocumented - - -`n_single_exc_bitmasks `_ - Number of single excitation bitmasks - - -`n_states `_ - Number of states to consider - - -`neutral_no_hund_in_couple `_ - n_couples is the number of couples of orbitals to be checked - couples(i,1) = first orbital of the ith couple - couples(i,2) = second orbital of the ith couple - returns the array couples_out - couples_out(i) = .True. if det_in contains - an orbital empty in the ith couple AND - an orbital doubly occupied in the ith couple - - -`nucl_elec_ref_bitmask_energy `_ - Energy of the reference bitmask used in Slater rules - - -`occ_pattern_search_key `_ - Return an integer*8 corresponding to a determinant index for searching - - -`occ_pattern_to_dets `_ - Generate all possible determinants for a give occ_pattern - - -`occ_pattern_to_dets_size `_ - Number of possible determinants for a given occ_pattern - - -`one_body_dm_ao_alpha `_ - one body density matrix on the AO basis : rho_AO(alpha) , rho_AO(beta) - - -`one_body_dm_ao_alpha_no_align `_ - one body density matrix on the AO basis : rho_AO(alpha) , rho_AO(beta) - - -`one_body_dm_ao_beta `_ - one body density matrix on the AO basis : rho_AO(alpha) , rho_AO(beta) - - -`one_body_dm_ao_beta_no_align `_ - one body density matrix on the AO basis : rho_AO(alpha) , rho_AO(beta) - - -`one_body_dm_dagger_mo_spin_index `_ - Undocumented - - -`one_body_dm_mo `_ - One-body density matrix - - -`one_body_dm_mo_alpha `_ - Alpha and beta one-body density matrix for each state - - -`one_body_dm_mo_alpha_average `_ - Alpha and beta one-body density matrix for each state - - -`one_body_dm_mo_alpha_old `_ - Alpha and beta one-body density matrix for each state - - -`one_body_dm_mo_beta `_ - Alpha and beta one-body density matrix for each state - - -`one_body_dm_mo_beta_average `_ - Alpha and beta one-body density matrix for each state - - -`one_body_dm_mo_beta_old `_ - Alpha and beta one-body density matrix for each state - - -`one_body_dm_mo_spin_index `_ - Undocumented - - -`one_body_single_double_dm_mo_alpha `_ - Alpha and beta one-body density matrix for each state - - -`one_body_single_double_dm_mo_beta `_ - Alpha and beta one-body density matrix for each state - - -`one_body_spin_density_ao `_ - one body spin density matrix on the AO basis : rho_AO(alpha) - rho_AO(beta) - - -`one_body_spin_density_mo `_ - rho(alpha) - rho(beta) - - -`only_single_double_dm `_ - If true, The One body DM is calculated with ignoring the Double<->Doubles extra diag elements - - -`print_bitmask `_ - Undocumented - - -`printwf `_ - Undocumented - - -`psi_average_norm_contrib `_ - Contribution of determinants to the state-averaged density - - -`psi_average_norm_contrib_sorted `_ - Wave function sorted by determinants contribution to the norm (state-averaged) - .br - psi_det_sorted_order(i) -> k : index in psi_det - - -`psi_bilinear_matrix `_ - Coefficient matrix if the wave function is expressed in a bilinear form : - D_a^t C D_b - - -`psi_bilinear_matrix_columns `_ - Sparse coefficient matrix if the wave function is expressed in a bilinear form : - D_a^t C D_b - .br - Rows are alpha determinants and columns are beta. - .br - Order refers to psi_det - - -`psi_bilinear_matrix_columns_loc `_ - Sparse coefficient matrix if the wave function is expressed in a bilinear form : - D_a^t C D_b - .br - Rows are alpha determinants and columns are beta. - .br - Order refers to psi_det - - -`psi_bilinear_matrix_order `_ - Sparse coefficient matrix if the wave function is expressed in a bilinear form : - D_a^t C D_b - .br - Rows are alpha determinants and columns are beta. - .br - Order refers to psi_det - - -`psi_bilinear_matrix_order_reverse `_ - Order which allows to go from psi_bilinear_matrix to psi_det - - -`psi_bilinear_matrix_order_transp_reverse `_ - Order which allows to go from psi_bilinear_matrix_order_transp to psi_bilinear_matrix - - -`psi_bilinear_matrix_rows `_ - Sparse coefficient matrix if the wave function is expressed in a bilinear form : - D_a^t C D_b - .br - Rows are alpha determinants and columns are beta. - .br - Order refers to psi_det - - -`psi_bilinear_matrix_transp_columns `_ - Transpose of psi_bilinear_matrix - D_b^t C^t D_a - .br - Rows are Alpha determinants and columns are beta, but the matrix is stored in row major - format - - -`psi_bilinear_matrix_transp_order `_ - Transpose of psi_bilinear_matrix - D_b^t C^t D_a - .br - Rows are Alpha determinants and columns are beta, but the matrix is stored in row major - format - - -`psi_bilinear_matrix_transp_rows `_ - Transpose of psi_bilinear_matrix - D_b^t C^t D_a - .br - Rows are Alpha determinants and columns are beta, but the matrix is stored in row major - format - - -`psi_bilinear_matrix_transp_rows_loc `_ - Location of the columns in the psi_bilinear_matrix - - -`psi_bilinear_matrix_transp_values `_ - Transpose of psi_bilinear_matrix - D_b^t C^t D_a - .br - Rows are Alpha determinants and columns are beta, but the matrix is stored in row major - format - - -`psi_bilinear_matrix_values `_ - Sparse coefficient matrix if the wave function is expressed in a bilinear form : - D_a^t C D_b - .br - Rows are alpha determinants and columns are beta. - .br - Order refers to psi_det - - -`psi_cas `_ - CAS wave function, defined from the application of the CAS bitmask on the - determinants. idx_cas gives the indice of the CAS determinant in psi_det. - - -`psi_cas_coef `_ - CAS wave function, defined from the application of the CAS bitmask on the - determinants. idx_cas gives the indice of the CAS determinant in psi_det. - - -`psi_cas_coef_sorted_bit `_ - CAS determinants sorted to accelerate the search of a random determinant in the wave - function. - - -`psi_cas_energy `_ - Undocumented - - -`psi_cas_energy_diagonalized `_ - Undocumented - - -`psi_cas_sorted_bit `_ - CAS determinants sorted to accelerate the search of a random determinant in the wave - function. - - -`psi_coef `_ - The wave function coefficients. Initialized with Hartree-Fock if the EZFIO file - is empty - - -`psi_coef_cas_diagonalized `_ - Undocumented - - -`psi_coef_max `_ - Max and min values of the coefficients - - -`psi_coef_min `_ - Max and min values of the coefficients - - -`psi_coef_sorted `_ - Wave function sorted by determinants contribution to the norm (state-averaged) - .br - psi_det_sorted_order(i) -> k : index in psi_det - - -`psi_coef_sorted_bit `_ - Determinants on which we apply for perturbation. - They are sorted by determinants interpreted as integers. Useful - to accelerate the search of a random determinant in the wave - function. - - -`psi_det `_ - The wave function determinants. Initialized with Hartree-Fock if the EZFIO file - is empty - - -`psi_det_alpha `_ - List of alpha determinants of psi_det - - -`psi_det_alpha_unique `_ - Unique alpha determinants - - -`psi_det_beta `_ - List of beta determinants of psi_det - - -`psi_det_beta_unique `_ - Unique beta determinants - - -`psi_det_size `_ - Size of the psi_det/psi_coef arrays - - -`psi_det_sorted `_ - Wave function sorted by determinants contribution to the norm (state-averaged) - .br - psi_det_sorted_order(i) -> k : index in psi_det - - -`psi_det_sorted_bit `_ - Determinants on which we apply for perturbation. - They are sorted by determinants interpreted as integers. Useful - to accelerate the search of a random determinant in the wave - function. - - -`psi_det_sorted_order `_ - Wave function sorted by determinants contribution to the norm (state-averaged) - .br - psi_det_sorted_order(i) -> k : index in psi_det - - -`psi_non_cas `_ - Set of determinants which are not part of the CAS, defined from the application - of the CAS bitmask on the determinants. - idx_non_cas gives the indice of the determinant in psi_det. - - -`psi_non_cas_coef `_ - Set of determinants which are not part of the CAS, defined from the application - of the CAS bitmask on the determinants. - idx_non_cas gives the indice of the determinant in psi_det. - - -`psi_non_cas_coef_sorted_bit `_ - CAS determinants sorted to accelerate the search of a random determinant in the wave - function. - - -`psi_non_cas_sorted_bit `_ - CAS determinants sorted to accelerate the search of a random determinant in the wave - function. - - -`psi_occ_pattern `_ - array of the occ_pattern present in the wf - psi_occ_pattern(:,1,j) = jth occ_pattern of the wave function : represent all the single occupations - psi_occ_pattern(:,2,j) = jth occ_pattern of the wave function : represent all the double occupations - - -`pull_pt2 `_ - Pull PT2 calculation in the collector - - -`push_pt2 `_ - Push PT2 calculation to the collector - - -`put_gess `_ - Undocumented - - -`read_dets `_ - Reads the determinants from the EZFIO file - - -`read_wf `_ - If true, read the wave function from the EZFIO file - - -`rec_occ_pattern_to_dets `_ - Undocumented - - -`ref_bitmask_energy `_ - Energy of the reference bitmask used in Slater rules - - -`ref_closed_shell_bitmask `_ - Undocumented - - -`remove_duplicates_in_psi_det `_ - Removes duplicate determinants in the wave function. - - -`resize_h_apply_buffer `_ - Resizes the H_apply buffer of proc iproc. The buffer lock should - be set before calling this function. - - -`s2_eig `_ - Force the wave function to be an eigenfunction of S^2 - - -`s2_eig_restart `_ - Undocumented - - -`s2_u_0 `_ - Computes v_0 = S^2|u_0> - .br - n : number of determinants - .br - - -`s2_u_0_nstates `_ - Computes v_0 = S^2|u_0> - .br - n : number of determinants - .br - - -`s2_values `_ - array of the averaged values of the S^2 operator on the various states - - -`s_z `_ - z component of the Spin - - -`s_z2_sz `_ - z component of the Spin - - -`save_hf `_ - Undocumented - - -`save_natorb `_ - Undocumented - - -`save_natural_mos `_ - Save natural orbitals, obtained by diagonalization of the one-body density matrix in the MO basis - - -`save_only_singles `_ - Undocumented - - -`save_ref_determinant `_ - Undocumented - - -`save_wavefunction `_ - Save the wave function into the EZFIO file - - -`save_wavefunction_general `_ - Save the wave function into the EZFIO file - - -`save_wavefunction_specified `_ - Save the wave function into the EZFIO file - - -`save_wavefunction_unsorted `_ - Save the wave function into the EZFIO file - - -`set_bit_to_integer `_ - Undocumented - - -`set_natural_mos `_ - Set natural orbitals, obtained by diagonalization of the one-body density matrix in the MO basis - - -`single_exc_bitmask `_ - single_exc_bitmask(:,1,i) is the bitmask for holes - single_exc_bitmask(:,2,i) is the bitmask for particles - for a given couple of hole/particle excitations i. - - -`singles_alpha_csc `_ - Dimension of the singles_alpha array - - -`singles_alpha_csc_idx `_ - Dimension of the singles_alpha array - - -`singles_alpha_csc_size `_ - Dimension of the singles_alpha array - - -`singles_alpha_size `_ - Dimension of the singles_alpha array - - -`sort_dets_by_det_search_key `_ - Determinants are sorted are sorted according to their det_search_key. - Useful to accelerate the search of a random determinant in the wave - function. - - -`spin_det_search_key `_ - Return an integer(8) corresponding to a determinant index for searching - - -`state_average_weight `_ - Weights in the state-average calculation of the density matrix - - -`store_full_h_mat `_ - If True, the Davidson diagonalization is performed by storing the full H matrix up to n_det_max_stored. Be careful, it can cost a lot of memory but can also save a lot of CPU time - - -`target_energy `_ - Energy that should be obtained when truncating the wave function (optional) - - -`threshold_generators `_ - Thresholds on generators (fraction of the norm) - - -`threshold_selectors `_ - Thresholds on selectors (fraction of the norm) - - -`two_body_dm_ab_big_array_act `_ - two_body_dm_ab_big_array_act = Purely active part of the two body density matrix - two_body_dm_ab_big_array_act_core takes only into account the single excitation - within the active space that adds terms in the act <-> core two body dm - two_body_dm_ab_big_array_act_core(i,j,k) = < a^\dagger_i n_k a_j > - with i,j in the ACTIVE SPACE - with k in the CORE SPACE - .br - The alpha-beta extra diagonal energy FOR WF DEFINED AS AN APPROXIMATION OF A CAS can be computed thanks to - sum_{h1,p1,h2,p2} two_body_dm_ab_big_array_act(h1,p1,h2,p2) * (h1p1|h2p2) - + sum_{h1,p1,h2,p2} two_body_dm_ab_big_array_core_act(h1,p1,h2,p2) * (h1p1|h2p2) - - -`two_body_dm_ab_big_array_core_act `_ - two_body_dm_ab_big_array_act = Purely active part of the two body density matrix - two_body_dm_ab_big_array_act_core takes only into account the single excitation - within the active space that adds terms in the act <-> core two body dm - two_body_dm_ab_big_array_act_core(i,j,k) = < a^\dagger_i n_k a_j > - with i,j in the ACTIVE SPACE - with k in the CORE SPACE - .br - The alpha-beta extra diagonal energy FOR WF DEFINED AS AN APPROXIMATION OF A CAS can be computed thanks to - sum_{h1,p1,h2,p2} two_body_dm_ab_big_array_act(h1,p1,h2,p2) * (h1p1|h2p2) - + sum_{h1,p1,h2,p2} two_body_dm_ab_big_array_core_act(h1,p1,h2,p2) * (h1p1|h2p2) - - -`two_body_dm_ab_diag_act `_ - two_body_dm_ab_diag_all(k,m) = <\Psi | n_(k\alpha) n_(m\beta) | \Psi> - two_body_dm_ab_diag_act(k,m) is restricted to the active orbitals : - orbital k = list_act(k) - two_body_dm_ab_diag_inact(k,m) is restricted to the inactive orbitals : - orbital k = list_inact(k) - two_body_dm_ab_diag_core(k,m) is restricted to the core orbitals : - orbital k = list_core(k) - two_body_dm_ab_diag_core_b_act_a(k,m) represents the core beta <-> active alpha part of the two body dm - orbital k = list_core(k) - orbital m = list_act(m) - two_body_dm_ab_diag_core_a_act_b(k,m) represents the core alpha <-> active beta part of the two body dm - orbital k = list_core(k) - orbital m = list_act(m) - two_body_dm_ab_diag_core_act(k,m) represents the core<->active part of the diagonal two body dm - when we traced on the spin - orbital k = list_core(k) - orbital m = list_act(m) - - -`two_body_dm_ab_diag_all `_ - two_body_dm_ab_diag_all(k,m) = <\Psi | n_(k\alpha) n_(m\beta) | \Psi> - two_body_dm_ab_diag_act(k,m) is restricted to the active orbitals : - orbital k = list_act(k) - two_body_dm_ab_diag_inact(k,m) is restricted to the inactive orbitals : - orbital k = list_inact(k) - two_body_dm_ab_diag_core(k,m) is restricted to the core orbitals : - orbital k = list_core(k) - two_body_dm_ab_diag_core_b_act_a(k,m) represents the core beta <-> active alpha part of the two body dm - orbital k = list_core(k) - orbital m = list_act(m) - two_body_dm_ab_diag_core_a_act_b(k,m) represents the core alpha <-> active beta part of the two body dm - orbital k = list_core(k) - orbital m = list_act(m) - two_body_dm_ab_diag_core_act(k,m) represents the core<->active part of the diagonal two body dm - when we traced on the spin - orbital k = list_core(k) - orbital m = list_act(m) - - -`two_body_dm_ab_diag_core `_ - two_body_dm_ab_diag_all(k,m) = <\Psi | n_(k\alpha) n_(m\beta) | \Psi> - two_body_dm_ab_diag_act(k,m) is restricted to the active orbitals : - orbital k = list_act(k) - two_body_dm_ab_diag_inact(k,m) is restricted to the inactive orbitals : - orbital k = list_inact(k) - two_body_dm_ab_diag_core(k,m) is restricted to the core orbitals : - orbital k = list_core(k) - two_body_dm_ab_diag_core_b_act_a(k,m) represents the core beta <-> active alpha part of the two body dm - orbital k = list_core(k) - orbital m = list_act(m) - two_body_dm_ab_diag_core_a_act_b(k,m) represents the core alpha <-> active beta part of the two body dm - orbital k = list_core(k) - orbital m = list_act(m) - two_body_dm_ab_diag_core_act(k,m) represents the core<->active part of the diagonal two body dm - when we traced on the spin - orbital k = list_core(k) - orbital m = list_act(m) - - -`two_body_dm_ab_diag_inact `_ - two_body_dm_ab_diag_all(k,m) = <\Psi | n_(k\alpha) n_(m\beta) | \Psi> - two_body_dm_ab_diag_act(k,m) is restricted to the active orbitals : - orbital k = list_act(k) - two_body_dm_ab_diag_inact(k,m) is restricted to the inactive orbitals : - orbital k = list_inact(k) - two_body_dm_ab_diag_core(k,m) is restricted to the core orbitals : - orbital k = list_core(k) - two_body_dm_ab_diag_core_b_act_a(k,m) represents the core beta <-> active alpha part of the two body dm - orbital k = list_core(k) - orbital m = list_act(m) - two_body_dm_ab_diag_core_a_act_b(k,m) represents the core alpha <-> active beta part of the two body dm - orbital k = list_core(k) - orbital m = list_act(m) - two_body_dm_ab_diag_core_act(k,m) represents the core<->active part of the diagonal two body dm - when we traced on the spin - orbital k = list_core(k) - orbital m = list_act(m) - - -`two_body_dm_ab_map `_ - Map of the two body density matrix elements for the alpha/beta elements - - -`two_body_dm_diag_core_a_act_b `_ - two_body_dm_ab_diag_all(k,m) = <\Psi | n_(k\alpha) n_(m\beta) | \Psi> - two_body_dm_ab_diag_act(k,m) is restricted to the active orbitals : - orbital k = list_act(k) - two_body_dm_ab_diag_inact(k,m) is restricted to the inactive orbitals : - orbital k = list_inact(k) - two_body_dm_ab_diag_core(k,m) is restricted to the core orbitals : - orbital k = list_core(k) - two_body_dm_ab_diag_core_b_act_a(k,m) represents the core beta <-> active alpha part of the two body dm - orbital k = list_core(k) - orbital m = list_act(m) - two_body_dm_ab_diag_core_a_act_b(k,m) represents the core alpha <-> active beta part of the two body dm - orbital k = list_core(k) - orbital m = list_act(m) - two_body_dm_ab_diag_core_act(k,m) represents the core<->active part of the diagonal two body dm - when we traced on the spin - orbital k = list_core(k) - orbital m = list_act(m) - - -`two_body_dm_diag_core_act `_ - two_body_dm_ab_diag_all(k,m) = <\Psi | n_(k\alpha) n_(m\beta) | \Psi> - two_body_dm_ab_diag_act(k,m) is restricted to the active orbitals : - orbital k = list_act(k) - two_body_dm_ab_diag_inact(k,m) is restricted to the inactive orbitals : - orbital k = list_inact(k) - two_body_dm_ab_diag_core(k,m) is restricted to the core orbitals : - orbital k = list_core(k) - two_body_dm_ab_diag_core_b_act_a(k,m) represents the core beta <-> active alpha part of the two body dm - orbital k = list_core(k) - orbital m = list_act(m) - two_body_dm_ab_diag_core_a_act_b(k,m) represents the core alpha <-> active beta part of the two body dm - orbital k = list_core(k) - orbital m = list_act(m) - two_body_dm_ab_diag_core_act(k,m) represents the core<->active part of the diagonal two body dm - when we traced on the spin - orbital k = list_core(k) - orbital m = list_act(m) - - -`two_body_dm_diag_core_b_act_a `_ - two_body_dm_ab_diag_all(k,m) = <\Psi | n_(k\alpha) n_(m\beta) | \Psi> - two_body_dm_ab_diag_act(k,m) is restricted to the active orbitals : - orbital k = list_act(k) - two_body_dm_ab_diag_inact(k,m) is restricted to the inactive orbitals : - orbital k = list_inact(k) - two_body_dm_ab_diag_core(k,m) is restricted to the core orbitals : - orbital k = list_core(k) - two_body_dm_ab_diag_core_b_act_a(k,m) represents the core beta <-> active alpha part of the two body dm - orbital k = list_core(k) - orbital m = list_act(m) - two_body_dm_ab_diag_core_a_act_b(k,m) represents the core alpha <-> active beta part of the two body dm - orbital k = list_core(k) - orbital m = list_act(m) - two_body_dm_ab_diag_core_act(k,m) represents the core<->active part of the diagonal two body dm - when we traced on the spin - orbital k = list_core(k) - orbital m = list_act(m) - - -`two_body_dm_in_map `_ - If True, the map of the two body density matrix alpha/beta is provided - - -`u_0_h_u_0_stored `_ - Computes e_0 = - .br - n : number of determinants - .br - uses the big_matrix_stored array - - -`u_0_s2_u_0 `_ - Computes e_0 = / - .br - n : number of determinants - .br - - -`wf_of_psi_bilinear_matrix `_ - Generate a wave function containing all possible products - of alpha and beta determinants - - -`write_spindeterminants `_ - Undocumented +============ +Determinants +============ +Contains everything for the computation of the Hamiltonian in the basis of Slater determinants. diff --git a/src/Determinants/truncate_wf.irp.f b/src/Determinants/truncate_wf.irp.f deleted file mode 100644 index 6d5e2c98..00000000 --- a/src/Determinants/truncate_wf.irp.f +++ /dev/null @@ -1,91 +0,0 @@ -program s2_eig_restart - implicit none - read_wf = .True. - if (s2_eig) then - call routine_s2 - else - call routine - endif -end - -subroutine routine - implicit none - integer :: ndet_max - print*, 'Max number of determinants ?' - read(5,*)ndet_max - integer(bit_kind), allocatable :: psi_det_tmp(:,:,:) - double precision, allocatable :: psi_coef_tmp(:,:) - allocate(psi_det_tmp(N_int,2,ndet_max),psi_coef_tmp(ndet_max, N_states)) - - integer :: i,j - double precision :: accu(N_states) - accu = 0.d0 - do i = 1, ndet_max - do j = 1, N_int - psi_det_tmp(j,1,i) = psi_det_sorted(j,1,i) - psi_det_tmp(j,2,i) = psi_det_sorted(j,2,i) - enddo - do j = 1, N_states - psi_coef_tmp(i,j) = psi_coef_sorted(i,j) - accu(j) += psi_coef_tmp(i,j) **2 - enddo - enddo - do j = 1, N_states - accu(j) = 1.d0/dsqrt(accu(j)) - enddo - do j = 1, N_states - do i = 1, ndet_max - psi_coef_tmp(i,j) = psi_coef_tmp(i,j) * accu(j) - enddo - enddo - - call save_wavefunction_general(ndet_max,N_states,psi_det_tmp,size(psi_coef_tmp,1),psi_coef_tmp) - -end - -subroutine routine_s2 - implicit none - integer :: ndet_max - double precision :: wmin - integer(bit_kind), allocatable :: psi_det_tmp(:,:,:) - double precision, allocatable :: psi_coef_tmp(:,:) - integer :: i,j,k - double precision :: accu(N_states) - - print*, 'Min weight of the occupation pattern ?' - read(5,*) wmin - - ndet_max = 0 - do i=1,N_det - if (maxval(weight_occ_pattern( det_to_occ_pattern(i),:)) < wmin) cycle - ndet_max = ndet_max+1 - enddo - - allocate(psi_det_tmp(N_int,2,ndet_max),psi_coef_tmp(ndet_max, N_states)) - - accu = 0.d0 - k=0 - do i = 1, N_det - if (maxval(weight_occ_pattern( det_to_occ_pattern(i),:)) < wmin) cycle - k = k+1 - do j = 1, N_int - psi_det_tmp(j,1,k) = psi_det(j,1,i) - psi_det_tmp(j,2,k) = psi_det(j,2,i) - enddo - do j = 1, N_states - psi_coef_tmp(k,j) = psi_coef(i,j) - accu(j) += psi_coef_tmp(k,j) **2 - enddo - enddo - do j = 1, N_states - accu(j) = 1.d0/dsqrt(accu(j)) - enddo - do j = 1, N_states - do i = 1, ndet_max - psi_coef_tmp(i,j) = psi_coef_tmp(i,j) * accu(j) - enddo - enddo - - call save_wavefunction_general(ndet_max,N_states,psi_det_tmp,size(psi_coef_tmp,1),psi_coef_tmp) - -end diff --git a/src/dress_zmq/EZFIO.cfg.example b/src/Dressing/EZFIO.cfg similarity index 100% rename from src/dress_zmq/EZFIO.cfg.example rename to src/Dressing/EZFIO.cfg diff --git a/src/Dressing/EZFIO.cfg.example b/src/Dressing/EZFIO.cfg.example new file mode 100644 index 00000000..9d9ddb2b --- /dev/null +++ b/src/Dressing/EZFIO.cfg.example @@ -0,0 +1,18 @@ +[thresh_dressed_ci] +type: Threshold +doc: Threshold on the convergence of the dressed CI energy +interface: ezfio,provider,ocaml +default: 1.e-5 + +[n_it_max_dressed_ci] +type: Strictly_positive_int +doc: Maximum number of dressed CI iterations +interface: ezfio,provider,ocaml +default: 10 + +[dress_relative_error] +type: Normalized_float +doc: Stop stochastic PT2 when the relative error is smaller than PT2_relative_error +interface: ezfio,provider,ocaml +default: 0.001 + diff --git a/src/FourIdx/NEEDED_CHILDREN_MODULES b/src/Dressing/NEED similarity index 100% rename from src/FourIdx/NEEDED_CHILDREN_MODULES rename to src/Dressing/NEED diff --git a/src/Dressing/README.rst b/src/Dressing/README.rst new file mode 100644 index 00000000..9c09036d --- /dev/null +++ b/src/Dressing/README.rst @@ -0,0 +1,4 @@ +========= +dress_zmq +========= + diff --git a/src/dress_zmq/alpha_factory.irp.f b/src/Dressing/alpha_factory.irp.f similarity index 100% rename from src/dress_zmq/alpha_factory.irp.f rename to src/Dressing/alpha_factory.irp.f diff --git a/src/dress_zmq/dress_general.irp.f b/src/Dressing/dress_general.irp.f similarity index 100% rename from src/dress_zmq/dress_general.irp.f rename to src/Dressing/dress_general.irp.f diff --git a/src/dress_zmq/dress_slave.irp.f b/src/Dressing/dress_slave.irp.f similarity index 100% rename from src/dress_zmq/dress_slave.irp.f rename to src/Dressing/dress_slave.irp.f diff --git a/src/dress_zmq/dress_stoch_routines.irp.f b/src/Dressing/dress_stoch_routines.irp.f similarity index 100% rename from src/dress_zmq/dress_stoch_routines.irp.f rename to src/Dressing/dress_stoch_routines.irp.f diff --git a/src/dress_zmq/dress_zmq_routines.irp.f b/src/Dressing/dress_zmq_routines.irp.f similarity index 100% rename from src/dress_zmq/dress_zmq_routines.irp.f rename to src/Dressing/dress_zmq_routines.irp.f diff --git a/src/dress_zmq/dressing.irp.f b/src/Dressing/dressing.irp.f similarity index 100% rename from src/dress_zmq/dressing.irp.f rename to src/Dressing/dressing.irp.f diff --git a/src/dress_zmq/dressing_vector.irp.f b/src/Dressing/dressing_vector.irp.f similarity index 100% rename from src/dress_zmq/dressing_vector.irp.f rename to src/Dressing/dressing_vector.irp.f diff --git a/src/dress_zmq/energy.irp.f b/src/Dressing/energy.irp.f similarity index 100% rename from src/dress_zmq/energy.irp.f rename to src/Dressing/energy.irp.f diff --git a/src/dress_zmq/extra_functions.irp.f.example b/src/Dressing/extra_functions.irp.f.example similarity index 100% rename from src/dress_zmq/extra_functions.irp.f.example rename to src/Dressing/extra_functions.irp.f.example diff --git a/src/dress_zmq/run_dress_slave.irp.f b/src/Dressing/run_dress_slave.irp.f similarity index 100% rename from src/dress_zmq/run_dress_slave.irp.f rename to src/Dressing/run_dress_slave.irp.f diff --git a/src/Electrons/NEEDED_CHILDREN_MODULES b/src/Electrons/NEED similarity index 100% rename from src/Electrons/NEEDED_CHILDREN_MODULES rename to src/Electrons/NEED diff --git a/src/Electrons/README.rst b/src/Electrons/README.rst index 484617bb..c53f0191 100644 --- a/src/Electrons/README.rst +++ b/src/Electrons/README.rst @@ -18,44 +18,3 @@ Assumptions * ``elec_alpha_num`` >= ``elec_beta_num`` -Needed Modules -============== - -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - -.. image:: tree_dependency.png - -* `Ezfio_files `_ - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Ezfio_files `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`elec_alpha_num `_ - Numbers of electrons alpha ("up") - - -`elec_beta_num `_ - Numbers of electrons beta ("down") - - -`elec_num `_ - Numbers of alpha ("up") , beta ("down") and total electrons - - -`elec_num_tab `_ - Numbers of alpha ("up") , beta ("down") and total electrons - diff --git a/src/Ezfio_files/NEEDED_CHILDREN_MODULES b/src/Ezfio_files/NEED similarity index 100% rename from src/Ezfio_files/NEEDED_CHILDREN_MODULES rename to src/Ezfio_files/NEED diff --git a/src/Ezfio_files/README.rst b/src/Ezfio_files/README.rst index 17f81a55..5891e6e4 100644 --- a/src/Ezfio_files/README.rst +++ b/src/Ezfio_files/README.rst @@ -5,280 +5,4 @@ Ezfio_files Module This modules essentially contains the name of the EZFIO directory in the ``ezfio_filename`` variable. This is read as the first argument of the command-line, or as the ``QP_INPUT`` environment variable. -Documentation -============= - -.. Do not edit this section. It was auto-generated from the -.. by the `update_README.py` script. - -`ezfio_filename `_ - Name of EZFIO file. It is obtained from the QPACKAGE_INPUT environment - variable if it is set, or as the 1st argument of the command line. - - -`getunitandopen `_ - :f: - file name - .br - :mode: - 'R' : READ, UNFORMATTED - 'W' : WRITE, UNFORMATTED - 'r' : READ, FORMATTED - 'w' : WRITE, FORMATTED - 'a' : APPEND, FORMATTED - 'x' : READ/WRITE, FORMATTED - .br - - -`output_ao_basis `_ - Output file for AO_Basis - - -`output_bitmask `_ - Output file for Bitmask - - -`output_cas_sd `_ - Output file for CAS_SD - - -`output_cis `_ - Output file for CIS - - -`output_cisd `_ - Output file for CISD - - -`output_cisd_selected `_ - Output file for CISD_selected - - -`output_cpu_time_0 `_ - Initial CPU and wall times when printing in the output files - - -`output_determinants `_ - Output file for Determinants - - -`output_electrons `_ - Output file for Electrons - - -`output_ezfio_files `_ - Output file for Ezfio_files - - -`output_full_ci `_ - Output file for Full_CI - - -`output_generators_cas `_ - Output file for Generators_CAS - - -`output_generators_full `_ - Output file for Generators_full - - -`output_hartree_fock `_ - Output file for Hartree_Fock - - -`output_integrals_bielec `_ - Output file for Integrals_Bielec - - -`output_integrals_monoelec `_ - Output file for Integrals_Monoelec - - -`output_mo_basis `_ - Output file for MO_Basis - - -`output_moguess `_ - Output file for MOGuess - - -`output_mrcc_cassd `_ - Output file for MRCC_CASSD - - -`output_mrcc_utils_new `_ - Output file for MRCC_Utils_new - - -`output_nuclei `_ - Output file for Nuclei - - -`output_perturbation `_ - Output file for Perturbation - - -`output_properties `_ - Output file for Properties - - -`output_pseudo `_ - Output file for Pseudo - - -`output_psiref_cas `_ - Output file for Psiref_CAS - - -`output_psiref_utils `_ - Output file for Psiref_Utils - - -`output_qmcchem `_ - Output file for QmcChem - - -`output_selectors_full `_ - Output file for Selectors_full - - -`output_singlerefmethod `_ - Output file for SingleRefMethod - - -`output_utils `_ - Output file for Utils - - -`output_wall_time_0 `_ - Initial CPU and wall times when printing in the output files - - -`write_bool `_ - Write an logical value in output - - -`write_double `_ - Write a double precision value in output - - -`write_int `_ - Write an integer value in output - - -`write_time `_ - Write a time stamp in the output for chronological reconstruction - - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`ezfio_filename `_ - Name of EZFIO file. It is obtained from the QPACKAGE_INPUT environment - variable if it is set, or as the 1st argument of the command line. - - -`ezfio_work_dir `_ - EZFIO/work/ - - -`getunitandopen `_ - :f: - file name - .br - :mode: - 'R' : READ, UNFORMATTED - 'W' : WRITE, UNFORMATTED - 'r' : READ, FORMATTED - 'w' : WRITE, FORMATTED - 'a' : APPEND, FORMATTED - 'x' : READ/WRITE, FORMATTED - .br - - -output_ao_basis - Output file for AO_Basis - - -output_bitmask - Output file for Bitmask - - -`output_cpu_time_0 `_ - Initial CPU and wall times when printing in the output files - - -output_davidson - Output file for Davidson - - -output_determinants - Output file for Determinants - - -output_electrons - Output file for Electrons - - -output_ezfio_files - Output file for Ezfio_files - - -output_hartree_fock - Output file for Hartree_Fock - - -output_integrals_bielec - Output file for Integrals_Bielec - - -output_integrals_monoelec - Output file for Integrals_Monoelec - - -output_mo_basis - Output file for MO_Basis - - -output_moguess - Output file for MOGuess - - -output_nuclei - Output file for Nuclei - - -output_pseudo - Output file for Pseudo - - -output_utils - Output file for Utils - - -`output_wall_time_0 `_ - Initial CPU and wall times when printing in the output files - - -output_zmq - Output file for ZMQ - - -`write_bool `_ - Write an logical value in output - - -`write_double `_ - Write a double precision value in output - - -`write_int `_ - Write an integer value in output - - -`write_time `_ - Write a time stamp in the output for chronological reconstruction diff --git a/src/FCI/EZFIO.cfg b/src/FCI/EZFIO.cfg index e73c08fb..4c74f0b8 100644 --- a/src/FCI/EZFIO.cfg +++ b/src/FCI/EZFIO.cfg @@ -2,37 +2,12 @@ type: double precision doc: Calculated Selected FCI energy interface: ezfio +size: (determinants.n_states) [energy_pt2] type: double precision doc: Calculated FCI energy + PT2 interface: ezfio +size: (determinants.n_states) -[iterative_save] -type: integer -doc: Save data at each iteration : 1(Append) | 2(Overwrite) | 3(NoSave) -interface: ezfio,ocaml -default: 2 -[n_iter] -interface: ezfio -doc: number of iterations -type:integer - -[n_det_iter] -interface: ezfio -doc: number of determinants at iteration -type: integer -size: (full_ci_zmq.n_iter) - -[energy_iter] -interface: ezfio -doc: The energy without a pt2 correction for n_det -type: double precision -size: (determinants.n_states,full_ci_zmq.n_iter) - -[pt2_iter] -interface: ezfio -doc: The pt2 correction for n_det -type: double precision -size: (determinants.n_states,full_ci_zmq.n_iter) diff --git a/src/FCI/FCI.irp.f b/src/FCI/FCI.irp.f index 03989552..d01422e9 100644 --- a/src/FCI/FCI.irp.f +++ b/src/FCI/FCI.irp.f @@ -12,7 +12,6 @@ program fci_zmq logical :: has double precision :: relative_error integer :: N_states_p - character*(512) :: fmt relative_error=PT2_relative_error @@ -86,66 +85,12 @@ program fci_zmq N_states_p = min(N_det,N_states) - print *, '' - print '(A,I12)', 'Summary at N_det = ', N_det - print '(A)', '-----------------------------------' - print *, '' + call ezfio_set_fci_energy_pt2(CI_energy+pt2) call write_double(6,correlation_energy_ratio, 'Correlation ratio') - print *, '' - - write(fmt,*) '(''# ============'',', N_states_p, '(1X,''=============================''))' - write(*,fmt) - write(fmt,*) '(12X,', N_states_p, '(6X,A7,1X,I6,10X))' - write(*,fmt) ('State',k, k=1,N_states_p) - write(fmt,*) '(''# ============'',', N_states_p, '(1X,''=============================''))' - write(*,fmt) - write(fmt,*) '(A12,', N_states_p, '(1X,F14.8,15X))' - write(*,fmt) '# E ', CI_energy(1:N_states_p) - if (N_states_p > 1) then - write(*,fmt) '# Excit. (au)', CI_energy(1:N_states_p)-CI_energy(1) - write(*,fmt) '# Excit. (eV)', (CI_energy(1:N_states_p)-CI_energy(1))*27.211396641308d0 - endif - write(fmt,*) '(A12,', 2*N_states_p, '(1X,F14.8))' - write(*,fmt) '# PT2'//pt2_string, (pt2(k), error(k), k=1,N_states_p) - write(*,'(A)') '#' - write(*,fmt) '# E+PT2 ', (CI_energy(k)+pt2(k),error(k), k=1,N_states_p) - if (N_states_p > 1) then - write(*,fmt) '# Excit. (au)', ( (CI_energy(k)+pt2(k)-CI_energy(1)-pt2(1)), & - dsqrt(error(k)*error(k)+error(1)*error(1)), k=1,N_states_p) - write(*,fmt) '# Excit. (eV)', ( (CI_energy(k)+pt2(k)-CI_energy(1)-pt2(1))*27.211396641308d0, & - dsqrt(error(k)*error(k)+error(1)*error(1))*27.211396641308d0, k=1,N_states_p) - endif - write(fmt,*) '(''# ============'',', N_states_p, '(1X,''=============================''))' - write(*,fmt) - print *, '' - - print *, 'N_det = ', N_det - print *, 'N_states = ', N_states - print*, 'correlation_ratio = ', correlation_energy_ratio - - do k=1, N_states_p - print*,'State ',k - print *, 'PT2 = ', pt2(k) - print *, 'E = ', CI_energy(k) - print *, 'E+PT2'//pt2_string//' = ', CI_energy(k)+pt2(k), ' +/- ', error(k) - enddo - - print *, '-----' - if(N_states.gt.1)then - print *, 'Variational Energy difference (au | eV)' - do i=2, N_states_p - print*,'Delta E = ', (CI_energy(i) - CI_energy(1)), & - (CI_energy(i) - CI_energy(1)) * 27.211396641308d0 - enddo - print *, '-----' - print*, 'Variational + perturbative Energy difference (au | eV)' - do i=2, N_states_p - print*,'Delta E = ', (CI_energy(i)+ pt2(i) - (CI_energy(1) + pt2(1))), & - (CI_energy(i)+ pt2(i) - (CI_energy(1) + pt2(1))) * 27.211396641308d0 - enddo - endif - call ezfio_set_full_ci_zmq_energy_pt2(CI_energy(1)+pt2(1)) - call dump_fci_iterations_value(N_det,CI_energy,pt2) + call print_summary(CI_energy,pt2,error) + call save_iterations(CI_energy,pt2,N_det) + call print_extrapolated_energy(CI_energy,pt2) + N_iter += 1 n_det_before = N_det if (s2_eig) then @@ -168,7 +113,7 @@ program fci_zmq end if call diagonalize_CI call save_wavefunction - call ezfio_set_full_ci_zmq_energy(CI_energy(1)) + call ezfio_set_fci_energy(CI_energy) enddo endif @@ -176,8 +121,8 @@ program fci_zmq threshold_davidson = threshold_davidson_in call diagonalize_CI call save_wavefunction - call ezfio_set_full_ci_zmq_energy(CI_energy(1)) - call ezfio_set_full_ci_zmq_energy_pt2(CI_energy(1)+pt2(1)) + call ezfio_set_fci_energy(CI_energy) + call ezfio_set_fci_energy_pt2(CI_energy+pt2) endif if (do_pt2) then @@ -189,52 +134,16 @@ program fci_zmq threshold_selectors = threshold_selectors_save threshold_generators = threshold_generators_save SOFT_TOUCH threshold_selectors threshold_generators - call ezfio_set_full_ci_zmq_energy(CI_energy(1)) - call ezfio_set_full_ci_zmq_energy_pt2(CI_energy(1)+pt2(1)) + call ezfio_set_fci_energy(CI_energy) + call ezfio_set_fci_energy_pt2(CI_energy+pt2) endif print *, 'N_det = ', N_det print *, 'N_states = ', N_states print*, 'correlation_ratio = ', correlation_energy_ratio - call dump_fci_iterations_value(N_det,CI_energy,pt2) - - print *, '' - print '(A,I12)', 'Summary at N_det = ', N_det - print '(A)', '-----------------------------------' - print *, '' + call save_iterations(CI_energy,pt2,N_det) call write_double(6,correlation_energy_ratio, 'Correlation ratio') - print *, '' - - - N_states_p = min(N_det,N_states) - print *, '' - write(fmt,*) '(''# ============'',', N_states_p, '(1X,''=============================''))' - write(*,fmt) - write(fmt,*) '(12X,', N_states_p, '(6X,A7,1X,I6,10X))' - write(*,fmt) ('State',k, k=1,N_states_p) - write(fmt,*) '(''# ============'',', N_states_p, '(1X,''=============================''))' - write(*,fmt) - write(fmt,*) '(A12,', N_states_p, '(1X,F14.8,15X))' - write(*,fmt) '# E ', CI_energy(1:N_states_p) - if (N_states_p > 1) then - write(*,fmt) '# Excit. (au)', CI_energy(1:N_states_p)-CI_energy(1) - write(*,fmt) '# Excit. (eV)', (CI_energy(1:N_states_p)-CI_energy(1))*27.211396641308d0 - endif - write(fmt,*) '(A12,', 2*N_states_p, '(1X,F14.8))' - write(*,fmt) '# PT2'//pt2_string, (pt2(k), error(k), k=1,N_states_p) - write(*,'(A)') '#' - write(*,fmt) '# E+PT2 ', (CI_energy(k)+pt2(k),error(k), k=1,N_states_p) - if (N_states_p > 1) then - write(*,fmt) '# Excit. (au)', ( (CI_energy(k)+pt2(k)-CI_energy(1)-pt2(1)), & - dsqrt(error(k)*error(k)+error(1)*error(1)), k=1,N_states_p) - write(*,fmt) '# Excit. (eV)', ( (CI_energy(k)+pt2(k)-CI_energy(1)-pt2(1))*27.211396641308d0, & - dsqrt(error(k)*error(k)+error(1)*error(1))*27.211396641308d0, k=1,N_states_p) - endif - write(fmt,*) '(''# ============'',', N_states_p, '(1X,''=============================''))' - write(*,fmt) - print *, '' - - + call print_summary(CI_energy,pt2,error) end diff --git a/src/FCI/NEED b/src/FCI/NEED new file mode 100644 index 00000000..5a2d6dcd --- /dev/null +++ b/src/FCI/NEED @@ -0,0 +1 @@ +Perturbation Selectors_full Generators_full ZMQ MPI DavidsonUndressed Iterations diff --git a/src/FCI/NEEDED_CHILDREN_MODULES b/src/FCI/NEEDED_CHILDREN_MODULES deleted file mode 100644 index cc81a88f..00000000 --- a/src/FCI/NEEDED_CHILDREN_MODULES +++ /dev/null @@ -1 +0,0 @@ -Perturbation Selectors_full Generators_full ZMQ FourIdx MPI DavidsonUndressed diff --git a/src/FCI/PT2.irp.f b/src/FCI/PT2.irp.f index e29fe3dc..049c6ef8 100644 --- a/src/FCI/PT2.irp.f +++ b/src/FCI/PT2.irp.f @@ -35,7 +35,8 @@ subroutine run print *, 'E+PT2 = ', E_CI_before(k)+pt2(k), ' +/- ', error(k) print *, '-----' enddo - call ezfio_set_full_ci_zmq_energy_pt2(E_CI_before(1)+pt2(1)) + call ezfio_set_fci_energy(E_CI_before) + call ezfio_set_fci_energy_pt2(E_CI_before+pt2) end diff --git a/src/FCI/README.rst b/src/FCI/README.rst index f2ee3e80..54b96310 100644 --- a/src/FCI/README.rst +++ b/src/FCI/README.rst @@ -1,426 +1,5 @@ -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Perturbation `_ -* `Selectors_full `_ -* `Generators_full `_ -* `ZMQ `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`add_comb `_ - Undocumented - - -`add_task_to_taskserver `_ - Get a task from the task server - - -`add_task_to_taskserver_recv `_ - Get a task from the task server - - -`add_task_to_taskserver_send `_ - Get a task from the task server - - -`add_to_selection_buffer `_ - Undocumented - - -`assert `_ - Undocumented - - -`bitstring_to_list_in_selection `_ - Gives the inidices(+1) of the bits set to 1 in the bit string - - -`comb_step `_ - Undocumented - - -`comb_teeth `_ - Undocumented - - -`connect_to_taskserver `_ - Connect to the task server and obtain the worker ID - - -`create_selection_buffer `_ - Undocumented - - -`delete_selection_buffer `_ - Undocumented - - -`disconnect_from_taskserver `_ - Disconnect from the task server - - -`do_carlo `_ - Undocumented - - -`end_parallel_job `_ - End a new parallel job with name 'name'. The slave tasks execute subroutine 'slave' - - -`end_zmq_pair_socket `_ - Terminate socket on which the results are sent. - - -`end_zmq_pull_socket `_ - Terminate socket on which the results are sent. - - -`end_zmq_push_socket `_ - Terminate socket on which the results are sent. - - -`end_zmq_sub_socket `_ - Terminate socket on which the results are sent. - - -`end_zmq_to_qp_run_socket `_ - Terminate the socket from the application to qp_run - - -`fci_zmq `_ - Undocumented - - -`fill_buffer_double `_ - Undocumented - - -`first_det_of_comb `_ - Undocumented - - -`first_det_of_teeth `_ - Undocumented - - -`fragment_count `_ - Number of fragments for the deterministic part - - -`fragment_first `_ - Undocumented - - -`get_carlo_workbatch `_ - Undocumented - - -`get_comb `_ - Undocumented - - -`get_d0 `_ - Undocumented - - -`get_d1 `_ - Undocumented - - -`get_d2 `_ - Undocumented - - -`get_first_tooth `_ - Undocumented - - -`get_m0 `_ - Undocumented - - -`get_m1 `_ - Undocumented - - -`get_m2 `_ - Undocumented - - -`get_mask_phase `_ - Undocumented - - -`get_phase_bi `_ - Undocumented - - -`get_task_from_taskserver `_ - Get a task from the task server - - -`initialize_pt2_e0_denominator `_ - If true, initialize pt2_E0_denominator - - -`integral8 `_ - Undocumented - - -`merge_selection_buffers `_ - Merges the selection buffers b1 and b2 into b2 - - -`new_parallel_job `_ - Start a new parallel job with name 'name'. The slave tasks execute subroutine 'slave' - - -`new_zmq_pair_socket `_ - Socket on which the collector and the main communicate - - -`new_zmq_pull_socket `_ - Socket on which the results are sent. If thread is 1, use inproc - - -`new_zmq_push_socket `_ - Socket on which the results are sent. If thread is 1, use inproc - - -`new_zmq_sub_socket `_ - Socket to read the state published by the Task server - - -`new_zmq_to_qp_run_socket `_ - Socket on which the qp_run process replies - - -`past_d1 `_ - Undocumented - - -`past_d2 `_ - Undocumented - - -`provide_everything `_ - Undocumented - - -`pt2_collector `_ - Undocumented - - -`pt2_cweight `_ - Undocumented - - -`pt2_cweight_cache `_ - Undocumented - - -`pt2_e0_denominator `_ - E0 in the denominator of the PT2 - - -`pt2_find `_ - Undocumented - - -`pt2_slave `_ - Helper program to compute the PT2 in distributed mode. - - -`pt2_slave_inproc `_ - Undocumented - - -`pt2_slave_tcp `_ - Undocumented - - -`pt2_stoch `_ - Undocumented - - -`pt2_weight `_ - Undocumented - - -`pt2_weight_inv `_ - Inverse of pt2_weight array - - -`pt2_workload `_ - Undocumented - - -`pull_pt2_results `_ - Undocumented - - -`pull_selection_results `_ - Undocumented - - -`push_pt2_results `_ - Undocumented - - -`push_selection_results `_ - Undocumented - - -`qp_run_address `_ - Address of the qp_run socket - Example : tcp://130.120.229.139:12345 - - -`reset_zmq_addresses `_ - Socket which pulls the results (2) - - -`run_pt2_slave `_ - Undocumented - - -`run_selection_slave `_ - Undocumented - - -`run_wf `_ - Undocumented - - -`select_connected `_ - Undocumented - - -`select_singles_and_doubles `_ - WARNING /!\ : It is assumed that the generators and selectors are psi_det_sorted - - -`selection_collector `_ - Undocumented - - -`selection_slave `_ - Helper program to compute the PT2 in distributed mode. - - -`selection_slave_inproc `_ - Undocumented - - -`size_tbc `_ - Size of the tbc array - - -`sort_selection_buffer `_ - Undocumented - - -`splash_pq `_ - Undocumented - - -`spot_isinwf `_ - Undocumented - - -`switch_qp_run_to_master `_ - Address of the master qp_run socket - Example : tcp://130.120.229.139:12345 - - -`task_done_to_taskserver `_ - Get a task from the task server - - -`wait_for_next_state `_ - Undocumented - - -`wait_for_state `_ - Wait for the ZMQ state to be ready - - -`wait_for_states `_ - Wait for the ZMQ state to be ready - - -`zmq_abort `_ - Aborts a running parallel computation - - -`zmq_context `_ - Context for the ZeroMQ library - - -`zmq_delete_task `_ - When a task is done, it has to be removed from the list of tasks on the qp_run - queue. This guarantees that the results have been received in the pull. - - -`zmq_lock `_ - Context for the ZeroMQ library - - -`zmq_port `_ - Return the value of the ZMQ port from the corresponding integer - - -`zmq_port_start `_ - Address of the qp_run socket - Example : tcp://130.120.229.139:12345 - - -`zmq_pt2 `_ - Undocumented - - -`zmq_selection `_ - Undocumented - - -`zmq_set_running `_ - Set the job to Running in QP-run - - -`zmq_socket_pair_inproc_address `_ - Socket which pulls the results (2) - - -`zmq_socket_pull_inproc_address `_ - Socket which pulls the results (2) - - -`zmq_socket_pull_tcp_address `_ - Socket which pulls the results (2) - - -`zmq_socket_push_inproc_address `_ - Socket which pulls the results (2) - - -`zmq_socket_push_tcp_address `_ - Socket which pulls the results (2) - - -`zmq_socket_sub_tcp_address `_ - Socket which pulls the results (2) - - -`zmq_state `_ - Threads executing work through the ZeroMQ interface +=== +FCI +=== +Selected Full Configuration Interaction. diff --git a/src/FCI/dump_fci_iterations_value.irp.f b/src/FCI/dump_fci_iterations_value.irp.f deleted file mode 100644 index 08ae05ac..00000000 --- a/src/FCI/dump_fci_iterations_value.irp.f +++ /dev/null @@ -1,130 +0,0 @@ -subroutine dump_fci_iterations_value(n_determinants,energy,pt2) - implicit none - -! Not using an irp.f90 environment because the SAVE statement is needed for simpler code - -! BEGIN_DOC -!! Output the number of determinants, energy, and pt2 correction at each iteration -! END_DOC - integer, intent(in) :: n_determinants - double precision, intent(in) :: energy(N_states), pt2(N_states) - integer :: N_iterations - integer, allocatable :: n_determinants_list(:) - double precision, allocatable :: energy_list(:,:) - double precision, allocatable :: pt2_list(:,:) - integer :: saveMethod - logical :: hasIter - logical,save :: firstAccess=.TRUE. !! every update of firstAccess will be saved - double precision, allocatable :: extrapolated_energy(:,:) - integer :: i,k - - !!! Check to ensure that we should save iterations (default is Append) - ! saveMethod: 1==Append, 2==Overwrite, 3==NoSave - if (N_det < N_states) then - return - endif - call ezfio_get_full_ci_zmq_iterative_save(saveMethod) - - !!! Check we are saving data - if (saveMethod/=3) then - - !!! If the iteration number exists get it - !!! otherwise set it to zero - call ezfio_has_full_ci_zmq_n_iter(hasIter) - if (hasIter) then - call ezfio_get_full_ci_zmq_n_iter(N_iterations) - else - N_iterations=0 - endif - - !!! If it is append we don't have to do any more checks - !!! N_iterations will be correct now. - - !!! If we should overwrite and this is the first time - !!! Then we need to reset N_iterations to zero - if ((saveMethod==2).AND.(firstAccess)) then - N_iterations=0 - endif - - !! Now allocate the array for entire size needed - allocate(extrapolated_energy(N_iterations+1,N_states)) - allocate(n_determinants_list(N_iterations+1)) - allocate(energy_list(N_states,N_iterations+1)) - allocate(pt2_list(N_states,N_iterations+1)) - - !!! Pull previously written data - !!! Unless it is at the beginning of a new/restarted calculation - if((hasIter).AND.(N_iterations>0)) then - call ezfio_get_full_ci_zmq_n_det_iter(n_determinants_list) - call ezfio_get_full_ci_zmq_energy_iter(energy_list) - call ezfio_get_full_ci_zmq_pt2_iter(pt2_list) - endif - - !! Now increment to the current iteration - N_iterations = N_iterations+1 - - !! Add the data from latest iteration - n_determinants_list(N_iterations) = n_determinants - energy_list(:,N_iterations) = energy(:) - pt2_list(:,N_iterations) = pt2(:) - - if (N_iterations > 2) then - write(*,'(A)') '' - write(*,'(A)') 'Extrapolated energies' - write(*,'(A)') '------------------------' - write(*,'(A)') '' - - do i=1, min(N_states,N_det) - call extrapolate_data(N_iterations, energy_list(i,1:N_iterations), pt2_list(i,1:N_iterations), extrapolated_energy(1:N_iterations,i)) - enddo - - print *, '' - print *, 'State ', 1 - print *, '' - write(*,*) '=========== ', '===================' - write(*,*) 'minimum PT2 ', 'Extrapolated energy' - write(*,*) '=========== ', '===================' - do k=2,min(N_iterations,8) - write(*,'(F11.4,2X,F18.8)') pt2_list(1,N_iterations+1-k), extrapolated_energy(k,1) - enddo - write(*,*) '=========== ', '===================' - - do i=2, min(N_states,N_det) - print *, '' - print *, 'State ', i - print *, '' - write(*,*) '=========== ', '=================== ', '=================== ', '===================' - write(*,*) 'minimum PT2 ', 'Extrapolated energy ', ' Excitation (a.u) ', ' Excitation (eV) ' - write(*,*) '=========== ', '=================== ', '=================== ', '===================' - do k=2,min(N_iterations,8) - write(*,'(F11.4,X,3(X,F18.8))') pt2_list(i,N_iterations+1-k), extrapolated_energy(k,i), & - extrapolated_energy(k,i) - extrapolated_energy(k,1), & - (extrapolated_energy(k,i) - extrapolated_energy(k,1) ) * 27.211396641308d0 - enddo - write(*,*) '=========== ', '=================== ', '=================== ', '===================' - enddo - - print *, '' - endif - - - ! Reset the iteration number - call ezfio_set_full_ci_zmq_n_iter(N_iterations) - - !!!! Now reset the ezfio values - !!!! To include the latest data - call ezfio_set_full_ci_zmq_n_det_iter(n_determinants_list) - call ezfio_set_full_ci_zmq_energy_iter(energy_list) - call ezfio_set_full_ci_zmq_pt2_iter(pt2_list) - - deallocate(n_determinants_list) - deallocate(energy_list) - deallocate(pt2_list) - - endif - - !!! set first access to false - !!! it will be saved - firstAccess=.FALSE. - end subroutine - diff --git a/src/FCI/selection_slave.irp.f b/src/FCI/selection_slave.irp.f deleted file mode 100644 index bfb1480b..00000000 --- a/src/FCI/selection_slave.irp.f +++ /dev/null @@ -1,157 +0,0 @@ -program selection_slave - implicit none - BEGIN_DOC -! Helper program to compute the PT2 in distributed mode. - END_DOC - - read_wf = .False. - distributed_davidson = .False. - SOFT_TOUCH read_wf distributed_davidson - call provide_everything - call switch_qp_run_to_master - call run_wf -end - -subroutine provide_everything - PROVIDE H_apply_buffer_allocated mo_bielec_integrals_in_map psi_det_generators psi_coef_generators psi_det_sorted_bit psi_selectors n_det_generators n_states generators_bitmask zmq_context n_states_diag - PROVIDE pt2_e0_denominator mo_tot_num N_int ci_energy mpi_master zmq_state zmq_context - PROVIDE psi_det psi_coef -end - -subroutine run_wf - use f77_zmq - - implicit none - IRP_IF MPI - include 'mpif.h' - IRP_ENDIF - - integer(ZMQ_PTR), external :: new_zmq_to_qp_run_socket - integer(ZMQ_PTR) :: zmq_to_qp_run_socket - double precision :: energy(N_states) - character*(64) :: states(3) - character*(64) :: old_state - integer :: rc, i, ierr - double precision :: t0, t1 - - integer, external :: zmq_get_dvector, zmq_get_N_det_generators - integer, external :: zmq_get_ivector - integer, external :: zmq_get_psi, zmq_get_N_det_selectors - integer, external :: zmq_get_N_states_diag - - call provide_everything - - zmq_context = f77_zmq_ctx_new () - states(1) = 'selection' - states(2) = 'davidson' - states(3) = 'pt2' - old_state = 'Waiting' - - zmq_to_qp_run_socket = new_zmq_to_qp_run_socket() - - do - - if (mpi_master) then - call wait_for_states(states,zmq_state,size(states)) - if (zmq_state(1:64) == old_state(1:64)) then - call sleep(1) - cycle - else - old_state(1:64) = zmq_state(1:64) - endif - print *, trim(zmq_state) - endif - - IRP_IF MPI - call MPI_BCAST (zmq_state, 128, MPI_CHARACTER, 0, MPI_COMM_WORLD, ierr) - if (ierr /= MPI_SUCCESS) then - print *, irp_here, 'error in broadcast of zmq_state' - endif - IRP_ENDIF - - if(zmq_state(1:7) == 'Stopped') then - exit - endif - - - if (zmq_state(1:9) == 'selection') then - - ! Selection - ! --------- - - call wall_time(t0) - if (zmq_get_psi(zmq_to_qp_run_socket,1) == -1) cycle - if (zmq_get_dvector(zmq_to_qp_run_socket,1,'threshold_generators',threshold_generators,1) == -1) cycle - if (zmq_get_dvector(zmq_to_qp_run_socket,1,'threshold_selectors',threshold_selectors,1) == -1) cycle - if (zmq_get_dvector(zmq_to_qp_run_socket,1,'energy',energy,N_states) == -1) cycle - if (zmq_get_N_det_generators (zmq_to_qp_run_socket, 1) == -1) cycle - if (zmq_get_N_det_selectors(zmq_to_qp_run_socket, 1) == -1) cycle - if (zmq_get_dvector(zmq_to_qp_run_socket,1,'state_average_weight',state_average_weight,N_states) == -1) cycle - psi_energy(1:N_states) = energy(1:N_states) - TOUCH psi_energy state_average_weight threshold_selectors threshold_generators - - if (mpi_master) then - print *, 'N_det', N_det - print *, 'N_det_generators', N_det_generators - print *, 'N_det_selectors', N_det_selectors - print *, 'psi_energy', psi_energy - print *, 'pt2_stoch_istate', pt2_stoch_istate - print *, 'state_average_weight', state_average_weight - endif - call wall_time(t1) - call write_double(6,(t1-t0),'Broadcast time') - - !$OMP PARALLEL PRIVATE(i) - i = omp_get_thread_num() - call run_selection_slave(0,i,energy) - !$OMP END PARALLEL - print *, 'Selection done' - IRP_IF MPI - call MPI_BARRIER(MPI_COMM_WORLD, ierr) - if (ierr /= MPI_SUCCESS) then - print *, irp_here, 'error in barrier' - endif - IRP_ENDIF - print *, 'All selection done' - if (N_det < 100000) then - exit - endif - - else if (zmq_state(1:8) == 'davidson') then - - ! Davidson - ! -------- - - call wall_time(t0) - if (zmq_get_psi(zmq_to_qp_run_socket,1) == -1) cycle - if (zmq_get_N_states_diag(zmq_to_qp_run_socket,1) == -1) cycle - if (zmq_get_dvector(zmq_to_qp_run_socket,1,'energy',energy,N_states_diag) == -1) cycle - - call wall_time(t1) - if (mpi_master) then - call write_double(6,(t1-t0),'Broadcast time') - endif - - call omp_set_nested(.True.) - call davidson_slave_tcp(0) - call omp_set_nested(.False.) - print *, 'Davidson done' - IRP_IF MPI - call MPI_BARRIER(MPI_COMM_WORLD, ierr) - if (ierr /= MPI_SUCCESS) then - print *, irp_here, 'error in barrier' - endif - IRP_ENDIF - print *, 'All Davidson done' - exit - - endif - - end do - IRP_IF MPI - call MPI_finalize(ierr) - IRP_ENDIF -end - - - diff --git a/src/Integrals_Bielec/four_idx_transform.irp.f b/src/FourIdx/Four_idx_transform.irp.f similarity index 100% rename from src/Integrals_Bielec/four_idx_transform.irp.f rename to src/FourIdx/Four_idx_transform.irp.f diff --git a/src/FourIdx/NEED b/src/FourIdx/NEED new file mode 100644 index 00000000..806b2268 --- /dev/null +++ b/src/FourIdx/NEED @@ -0,0 +1 @@ +Integrals_Bielec diff --git a/src/FourIdx/four_index.irp.f b/src/FourIdx/four_index.irp.f deleted file mode 100644 index bded6d00..00000000 --- a/src/FourIdx/four_index.irp.f +++ /dev/null @@ -1,282 +0,0 @@ -subroutine four_index_transform(map_a,map_c,matrix_B,LDB, & - i_start, j_start, k_start, l_start, & - i_end , j_end , k_end , l_end , & - a_start, b_start, c_start, d_start, & - a_end , b_end , c_end , d_end ) - implicit none - use map_module - use mmap_module - BEGIN_DOC -! Performs a four-index transformation of map_a(N^4) into map_c(M^4) using b(NxM) -! C_{abcd} = \sum_{ijkl} A_{ijkl}.B_{ia}.B_{jb}.B_{kc}.B_{ld} -! Loops run over *_start->*_end - END_DOC - type(map_type), intent(in) :: map_a - type(map_type), intent(inout) :: map_c - integer, intent(in) :: LDB - double precision, intent(in) :: matrix_B(LDB,*) - integer, intent(in) :: i_start, j_start, k_start, l_start - integer, intent(in) :: i_end , j_end , k_end , l_end - integer, intent(in) :: a_start, b_start, c_start, d_start - integer, intent(in) :: a_end , b_end , c_end , d_end - - double precision, allocatable :: T(:,:), U(:,:,:), V(:,:) - double precision, allocatable :: T2d(:,:), V2d(:,:) - integer :: i_max, j_max, k_max, l_max - integer :: i_min, j_min, k_min, l_min - integer :: i, j, k, l, ik, ll - integer :: l_start_block, l_end_block, l_block - integer :: a, b, c, d - double precision, external :: get_ao_bielec_integral - integer*8 :: ii - integer(key_kind) :: idx - real(integral_kind) :: tmp - integer(key_kind), allocatable :: key(:) - real(integral_kind), allocatable :: value(:) - integer*8, allocatable :: l_pointer(:) - - ASSERT (k_start == i_start) - ASSERT (l_start == j_start) - ASSERT (a_start == c_start) - ASSERT (b_start == d_start) - - i_min = min(i_start,a_start) - i_max = max(i_end ,a_end ) - j_min = min(j_start,b_start) - j_max = max(j_end ,b_end ) - k_min = min(k_start,c_start) - k_max = max(k_end ,c_end ) - l_min = min(l_start,d_start) - l_max = max(l_end ,d_end ) - - ASSERT (0 < i_max) - ASSERT (0 < j_max) - ASSERT (0 < k_max) - ASSERT (0 < l_max) - ASSERT (LDB >= i_max) - ASSERT (LDB >= j_max) - ASSERT (LDB >= k_max) - ASSERT (LDB >= l_max) - - integer*4, allocatable :: a_array_ik(:) - integer*4, allocatable :: a_array_j(:) - double precision, allocatable :: a_array_value(:) - - integer*8 :: new_size - new_size = max(1024_8, 10_8 * map_a % n_elements ) - - allocate(a_array_ik(new_size), a_array_j(new_size), a_array_value(new_size)) - - integer :: ipass, npass - integer*8 :: tempspace - - tempspace = (new_size * 16_8) / (1024_8 * 1024_8) - npass = int(min(int(l_end-l_start,8),1_8 + tempspace / 2048_8),4) ! 2 GiB of scratch space - l_block = (l_end-l_start+1)/npass - - ipass = 0 - do l_start_block = l_start, l_end, l_block - ipass = ipass+1 - print *, 'Pass ', ipass - l_end_block = min(l_end, l_start_block+l_block-1) - - allocate(l_pointer(l_start_block:l_end_block+1), value((i_max*k_max)) ) - ii = 1_8 - !$OMP PARALLEL DEFAULT(SHARED) PRIVATE(i,j,k,l,ik,idx) - do l=l_start_block,l_end_block - !$OMP SINGLE - l_pointer(l) = ii - !$OMP END SINGLE - do j=j_start,j_end - !$OMP DO SCHEDULE(static,16) - do k=k_start,k_end - do i=i_start,i_end - ik = (i-i_start+1) + (k-k_start)*(k_end-k_start+1) - call bielec_integrals_index(i,j,k,l,idx) - call map_get(map_a,idx,value(ik)) - enddo - enddo - !$OMP END DO - - !$OMP SINGLE - ik=0 - do k=k_start,k_end - do i=i_start,i_end - ik = ik+1 - tmp=value(ik) - if (tmp /= 0.d0) then - a_array_ik(ii) = ik - a_array_j(ii) = j - a_array_value(ii) = tmp - ii=ii+1_8 - endif - enddo - enddo - !$OMP END SINGLE - enddo - enddo - !$OMP SINGLE - a_array_ik(ii) = 0 - a_array_j(ii) = 0 - a_array_value(ii) = 0.d0 - l_pointer(l_end_block+1) = ii - !$OMP END SINGLE - !$OMP END PARALLEL - deallocate(value) - - !INPUT DATA - !open(unit=10,file='INPUT',form='UNFORMATTED') - !write(10) i_start, j_start, i_end, j_end - !write(10) a_start, b_start, a_end, b_end - !write(10) LDB, mo_tot_num - !write(10) matrix_B(1:LDB,1:mo_tot_num) - !idx=size(a_array) - !write(10) idx - !write(10) a_array - !write(10) l_pointer - !close(10) - !open(unit=10,file='OUTPUT',form='FORMATTED') - ! END INPUT DATA - - - !$OMP PARALLEL DEFAULT(NONE) SHARED(a_array_ik,a_array_j,a_array_value,& - !$OMP a_start,a_end,b_start,b_end,c_start,c_end,d_start,d_end,& - !$OMP i_start,i_end,j_start,j_end,k_start,k_end,l_start_block,l_end_block,& - !$OMP i_min,i_max,j_min,j_max,k_min,k_max,l_min,l_max, & - !$OMP map_c,matrix_B,l_pointer) & - !$OMP PRIVATE(key,value,T,U,V,i,j,k,l,idx,ik,ll, & - !$OMP a,b,c,d,tmp,T2d,V2d,ii,p,q) - allocate( key(i_max*j_max*k_max), value(i_max*j_max*k_max) ) - allocate( U(a_start:a_end, c_start:c_end, b_start:b_end) ) - - - - allocate( T2d((i_end-i_start+1)*(k_end-k_start+1), j_start:j_end), & - V2d((i_end-i_start+1)*(k_end-k_start+1), b_start:b_end), & - V(i_start:i_end, k_start:k_end), & - T(k_start:k_end, a_start:a_end)) - - - !$OMP DO SCHEDULE(dynamic) - do d=d_start,d_end - U = 0.d0 - do l=l_start_block,l_end_block - if (dabs(matrix_B(l,d)) < 1.d-10) then - cycle - endif - - ii=l_pointer(l) - do j=j_start,j_end - !DIR$ VECTOR NONTEMPORAL - T2d(:,j) = 0.d0 - !DIR$ IVDEP - do while (j == a_array_j(ii)) - T2d(a_array_ik(ii),j) = a_array_value(ii) - ii = ii + 1_8 - enddo - enddo - - call DGEMM('N','N', (i_end-i_start+1)*(k_end-k_start+1) ,& - (b_end-b_start+1), (j_end-j_start+1), 1.d0, & - T2d(1,j_start), size(T2d,1), & - matrix_B(j_start,b_start), size(matrix_B,1),0.d0, & - V2d(1,b_start), size(V2d,1) ) - - do b=b_start,b_end - ik = 0 - do k=k_start,k_end - do i=i_start,i_end - ik = ik+1 - V(i,k) = V2d(ik,b) - enddo - enddo - - ! T = 0.d0 - ! do a=a_start,a_end - ! do k=k_start,k_end - ! do i=i_start,i_end - ! T(k,a) = T(k,a) + V(k,i)*matrix_B(i,a) - ! enddo - ! enddo - ! enddo - call DGEMM('N','N', (k_end-k_start+1), (a_end-a_start+1), & - (i_end-i_start+1), 1.d0, & - V(i_start,k_start), size(V,1), & - matrix_B(i_start,a_start), size(matrix_B,1),0.d0, & - T(k_start,a_start), size(T,1) ) - - ! do c=c_start,c_end - ! do a=a_start,a_end - ! do k=k_start,k_end - ! U(a,c,b) = U(a,c,b) + T(k,a)*matrix_B(k,c)*matrix_B(l,d) - ! enddo - ! enddo - ! enddo - call DGEMM('T','N', (a_end-a_start+1), (c_end-c_start+1), & - (k_end-k_start+1), matrix_B(l, d), & - T(k_start,a_start), size(T,1), & - matrix_B(k_start,c_start), size(matrix_B,1), 1.d0, & - U(a_start,c_start,b), size(U,1) ) - enddo - enddo - - idx = 0_8 - -! TODO : Remove symmetry in storage - integer :: p, q - do b=b_start,d - q = b+ishft(d*d-d,-1) - do c=c_start,c_end - p = a_start+ishft(c*c-c,-1) - do a=a_start,min(b,c) - if (dabs(U(a,c,b)) < 1.d-15) then - cycle - endif - if ((a==b).and.(p>q)) cycle - p = p+1 - idx = idx+1_8 - call bielec_integrals_index(a,b,c,d,key(idx)) -!print *, int(key(idx),4), int(a,2),int(b,2),int(c,2),int(d,2), p, q - value(idx) = U(a,c,b) - enddo - enddo - enddo - - - - - - - !$OMP CRITICAL - call map_update(map_c, key, value, idx,1.d-15) - !$OMP END CRITICAL - - !WRITE OUTPUT - ! OMP CRITICAL - !print *, d - !do b=b_start,d - ! do c=c_start,c_end - ! do a=a_start,min(b,c) - ! if (dabs(U(a,c,b)) < 1.d-15) then - ! cycle - ! endif - ! write(10,*) d,c,b,a,U(a,c,b) - ! enddo - ! enddo - !enddo - ! OMP END CRITICAL - !END WRITE OUTPUT - - - enddo - !$OMP END DO - - deallocate(key,value,V,T) - !$OMP END PARALLEL - call map_merge(map_c) - - deallocate(l_pointer) - enddo - deallocate(a_array_ik,a_array_j,a_array_value) - -end diff --git a/src/FourIdx/four_index_block.irp.f b/src/FourIdx/four_index_block.irp.f deleted file mode 100644 index 95710381..00000000 --- a/src/FourIdx/four_index_block.irp.f +++ /dev/null @@ -1,296 +0,0 @@ -subroutine four_index_transform_block(map_a,map_c,matrix_B,LDB, & - i_start, j_start, k_start, l_start, & - i_end , j_end , k_end , l_end , & - a_start, b_start, c_start, d_start, & - a_end , b_end , c_end , d_end ) - implicit none - use map_module - use mmap_module - BEGIN_DOC -! Performs a four-index transformation of map_a(N^4) into map_c(M^4) using b(NxM) -! C_{abcd} = \sum_{ijkl} A_{ijkl}.B_{ia}.B_{jb}.B_{kc}.B_{ld} -! Loops run over *_start->*_end - END_DOC - type(map_type), intent(in) :: map_a - type(map_type), intent(inout) :: map_c - integer, intent(in) :: LDB - double precision, intent(in) :: matrix_B(LDB,*) - integer, intent(in) :: i_start, j_start, k_start, l_start - integer, intent(in) :: i_end , j_end , k_end , l_end - integer, intent(in) :: a_start, b_start, c_start, d_start - integer, intent(in) :: a_end , b_end , c_end , d_end - - double precision, allocatable :: T(:,:), U(:,:,:), V(:,:) - double precision, allocatable :: T2d(:,:), V2d(:,:) - integer :: i_max, j_max, k_max, l_max - integer :: i_min, j_min, k_min, l_min - integer :: i, j, k, l, ik, ll - integer :: l_start_block, l_end_block, l_block - integer :: a, b, c, d - double precision, external :: get_ao_bielec_integral - integer*8 :: ii - integer(key_kind) :: idx - real(integral_kind) :: tmp - integer(key_kind), allocatable :: key(:) - real(integral_kind), allocatable :: value(:) - integer*8, allocatable :: l_pointer(:) - - ASSERT (k_start == i_start) - ASSERT (l_start == j_start) - ASSERT (a_start == c_start) - ASSERT (b_start == d_start) - - i_min = min(i_start,a_start) - i_max = max(i_end ,a_end ) - j_min = min(j_start,b_start) - j_max = max(j_end ,b_end ) - k_min = min(k_start,c_start) - k_max = max(k_end ,c_end ) - l_min = min(l_start,d_start) - l_max = max(l_end ,d_end ) - - ASSERT (0 < i_max) - ASSERT (0 < j_max) - ASSERT (0 < k_max) - ASSERT (0 < l_max) - ASSERT (LDB >= i_max) - ASSERT (LDB >= j_max) - ASSERT (LDB >= k_max) - ASSERT (LDB >= l_max) - - integer*4, allocatable :: a_array_ik(:) - integer*4, allocatable :: a_array_j(:) - double precision, allocatable :: a_array_value(:) - - integer*8 :: new_size - new_size = max(1024_8, 5_8 * map_a % n_elements ) - - integer*8 :: tempspace - - tempspace = (new_size * 16_8) / (1024_8 * 1024_8) - npass = int(min(int(l_end-l_start,8),1_8 + tempspace / 2048_8),4) ! 2 GiB of scratch space - l_block = (l_end-l_start+1)/npass - - allocate(a_array_ik(new_size/npass), a_array_j(new_size/npass), a_array_value(new_size/npass)) - - integer :: ipass, npass - ipass = 0 - do l_start_block = l_start, l_end, l_block - ipass = ipass+1 - print *, 'Pass ', ipass - l_end_block = min(l_end, l_start_block+l_block-1) - - allocate(l_pointer(l_start_block:l_end_block+1), value((i_max*k_max)) ) - ii = 1_8 - !$OMP PARALLEL DEFAULT(SHARED) PRIVATE(i,j,k,l,ik,idx) - do l=l_start_block,l_end_block - !$OMP SINGLE - l_pointer(l) = ii - !$OMP END SINGLE - do j=j_start,j_end - !$OMP DO SCHEDULE(static,16) - do k=k_start,k_end - do i=i_start,k - ik = (i-i_start+1) + ishft( (k-k_start)*(k-k_start+1), -1 ) - call bielec_integrals_index(i,j,k,l,idx) - call map_get(map_a,idx,value(ik)) - enddo - enddo - !$OMP END DO - - !$OMP SINGLE - ik=0 - do k=k_start,k_end - do i=i_start,k - ik = ik+1 - tmp=value(ik) - if (tmp /= 0.d0) then - a_array_ik(ii) = ik - a_array_j(ii) = j - a_array_value(ii) = tmp - ii=ii+1_8 - endif - enddo - enddo - !$OMP END SINGLE - enddo - enddo - !$OMP SINGLE - a_array_ik(ii) = 0 - a_array_j(ii) = 0 - a_array_value(ii) = 0.d0 - l_pointer(l_end_block+1) = ii - !$OMP END SINGLE - !$OMP END PARALLEL - deallocate(value) - - !INPUT DATA - !open(unit=10,file='INPUT',form='UNFORMATTED') - !write(10) i_start, j_start, i_end, j_end - !write(10) a_start, b_start, a_end, b_end - !write(10) LDB, mo_tot_num - !write(10) matrix_B(1:LDB,1:mo_tot_num) - !idx=size(a_array) - !write(10) idx - !write(10) a_array - !write(10) l_pointer - !close(10) - !open(unit=10,file='OUTPUT',form='FORMATTED') - ! END INPUT DATA - - - !$OMP PARALLEL DEFAULT(NONE) SHARED(a_array_ik,a_array_j,a_array_value,& - !$OMP a_start,a_end,b_start,b_end,c_start,c_end,d_start,d_end,& - !$OMP i_start,i_end,j_start,j_end,k_start,k_end,l_start_block,l_end_block,& - !$OMP i_min,i_max,j_min,j_max,k_min,k_max,l_min,l_max, & - !$OMP map_c,matrix_B,l_pointer) & - !$OMP PRIVATE(key,value,T,U,V,i,j,k,l,idx,ik,ll, & - !$OMP a,b,c,d,tmp,T2d,V2d,ii,p,q) - allocate( key(i_max*j_max*k_max), value(i_max*j_max*k_max) ) - allocate( U(a_start:a_end, c_start:c_end, b_start:b_end) ) - - - - allocate( T2d((i_end-i_start+1)*(k_end-k_start+2)/2, j_start:j_end), & - V2d((i_end-i_start+1)*(k_end-k_start+2)/2, b_start:b_end), & - V(i_start:i_end, k_start:k_end), & - T(k_start:k_end, a_start:a_end)) - - - !$OMP DO SCHEDULE(dynamic) - do d=d_start,d_end - U = 0.d0 - do l=l_start_block,l_end_block - if (dabs(matrix_B(l,d)) < 1.d-10) then - cycle - endif - - ii=l_pointer(l) - do j=j_start,j_end - !DIR$ VECTOR NONTEMPORAL - T2d(:,j) = 0.d0 - !DIR$ IVDEP - do while (j == a_array_j(ii)) - T2d(a_array_ik(ii),j) = a_array_value(ii) - ii = ii + 1_8 - enddo - enddo - - call DGEMM('N','N', ishft( (i_end-i_start+1)*(i_end-i_start+2), -1),& - (d-b_start+1), & - (j_end-j_start+1), 1.d0, & - T2d(1,j_start), size(T2d,1), & - matrix_B(j_start,b_start), size(matrix_B,1),0.d0, & - V2d(1,b_start), size(V2d,1) ) - - do b=b_start,d - ik = 0 - do k=k_start,k_end - do i=i_start,k - ik = ik+1 - V(i,k) = V2d(ik,b) - enddo - enddo - - ! T = 0.d0 - ! do a=a_start,b - ! do k=k_start,k_end - ! do i=i_start,k - ! T(k,a) = T(k,a) + V(i,k)*matrix_B(i,a) - ! enddo - ! do i=k+1,i_end - ! T(k,a) = T(k,a) + V(k,i)*matrix_B(i,a) - ! enddo - ! enddo - ! enddo - call DSYMM('L','U', (k_end-k_start+1), (b-a_start+1), & - 1.d0, & - V(i_start,k_start), size(V,1), & - matrix_B(i_start,a_start), size(matrix_B,1),0.d0, & - T(k_start,a_start), size(T,1) ) - - ! do c=c_start,b - ! do a=a_start,c - ! do k=k_start,k_end - ! U(a,c,b) = U(a,c,b) + T(k,a)*matrix_B(k,c)*matrix_B(l,d) - ! enddo - ! enddo - ! enddo - call DGEMM('T','N', (b-a_start+1), (b-c_start+1), & - (k_end-k_start+1), matrix_B(l, d), & - T(k_start,a_start), size(T,1), & - matrix_B(k_start,c_start), size(matrix_B,1), 1.d0, & - U(a_start,c_start,b), size(U,1) ) - ! do c=b+1,c_end - ! do a=a_start,b - ! do k=k_start,k_end - ! U(a,c,b) = U(a,c,b) + T(k,a)*matrix_B(k,c)*matrix_B(l,d) - ! enddo - ! enddo - ! enddo - if (b < b_end) then - call DGEMM('T','N', (b-a_start+1), (c_end-b), & - (k_end-k_start+1), matrix_B(l, d), & - T(k_start,a_start), size(T,1), & - matrix_B(k_start,b+1), size(matrix_B,1), 1.d0, & - U(a_start,b+1,b), size(U,1) ) - endif - enddo - - enddo - - idx = 0_8 - - integer :: p, q - do b=b_start,d - q = b+ishft(d*d-d,-1) - do c=c_start,c_end - p = a_start+ishft(c*c-c,-1) - do a=a_start,min(b,c) - if (dabs(U(a,c,b)) < 1.d-15) then - cycle - endif - if ((a==b).and.(p>q)) cycle - p = p+1 - idx = idx+1_8 - call bielec_integrals_index(a,b,c,d,key(idx)) -!print *, int(key(idx),4), int(a,2),int(b,2),int(c,2),int(d,2), p, q - value(idx) = U(a,c,b) - enddo - enddo - enddo - - - !$OMP CRITICAL - call map_update(map_c, key, value, idx,1.d-15) - !$OMP END CRITICAL - - !WRITE OUTPUT - ! OMP CRITICAL - !print *, d - !do b=b_start,d - ! do c=c_start,c_end - ! do a=a_start,min(b,c) - ! if (dabs(U(a,c,b)) < 1.d-15) then - ! cycle - ! endif - ! write(10,*) d,c,b,a,U(a,c,b) - ! enddo - ! enddo - !enddo - ! OMP END CRITICAL - !END WRITE OUTPUT - - - enddo - !$OMP END DO - - deallocate(key,value,V,T,T2d,V2d,U) - !$OMP END PARALLEL - call map_merge(map_c) - - deallocate(l_pointer) - enddo - deallocate(a_array_ik,a_array_j,a_array_value) - -end diff --git a/src/FourIdx/four_index_slave.irp.f b/src/FourIdx/four_index_slave.irp.f deleted file mode 100644 index ca07062f..00000000 --- a/src/FourIdx/four_index_slave.irp.f +++ /dev/null @@ -1,259 +0,0 @@ -subroutine four_index_transform_slave_work(map_a,matrix_B,LDB, & - i_start, j_start, k_start, l_start, & - i_end , j_end , k_end , l_end , & - a_start, b_start, c_start, d_start, & - a_end , b_end , c_end , d_end, task_id, worker_id, thread ) - implicit none - use f77_zmq - use map_module - use mmap_module - BEGIN_DOC -! Performs a four-index transformation of map_a(N^4) into map_c(M^4) using b(NxM) -! C_{abcd} = \sum_{ijkl} A_{ijkl}.B_{ia}.B_{jb}.B_{kc}.B_{ld} -! Loops run over *_start->*_end - END_DOC - type(map_type), intent(in) :: map_a - integer, intent(in) :: LDB - double precision, intent(in) :: matrix_B(LDB,*) - integer, intent(in) :: i_start, j_start, k_start, l_start - integer, intent(in) :: i_end , j_end , k_end , l_end - integer, intent(in) :: a_start, b_start, c_start, d_start - integer, intent(in) :: a_end , b_end , c_end , d_end - integer, intent(in) :: task_id, thread, worker_id - - double precision, allocatable :: T(:,:), U(:,:,:), V(:,:) - double precision, allocatable :: T2d(:,:), V2d(:,:) - integer :: i_max, j_max, k_max, l_max - integer :: i_min, j_min, k_min, l_min - integer :: i, j, k, l, ik, ll - integer :: a, b, c, d - double precision, external :: get_ao_bielec_integral - integer*8 :: ii - integer(key_kind) :: idx - real(integral_kind) :: tmp - integer(key_kind), allocatable :: key(:) - real(integral_kind), allocatable :: value(:) - integer*8, allocatable :: l_pointer(:) - - ASSERT (k_start == i_start) - ASSERT (l_start == j_start) - ASSERT (a_start == c_start) - ASSERT (b_start == d_start) - - i_min = min(i_start,a_start) - i_max = max(i_end ,a_end ) - j_min = min(j_start,b_start) - j_max = max(j_end ,b_end ) - k_min = min(k_start,c_start) - k_max = max(k_end ,c_end ) - l_min = min(l_start,d_start) - l_max = max(l_end ,d_end ) - - ASSERT (0 < i_max) - ASSERT (0 < j_max) - ASSERT (0 < k_max) - ASSERT (0 < l_max) - ASSERT (LDB >= i_max) - ASSERT (LDB >= j_max) - ASSERT (LDB >= k_max) - ASSERT (LDB >= l_max) - - integer*4, allocatable :: a_array_ik(:) - integer*2, allocatable :: a_array_j(:) - double precision, allocatable :: a_array_value(:) - - integer*8 :: new_size - new_size = max(2048_8, 5_8 * map_a % n_elements ) - - integer*8 :: tempspace - integer :: npass, l_block - - tempspace = (new_size * 16_8) / (2048_8 * 2048_8) - npass = int(min(1_8+int(l_end-l_start,8),1_8 + tempspace / 2048_8),4) ! 2 GiB of scratch space - l_block = (l_end-l_start+1)/npass - - allocate(a_array_ik(new_size/npass), a_array_j(new_size/npass), a_array_value(new_size/npass)) - - - allocate(l_pointer(l_start:l_end+1), value((i_max*k_max)) ) - ii = 1_8 - !$OMP PARALLEL DEFAULT(SHARED) PRIVATE(i,j,k,l,ik,idx) - do l=l_start,l_end - !$OMP SINGLE - l_pointer(l) = ii - !$OMP END SINGLE - do j=j_start,j_end - !$OMP DO SCHEDULE(static,1) - do k=k_start,k_end - do i=i_start,k - ik = (i-i_start+1) + ishft( (k-k_start)*(k-k_start+1), -1 ) - call bielec_integrals_index(i,j,k,l,idx) - call map_get(map_a,idx,value(ik)) - enddo - enddo - !$OMP END DO - - !$OMP SINGLE - ik=0 - do k=k_start,k_end - do i=i_start,k - ik = ik+1 - tmp=value(ik) - if (tmp /= 0.d0) then - a_array_ik(ii) = ik - a_array_j(ii) = int(j,2) ! Warning: integer*2 - a_array_value(ii) = tmp - ii=ii+1_8 - endif - enddo - enddo - !$OMP END SINGLE - enddo - enddo - !$OMP SINGLE - a_array_ik(ii) = 0 - a_array_j(ii) = 0 - a_array_value(ii) = 0.d0 - l_pointer(l_end+1) = ii - !$OMP END SINGLE - !$OMP END PARALLEL - deallocate(value) - -!INPUT DATA -!open(unit=10,file='INPUT',form='UNFORMATTED') -!write(10) i_start, j_start, i_end, j_end -!write(10) a_start, b_start, a_end, b_end -!write(10) LDB, mo_tot_num -!write(10) matrix_B(1:LDB,1:mo_tot_num) -!idx=size(a_array) -!write(10) idx -!write(10) a_array -!write(10) l_pointer -!close(10) -!open(unit=10,file='OUTPUT',form='FORMATTED') -! END INPUT DATA - - !$OMP PARALLEL DEFAULT(NONE) SHARED(a_array_ik,a_array_j,a_array_value, & - !$OMP a_start,a_end,b_start,b_end,c_start,c_end,d_start,d_end,& - !$OMP i_start,i_end,j_start,j_end,k_start,k_end,l_start,l_end,& - !$OMP i_min,i_max,j_min,j_max,k_min,k_max,l_min,l_max, & - !$OMP matrix_B,l_pointer,thread,task_id,worker_id) & - !$OMP PRIVATE(key,value,T,U,V,i,j,k,l,idx,ik,ll,zmq_to_qp_run_socket, & - !$OMP a,b,c,d,p,q,tmp,T2d,V2d,ii,zmq_socket_push) - - integer(ZMQ_PTR) :: zmq_socket_push - integer(ZMQ_PTR), external :: new_zmq_push_socket - zmq_socket_push = new_zmq_push_socket(thread) - - - - allocate( U(a_start:a_end, c_start:c_end, b_start:b_end) ) - - !$OMP DO SCHEDULE(dynamic,1) - do d=d_start,d_end - U = 0.d0 - do l=l_start,l_end - if (dabs(matrix_B(l,d)) < 1.d-10) then - cycle - endif - - allocate( T2d((i_end-i_start+1)*(k_end-k_start+2)/2, j_start:j_end) ) - ii=l_pointer(l) - do j=j_start,j_end - !DIR$ VECTOR NONTEMPORAL - T2d(:,j) = 0.d0 - !DIR$ IVDEP - do while (j == a_array_j(ii)) - T2d(a_array_ik(ii),j) = transfer(a_array_value(ii), 1.d0) - ii = ii + 1_8 - enddo - enddo - - allocate (V2d((i_end-i_start+1)*(k_end-k_start+2)/2, b_start:b_end)) - call DGEMM('N','N', ishft( (i_end-i_start+1)*(i_end-i_start+2), -1),& - (d-b_start+1), & - (j_end-j_start+1), 1.d0, & - T2d(1,j_start), size(T2d,1), & - matrix_B(j_start,b_start), size(matrix_B,1),0.d0, & - V2d(1,b_start), size(V2d,1) ) - deallocate(T2d) - - allocate( V(i_start:i_end, k_start:k_end), T(k_start:k_end, a_start:a_end)) - do b=b_start,d - ik = 0 - do k=k_start,k_end - do i=i_start,k - ik = ik+1 - V(i,k) = V2d(ik,b) - enddo - enddo - - call DSYMM('L','U', (k_end-k_start+1), (b-a_start+1), & - 1.d0, & - V(i_start,k_start), size(V,1), & - matrix_B(i_start,a_start), size(matrix_B,1),0.d0, & - T(k_start,a_start), size(T,1) ) - - call DGEMM('T','N', (b-a_start+1), (b-c_start+1), & - (k_end-k_start+1), matrix_B(l, d), & - T(k_start,a_start), size(T,1), & - matrix_B(k_start,c_start), size(matrix_B,1), 1.d0, & - U(a_start,c_start,b), size(U,1) ) - - if (b < b_end) then - call DGEMM('T','N', (b-a_start+1), (c_end-b), & - (k_end-k_start+1), matrix_B(l, d), & - T(k_start,a_start), size(T,1), & - matrix_B(k_start,b+1), size(matrix_B,1), 1.d0, & - U(a_start,b+1,b), size(U,1) ) - endif - enddo - deallocate(T,V,V2d) - enddo - - idx = 0_8 - - allocate( key(i_max*j_max*k_max), value(i_max*j_max*k_max) ) - integer :: p, q - do b=b_start,d - q = b+ishft(d*d-d,-1) - do c=c_start,c_end - p = a_start+ishft(c*c-c,-1) - do a=a_start,min(b,c) - if (dabs(U(a,c,b)) < 1.d-15) then - cycle - endif - if ((a==b).and.(p>q)) cycle - p = p+1 - idx = idx+1_8 - call bielec_integrals_index(a,b,c,d,key(idx)) -!print *, int(key(idx),4), int(a,2),int(b,2),int(c,2),int(d,2), p, q - value(idx) = U(a,c,b) - enddo - enddo - enddo - - call four_idx_push_results(zmq_socket_push, key, value, idx, -task_id) - deallocate(key,value) - - enddo - deallocate(U) - - !$OMP BARRIER - !$OMP MASTER - integer(ZMQ_PTR) :: zmq_to_qp_run_socket - integer(ZMQ_PTR), external :: task_done_to_taskserver, new_zmq_to_qp_run_socket - zmq_to_qp_run_socket = new_zmq_to_qp_run_socket() - if (task_done_to_taskserver(zmq_to_qp_run_socket,worker_id,task_id) == -1) then - stop 'Unable to send task done' - endif - call four_idx_push_results(zmq_socket_push, 0_8, 0.d0, 0, task_id) - call end_zmq_to_qp_run_socket(zmq_to_qp_run_socket) - !$OMP END MASTER - call end_zmq_push_socket(zmq_socket_push) - !$OMP END PARALLEL - - - deallocate(l_pointer,a_array_ik,a_array_j,a_array_value) - -end diff --git a/src/FourIdx/four_index_zmq.irp.f b/src/FourIdx/four_index_zmq.irp.f deleted file mode 100644 index 2a0c56ce..00000000 --- a/src/FourIdx/four_index_zmq.irp.f +++ /dev/null @@ -1,355 +0,0 @@ -subroutine four_index_transform_zmq(map_a,map_c,matrix_B,LDB, & - i_start, j_start, k_start, l_start, & - i_end , j_end , k_end , l_end , & - a_start, b_start, c_start, d_start, & - a_end , b_end , c_end , d_end ) - implicit none - use f77_zmq - use map_module - BEGIN_DOC -! Performs a four-index transformation of map_a(N^4) into map_c(M^4) using b(NxM) -! C_{abcd} = \sum_{ijkl} A_{ijkl}.B_{ia}.B_{jb}.B_{kc}.B_{ld} -! Loops run over *_start->*_end - END_DOC - type(map_type), intent(in) :: map_a - type(map_type), intent(inout) :: map_c - integer, intent(in) :: LDB - double precision, intent(in) :: matrix_B(LDB,*) - integer, intent(in) :: i_start, j_start, k_start, l_start - integer, intent(in) :: i_end , j_end , k_end , l_end - integer, intent(in) :: a_start, b_start, c_start, d_start - integer, intent(in) :: a_end , b_end , c_end , d_end - - integer :: i_max, j_max, k_max, l_max - integer :: i_min, j_min, k_min, l_min - integer :: i, j, k, l, ik, ll - integer :: l_start_block, l_end_block, l_block - integer :: a, b, c, d - double precision, external :: get_ao_bielec_integral - integer*8 :: ii - integer(key_kind) :: idx - real(integral_kind) :: tmp - integer(key_kind), allocatable :: key(:) - real(integral_kind), allocatable :: value(:) - integer*8, allocatable :: l_pointer(:) - - ASSERT (k_start == i_start) - ASSERT (l_start == j_start) - ASSERT (a_start == c_start) - ASSERT (b_start == d_start) - - i_min = min(i_start,a_start) - i_max = max(i_end ,a_end ) - j_min = min(j_start,b_start) - j_max = max(j_end ,b_end ) - k_min = min(k_start,c_start) - k_max = max(k_end ,c_end ) - l_min = min(l_start,d_start) - l_max = max(l_end ,d_end ) - - ASSERT (0 < i_max) - ASSERT (0 < j_max) - ASSERT (0 < k_max) - ASSERT (0 < l_max) - ASSERT (LDB >= i_max) - ASSERT (LDB >= j_max) - ASSERT (LDB >= k_max) - ASSERT (LDB >= l_max) - - - integer(ZMQ_PTR) :: zmq_to_qp_run_socket - integer(ZMQ_PTR) :: zmq_socket_pull - call new_parallel_job(zmq_to_qp_run_socket,zmq_socket_pull,'four_idx') - - integer*8 :: new_size - new_size = max(2048_8, 5_8 * map_a % n_elements ) - - integer :: npass - integer*8 :: tempspace - - tempspace = (new_size * 16_8) / (2048_8 * 2048_8) - npass = int(min(int(l_end-l_start,8),1_8 + tempspace / 2048_8),4) ! 2 GiB of scratch space - l_block = (l_end-l_start+1)/npass - - ! Create tasks - ! ============ - - character(len=256) :: task - - integer, external :: add_task_to_taskserver - - do l_start_block = l_start, l_end, l_block - l_end_block = min(l_end, l_start_block+l_block-1) - write(task,'(16(I10,X))') & - i_start, j_start, k_start, l_start_block, & - i_end , j_end , k_end , l_end_block , & - a_start, b_start, c_start, d_start, & - a_end , b_end , c_end , d_end - if (add_task_to_taskserver(zmq_to_qp_run_socket,trim(task)) == -1) then - stop 'Unable to add task to server' - endif - enddo - - integer, external :: zmq_set_running - if (zmq_set_running(zmq_to_qp_run_socket) == -1) then - print *, irp_here, ': Failed in zmq_set_running' - endif - - - PROVIDE nproc - - integer :: ithread, sqnproc - sqnproc = int(sqrt(float(nproc))+0.5) - call omp_set_nested(.True.) - call omp_set_dynamic(.True.) - !$OMP PARALLEL NUM_THREADS(1+max(1,sqnproc)) PRIVATE(ithread) - ithread = omp_get_thread_num() - if (ithread==0) then - call four_idx_collector(zmq_socket_pull,map_c) - else - call four_index_transform_slave_inproc(ithread) - endif - !$OMP END PARALLEL - - call end_parallel_job(zmq_to_qp_run_socket, zmq_socket_pull, 'four_idx') - - -end - - -subroutine four_index_transform_slave_tcp(i) - implicit none - integer, intent(in) :: i - BEGIN_DOC -! Computes a buffer of integrals. i is the ID of the current thread. - END_DOC - call four_index_transform_slave(0,i) -end - - -subroutine four_index_transform_slave_inproc(i) - implicit none - integer, intent(in) :: i - BEGIN_DOC -! Computes a buffer of integrals. i is the ID of the current thread. - END_DOC - call four_index_transform_slave(1,i) -end - - - -subroutine four_index_transform_slave(thread,worker_id) - use f77_zmq - implicit none - - integer(ZMQ_PTR) :: zmq_to_qp_run_socket - integer,intent(in) :: worker_id, thread - integer :: task_id - character*(512) :: msg - - integer :: i_start, j_start, k_start, l_start_block - integer :: i_end , j_end , k_end , l_end_block - integer :: a_start, b_start, c_start, d_start - integer :: a_end , b_end , c_end , d_end - - integer, external :: get_task_from_taskserver - integer(ZMQ_PTR), external :: new_zmq_to_qp_run_socket - - zmq_to_qp_run_socket = new_zmq_to_qp_run_socket() - - integer, external :: connect_to_taskserver - if (connect_to_taskserver(zmq_to_qp_run_socket,worker_id,thread) == -1) then - call end_zmq_to_qp_run_socket(zmq_to_qp_run_socket) - return - endif - - do - if (get_task_from_taskserver(zmq_to_qp_run_socket,worker_id, task_id, msg) == -1) then - exit - endif - if(task_id == 0) exit - read (msg,*) & - i_start, j_start, k_start, l_start_block, & - i_end , j_end , k_end , l_end_block , & - a_start, b_start, c_start, d_start, & - a_end , b_end , c_end , d_end - - call four_index_transform_slave_work(ao_integrals_map, & - mo_coef, size(mo_coef,1), & - i_start, j_start, k_start, l_start_block, & - i_end , j_end , k_end , l_end_block , & - a_start, b_start, c_start, d_start, & - a_end , b_end , c_end , d_end, & - task_id, worker_id, thread) - - - enddo - integer, external :: disconnect_from_taskserver - if (disconnect_from_taskserver(zmq_to_qp_run_socket,thread) == -1) then - continue - endif - call end_zmq_to_qp_run_socket(zmq_to_qp_run_socket) - -end - - -BEGIN_PROVIDER [ integer, nthreads_four_idx ] - implicit none - BEGIN_DOC - ! Number of threads for 4-index transformation - END_DOC - nthreads_four_idx = nproc - character*(32) :: env - call getenv('NTHREADS_FOUR_IDX',env) - if (trim(env) /= '') then - read(env,*) nthreads_four_idx - endif - call write_int(6,nthreads_four_idx,'Number of threads for 4-index transformation') -END_PROVIDER - - - -subroutine four_idx_collector(zmq_socket_pull,map_c) - use f77_zmq - use map_module - implicit none - type(map_type), intent(inout) :: map_c - integer(ZMQ_PTR), intent(in) :: zmq_socket_pull - - integer :: more - integer, external :: zmq_delete_task - integer(ZMQ_PTR), external :: new_zmq_to_qp_run_socket - integer(ZMQ_PTR) :: zmq_to_qp_run_socket - integer :: task_id - - - zmq_to_qp_run_socket = new_zmq_to_qp_run_socket() - - more = 1 - do while (more == 1) - call four_idx_pull_results(zmq_socket_pull, map_c, task_id) - if (task_id > 0) then - if (zmq_delete_task(zmq_to_qp_run_socket,zmq_socket_pull,task_id,more) == -1) then - stop 'Unable to delete task' - endif - endif - enddo - - call end_zmq_to_qp_run_socket(zmq_to_qp_run_socket) - -end - - -subroutine four_idx_pull_results(zmq_socket_pull, map_c, task_id) - use f77_zmq - use map_module - implicit none - type(map_type), intent(inout) :: map_c - integer(ZMQ_PTR), intent(in) :: zmq_socket_pull - - integer, intent(out) :: task_id - - integer :: rc, sze - integer*8 :: rc8 - - - rc = f77_zmq_recv( zmq_socket_pull, task_id, 4, 0) - if(rc /= 4) stop 'four_idx_pull_results failed to pull task_id' - - if (task_id > 0) then - IRP_IF ZMQ_PUSH - IRP_ELSE - rc = f77_zmq_send( zmq_socket_pull, 'ok', 2, 0) - if (rc /= 2) then - print *, irp_here, ' : f77_zmq_send (zmq_socket_pull,...' - stop 'error' - endif - IRP_ENDIF - call map_merge(map_c) - return - endif - - rc = f77_zmq_recv( zmq_socket_pull, sze, 4, 0) - if(rc /= 4) stop 'four_idx_pull_results failed to pull sze' - - integer(key_kind), allocatable :: key(:) - real(integral_kind), allocatable :: value(:) - - allocate(key(sze), value(sze)) - - rc8 = f77_zmq_recv8( zmq_socket_pull, key, int(key_kind*sze,8), 0) - if(rc8 /= key_kind*sze) stop 'four_idx_pull_results failed to pull key' - - rc8 = f77_zmq_recv8( zmq_socket_pull, value, int(integral_kind*sze,8), 0) - if(rc8 /= integral_kind*sze) stop 'four_idx_pull_results failed to pull value' - -! Activate if zmq_socket_pull is a REP - IRP_IF ZMQ_PUSH - IRP_ELSE - rc = f77_zmq_send( zmq_socket_pull, 'ok', 2, 0) - if (rc /= 2) then - print *, irp_here, ' : f77_zmq_send (zmq_socket_pull,...' - stop 'error' - endif - IRP_ENDIF - - call map_update(map_c, key, value, sze, mo_integrals_threshold) - - deallocate(key, value) -end - - - -subroutine four_idx_push_results(zmq_socket_push, key, value, sze, task_id) - use f77_zmq - use map_module - implicit none - integer, intent(in) :: sze - integer(key_kind), intent(in) :: key(sze) - real(integral_kind), intent(in) :: value(sze) - integer(ZMQ_PTR), intent(in) :: zmq_socket_push - integer, intent(in) :: task_id - - integer :: rc - integer*8 :: rc8 - - - if (task_id > 0) then - rc = f77_zmq_send( zmq_socket_push, task_id, 4, 0) - if(rc /= 4) stop 'four_idx_push_results failed to push task_id' - else - rc = f77_zmq_send( zmq_socket_push, task_id, 4, ZMQ_SNDMORE) - if(rc /= 4) stop 'four_idx_push_results failed to push task_id' - - rc = f77_zmq_send( zmq_socket_push, sze, 4, ZMQ_SNDMORE) - if(rc /= 4) stop 'four_idx_push_results failed to push sze' - - rc8 = f77_zmq_send8( zmq_socket_push, key, int(key_kind*sze,8), ZMQ_SNDMORE) - if(rc8 /= key_kind*sze) then - print *, sze, key_kind, rc8 - stop 'four_idx_push_results failed to push key' - endif - - rc8 = f77_zmq_send8( zmq_socket_push, value, int(integral_kind*sze,8), 0) - if(rc8 /= integral_kind*sze) then - print *, sze, integral_kind, rc8 - stop 'four_idx_push_results failed to push value' - endif - endif - - -! Activate if zmq_socket_push is a REP -IRP_IF ZMQ_PUSH -IRP_ELSE - character*(2) :: reply - rc = f77_zmq_recv( zmq_socket_push, reply, 2, 0) - if (reply(1:2) /= 'ok') then - print *, reply(1:rc) - print *, irp_here, ' : f77_zmq_send (zmq_socket_push,...' - stop 'error' - endif -IRP_ENDIF - -end - - diff --git a/src/Generators_CAS/NEED b/src/Generators_CAS/NEED new file mode 100644 index 00000000..aae89501 --- /dev/null +++ b/src/Generators_CAS/NEED @@ -0,0 +1 @@ +Determinants diff --git a/src/Generators_CAS/README.rst b/src/Generators_CAS/README.rst index 9d880b0d..cf0df440 100644 --- a/src/Generators_CAS/README.rst +++ b/src/Generators_CAS/README.rst @@ -3,86 +3,9 @@ Generators_CAS Module ===================== The generator determinants are those filtered by the ``cas_bitmask`` mask. + Assumptions =========== -.. Do not edit this section. It was auto-generated from the -.. NEEDED_MODULES_CHILDREN file by the `update_README.py` script. - The active space is defined by the ``reference_bitmask``. - -Documentation -============= - -.. Do not edit this section. It was auto-generated from the -.. by the `update_README.py` script. - -`n_det_generators `_ - Number of generator detetrminants - - -`psi_coef_generators `_ - For Single reference wave functions, the generator is the - Hartree-Fock determinant - - -`psi_det_generators `_ - For Single reference wave functions, the generator is the - Hartree-Fock determinant - - -`select_max `_ - Memo to skip useless selectors - - -`size_select_max `_ - Size of the select_max array - -Needed Modules -============== - -.. Do not edit this section. It was auto-generated from the -.. by the `update_README.py` script. - -.. image:: tree_dependency.png - -* `Determinants `_ - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Determinants `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`n_det_generators `_ - Number of generator detetrminants - - -`psi_coef_generators `_ - For Single reference wave functions, the generator is the - Hartree-Fock determinant - - -`psi_det_generators `_ - For Single reference wave functions, the generator is the - Hartree-Fock determinant - - -`select_max `_ - Memo to skip useless selectors - - -`size_select_max `_ - Size of the select_max array - diff --git a/src/Generators_full/NEEDED_CHILDREN_MODULES b/src/Generators_full/NEED similarity index 100% rename from src/Generators_full/NEEDED_CHILDREN_MODULES rename to src/Generators_full/NEED diff --git a/src/Generators_full/README.rst b/src/Generators_full/README.rst index d1fc68ec..e3ba2312 100644 --- a/src/Generators_full/README.rst +++ b/src/Generators_full/README.rst @@ -5,57 +5,3 @@ Generators_full Module All the determinants of the wave function are generators. In this way, the Full CI space is explored. -Needed Modules -============== - -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - -.. image:: tree_dependency.png - -* `Determinants `_ -* `Hartree_Fock `_ - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Determinants `_ -* `Hartree_Fock `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`degree_max_generators `_ - Max degree of excitation (respect to HF) of the generators - - -`n_det_generators `_ - For Single reference wave functions, the number of generators is 1 : the - Hartree-Fock determinant - - -`psi_coef_generators `_ - For Single reference wave functions, the generator is the - Hartree-Fock determinant - - -`psi_det_generators `_ - For Single reference wave functions, the generator is the - Hartree-Fock determinant - - -`select_max `_ - Memo to skip useless selectors - - -`size_select_max `_ - Size of the select_max array - diff --git a/src/Hartree_Fock/NEEDED_CHILDREN_MODULES b/src/Hartree_Fock/NEED similarity index 100% rename from src/Hartree_Fock/NEEDED_CHILDREN_MODULES rename to src/Hartree_Fock/NEED diff --git a/src/Hartree_Fock/README.rst b/src/Hartree_Fock/README.rst index 5cb05735..6c8ffb38 100644 --- a/src/Hartree_Fock/README.rst +++ b/src/Hartree_Fock/README.rst @@ -2,226 +2,4 @@ Hartree-Fock Module =================== -From the 140 molecules of the G2 set, only LiO, ONa don't converge well. - -Needed Modules -============== - -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - -.. image:: tree_dependency.png - -* `Integrals_Bielec `_ -* `MOGuess `_ - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Integrals_Bielec `_ -* `MOGuess `_ -* `Bitmask `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`ao_bi_elec_integral_alpha `_ - Alpha Fock matrix in AO basis set - - -`ao_bi_elec_integral_beta `_ - Alpha Fock matrix in AO basis set - - -`create_guess `_ - Create a MO guess if no MOs are present in the EZFIO directory - - -`damping_scf `_ - Undocumented - - -`diagonal_fock_matrix_mo `_ - Diagonal Fock matrix in the MO basis - - -`diagonal_fock_matrix_mo_sum `_ - diagonal element of the fock matrix calculated as the sum over all the interactions - with all the electrons in the RHF determinant - diagonal_Fock_matrix_mo_sum(i) = sum_{j=1, N_elec} 2 J_ij -K_ij - - -`eigenvalues_fock_matrix_ao `_ - Eigenvalues and eigenvectors of the Fock matrix over the AO basis - - -`eigenvectors_fock_matrix_ao `_ - Eigenvalues and eigenvectors of the Fock matrix over the AO basis - - -`eigenvectors_fock_matrix_mo `_ - Diagonal Fock matrix in the MO basis - - -`extrapolate_fock_matrix `_ - Compute the extrapolated Fock matrix using the DIIS procedure - - -`fock_matrix_ao `_ - Fock matrix in AO basis set - - -`fock_matrix_ao_alpha `_ - Alpha Fock matrix in AO basis set - - -`fock_matrix_ao_beta `_ - Alpha Fock matrix in AO basis set - - -`fock_matrix_diag_mo `_ - Fock matrix on the MO basis. - For open shells, the ROHF Fock Matrix is - .br - | F-K | F + K/2 | F | - |---------------------------------| - | F + K/2 | F | F - K/2 | - |---------------------------------| - | F | F - K/2 | F + K | - .br - F = 1/2 (Fa + Fb) - .br - K = Fb - Fa - .br - - -`fock_matrix_mo `_ - Fock matrix on the MO basis. - For open shells, the ROHF Fock Matrix is - .br - | F-K | F + K/2 | F | - |---------------------------------| - | F + K/2 | F | F - K/2 | - |---------------------------------| - | F | F - K/2 | F + K | - .br - F = 1/2 (Fa + Fb) - .br - K = Fb - Fa - .br - - -`fock_matrix_mo_alpha `_ - Fock matrix on the MO basis - - -`fock_matrix_mo_beta `_ - Fock matrix on the MO basis - - -`fock_mo_to_ao `_ - Undocumented - - -`fps_spf_matrix_ao `_ - Commutator FPS - SPF - - -`fps_spf_matrix_mo `_ - Commutator FPS - SPF in MO basis - - -`guess `_ - Undocumented - - -`hf_density_matrix_ao `_ - S^-1 Density matrix in the AO basis S^-1 - - -`hf_density_matrix_ao_alpha `_ - S^-1 x Alpha density matrix in the AO basis x S^-1 - - -`hf_density_matrix_ao_beta `_ - S^-1 Beta density matrix in the AO basis x S^-1 - - -`hf_energy `_ - Hartree-Fock energy - - -`huckel_guess `_ - Build the MOs using the extended Huckel model - - -`level_shift `_ - Energy shift on the virtual MOs to improve SCF convergence - - -`localize_mos `_ - Undocumented - - -`max_dim_diis `_ - Maximum size of the DIIS extrapolation procedure - - -`mo_guess_type `_ - Initial MO guess. Can be [ Huckel | HCore ] - - -`n_it_scf_max `_ - Maximum number of SCF iterations - - -`no_oa_or_av_opt `_ - If true, skip the (inactive+core) --> (active) and the (active) --> (virtual) orbital rotations within the SCF procedure - - -`roothaan_hall_scf `_ - Roothaan-Hall algorithm for SCF Hartree-Fock calculation - - -`run `_ - Run SCF calculation - - -`scf `_ - Produce `Hartree_Fock` MO orbital - output: mo_basis.mo_tot_num mo_basis.mo_label mo_basis.ao_md5 mo_basis.mo_coef mo_basis.mo_occ - output: hartree_fock.energy - optional: mo_basis.mo_coef - - -`scf_algorithm `_ - Type of SCF algorithm used. Possible choices are [ Simple | DIIS] - - -`thresh_scf `_ - Threshold on the convergence of the Hartree Fock energy. - - -`threshold_diis `_ - Threshold on the convergence of the DIIS error vector during a Hartree-Fock calculation. If 0. is chosen, the square root of thresh_scf will be used. - - -`threshold_diis_nonzero `_ - If threshold_DIIS is zero, choose sqrt(thresh_scf) - - -`threshold_overlap_ao_eigenvalues `_ - Threshold on the magnitude of the smallest eigenvalues of the overlap matrix in the AO basis - - -`x_matrix_ao `_ - Matrix X = S^{-1/2} obtained by SVD diff --git a/src/Integrals_Bielec/NEED b/src/Integrals_Bielec/NEED new file mode 100644 index 00000000..ec64d210 --- /dev/null +++ b/src/Integrals_Bielec/NEED @@ -0,0 +1 @@ +AO_one_e_integrals MO_one_e_integrals Pseudo Bitmask ZMQ AO_Basis MO_Basis diff --git a/src/Integrals_Bielec/NEEDED_CHILDREN_MODULES b/src/Integrals_Bielec/NEEDED_CHILDREN_MODULES deleted file mode 100644 index 9d249718..00000000 --- a/src/Integrals_Bielec/NEEDED_CHILDREN_MODULES +++ /dev/null @@ -1 +0,0 @@ -AO_one_e_integrals MO_one_e_integrals Pseudo Bitmask ZMQ FourIdx AO_Basis MO_Basis diff --git a/src/Integrals_Bielec/README.rst b/src/Integrals_Bielec/README.rst index 37961fb6..075c32b4 100644 --- a/src/Integrals_Bielec/README.rst +++ b/src/Integrals_Bielec/README.rst @@ -1,8 +1,8 @@ -============= -BiInts Module -============= +================ +Integrals_Bielec +================ -Here, all bi-electronic integrals (:math:`1/r_{12}`) are computed. As they have +Here, all two-electron integrals (:math:`1/r_{12}`) are computed. As they have 4 indices and many are zero, they are stored in a map, as defined in ``Utils/map_module.f90``. To fetch an AO integral, use the ``get_ao_bielec_integral(i,j,k,l,ao_integrals_map)`` function, and to fetch and @@ -16,440 +16,3 @@ The conventions are: -Needed Modules -============== - -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - -.. image:: tree_dependency.png - -* `Pseudo `_ -* `Bitmask `_ - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Pseudo `_ -* `Bitmask `_ -* `ZMQ `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`add_integrals_to_map `_ - Adds integrals to tha MO map according to some bitmask - - -`add_integrals_to_map_no_exit_34 `_ - Adds integrals to tha MO map according to some bitmask - - -`add_integrals_to_map_three_indices `_ - Adds integrals to tha MO map according to some bitmask - - -`ao_bielec_integral `_ - integral of the AO basis or (ij|kl) - i(r1) j(r1) 1/r12 k(r2) l(r2) - - -`ao_bielec_integral_schwartz `_ - Needed to compute Schwartz inequalities - - -`ao_bielec_integral_schwartz_accel `_ - integral of the AO basis or (ij|kl) - i(r1) j(r1) 1/r12 k(r2) l(r2) - - -`ao_bielec_integrals_in_map `_ - Map of Atomic integrals - i(r1) j(r2) 1/r12 k(r1) l(r2) - - -`ao_bielec_integrals_in_map_collector `_ - Collects results from the AO integral calculation - - -`ao_bielec_integrals_in_map_slave `_ - Computes a buffer of integrals - - -`ao_bielec_integrals_in_map_slave_inproc `_ - Computes a buffer of integrals. i is the ID of the current thread. - - -`ao_bielec_integrals_in_map_slave_tcp `_ - Computes a buffer of integrals. i is the ID of the current thread. - - -`ao_integrals_cache `_ - Cache of AO integrals for fast access - - -`ao_integrals_cache_max `_ - Min and max values of the AOs for which the integrals are in the cache - - -`ao_integrals_cache_min `_ - Min and max values of the AOs for which the integrals are in the cache - - -`ao_integrals_map `_ - AO integrals - - -`ao_integrals_threshold `_ - If || < ao_integrals_threshold then is zero - - -`ao_l4 `_ - Computes the product of l values of i,j,k,and l - - -`bench_maps `_ - Performs timing benchmarks on integral access - - -`bielec_integrals_index `_ - Undocumented - - -`bielec_integrals_index_reverse `_ - Undocumented - - -`big_array_coulomb_integrals `_ - Undocumented - - -`big_array_exchange_integrals `_ - Undocumented - - -`clear_ao_map `_ - Frees the memory of the AO map - - -`clear_mo_map `_ - Frees the memory of the MO map - - -`compute_ao_bielec_integrals `_ - Compute AO 1/r12 integrals for all i and fixed j,k,l - - -`compute_ao_integrals_jl `_ - Parallel client for AO integrals - - -`disk_access_ao_integrals `_ - Read/Write AO integrals from/to disk [ Write | Read | None ] - - -`disk_access_mo_integrals `_ - Read/Write MO integrals from/to disk [ Write | Read | None ] - - -`do_direct_integrals `_ - Compute integrals on the fly - - -`dump_ao_integrals `_ - Save to disk the $ao integrals - - -`dump_mo_integrals `_ - Save to disk the $ao integrals - - -`eri `_ - ATOMIC PRIMTIVE bielectronic integral between the 4 primitives :: - primitive_1 = x1**(a_x) y1**(a_y) z1**(a_z) exp(-alpha * r1**2) - primitive_2 = x1**(b_x) y1**(b_y) z1**(b_z) exp(- beta * r1**2) - primitive_3 = x2**(c_x) y2**(c_y) z2**(c_z) exp(-delta * r2**2) - primitive_4 = x2**(d_x) y2**(d_y) z2**(d_z) exp(- gama * r2**2) - - -`four_idx `_ - 4-index transformation from AO to MO integrals - - -`gauleg `_ - Gauss-Legendre - - -`gauleg_t2 `_ - t_w(i,1,k) = w(i) - t_w(i,2,k) = t(i) - - -`gauleg_w `_ - t_w(i,1,k) = w(i) - t_w(i,2,k) = t(i) - - -`general_primitive_integral `_ - Computes the integral where p,q,r,s are Gaussian primitives - - -`get_ao_bielec_integral `_ - Gets one AO bi-electronic integral from the AO map - - -`get_ao_bielec_integrals `_ - Gets multiple AO bi-electronic integral from the AO map . - All i are retrieved for j,k,l fixed. - - -`get_ao_bielec_integrals_non_zero `_ - Gets multiple AO bi-electronic integral from the AO map . - All non-zero i are retrieved for j,k,l fixed. - - -`get_ao_map_size `_ - Returns the number of elements in the AO map - - -`get_mo_bielec_integral `_ - Returns one integral in the MO basis - - -`get_mo_bielec_integrals `_ - Returns multiple integrals in the MO basis, all - i for j,k,l fixed. - - -`get_mo_bielec_integrals_coulomb_ii `_ - Returns multiple integrals - k(1)i(2) 1/r12 l(1)i(2) :: out_val(i1) - for k,l fixed. - - -`get_mo_bielec_integrals_exch_ii `_ - Returns multiple integrals - k(1)i(2) 1/r12 i(1)l(2) :: out_val(i1) - for k,l fixed. - - -`get_mo_bielec_integrals_ij `_ - Returns multiple integrals in the MO basis, all - i(1)j(2) 1/r12 k(1)l(2) - i, j for k,l fixed. - - -`get_mo_map_size `_ - Return the number of elements in the MO map - - -`give_polynom_mult_center_x `_ - subroutine that returns the explicit polynom in term of the "t" - variable of the following polynomw : - I_x1(a_x, d_x,p,q) * I_x1(a_y, d_y,p,q) * I_x1(a_z, d_z,p,q) - - -`i_x1_new `_ - recursive function involved in the bielectronic integral - - -`i_x1_pol_mult `_ - recursive function involved in the bielectronic integral - - -`i_x1_pol_mult_a1 `_ - recursive function involved in the bielectronic integral - - -`i_x1_pol_mult_a2 `_ - recursive function involved in the bielectronic integral - - -`i_x1_pol_mult_recurs `_ - recursive function involved in the bielectronic integral - - -`i_x2_new `_ - recursive function involved in the bielectronic integral - - -`i_x2_pol_mult `_ - recursive function involved in the bielectronic integral - - -`insert_into_ao_integrals_map `_ - Create new entry into AO map - - -`insert_into_mo_integrals_map `_ - Create new entry into MO map, or accumulate in an existing entry - - -`integrale_new `_ - calculate the integral of the polynom :: - I_x1(a_x+b_x, c_x+d_x,p,q) * I_x1(a_y+b_y, c_y+d_y,p,q) * I_x1(a_z+b_z, c_z+d_z,p,q) - between ( 0 ; 1) - - -`load_ao_integrals `_ - Read from disk the $ao integrals - - -`load_mo_integrals `_ - Read from disk the $ao integrals - - -`mo_bielec_integral `_ - Returns one integral in the MO basis - - -`mo_bielec_integral_jj `_ - mo_bielec_integral_jj(i,j) = J_ij - mo_bielec_integral_jj_exchange(i,j) = K_ij - mo_bielec_integral_jj_anti(i,j) = J_ij - K_ij - - -`mo_bielec_integral_jj_anti `_ - mo_bielec_integral_jj(i,j) = J_ij - mo_bielec_integral_jj_exchange(i,j) = K_ij - mo_bielec_integral_jj_anti(i,j) = J_ij - K_ij - - -`mo_bielec_integral_jj_anti_from_ao `_ - mo_bielec_integral_jj_from_ao(i,j) = J_ij - mo_bielec_integral_jj_exchange_from_ao(i,j) = J_ij - mo_bielec_integral_jj_anti_from_ao(i,j) = J_ij - K_ij - - -`mo_bielec_integral_jj_exchange `_ - mo_bielec_integral_jj(i,j) = J_ij - mo_bielec_integral_jj_exchange(i,j) = K_ij - mo_bielec_integral_jj_anti(i,j) = J_ij - K_ij - - -`mo_bielec_integral_jj_exchange_from_ao `_ - mo_bielec_integral_jj_from_ao(i,j) = J_ij - mo_bielec_integral_jj_exchange_from_ao(i,j) = J_ij - mo_bielec_integral_jj_anti_from_ao(i,j) = J_ij - K_ij - - -`mo_bielec_integral_jj_from_ao `_ - mo_bielec_integral_jj_from_ao(i,j) = J_ij - mo_bielec_integral_jj_exchange_from_ao(i,j) = J_ij - mo_bielec_integral_jj_anti_from_ao(i,j) = J_ij - K_ij - - -`mo_bielec_integral_vv_anti_from_ao `_ - mo_bielec_integral_vv_from_ao(i,j) = J_ij - mo_bielec_integral_vv_exchange_from_ao(i,j) = J_ij - mo_bielec_integral_vv_anti_from_ao(i,j) = J_ij - K_ij - but only for the virtual orbitals - - -`mo_bielec_integral_vv_exchange_from_ao `_ - mo_bielec_integral_vv_from_ao(i,j) = J_ij - mo_bielec_integral_vv_exchange_from_ao(i,j) = J_ij - mo_bielec_integral_vv_anti_from_ao(i,j) = J_ij - K_ij - but only for the virtual orbitals - - -`mo_bielec_integral_vv_from_ao `_ - mo_bielec_integral_vv_from_ao(i,j) = J_ij - mo_bielec_integral_vv_exchange_from_ao(i,j) = J_ij - mo_bielec_integral_vv_anti_from_ao(i,j) = J_ij - K_ij - but only for the virtual orbitals - - -`mo_bielec_integrals_in_map `_ - If True, the map of MO bielectronic integrals is provided - - -`mo_bielec_integrals_index `_ - Computes an unique index for i,j,k,l integrals - - -`mo_integrals_cache `_ - Cache of MO integrals for fast access - - -`mo_integrals_cache_max `_ - Min and max values of the MOs for which the integrals are in the cache - - -`mo_integrals_cache_min `_ - Min and max values of the MOs for which the integrals are in the cache - - -`mo_integrals_map `_ - MO integrals - - -`mo_integrals_threshold `_ - If || < ao_integrals_threshold then is zero - - -`n_pt_max_integrals_16 `_ - Aligned n_pt_max_integrals - - -`n_pt_sup `_ - Returns the upper boundary of the degree of the polynomial involved in the - bielctronic integral : - Ix(a_x,b_x,c_x,d_x) * Iy(a_y,b_y,c_y,d_y) * Iz(a_z,b_z,c_z,d_z) - - -`no_ivvv_integrals `_ - Can be switched on only if no_vvvv_integrals is True, then do not computes the integrals having 3 virtual index and 1 belonging to the core inactive active orbitals - - -`no_vvv_integrals `_ - Can be switched on only if no_vvvv_integrals is True, then do not computes the integrals having 3 virtual orbitals - - -`no_vvvv_integrals `_ - If True, computes all integrals except for the integrals having 4 virtual index - - -`provide_all_mo_integrals `_ - Undocumented - - -`push_integrals `_ - Push integrals in the push socket - - -`qp_ao_ints `_ - Increments a running calculation to compute AO integrals - - -`read_ao_integrals `_ - One level of abstraction for disk_access_ao_integrals and disk_access_mo_integrals - - -`read_mo_integrals `_ - One level of abstraction for disk_access_ao_integrals and disk_access_mo_integrals - - -`set_integrals_exchange_jj_into_map `_ - Undocumented - - -`set_integrals_jj_into_map `_ - Undocumented - - -`write_ao_integrals `_ - One level of abstraction for disk_access_ao_integrals and disk_access_mo_integrals - - -`write_mo_integrals `_ - One level of abstraction for disk_access_ao_integrals and disk_access_mo_integrals - diff --git a/src/Integrals_Bielec/ao_bi_integrals.irp.f b/src/Integrals_Bielec/ao_bi_integrals.irp.f index d7db5feb..ce797fab 100644 --- a/src/Integrals_Bielec/ao_bi_integrals.irp.f +++ b/src/Integrals_Bielec/ao_bi_integrals.irp.f @@ -651,7 +651,7 @@ subroutine integrale_new(I_f,a_x,b_x,c_x,d_x,a_y,b_y,c_y,d_y,a_z,b_z,c_z,d_z,p,q include 'Utils/constants.include.F' double precision :: p,q integer :: a_x,b_x,c_x,d_x,a_y,b_y,c_y,d_y,a_z,b_z,c_z,d_z - integer :: i, n_iter, n_pt, j + integer :: i, n_pt, j double precision :: I_f, pq_inv, p10_1, p10_2, p01_1, p01_2,rho,pq_inv_2 integer :: ix,iy,iz, jx,jy,jz, sx,sy,sz diff --git a/src/Integrals_Bielec/core_quantities.irp.f b/src/Integrals_Bielec/core_quantities.irp.f new file mode 100644 index 00000000..a120cf78 --- /dev/null +++ b/src/Integrals_Bielec/core_quantities.irp.f @@ -0,0 +1,35 @@ +BEGIN_PROVIDER [double precision, core_energy] + implicit none + integer :: i,j,k,l + core_energy = 0.d0 + do i = 1, n_core_orb + j = list_core(i) + core_energy += 2.d0 * mo_mono_elec_integral(j,j) + mo_bielec_integral_jj(j,j) + do k = i+1, n_core_orb + l = list_core(k) + core_energy += 2.d0 * (2.d0 * mo_bielec_integral_jj(j,l) - mo_bielec_integral_jj_exchange(j,l)) + enddo + enddo + core_energy += nuclear_repulsion + +END_PROVIDER + +BEGIN_PROVIDER [double precision, core_fock_operator, (mo_tot_num,mo_tot_num)] + implicit none + integer :: i,j,k,l,m,n + double precision :: get_mo_bielec_integral + BEGIN_DOC +! this is the contribution to the Fock operator from the core electrons + END_DOC + core_fock_operator = 0.d0 + do i = 1, n_act_orb + j = list_act(i) + do k = 1, n_act_orb + l = list_act(k) + do m = 1, n_core_orb + n = list_core(m) + core_fock_operator(j,l) += 2.d0 * get_mo_bielec_integral(j,n,l,n,mo_integrals_map) - get_mo_bielec_integral(j,n,n,l,mo_integrals_map) + enddo + enddo + enddo +END_PROVIDER diff --git a/src/Integrals_Bielec/test_integrals.irp.f b/src/Integrals_Bielec/test_integrals.irp.f deleted file mode 100644 index bb6f849b..00000000 --- a/src/Integrals_Bielec/test_integrals.irp.f +++ /dev/null @@ -1,178 +0,0 @@ -program bench_maps - implicit none - BEGIN_DOC -! Performs timing benchmarks on integral access - END_DOC - integer :: i,j,k,l - integer*8 :: ii,jj - double precision :: r, cpu - integer*8 :: cpu0, cpu1, count_rate, count_max - - PROVIDE mo_bielec_integrals_in_map - print *, mo_tot_num, 'MOs' - - ! Time random function - call system_clock(cpu0, count_rate, count_max) - do ii=1,100000000_8 - call random_number(r) - i = int(r*mo_tot_num)+1 - call random_number(r) - j = int(r*mo_tot_num)+1 - call random_number(r) - k = int(r*mo_tot_num)+1 - call random_number(r) - l = int(r*mo_tot_num)+1 - enddo - call system_clock(cpu1, count_rate, count_max) - cpu = (cpu1-cpu0)/count_rate - print *, 'Random function : ', cpu/dble(ii) - - call system_clock(cpu0, count_rate, count_max) - do ii=1,100000000_8 - call random_number(r) - i = int(r*mo_tot_num)+1 - call random_number(r) - j = int(r*mo_tot_num)+1 - call random_number(r) - k = int(r*mo_tot_num)+1 - call random_number(r) - l = int(r*mo_tot_num)+1 - call get_mo_bielec_integral(i,j,k,l,mo_integrals_map) - enddo - call system_clock(cpu1, count_rate, count_max) - cpu = -cpu + (cpu1 - cpu0)/count_rate - print *, 'Random access : ', cpu/dble(ii) - - ii=0_8 - call system_clock(cpu0, count_rate, count_max) - do jj=1,10 - do l=1,mo_tot_num - do k=1,mo_tot_num - do j=1,mo_tot_num - do i=1,mo_tot_num - ii += 1 - call get_mo_bielec_integral(i,j,k,l,mo_integrals_map) - enddo - enddo - enddo - enddo - enddo - call system_clock(cpu1, count_rate, count_max) - cpu = (cpu1 - cpu0)/count_rate - print *, 'loop ijkl : ', cpu/dble(ii) - - call system_clock(cpu0, count_rate, count_max) - do ii=1,100000_8 - call random_number(r) - i = int(r*mo_tot_num)+1 - call random_number(r) - j = int(r*mo_tot_num)+1 - call random_number(r) - k = int(r*mo_tot_num)+1 - call random_number(r) - l = int(r*mo_tot_num)+1 - call get_mo_bielec_integral(i,j,k,l,mo_integrals_map) - enddo - call system_clock(cpu1, count_rate, count_max) - - ii=0 - call system_clock(cpu0, count_rate, count_max) - do jj=1,10 - do l=1,mo_tot_num - do j=1,mo_tot_num - do k=1,mo_tot_num - do i=1,mo_tot_num - ii += 1 - call get_mo_bielec_integral(i,j,k,l,mo_integrals_map) - enddo - enddo - enddo - enddo - enddo - call system_clock(cpu1, count_rate, count_max) - cpu = (cpu1 - cpu0)/count_rate - print *, 'loop ikjl : ', cpu/dble(ii) - - call system_clock(cpu0, count_rate, count_max) - do ii=1,100000_8 - call random_number(r) - i = int(r*mo_tot_num)+1 - call random_number(r) - j = int(r*mo_tot_num)+1 - call random_number(r) - k = int(r*mo_tot_num)+1 - call random_number(r) - l = int(r*mo_tot_num)+1 - call get_mo_bielec_integral(i,j,k,l,mo_integrals_map) - enddo - call system_clock(cpu1, count_rate, count_max) - - ii=0 - call system_clock(cpu0, count_rate, count_max) - do jj=1,10 - do k=1,mo_tot_num - do l=1,mo_tot_num - do j=1,mo_tot_num - do i=1,mo_tot_num - ii += 1 - call get_mo_bielec_integral(i,j,k,l,mo_integrals_map) - enddo - enddo - enddo - enddo - enddo - call system_clock(cpu1, count_rate, count_max) - cpu = (cpu1 - cpu0)/count_rate - print *, 'loop ijlk : ', cpu/dble(ii) - - call system_clock(cpu0, count_rate, count_max) - do ii=1,100000_8 - call random_number(r) - i = int(r*mo_tot_num)+1 - call random_number(r) - j = int(r*mo_tot_num)+1 - call random_number(r) - k = int(r*mo_tot_num)+1 - call random_number(r) - l = int(r*mo_tot_num)+1 - call get_mo_bielec_integral(i,j,k,l,mo_integrals_map) - enddo - call system_clock(cpu1, count_rate, count_max) - - ii=0 - call system_clock(cpu0, count_rate, count_max) - do jj=1,10 - do i=1,mo_tot_num - do j=1,mo_tot_num - do k=1,mo_tot_num - do l=1,mo_tot_num - ii += 1 - call get_mo_bielec_integral(i,j,k,l,mo_integrals_map) - enddo - enddo - enddo - enddo - enddo - call system_clock(cpu1, count_rate, count_max) - cpu = (cpu1 - cpu0)/count_rate - print *, 'loop lkji : ', cpu/dble(ii) - - ii=0 - call system_clock(cpu0, count_rate, count_max) - do jj=1,10 - do j=1,mo_tot_num - do i=1,mo_tot_num - do k=1,mo_tot_num - do l=1,mo_tot_num - ii += 1 - call get_mo_bielec_integral(i,j,k,l,mo_integrals_map) - enddo - enddo - enddo - enddo - enddo - call system_clock(cpu1, count_rate, count_max) - cpu = (cpu1 - cpu0)/count_rate - print *, 'loop lkij : ', cpu/dble(ii) - -end diff --git a/src/Iterations/EZFIO.cfg b/src/Iterations/EZFIO.cfg new file mode 100644 index 00000000..c39ea5ae --- /dev/null +++ b/src/Iterations/EZFIO.cfg @@ -0,0 +1,24 @@ +[n_iter] +interface: ezfio +doc: number of iterations +type:integer +default: 1 + +[n_det_iterations] +interface: ezfio, provider +doc: Number of determinants at each iteration +type: integer +size: (100) + +[energy_iterations] +interface: ezfio, provider +doc: The energy without a pt2 correction for n_det +type: double precision +size: (determinants.n_states,100) + +[pt2_iterations] +interface: ezfio, provider +doc: The pt2 correction for n_det +type: double precision +size: (determinants.n_states,100) + diff --git a/src/MPI/NEEDED_CHILDREN_MODULES b/src/Iterations/NEED similarity index 100% rename from src/MPI/NEEDED_CHILDREN_MODULES rename to src/Iterations/NEED diff --git a/src/Iterations/README.rst b/src/Iterations/README.rst new file mode 100644 index 00000000..f7510281 --- /dev/null +++ b/src/Iterations/README.rst @@ -0,0 +1,4 @@ +============= +IterativeSave +============= + diff --git a/src/Iterations/io.irp.f b/src/Iterations/io.irp.f new file mode 100644 index 00000000..3a145996 --- /dev/null +++ b/src/Iterations/io.irp.f @@ -0,0 +1,42 @@ +BEGIN_PROVIDER [ integer, n_iter ] + implicit none + BEGIN_DOC +! number of iterations + END_DOC + + logical :: has + PROVIDE ezfio_filename + if (mpi_master) then + + call ezfio_has_iterations_n_iter(has) + if (has) then + write(6, *) '.. >>>>> [ IO Read ] n_iter <<<<< ..' + call ezfio_get_iterations_n_iter(n_iter) + else + n_iter = 1 + double precision :: zeros(N_states,100) + integer :: izeros(100) + zeros = 0.d0 + izeros = 0 + call ezfio_set_iterations_energy_iterations(zeros) + call ezfio_set_iterations_pt2_iterations(zeros) + call ezfio_set_iterations_n_det_iterations(zeros) + endif + endif + IRP_IF MPI_DEBUG + print *, irp_here, mpi_rank + call MPI_BARRIER(MPI_COMM_WORLD, ierr) + IRP_ENDIF + IRP_IF MPI + include 'mpif.h' + integer :: ierr + call MPI_BCAST( n_iter, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr) + if (ierr /= MPI_SUCCESS) then + stop 'Unable to read n_iter with MPI' + endif + IRP_ENDIF + + call write_time(6) + +END_PROVIDER + diff --git a/src/Iterations/iterations.irp.f b/src/Iterations/iterations.irp.f new file mode 100644 index 00000000..a3f6f280 --- /dev/null +++ b/src/Iterations/iterations.irp.f @@ -0,0 +1,36 @@ +BEGIN_PROVIDER [ double precision, extrapolated_energy, (N_iter,N_states) ] + implicit none + BEGIN_DOC + ! Extrapolated energy, using E_var = f(PT2) where PT2=0 + END_DOC + integer :: i + do i=1,min(N_states,N_det) + call extrapolate_data(N_iter, & + energy_iterations(i,1:N_iter), & + pt2_iterations(i,1:N_iter), & + extrapolated_energy(1:N_iter,i)) + enddo +END_PROVIDER + + +subroutine save_iterations(e_, pt2_,n_) + implicit none + BEGIN_DOC +! Update the energy in the EZFIO file. + END_DOC + integer, intent(in) :: n_ + double precision, intent(in) :: e_(N_states), pt2_(N_states) + + if (N_iter > 100) then + return + endif + + energy_iterations(1:N_states,N_iter) = e_(1:N_states) + pt2_iterations(1:N_states,N_iter) = pt2_(1:N_states) + n_det_iterations(N_iter) = n_ + call ezfio_set_iterations_energy_iterations(energy_iterations) + call ezfio_set_iterations_pt2_iterations(pt2_iterations) + call ezfio_set_iterations_n_det_iterations(n_det_iterations) + call ezfio_set_iterations_N_iter(N_iter) +end + diff --git a/src/Iterations/print_extrapolation.irp.f b/src/Iterations/print_extrapolation.irp.f new file mode 100644 index 00000000..2aa30233 --- /dev/null +++ b/src/Iterations/print_extrapolation.irp.f @@ -0,0 +1,47 @@ +subroutine print_extrapolated_energy(e_,pt2_) + implicit none + BEGIN_DOC +! Print the extrapolated energy in the output + END_DOC + + double precision, intent(in) :: e_(N_states), pt2_(N_states) + integer :: i,k + + if (N_iter< 2) then + return + endif + write(*,'(A)') '' + write(*,'(A)') 'Extrapolated energies' + write(*,'(A)') '------------------------' + write(*,'(A)') '' + + print *, '' + print *, 'State ', 1 + print *, '' + write(*,*) '=========== ', '===================' + write(*,*) 'minimum PT2 ', 'Extrapolated energy' + write(*,*) '=========== ', '===================' + do k=2,min(N_iter,8) + write(*,'(F11.4,2X,F18.8)') pt2_iterations(1,N_iter+1-k), extrapolated_energy(k,1) + enddo + write(*,*) '=========== ', '===================' + + do i=2, min(N_states,N_det) + print *, '' + print *, 'State ', i + print *, '' + write(*,*) '=========== ', '=================== ', '=================== ', '===================' + write(*,*) 'minimum PT2 ', 'Extrapolated energy ', ' Excitation (a.u) ', ' Excitation (eV) ' + write(*,*) '=========== ', '=================== ', '=================== ', '===================' + do k=2,min(N_iter,8) + write(*,'(F11.4,X,3(X,F18.8))') pt2_iterations(i,N_iter+1-k), extrapolated_energy(k,i), & + extrapolated_energy(k,i) - extrapolated_energy(k,1), & + (extrapolated_energy(k,i) - extrapolated_energy(k,1) ) * 27.211396641308d0 + enddo + write(*,*) '=========== ', '=================== ', '=================== ', '===================' + enddo + + print *, '' + +end subroutine + diff --git a/src/Iterations/print_summary.irp.f b/src/Iterations/print_summary.irp.f new file mode 100644 index 00000000..f87b486d --- /dev/null +++ b/src/Iterations/print_summary.irp.f @@ -0,0 +1,79 @@ +subroutine print_summary(e_,pt2_,error_) + implicit none + BEGIN_DOC +! Print the extrapolated energy in the output + END_DOC + + double precision, intent(in) :: e_(N_states), pt2_(N_states), error_(N_states) + integer :: i, k + integer :: N_states_p + character*(8) :: pt2_string + character*(512) :: fmt + + + if (do_pt2) then + pt2_string = ' ' + else + pt2_string = '(approx)' + endif + + N_states_p = min(N_det,N_states) + + print *, '' + print '(A,I12)', 'Summary at N_det = ', N_det + print '(A)', '-----------------------------------' + print *, '' + + write(fmt,*) '(''# ============'',', N_states_p, '(1X,''=============================''))' + write(*,fmt) + write(fmt,*) '(12X,', N_states_p, '(6X,A7,1X,I6,10X))' + write(*,fmt) ('State',k, k=1,N_states_p) + write(fmt,*) '(''# ============'',', N_states_p, '(1X,''=============================''))' + write(*,fmt) + write(fmt,*) '(A12,', N_states_p, '(1X,F14.8,15X))' + write(*,fmt) '# E ', e_(1:N_states_p) + if (N_states_p > 1) then + write(*,fmt) '# Excit. (au)', e_(1:N_states_p)-e_(1) + write(*,fmt) '# Excit. (eV)', (e_(1:N_states_p)-e_(1))*27.211396641308d0 + endif + write(fmt,*) '(A12,', 2*N_states_p, '(1X,F14.8))' + write(*,fmt) '# PT2'//pt2_string, (pt2_(k), error_(k), k=1,N_states_p) + write(*,'(A)') '#' + write(*,fmt) '# E+PT2 ', (e_(k)+pt2_(k),error_(k), k=1,N_states_p) + if (N_states_p > 1) then + write(*,fmt) '# Excit. (au)', ( (e_(k)+pt2_(k)-e_(1)-pt2_(1)), & + dsqrt(error_(k)*error_(k)+error_(1)*error_(1)), k=1,N_states_p) + write(*,fmt) '# Excit. (eV)', ( (e_(k)+pt2_(k)-e_(1)-pt2_(1))*27.211396641308d0, & + dsqrt(error_(k)*error_(k)+error_(1)*error_(1))*27.211396641308d0, k=1,N_states_p) + endif + write(fmt,*) '(''# ============'',', N_states_p, '(1X,''=============================''))' + write(*,fmt) + print *, '' + + print *, 'N_det = ', N_det + print *, 'N_states = ', N_states + + do k=1, N_states_p + print*,'State ',k + print *, 'PT2 = ', pt2_(k) + print *, 'E = ', e_(k) + print *, 'E+PT2'//pt2_string//' = ', e_(k)+pt2_(k), ' +/- ', error_(k) + enddo + + print *, '-----' + if(N_states.gt.1)then + print *, 'Variational Energy difference (au | eV)' + do i=2, N_states_p + print*,'Delta E = ', (e_(i) - e_(1)), & + (e_(i) - e_(1)) * 27.211396641308d0 + enddo + print *, '-----' + print*, 'Variational + perturbative Energy difference (au | eV)' + do i=2, N_states_p + print*,'Delta E = ', (e_(i)+ pt2_(i) - (e_(1) + pt2_(1))), & + (e_(i)+ pt2_(i) - (e_(1) + pt2_(1))) * 27.211396641308d0 + enddo + endif + +end subroutine + diff --git a/src/MOGuess/H_CORE_guess.irp.f b/src/MOGuess/H_CORE_guess.irp.f deleted file mode 100644 index 11fef327..00000000 --- a/src/MOGuess/H_CORE_guess.irp.f +++ /dev/null @@ -1,9 +0,0 @@ -program H_CORE_guess_prog - BEGIN_DOC -! Produce `H_core` MO orbital -! output: mo_basis.mo_tot_num mo_basis.mo_label mo_basis.ao_md5 mo_basis.mo_coef mo_basis.mo_occ - END_DOC - implicit none - character*(64) :: label - call hcore_guess -end diff --git a/src/MOGuess/NEEDED_CHILDREN_MODULES b/src/MOGuess/NEED similarity index 100% rename from src/MOGuess/NEEDED_CHILDREN_MODULES rename to src/MOGuess/NEED diff --git a/src/MOGuess/README.rst b/src/MOGuess/README.rst index 7f2e8d94..14ade90f 100644 --- a/src/MOGuess/README.rst +++ b/src/MOGuess/README.rst @@ -2,56 +2,3 @@ MOGuess Module ============== -Needed Modules -============== - -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - -.. image:: tree_dependency.png - -* `Integrals_Monoelec `_ - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Integrals_Monoelec `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`ao_ortho_canonical_nucl_elec_integral `_ - Undocumented - - -`ao_ortho_lowdin_coef `_ - matrix of the coefficients of the mos generated by the - orthonormalization by the S^{-1/2} canonical transformation of the aos - ao_ortho_lowdin_coef(i,j) = coefficient of the ith ao on the jth ao_ortho_lowdin orbital - - -`ao_ortho_lowdin_nucl_elec_integral `_ - Undocumented - - -`ao_ortho_lowdin_overlap `_ - overlap matrix of the ao_ortho_lowdin - supposed to be the Identity - - -`h_core_guess `_ - Produce `H_core` MO orbital - output: mo_basis.mo_tot_num mo_basis.mo_label mo_basis.ao_md5 mo_basis.mo_coef mo_basis.mo_occ - - -`hcore_guess `_ - Produce `H_core` MO orbital - diff --git a/src/MO_Basis/NEEDED_CHILDREN_MODULES b/src/MO_Basis/NEED similarity index 100% rename from src/MO_Basis/NEEDED_CHILDREN_MODULES rename to src/MO_Basis/NEED diff --git a/src/MO_Basis/README.rst b/src/MO_Basis/README.rst index 5b91499f..11a33fb9 100644 --- a/src/MO_Basis/README.rst +++ b/src/MO_Basis/README.rst @@ -18,236 +18,9 @@ When saving the MOs, the ``mo_basis`` directory of the EZFIO file is copied in the ``save`` directory, named by the current ``mo_label``. All this is done with the script named ``save_current_mos.sh`` in the ``scripts`` directory. -Assumptions -=========== - -.. Do not edit this section. It was auto-generated from the -.. NEEDED_MODULES_CHILDREN file by the `update_README.py` script. - ASSUMPTONS ========== * The AO basis functions are normalized. -Needed Modules -============== - -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - -.. image:: tree_dependency.png - -* `AO_Basis `_ -* `Electrons `_ - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `AO_Basis `_ -* `Electrons `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`ao_cart_to_sphe_coef `_ - matrix of the coefficients of the mos generated by the - orthonormalization by the S^{-1/2} canonical transformation of the aos - ao_cart_to_sphe_coef(i,j) = coefficient of the ith ao on the jth ao_ortho_canonical orbital - - -`ao_cart_to_sphe_inv `_ - AO_cart_to_sphe_coef^(-1) - - -`ao_cart_to_sphe_num `_ - matrix of the coefficients of the mos generated by the - orthonormalization by the S^{-1/2} canonical transformation of the aos - ao_cart_to_sphe_coef(i,j) = coefficient of the ith ao on the jth ao_ortho_canonical orbital - - -`ao_cart_to_sphe_overlap `_ - AO overlap matrix in the spherical basis set - - -`ao_ortho_cano_to_ao `_ - Transform A from the AO basis to the orthogonal AO basis - .br - C^(-1).A_ao.Ct^(-1) - - -`ao_ortho_canonical_coef `_ - matrix of the coefficients of the mos generated by the - orthonormalization by the S^{-1/2} canonical transformation of the aos - ao_ortho_canonical_coef(i,j) = coefficient of the ith ao on the jth ao_ortho_canonical orbital - - -`ao_ortho_canonical_coef_inv `_ - ao_ortho_canonical_coef^(-1) - - -`ao_ortho_canonical_num `_ - matrix of the coefficients of the mos generated by the - orthonormalization by the S^{-1/2} canonical transformation of the aos - ao_ortho_canonical_coef(i,j) = coefficient of the ith ao on the jth ao_ortho_canonical orbital - - -`ao_ortho_canonical_overlap `_ - overlap matrix of the ao_ortho_canonical. - Expected to be the Identity - - -`ao_to_mo `_ - Transform A from the AO basis to the MO basis - .br - C.A_ao.Ct - - -`cholesky_mo `_ - Cholesky decomposition of AO Density matrix - .br - n : Number of AOs - m : Number of MOs - .br - P(LDP,n) : Density matrix in AO basis - .br - C(LDC,m) : MOs - .br - tol_in : tolerance - .br - rank : Nomber of local MOs (output) - .br - - -`give_all_mos_at_r `_ - Undocumented - - -`give_specific_mos_at_r `_ - Undocumented - - -`mix_mo_jk `_ - subroutine that rotates the jth MO with the kth MO - to give two new MO's that are - '+' = 1/sqrt(2) (|j> + |k>) - '-' = 1/sqrt(2) (|j> - |k>) - by convention, the '+' MO is in the lower index (min(j,k)) - by convention, the '-' MO is in the greater index (max(j,k)) - - -`mo_as_eigvectors_of_mo_matrix `_ - Undocumented - - -`mo_as_eigvectors_of_mo_matrix_sort_by_observable `_ - Undocumented - - -`mo_as_svd_vectors_of_mo_matrix `_ - Undocumented - - -`mo_class `_ - Core|Inactive|Active|Virtual|Deleted - - -`mo_coef `_ - Molecular orbital coefficients on AO basis set - mo_coef(i,j) = coefficient of the ith ao on the jth mo - mo_label : Label characterizing the MOS (local, canonical, natural, etc) - - -`mo_coef_in_ao_ortho_basis `_ - MO coefficients in orthogonalized AO basis - .br - C^(-1).C_mo - - -`mo_coef_transp `_ - Molecular orbital coefficients on AO basis set - - -`mo_label `_ - Molecular orbital coefficients on AO basis set - mo_coef(i,j) = coefficient of the ith ao on the jth mo - mo_label : Label characterizing the MOS (local, canonical, natural, etc) - - -`mo_occ `_ - MO occupation numbers - - -`mo_overlap `_ - Undocumented - - -`mo_sort_by_observable `_ - Undocumented - - -`mo_to_ao `_ - Transform A from the MO basis to the AO basis - .br - (S.C).A_mo.(S.C)t - - -`mo_to_ao_no_overlap `_ - Transform A from the MO basis to the S^-1 AO basis - - -`mo_tot_num `_ - Total number of molecular orbitals and the size of the keys corresponding - - -`mo_tot_num_align `_ - Aligned variable for dimensioning of arrays - - -`permut_mos `_ - Undocumented - - -`pouet `_ - Undocumented - - -`s_mo_coef `_ - Product S.C where S is the overlap matrix in the AO basis and C the mo_coef matrix. - - -`save_mos `_ - Undocumented - - -`save_mos_truncated `_ - Undocumented - - -`svd_mo `_ - Singular value decomposition of the AO Density matrix - .br - n : Number of AOs - m : Number of MOs - .br - P(LDP,n) : Density matrix in AO basis - .br - C(LDC,m) : MOs - .br - tol_in : tolerance - .br - rank : Nomber of local MOs (output) - .br - - -`swap_mos `_ - Undocumented - diff --git a/src/MO_Basis/cholesky_mo.irp.f b/src/MO_Basis/cholesky_mo.irp.f deleted file mode 100644 index 65184c1e..00000000 --- a/src/MO_Basis/cholesky_mo.irp.f +++ /dev/null @@ -1,86 +0,0 @@ -subroutine cholesky_mo(n,m,P,LDP,C,LDC,tol_in,rank) - implicit none - BEGIN_DOC -! Cholesky decomposition of AO Density matrix -! -! n : Number of AOs - -! m : Number of MOs -! -! P(LDP,n) : Density matrix in AO basis -! -! C(LDC,m) : MOs -! -! tol_in : tolerance -! -! rank : Nomber of local MOs (output) -! - END_DOC - integer, intent(in) :: n,m, LDC, LDP - double precision, intent(in) :: P(LDP,n) - double precision, intent(out) :: C(LDC,m) - double precision, intent(in) :: tol_in - integer, intent(out) :: rank - - integer :: info - integer :: i,k - integer :: ipiv(n) - double precision:: tol - double precision, allocatable :: W(:,:), work(:) - - allocate(W(LDC,n),work(2*n)) - tol=tol_in - - info = 0 - do i=1,n - do k=1,i - W(i,k) = P(i,k) - enddo - do k=i+1,n - W(i,k) = 0. - enddo - enddo - call DPSTRF('L', n, W, LDC, ipiv, rank, tol, work, info ) - do i=1,n - do k=1,min(m,rank) - C(ipiv(i),k) = W(i,k) - enddo - enddo - - deallocate(W,work) -end - -subroutine svd_mo(n,m,P,LDP,C,LDC) - implicit none - BEGIN_DOC -! Singular value decomposition of the AO Density matrix -! -! n : Number of AOs - -! m : Number of MOs -! -! P(LDP,n) : Density matrix in AO basis -! -! C(LDC,m) : MOs -! -! tol_in : tolerance -! -! rank : Nomber of local MOs (output) -! - END_DOC - integer, intent(in) :: n,m, LDC, LDP - double precision, intent(in) :: P(LDP,n) - double precision, intent(out) :: C(LDC,m) - - integer :: info - integer :: i,k - integer :: ipiv(n) - double precision:: tol - double precision, allocatable :: W(:,:), work(:) - - allocate(W(LDC,n),work(2*n)) - call svd(P,LDP,C,LDC,W,size(W,1),m,n) - - deallocate(W,work) -end - diff --git a/src/MO_Basis/mo_permutation.irp.f b/src/MO_Basis/mo_permutation.irp.f deleted file mode 100644 index 72fbd07b..00000000 --- a/src/MO_Basis/mo_permutation.irp.f +++ /dev/null @@ -1,20 +0,0 @@ -program permut_mos - implicit none - integer :: mo1,mo2 - integer :: i,j,k,l - double precision :: mo_coef_tmp(ao_num,2) - print*,'Which MOs would you like to change ?' - read(5,*)mo1,mo2 - print*,'' - do i= 1,ao_num - mo_coef_tmp(i,1) = mo_coef(i,mo1) - mo_coef_tmp(i,2) = mo_coef(i,mo2) - enddo - do i = 1,ao_num - mo_coef(i,mo1) = mo_coef_tmp(i,2) - mo_coef(i,mo2) = mo_coef_tmp(i,1) - enddo - touch mo_coef - call save_mos - -end diff --git a/src/MO_Basis/print_mo_in_space.irp.f b/src/MO_Basis/print_mo_in_space.irp.f deleted file mode 100644 index a5a324ed..00000000 --- a/src/MO_Basis/print_mo_in_space.irp.f +++ /dev/null @@ -1,50 +0,0 @@ -program pouet - implicit none - integer :: i,j,k - double precision :: r(3) - double precision, allocatable :: aos_array(:),mos_array(:),ao_ortho_array(:) - allocate(aos_array(ao_num),mos_array(mo_tot_num), ao_ortho_array(ao_num)) - integer :: nx,ny - double precision :: interval_x - double precision :: xmin,xmax - double precision :: dx - - double precision :: interval_y - double precision :: ymin,ymax - double precision :: dy - - double precision :: val_max - -!do i = 1, ao_num -! write(41,'(100(F16.10,X))'),ao_ortho_canonical_overlap(i,:) -!enddo - -!stop - - - xmin = -4.d0 - xmax = 4.d0 - interval_x = xmax - xmin - nx = 100 - dx = dabs(interval_x)/dble(nx) - - r = 0.d0 -!r(3) = xmin - r(1) = xmin - val_max = 0.d0 - do j = 1, nx -! call give_all_aos_at_r(r,aos_array) - call give_all_mos_at_r(r,mos_array) - write(36,'(100(F16.10,X))') r(1), mos_array(1), mos_array(2), mos_array(3), mos_array(17), mos_array(23) - !write(36,'(100(F16.10,X))') r(1), mos_array(1), mos_array(2), mos_array(4) - !write(37,'(100(F16.10,X))') r(1),mos_array(1) * mos_array(2), mos_array(4)*mos_array(2) -! if(val_max.le.aos_array(1) * aos_array(2) )then -! val_max = aos_array(1) * aos_array(2) -! endif - r(1) += dx -! r(3) += dx - enddo -!write(40,'(100(F16.10,X))')nucl_coord(1,2),nucl_coord(1,3),val_max * 1.5d0 -!write(41,'(100(F16.10,X))')nucl_coord(2,2),nucl_coord(2,3),val_max * 1.5d0 - deallocate(aos_array,mos_array, ao_ortho_array) -end diff --git a/src/MO_Basis/swap_mos.irp.f b/src/MO_Basis/swap_mos.irp.f deleted file mode 100644 index 80a29965..00000000 --- a/src/MO_Basis/swap_mos.irp.f +++ /dev/null @@ -1,14 +0,0 @@ -program swap_mos - implicit none - integer :: i,j, i1, i2 - double precision :: x - print *, 'MOs to swap?' - read(*,*) i1, i2 - do i=1,ao_num - x = mo_coef(i,i1) - mo_coef(i,i1) = mo_coef(i,i2) - mo_coef(i,i2) = x - enddo - call save_mos - -end diff --git a/src/MO_one_e_integrals/NEEDED_CHILDREN_MODULES b/src/MO_one_e_integrals/NEED similarity index 100% rename from src/MO_one_e_integrals/NEEDED_CHILDREN_MODULES rename to src/MO_one_e_integrals/NEED diff --git a/src/MO_one_e_integrals/README.rst b/src/MO_one_e_integrals/README.rst index 06b30465..89d26087 100644 --- a/src/MO_one_e_integrals/README.rst +++ b/src/MO_one_e_integrals/README.rst @@ -4,11 +4,3 @@ MO_one_e_integrals All the one-electron integrals in MO basis are here. -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. diff --git a/src/MO_one_e_integrals/check_orthonormality.irp.f b/src/MO_one_e_integrals/check_orthonormality.irp.f deleted file mode 100644 index 44294023..00000000 --- a/src/MO_one_e_integrals/check_orthonormality.irp.f +++ /dev/null @@ -1,31 +0,0 @@ -program check_ortho - implicit none - - call do_print - print *, '--' - print *, '--' - call orthonormalize_mos - call do_print -end - -subroutine do_print - implicit none - integer :: i,j - double precision :: off_diag, diag - - off_diag = 0.d0 - diag = 0.d0 - do j=1,mo_tot_num - do i=1,mo_tot_num - off_diag += abs(mo_overlap(i,j)) - enddo - diag += abs(mo_overlap(j,j)) - off_diag -= abs(mo_overlap(j,j)) - enddo - print *, 'Diag = ', abs(1.d0-diag/dble(mo_tot_num)) - print *, 'Off-Diag = ', off_diag/(dble(mo_tot_num)**2-dble(mo_tot_num)) - print *, '--' - -end - - diff --git a/src/Utils/NEEDED_CHILDREN_MODULES b/src/MPI/NEED similarity index 100% rename from src/Utils/NEEDED_CHILDREN_MODULES rename to src/MPI/NEED diff --git a/src/MPI/README.rst b/src/MPI/README.rst index 8826a8ee..21dfcde6 100644 --- a/src/MPI/README.rst +++ b/src/MPI/README.rst @@ -2,11 +2,3 @@ MPI === -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. diff --git a/src/Nuclei/NEEDED_CHILDREN_MODULES b/src/Nuclei/NEED similarity index 100% rename from src/Nuclei/NEEDED_CHILDREN_MODULES rename to src/Nuclei/NEED diff --git a/src/Nuclei/README.rst b/src/Nuclei/README.rst index b75b117d..d481ebe5 100644 --- a/src/Nuclei/README.rst +++ b/src/Nuclei/README.rst @@ -6,125 +6,3 @@ This module contains data relative to the nuclei (coordinates, charge, nuclear repulsion energy, etc). The coordinates are expressed in atomic units. -Needed Modules -============== - -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - -.. image:: tree_dependency.png - -* `Ezfio_files `_ -* `Utils `_ - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Ezfio_files `_ -* `Utils `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`disk_access_nuclear_repulsion `_ - Read/Write Nuclear Repulsion from/to disk [ Write | Read | None ] - - -`element_name `_ - Array of the name of element, sorted by nuclear charge (integer) - - -`nucl_charge `_ - Nuclear charges - - -`nucl_coord `_ - Nuclear coordinates in the format (:, {x,y,z}) - - -`nucl_coord_transp `_ - Transposed array of nucl_coord - - -`nucl_dist `_ - nucl_dist : Nucleus-nucleus distances - nucl_dist_2 : Nucleus-nucleus distances squared - nucl_dist_vec : Nucleus-nucleus distances vectors - - -`nucl_dist_2 `_ - nucl_dist : Nucleus-nucleus distances - nucl_dist_2 : Nucleus-nucleus distances squared - nucl_dist_vec : Nucleus-nucleus distances vectors - - -`nucl_dist_vec_x `_ - nucl_dist : Nucleus-nucleus distances - nucl_dist_2 : Nucleus-nucleus distances squared - nucl_dist_vec : Nucleus-nucleus distances vectors - - -`nucl_dist_vec_y `_ - nucl_dist : Nucleus-nucleus distances - nucl_dist_2 : Nucleus-nucleus distances squared - nucl_dist_vec : Nucleus-nucleus distances vectors - - -`nucl_dist_vec_z `_ - nucl_dist : Nucleus-nucleus distances - nucl_dist_2 : Nucleus-nucleus distances squared - nucl_dist_vec : Nucleus-nucleus distances vectors - - -`nucl_label `_ - Nuclear labels - - -`nucl_num `_ - Number of nuclei - - -`nucl_num_aligned `_ - Number of nuclei algined - - -`nuclear_repulsion `_ - Nuclear repulsion energy - - -`positive_charge_barycentre `_ - Centroid of the positive charges - - -`slater_bragg_radii `_ - atomic radii in Angstrom defined in table I of JCP 41, 3199 (1964) Slater - execpt for the Hydrogen atom where we took the value of Becke (1988, JCP) - - -`slater_bragg_radii_per_atom `_ - Undocumented - - -`slater_bragg_radii_per_atom_ua `_ - Undocumented - - -`slater_bragg_radii_ua `_ - Undocumented - - -`slater_bragg_type_inter_distance `_ - Undocumented - - -`slater_bragg_type_inter_distance_ua `_ - Undocumented - diff --git a/src/Perturbation/NEED b/src/Perturbation/NEED new file mode 100644 index 00000000..6c4ba6bc --- /dev/null +++ b/src/Perturbation/NEED @@ -0,0 +1 @@ +Determinants Hartree_Fock Davidson diff --git a/src/Perturbation/NEEDED_CHILDREN_MODULES b/src/Perturbation/NEEDED_CHILDREN_MODULES deleted file mode 100644 index c687e4bf..00000000 --- a/src/Perturbation/NEEDED_CHILDREN_MODULES +++ /dev/null @@ -1 +0,0 @@ -Determinants Hartree_Fock Davidson MRPT_Utils diff --git a/src/Perturbation/README.rst b/src/Perturbation/README.rst index 1657e079..b999e686 100644 --- a/src/Perturbation/README.rst +++ b/src/Perturbation/README.rst @@ -67,292 +67,3 @@ Assumptions pt2_.... -Needed Modules -============== - -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - -.. image:: tree_dependency.png - -* `Properties `_ -* `Hartree_Fock `_ - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Properties `_ -* `Hartree_Fock `_ -* `Davidson `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`do_pt2_end `_ - If true, compute the PT2 at the end of the selection - - -`fill_h_apply_buffer_selection `_ - Fill the H_apply buffer with determiants for the selection - - -`max_exc_pert `_ - Undocumented - - -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_dummy - Applly pertubration ``dummy`` to the buffer of determinants generated in the H_apply - routine. - - -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 - Applly pertubration ``epstein_nesbet_2x2`` to the buffer of determinants generated in the H_apply - routine. - - -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 - 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 - Applly pertubration ``epstein_nesbet_sc2_projected`` to the buffer of determinants generated in the H_apply - routine. - - -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 - Applly pertubration ``moller_plesset`` to the buffer of determinants generated in the H_apply - routine. - - -perturb_buffer_dipole_moment_z - Applly pertubration ``dipole_moment_z`` to the buffer of determinants generated in the H_apply - routine. - - -perturb_buffer_dummy - Applly pertubration ``dummy`` to the buffer of determinants generated in the H_apply - routine. - - -perturb_buffer_epstein_nesbet - Applly pertubration ``epstein_nesbet`` to the buffer of determinants generated in the H_apply - routine. - - -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 - Applly pertubration ``epstein_nesbet_sc2`` to the buffer of determinants generated in the H_apply - routine. - - -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 - Applly pertubration ``epstein_nesbet_sc2_projected`` to the buffer of determinants generated in the H_apply - routine. - - -perturb_buffer_h_core - Applly pertubration ``h_core`` to the buffer of determinants generated in the H_apply - routine. - - -perturb_buffer_moller_plesset - Applly pertubration ``moller_plesset`` to the buffer of determinants generated in the H_apply - routine. - - -`pt2_dipole_moment_z `_ - compute the perturbatibe contribution to the dipole moment of one determinant - .br - for the various n_st states, at various level of theory. - .br - c_pert(i) = /( - ) - .br - e_2_pert(i) = c_pert(i) * - .br - H_pert_diag(i) = c_pert(i)^2 * - .br - To get the contribution of the first order : - .br - = sum(over i) e_2_pert(i) - .br - To get the contribution of the diagonal elements of the second order : - .br - [ + + sum(over i) H_pert_diag(i) ] / [1. + sum(over i) c_pert(i) **2] - .br - - -`pt2_dummy `_ - Dummy perturbation to add all connected determinants. - - -`pt2_epstein_nesbet `_ - compute the standard Epstein-Nesbet perturbative first order coefficient and second order energetic contribution - .br - for the various N_st states. - .br - c_pert(i) = /( E(i) - ) - .br - e_2_pert(i) = ^2/( E(i) - ) - .br - - -`pt2_epstein_nesbet_2x2 `_ - compute the Epstein-Nesbet 2x2 diagonalization coefficient and energetic contribution - .br - for the various N_st states. - .br - e_2_pert(i) = 0.5 * (( - E(i) ) - sqrt( ( - E(i)) ^2 + 4 ^2 ) - .br - c_pert(i) = e_2_pert(i)/ - .br - - -`pt2_epstein_nesbet_sc2 `_ - compute the standard Epstein-Nesbet perturbative first order coefficient and second order energetic contribution - .br - for the various N_st states, but with the CISD_SC2 energies and coefficients - .br - c_pert(i) = /( E(i) - ) - .br - e_2_pert(i) = ^2/( E(i) - ) - .br - - -`pt2_epstein_nesbet_sc2_no_projected `_ - compute the Epstein-Nesbet perturbative first order coefficient and second order energetic contribution - .br - for the various N_st states, - .br - but with the correction in the denominator - .br - comming from the interaction of that determinant with all the others determinants - .br - that can be repeated by repeating all the double excitations - .br - : you repeat all the correlation energy already taken into account in electronic_energy(1) - .br - that could be repeated to this determinant. - .br - In addition, for the perturbative energetic contribution you have the standard second order - .br - e_2_pert = ^2/(Delta_E) - .br - and also the purely projected contribution - .br - H_pert_diag = c_pert - - -`pt2_epstein_nesbet_sc2_projected `_ - compute the Epstein-Nesbet perturbative first order coefficient and second order energetic contribution - .br - for the various N_st states, - .br - but with the correction in the denominator - .br - comming from the interaction of that determinant with all the others determinants - .br - that can be repeated by repeating all the double excitations - .br - : you repeat all the correlation energy already taken into account in electronic_energy(1) - .br - that could be repeated to this determinant. - .br - In addition, for the perturbative energetic contribution you have the standard second order - .br - e_2_pert = ^2/(Delta_E) - .br - and also the purely projected contribution - .br - H_pert_diag = c_pert - - -`pt2_h_core `_ - compute the standard Epstein-Nesbet perturbative first order coefficient and second order energetic contribution - .br - for the various N_st states. - .br - c_pert(i) = /( E(i) - ) - .br - e_2_pert(i) = ^2/( E(i) - ) - .br - - -`pt2_max `_ - The selection process stops when the largest PT2 (for all the state) is lower - than pt2_max in absolute value - - -`pt2_moller_plesset `_ - compute the standard Moller-Plesset perturbative first order coefficient and second order energetic contribution - .br - for the various n_st states. - .br - c_pert(i) = /(difference of orbital energies) - .br - e_2_pert(i) = ^2/(difference of orbital energies) - .br - - -`remove_small_contributions `_ - Remove determinants with small contributions. N_states is assumed to be - provided. - - -`repeat_all_e_corr `_ - Undocumented - - -`selection_criterion `_ - Threshold to select determinants. Set by selection routines. - - -`selection_criterion_factor `_ - Threshold to select determinants. Set by selection routines. - - -`selection_criterion_min `_ - Threshold to select determinants. Set by selection routines. - - -`var_pt2_ratio `_ - The selection process stops when the energy ratio variational/(variational+PT2) - is equal to var_pt2_ratio - diff --git a/src/Pseudo/NEEDED_CHILDREN_MODULES b/src/Pseudo/NEED similarity index 100% rename from src/Pseudo/NEEDED_CHILDREN_MODULES rename to src/Pseudo/NEED diff --git a/src/Pseudo/README.rst b/src/Pseudo/README.rst index 2b3f87dd..ad61fe15 100644 --- a/src/Pseudo/README.rst +++ b/src/Pseudo/README.rst @@ -2,80 +2,3 @@ Pseudo Module ============= -Needed Modules -============== - -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - -.. image:: tree_dependency.png - -* `Nuclei `_ - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Nuclei `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`do_pseudo `_ - Using pseudo potential integral or not - - -`nucl_charge_remove `_ - Nuclear charges removed - - -`pseudo_dz_k `_ - test - - -`pseudo_dz_kl `_ - test - - -`pseudo_grid_rmax `_ - R_maxof the QMC grid - - -`pseudo_grid_size `_ - Nb of points of the QMC grid - - -`pseudo_klocmax `_ - test - - -`pseudo_kmax `_ - test - - -`pseudo_lmax `_ - test - - -`pseudo_n_k `_ - test - - -`pseudo_n_kl `_ - test - - -`pseudo_v_k `_ - test - - -`pseudo_v_kl `_ - test - diff --git a/src/Psiref_CAS/NEEDED_CHILDREN_MODULES b/src/Psiref_CAS/NEED similarity index 100% rename from src/Psiref_CAS/NEEDED_CHILDREN_MODULES rename to src/Psiref_CAS/NEED diff --git a/src/Psiref_CAS/README.rst b/src/Psiref_CAS/README.rst index a217e36c..2bd272e1 100644 --- a/src/Psiref_CAS/README.rst +++ b/src/Psiref_CAS/README.rst @@ -6,98 +6,3 @@ Psiref_threshold Module Reference wave function is defined as all determinants with coefficients such that | c_i/c_max | > threshold. -Documentation -============= - -.. Do not edit this section. It was auto-generated from the -.. by the `update_README.py` script. - -`idx_ref `_ - CAS wave function, defined from the application of the CAS bitmask on the - determinants. idx_cas gives the indice of the CAS determinant in psi_det. - - -`n_det_ref `_ - CAS wave function, defined from the application of the CAS bitmask on the - determinants. idx_cas gives the indice of the CAS determinant in psi_det. - - -`psi_ref `_ - CAS wave function, defined from the application of the CAS bitmask on the - determinants. idx_cas gives the indice of the CAS determinant in psi_det. - - -`psi_ref_coef `_ - CAS wave function, defined from the application of the CAS bitmask on the - determinants. idx_cas gives the indice of the CAS determinant in psi_det. - - -`psi_ref_coef_restart `_ - Projection of the CAS wave function on the restart wave function. - - -`psi_ref_restart `_ - Projection of the CAS wave function on the restart wave function. - -Needed Modules -============== - -.. Do not edit this section. It was auto-generated from the -.. by the `update_README.py` script. - -.. image:: tree_dependency.png - -* `Psiref_Utils `_ - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Psiref_Utils `_ -* `Davidson `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`idx_ref `_ - CAS wave function, defined from the application of the CAS bitmask on the - determinants. idx_cas gives the indice of the CAS determinant in psi_det. - - -`n_det_ref `_ - CAS wave function, defined from the application of the CAS bitmask on the - determinants. idx_cas gives the indice of the CAS determinant in psi_det. - - -`overwrite_w_cas `_ - Undocumented - - -`psi_ref `_ - CAS wave function, defined from the application of the CAS bitmask on the - determinants. idx_cas gives the indice of the CAS determinant in psi_det. - - -`psi_ref_coef `_ - CAS wave function, defined from the application of the CAS bitmask on the - determinants. idx_cas gives the indice of the CAS determinant in psi_det. - - -`psi_ref_coef_inv `_ - 1/psi_ref_coef - - -`psi_ref_coef_restart `_ - Projection of the CAS wave function on the restart wave function. - - -`psi_ref_restart `_ - Projection of the CAS wave function on the restart wave function. - diff --git a/src/Psiref_Utils/NEEDED_CHILDREN_MODULES b/src/Psiref_Utils/NEED similarity index 100% rename from src/Psiref_Utils/NEEDED_CHILDREN_MODULES rename to src/Psiref_Utils/NEED diff --git a/src/Psiref_Utils/README.rst b/src/Psiref_Utils/README.rst index 2ceb6b98..1696c5ab 100644 --- a/src/Psiref_Utils/README.rst +++ b/src/Psiref_Utils/README.rst @@ -7,927 +7,3 @@ Utilities related to the use of a reference wave function. This module needs to be loaded with any psi_ref module. -Documentation -============= - -.. Do not edit this section. It was auto-generated from the -.. by the `update_README.py` script. - -`get_index_in_psi_ref_sorted_bit `_ - Returns the index of the determinant in the ``psi_ref_sorted_bit`` array - - -`h_matrix_ref `_ - Undocumented - - -`holes_operators `_ - holes_operators represents an array of integers where all the holes have - been done going from psi_ref to psi_non_ref - particles_operators represents an array of integers where all the particles have - been done going from psi_ref to psi_non_ref - - -`idx_non_ref `_ - Set of determinants which are not part of the reference, defined from the application - of the reference bitmask on the determinants. - idx_non_ref gives the indice of the determinant in psi_det. - idx_non_ref_rev gives the reverse. - - -`idx_non_ref_rev `_ - Set of determinants which are not part of the reference, defined from the application - of the reference bitmask on the determinants. - idx_non_ref gives the indice of the determinant in psi_det. - idx_non_ref_rev gives the reverse. - - -`is_in_psi_ref `_ - True if the determinant ``det`` is in the wave function - - -`n_det_non_ref `_ - Set of determinants which are not part of the reference, defined from the application - of the reference bitmask on the determinants. - idx_non_ref gives the indice of the determinant in psi_det. - idx_non_ref_rev gives the reverse. - - -`particles_operators `_ - holes_operators represents an array of integers where all the holes have - been done going from psi_ref to psi_non_ref - particles_operators represents an array of integers where all the particles have - been done going from psi_ref to psi_non_ref - - -`psi_coef_ref_diagonalized `_ - Undocumented - - -`psi_non_ref `_ - Set of determinants which are not part of the reference, defined from the application - of the reference bitmask on the determinants. - idx_non_ref gives the indice of the determinant in psi_det. - idx_non_ref_rev gives the reverse. - - -`psi_non_ref_coef `_ - Set of determinants which are not part of the reference, defined from the application - of the reference bitmask on the determinants. - idx_non_ref gives the indice of the determinant in psi_det. - idx_non_ref_rev gives the reverse. - - -`psi_non_ref_coef_restart `_ - Set of determinants which are not part of the reference, defined from the application - of the reference bitmask on the determinants. - idx_non_ref gives the indice of the determinant in psi_det. - But this is with respect to the restart wave function. - - -`psi_non_ref_coef_sorted_bit `_ - Reference determinants sorted to accelerate the search of a random determinant in the wave - function. - - -`psi_non_ref_restart `_ - Set of determinants which are not part of the reference, defined from the application - of the reference bitmask on the determinants. - idx_non_ref gives the indice of the determinant in psi_det. - But this is with respect to the restart wave function. - - -`psi_non_ref_sorted_bit `_ - Reference determinants sorted to accelerate the search of a random determinant in the wave - function. - - -`psi_ref_coef_sorted_bit `_ - Reference determinants sorted to accelerate the search of a random determinant in the wave - function. - - -`psi_ref_energy `_ - Undocumented - - -`psi_ref_energy_diagonalized `_ - Undocumented - - -`psi_ref_sorted_bit `_ - Reference determinants sorted to accelerate the search of a random determinant in the wave - function. - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Bitmask `_ -* `Determinants `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`a_coef `_ - Undocumented - - -`add_poly `_ - Add two polynomials - D(t) =! D(t) +( B(t)+C(t)) - - -`add_poly_multiply `_ - Add a polynomial multiplied by a constant - D(t) =! D(t) +( cst * B(t)) - - -`align_double `_ - Compute 1st dimension such that it is aligned for vectorization. - - -`apply_rotation `_ - Apply the rotation found by find_rotation - - -`approx_dble `_ - Undocumented - - -`b_coef `_ - Undocumented - - -`binom `_ - Binomial coefficients - - -`binom_func `_ - .. math :: - .br - \frac{i!}{j!(i-j)!} - .br - - -`binom_transp `_ - Binomial coefficients - - -`dble_fact `_ - Undocumented - - -`dble_fact_even `_ - n!! - - -`dble_fact_odd `_ - n!! - - -`dble_logfact `_ - n!! - - -`ddfact2 `_ - Undocumented - - -`dset_order `_ - array A has already been sorted, and iorder has contains the new order of - elements of A. This subroutine changes the order of x to match the new order of A. - - -`dset_order_big `_ - array A has already been sorted, and iorder has contains the new order of - elements of A. This subroutine changes the order of x to match the new order of A. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`dsort `_ - Sort array x(isize). - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`dtranspose `_ - Transpose input matrix A into output matrix B - - -`erf0 `_ - Undocumented - - -`extract_ref `_ - Replaces the total wave function by the normalized projection on the reference - - -`f_integral `_ - function that calculates the following integral - \int_{\-infty}^{+\infty} x^n \exp(-p x^2) dx - - -`fact `_ - n! - - -`fact_inv `_ - 1/n! - - -`find_rotation `_ - Find A.C = B - - -`gammln `_ - Undocumented - - -`gammp `_ - Undocumented - - -`gaussian_product `_ - Gaussian product in 1D. - e^{-a (x-x_A)^2} e^{-b (x-x_B)^2} = K_{ab}^x e^{-p (x-x_P)^2} - - -`gaussian_product_x `_ - Gaussian product in 1D. - e^{-a (x-x_A)^2} e^{-b (x-x_B)^2} = K_{ab}^x e^{-p (x-x_P)^2} - - -`gcf `_ - Undocumented - - -`get_index_in_psi_ref_sorted_bit `_ - Returns the index of the determinant in the ``psi_ref_sorted_bit`` array - - -`get_pseudo_inverse `_ - Find C = A^-1 - - -`give_explicit_poly_and_gaussian `_ - Transforms the product of - (x-x_A)^a(1) (x-x_B)^b(1) (x-x_A)^a(2) (y-y_B)^b(2) (z-z_A)^a(3) (z-z_B)^b(3) exp(-(r-A)^2 alpha) exp(-(r-B)^2 beta) - into - fact_k * [ sum (l_x = 0,i_order(1)) P_new(l_x,1) * (x-P_center(1))^l_x ] exp (- p (x-P_center(1))^2 ) - * [ sum (l_y = 0,i_order(2)) P_new(l_y,2) * (y-P_center(2))^l_y ] exp (- p (y-P_center(2))^2 ) - * [ sum (l_z = 0,i_order(3)) P_new(l_z,3) * (z-P_center(3))^l_z ] exp (- p (z-P_center(3))^2 ) - - -`give_explicit_poly_and_gaussian_double `_ - Transforms the product of - (x-x_A)^a(1) (x-x_B)^b(1) (x-x_A)^a(2) (y-y_B)^b(2) (z-z_A)^a(3) (z-z_B)^b(3) - exp(-(r-A)^2 alpha) exp(-(r-B)^2 beta) exp(-(r-Nucl_center)^2 gama - .br - into - fact_k * [ sum (l_x = 0,i_order(1)) P_new(l_x,1) * (x-P_center(1))^l_x ] exp (- p (x-P_center(1))^2 ) - * [ sum (l_y = 0,i_order(2)) P_new(l_y,2) * (y-P_center(2))^l_y ] exp (- p (y-P_center(2))^2 ) - * [ sum (l_z = 0,i_order(3)) P_new(l_z,3) * (z-P_center(3))^l_z ] exp (- p (z-P_center(3))^2 ) - - -`give_explicit_poly_and_gaussian_x `_ - Transform the product of - (x-x_A)^a(1) (x-x_B)^b(1) (x-x_A)^a(2) (y-y_B)^b(2) (z-z_A)^a(3) (z-z_B)^b(3) exp(-(r-A)^2 alpha) exp(-(r-B)^2 beta) - into - fact_k (x-x_P)^iorder(1) (y-y_P)^iorder(2) (z-z_P)^iorder(3) exp(-p(r-P)^2) - - -`gser `_ - Undocumented - - -`h_matrix_ref `_ - Undocumented - - -`heap_dsort `_ - Sort array x(isize) using the heap sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`heap_dsort_big `_ - Sort array x(isize) using the heap sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`heap_i2sort `_ - Sort array x(isize) using the heap sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`heap_i2sort_big `_ - Sort array x(isize) using the heap sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`heap_i8sort `_ - Sort array x(isize) using the heap sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`heap_i8sort_big `_ - Sort array x(isize) using the heap sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`heap_isort `_ - Sort array x(isize) using the heap sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`heap_isort_big `_ - Sort array x(isize) using the heap sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`heap_sort `_ - Sort array x(isize) using the heap sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`heap_sort_big `_ - Sort array x(isize) using the heap sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`hermite `_ - Hermite polynomial - - -`holes_operators `_ - holes_operators represents an array of integers where all the holes have - been done going from psi_ref to psi_non_ref - particles_operators represents an array of integers where all the particles have - been done going from psi_ref to psi_non_ref - - -`i2radix_sort `_ - Sort integer array x(isize) using the radix sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - iradix should be -1 in input. - - -`i2set_order `_ - array A has already been sorted, and iorder has contains the new order of - elements of A. This subroutine changes the order of x to match the new order of A. - - -`i2set_order_big `_ - array A has already been sorted, and iorder has contains the new order of - elements of A. This subroutine changes the order of x to match the new order of A. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`i2sort `_ - Sort array x(isize). - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`i8radix_sort `_ - Sort integer array x(isize) using the radix sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - iradix should be -1 in input. - - -`i8radix_sort_big `_ - Sort integer array x(isize) using the radix sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - iradix should be -1 in input. - - -`i8set_order `_ - array A has already been sorted, and iorder has contains the new order of - elements of A. This subroutine changes the order of x to match the new order of A. - - -`i8set_order_big `_ - array A has already been sorted, and iorder has contains the new order of - elements of A. This subroutine changes the order of x to match the new order of A. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`i8sort `_ - Sort array x(isize). - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`idx_non_ref `_ - Set of determinants which are not part of the reference, defined from the application - of the reference bitmask on the determinants. - idx_non_ref gives the indice of the determinant in psi_det. - idx_non_ref_rev gives the reverse. - - -`idx_non_ref_rev `_ - Set of determinants which are not part of the reference, defined from the application - of the reference bitmask on the determinants. - idx_non_ref gives the indice of the determinant in psi_det. - idx_non_ref_rev gives the reverse. - - -`insertion_dsort `_ - Sort array x(isize) using the insertion sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`insertion_dsort_big `_ - Sort array x(isize) using the insertion sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`insertion_i2sort `_ - Sort array x(isize) using the insertion sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`insertion_i2sort_big `_ - Sort array x(isize) using the insertion sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`insertion_i8sort `_ - Sort array x(isize) using the insertion sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`insertion_i8sort_big `_ - Sort array x(isize) using the insertion sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`insertion_isort `_ - Sort array x(isize) using the insertion sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`insertion_isort_big `_ - Sort array x(isize) using the insertion sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`insertion_sort `_ - Sort array x(isize) using the insertion sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`insertion_sort_big `_ - Sort array x(isize) using the insertion sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`inv_int `_ - 1/i - - -`iradix_sort `_ - Sort integer array x(isize) using the radix sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - iradix should be -1 in input. - - -`iradix_sort_big `_ - Sort integer array x(isize) using the radix sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - iradix should be -1 in input. - - -`is_in_psi_ref `_ - True if the determinant ``det`` is in the wave function - - -`iset_order `_ - array A has already been sorted, and iorder has contains the new order of - elements of A. This subroutine changes the order of x to match the new order of A. - - -`iset_order_big `_ - array A has already been sorted, and iorder has contains the new order of - elements of A. This subroutine changes the order of x to match the new order of A. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`isort `_ - Sort array x(isize). - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`lapack_diag `_ - Diagonalize matrix H - .br - H is untouched between input and ouptut - .br - eigevalues(i) = ith lowest eigenvalue of the H matrix - .br - eigvectors(i,j) = where i is the basis function and psi_j is the j th eigenvector - .br - - -`lapack_diag_s2 `_ - Diagonalize matrix H - .br - H is untouched between input and ouptut - .br - eigevalues(i) = ith lowest eigenvalue of the H matrix - .br - eigvectors(i,j) = where i is the basis function and psi_j is the j th eigenvector - .br - - -`lapack_diagd `_ - Diagonalize matrix H - .br - H is untouched between input and ouptut - .br - eigevalues(i) = ith lowest eigenvalue of the H matrix - .br - eigvectors(i,j) = where i is the basis function and psi_j is the j th eigenvector - .br - - -`lapack_partial_diag `_ - Diagonalize matrix H - .br - H is untouched between input and ouptut - .br - eigevalues(i) = ith lowest eigenvalue of the H matrix - .br - eigvectors(i,j) = where i is the basis function and psi_j is the j th eigenvector - .br - - -`logfact `_ - n! - - -`lowercase `_ - Transform to lower case - - -`map_load_from_disk `_ - Undocumented - - -`map_save_to_disk `_ - Undocumented - - -`multiply_poly `_ - Multiply two polynomials - D(t) =! D(t) +( B(t)*C(t)) - - -`n_det_non_ref `_ - Set of determinants which are not part of the reference, defined from the application - of the reference bitmask on the determinants. - idx_non_ref gives the indice of the determinant in psi_det. - idx_non_ref_rev gives the reverse. - - -`normalize `_ - Normalizes vector u - u is expected to be aligned in memory. - - -`nproc `_ - Number of current OpenMP threads - - -`ortho_canonical `_ - Compute C_new=C_old.U.s^-1/2 canonical orthogonalization. - .br - overlap : overlap matrix - .br - LDA : leftmost dimension of overlap array - .br - N : Overlap matrix is NxN (array is (LDA,N) ) - .br - C : Coefficients of the vectors to orthogonalize. On exit, - orthogonal vectors - .br - LDC : leftmost dimension of C - .br - m : Coefficients matrix is MxN, ( array is (LDC,N) ) - .br - - -`ortho_lowdin `_ - Compute C_new=C_old.S^-1/2 orthogonalization. - .br - overlap : overlap matrix - .br - LDA : leftmost dimension of overlap array - .br - N : Overlap matrix is NxN (array is (LDA,N) ) - .br - C : Coefficients of the vectors to orthogonalize. On exit, - orthogonal vectors - .br - LDC : leftmost dimension of C - .br - m : Coefficients matrix is MxN, ( array is (LDC,N) ) - .br - - -`ortho_qr `_ - Orthogonalization using Q.R factorization - .br - A : matrix to orthogonalize - .br - LDA : leftmost dimension of A - .br - n : Number of rows of A - .br - m : Number of columns of A - .br - - -`overlap_a_b_c `_ - Undocumented - - -`overlap_gaussian_x `_ - .. math:: - .br - \sum_{-infty}^{+infty} (x-A_x)^ax (x-B_x)^bx exp(-alpha(x-A_x)^2) exp(-beta(x-B_X)^2) dx - .br - - -`overlap_gaussian_xyz `_ - .. math:: - .br - S_x = \int (x-A_x)^{a_x} exp(-\alpha(x-A_x)^2) (x-B_x)^{b_x} exp(-beta(x-B_x)^2) dx \\ - S = S_x S_y S_z - .br - - -`overlap_x_abs `_ - .. math :: - .br - \int_{-infty}^{+infty} (x-A_center)^(power_A) * (x-B_center)^power_B * exp(-alpha(x-A_center)^2) * exp(-beta(x-B_center)^2) dx - .br - - -`particles_operators `_ - holes_operators represents an array of integers where all the holes have - been done going from psi_ref to psi_non_ref - particles_operators represents an array of integers where all the particles have - been done going from psi_ref to psi_non_ref - - -`progress_active `_ - Current status for displaying progress bars. Global variable. - - -`progress_bar `_ - Current status for displaying progress bars. Global variable. - - -`progress_timeout `_ - Current status for displaying progress bars. Global variable. - - -`progress_title `_ - Current status for displaying progress bars. Global variable. - - -`progress_value `_ - Current status for displaying progress bars. Global variable. - - -`psi_non_ref `_ - Set of determinants which are not part of the reference, defined from the application - of the reference bitmask on the determinants. - idx_non_ref gives the indice of the determinant in psi_det. - idx_non_ref_rev gives the reverse. - - -`psi_non_ref_coef `_ - Set of determinants which are not part of the reference, defined from the application - of the reference bitmask on the determinants. - idx_non_ref gives the indice of the determinant in psi_det. - idx_non_ref_rev gives the reverse. - - -`psi_non_ref_coef_restart `_ - Set of determinants which are not part of the reference, defined from the application - of the reference bitmask on the determinants. - idx_non_ref gives the indice of the determinant in psi_det. - But this is with respect to the restart wave function. - - -`psi_non_ref_coef_sorted_bit `_ - Reference determinants sorted to accelerate the search of a random determinant in the wave - function. - - -`psi_non_ref_coef_transp `_ - Transposed psi_non_ref_coef - - -`psi_non_ref_restart `_ - Set of determinants which are not part of the reference, defined from the application - of the reference bitmask on the determinants. - idx_non_ref gives the indice of the determinant in psi_det. - But this is with respect to the restart wave function. - - -`psi_non_ref_sorted_bit `_ - Reference determinants sorted to accelerate the search of a random determinant in the wave - function. - - -`psi_ref_coef_diagonalized `_ - Undocumented - - -`psi_ref_coef_normalized `_ - Normalized coefficients of the reference - - -`psi_ref_coef_sorted_bit `_ - Reference determinants sorted to accelerate the search of a random determinant in the wave - function. - - -`psi_ref_coef_transp `_ - Transposed psi_ref_coef - - -`psi_ref_energy `_ - Undocumented - - -`psi_ref_energy_diagonalized `_ - Undocumented - - -`psi_ref_sorted_bit `_ - Reference determinants sorted to accelerate the search of a random determinant in the wave - function. - - -`recentered_poly2 `_ - Recenter two polynomials - - -`ref_hamiltonian_matrix `_ - H matrix in the Reference space - - -`rint `_ - .. math:: - .br - \int_0^1 dx \exp(-p x^2) x^n - .br - - -`rint1 `_ - Standard version of rint - - -`rint_large_n `_ - Version of rint for large values of n - - -`rint_sum `_ - Needed for the calculation of two-electron integrals. - - -`rinteg `_ - Undocumented - - -`rintgauss `_ - Undocumented - - -`run_progress `_ - Display a progress bar with documentation of what is happening - - -`sabpartial `_ - Undocumented - - -`set_order `_ - array A has already been sorted, and iorder has contains the new order of - elements of A. This subroutine changes the order of x to match the new order of A. - - -`set_order_big `_ - array A has already been sorted, and iorder has contains the new order of - elements of A. This subroutine changes the order of x to match the new order of A. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`set_zero_extra_diag `_ - Undocumented - - -`sort `_ - Sort array x(isize). - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`start_progress `_ - Starts the progress bar - - -`stop_progress `_ - Stop the progress bar - - -`svd `_ - Compute A = U.D.Vt - .br - LDx : leftmost dimension of x - .br - Dimsneion of A is m x n - .br - - -`transpose `_ - Transpose input matrix A into output matrix B - - -`u_dot_u `_ - Compute - - -`u_dot_v `_ - Compute - - -`wall_time `_ - The equivalent of cpu_time, but for the wall time. - - -`write_git_log `_ - Write the last git commit in file iunit. - diff --git a/src/Selectors_CASSD/NEEDED_CHILDREN_MODULES b/src/Selectors_CASSD/NEED similarity index 100% rename from src/Selectors_CASSD/NEEDED_CHILDREN_MODULES rename to src/Selectors_CASSD/NEED diff --git a/src/Selectors_CASSD/README.rst b/src/Selectors_CASSD/README.rst index 19b4ec2b..c7d23c3d 100644 --- a/src/Selectors_CASSD/README.rst +++ b/src/Selectors_CASSD/README.rst @@ -2,11 +2,3 @@ Selectors_CASSD =============== -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. diff --git a/src/Selectors_Utils/NEEDED_CHILDREN_MODULES b/src/Selectors_Utils/NEED similarity index 100% rename from src/Selectors_Utils/NEEDED_CHILDREN_MODULES rename to src/Selectors_Utils/NEED diff --git a/src/Selectors_Utils/README.rst b/src/Selectors_Utils/README.rst index fc264fc1..31bba35f 100644 --- a/src/Selectors_Utils/README.rst +++ b/src/Selectors_Utils/README.rst @@ -2,189 +2,3 @@ Selectors_full Module ===================== -Needed Modules -============== - -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - -.. image:: tree_dependency.png - -* `Determinants `_ -* `Hartree_Fock `_ - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Determinants `_ -* `Hartree_Fock `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`coef_hf_selector `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`delta_e_per_selector `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`double_index_selectors `_ - degree of excitation respect to Hartree Fock for the wave function - .br - for the all the selectors determinants - .br - double_index_selectors = list of the index of the double excitations - .br - n_double_selectors = number of double excitations in the selectors determinants - - -`e_corr_double_only `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`e_corr_per_selectors `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`e_corr_second_order `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`exc_degree_per_selectors `_ - degree of excitation respect to Hartree Fock for the wave function - .br - for the all the selectors determinants - .br - double_index_selectors = list of the index of the double excitations - .br - n_double_selectors = number of double excitations in the selectors determinants - - -`i_h_hf_per_selectors `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`inv_selectors_coef_hf `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`inv_selectors_coef_hf_squared `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`n_det_selectors `_ - For Single reference wave functions, the number of selectors is 1 : the - Hartree-Fock determinant - - -`n_double_selectors `_ - degree of excitation respect to Hartree Fock for the wave function - .br - for the all the selectors determinants - .br - double_index_selectors = list of the index of the double excitations - .br - n_double_selectors = number of double excitations in the selectors determinants - - -`psi_selectors `_ - Determinants on which we apply for perturbation. - - -`psi_selectors_coef `_ - Determinants on which we apply for perturbation. - - -`psi_selectors_coef_transp `_ - Transposed psi_selectors - - -`psi_selectors_diag_h_mat `_ - Diagonal elements of the H matrix for each selectors - - -`psi_selectors_size `_ - Undocumented - - -`zmq_get_psi `_ - Get the wave function from the qp_run scheduler - - -`zmq_put_psi `_ - Put the wave function on the qp_run scheduler - diff --git a/src/Selectors_full/NEEDED_CHILDREN_MODULES b/src/Selectors_full/NEED similarity index 100% rename from src/Selectors_full/NEEDED_CHILDREN_MODULES rename to src/Selectors_full/NEED diff --git a/src/Selectors_full/README.rst b/src/Selectors_full/README.rst index fc264fc1..31bba35f 100644 --- a/src/Selectors_full/README.rst +++ b/src/Selectors_full/README.rst @@ -2,189 +2,3 @@ Selectors_full Module ===================== -Needed Modules -============== - -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - -.. image:: tree_dependency.png - -* `Determinants `_ -* `Hartree_Fock `_ - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Determinants `_ -* `Hartree_Fock `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`coef_hf_selector `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`delta_e_per_selector `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`double_index_selectors `_ - degree of excitation respect to Hartree Fock for the wave function - .br - for the all the selectors determinants - .br - double_index_selectors = list of the index of the double excitations - .br - n_double_selectors = number of double excitations in the selectors determinants - - -`e_corr_double_only `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`e_corr_per_selectors `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`e_corr_second_order `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`exc_degree_per_selectors `_ - degree of excitation respect to Hartree Fock for the wave function - .br - for the all the selectors determinants - .br - double_index_selectors = list of the index of the double excitations - .br - n_double_selectors = number of double excitations in the selectors determinants - - -`i_h_hf_per_selectors `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`inv_selectors_coef_hf `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`inv_selectors_coef_hf_squared `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`n_det_selectors `_ - For Single reference wave functions, the number of selectors is 1 : the - Hartree-Fock determinant - - -`n_double_selectors `_ - degree of excitation respect to Hartree Fock for the wave function - .br - for the all the selectors determinants - .br - double_index_selectors = list of the index of the double excitations - .br - n_double_selectors = number of double excitations in the selectors determinants - - -`psi_selectors `_ - Determinants on which we apply for perturbation. - - -`psi_selectors_coef `_ - Determinants on which we apply for perturbation. - - -`psi_selectors_coef_transp `_ - Transposed psi_selectors - - -`psi_selectors_diag_h_mat `_ - Diagonal elements of the H matrix for each selectors - - -`psi_selectors_size `_ - Undocumented - - -`zmq_get_psi `_ - Get the wave function from the qp_run scheduler - - -`zmq_put_psi `_ - Put the wave function on the qp_run scheduler - diff --git a/src/Selectors_no_sorted/NEEDED_CHILDREN_MODULES b/src/Selectors_no_sorted/NEED similarity index 100% rename from src/Selectors_no_sorted/NEEDED_CHILDREN_MODULES rename to src/Selectors_no_sorted/NEED diff --git a/src/Selectors_no_sorted/README.rst b/src/Selectors_no_sorted/README.rst index 1170123a..79b78499 100644 --- a/src/Selectors_no_sorted/README.rst +++ b/src/Selectors_no_sorted/README.rst @@ -2,348 +2,3 @@ Selectors_no_sorted Module ========================== -Documentation -============= - -.. Do not edit this section. It was auto-generated from the -.. by the `update_README.py` script. - -`coef_hf_selector `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`delta_e_per_selector `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`double_index_selectors `_ - degree of excitation respect to Hartree Fock for the wave function - .br - for the all the selectors determinants - .br - double_index_selectors = list of the index of the double excitations - .br - n_double_selectors = number of double excitations in the selectors determinants - - -`e_corr_double_only `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`e_corr_per_selectors `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`e_corr_second_order `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`exc_degree_per_selectors `_ - degree of excitation respect to Hartree Fock for the wave function - .br - for the all the selectors determinants - .br - double_index_selectors = list of the index of the double excitations - .br - n_double_selectors = number of double excitations in the selectors determinants - - -`i_h_hf_per_selectors `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`inv_selectors_coef_hf `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`inv_selectors_coef_hf_squared `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`n_det_selectors `_ - For Single reference wave functions, the number of selectors is 1 : the - Hartree-Fock determinant - - -`n_double_selectors `_ - degree of excitation respect to Hartree Fock for the wave function - .br - for the all the selectors determinants - .br - double_index_selectors = list of the index of the double excitations - .br - n_double_selectors = number of double excitations in the selectors determinants - - -`psi_selectors `_ - Determinants on which we apply for perturbation. - - -`psi_selectors_ab `_ - Determinants on which we apply . - They are sorted by the 3 highest electrons in the alpha part, - then by the 3 highest electrons in the beta part to accelerate - the research of connected determinants. - - -`psi_selectors_coef `_ - Determinants on which we apply for perturbation. - - -`psi_selectors_coef_ab `_ - Determinants on which we apply . - They are sorted by the 3 highest electrons in the alpha part, - then by the 3 highest electrons in the beta part to accelerate - the research of connected determinants. - - -`psi_selectors_diag_h_mat `_ - Diagonal elements of the H matrix for each selectors - - -`psi_selectors_next_ab `_ - Determinants on which we apply . - They are sorted by the 3 highest electrons in the alpha part, - then by the 3 highest electrons in the beta part to accelerate - the research of connected determinants. - - -`psi_selectors_size `_ - 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 `_ - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Determinants `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`coef_hf_selector `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`delta_e_per_selector `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`double_index_selectors `_ - degree of excitation respect to Hartree Fock for the wave function - .br - for the all the selectors determinants - .br - double_index_selectors = list of the index of the double excitations - .br - n_double_selectors = number of double excitations in the selectors determinants - - -`e_corr_double_only `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`e_corr_per_selectors `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`e_corr_second_order `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`exc_degree_per_selectors `_ - degree of excitation respect to Hartree Fock for the wave function - .br - for the all the selectors determinants - .br - double_index_selectors = list of the index of the double excitations - .br - n_double_selectors = number of double excitations in the selectors determinants - - -`i_h_hf_per_selectors `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`inv_selectors_coef_hf `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`inv_selectors_coef_hf_squared `_ - energy of correlation per determinant respect to the Hartree Fock determinant - .br - for the all the double excitations in the selectors determinants - .br - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation - .br - E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation - .br - coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants - - -`n_det_selectors `_ - For Single reference wave functions, the number of selectors is 1 : the - Hartree-Fock determinant - - -`n_double_selectors `_ - degree of excitation respect to Hartree Fock for the wave function - .br - for the all the selectors determinants - .br - double_index_selectors = list of the index of the double excitations - .br - n_double_selectors = number of double excitations in the selectors determinants - - -`psi_selectors `_ - Determinants on which we apply for perturbation. - - -`psi_selectors_coef `_ - Determinants on which we apply for perturbation. - - -`psi_selectors_diag_h_mat `_ - Diagonal elements of the H matrix for each selectors - - -`psi_selectors_size `_ - Undocumented - diff --git a/src/SingleRefMethod/NEEDED_CHILDREN_MODULES b/src/SingleRefMethod/NEED similarity index 100% rename from src/SingleRefMethod/NEEDED_CHILDREN_MODULES rename to src/SingleRefMethod/NEED diff --git a/src/SingleRefMethod/README.rst b/src/SingleRefMethod/README.rst index 19e47d71..1cad35a7 100644 --- a/src/SingleRefMethod/README.rst +++ b/src/SingleRefMethod/README.rst @@ -5,79 +5,3 @@ SingleDetMethod Module Include this module for single reference methods. Using this module, the only generator determinant is the Hartree-Fock determinant. -Documentation -============= - -.. Do not edit this section. It was auto-generated from the -.. by the `update_README.py` script. - -`n_det_generators `_ - For Single reference wave functions, the number of generators is 1 : the - Hartree-Fock determinant - - -`psi_coef_generators `_ - For Single reference wave functions, the generator is the - Hartree-Fock determinant - - -`psi_det_generators `_ - For Single reference wave functions, the generator is the - Hartree-Fock determinant - - -`select_max `_ - Memo to skip useless selectors - - -`size_select_max `_ - Size of select_max - -Needed Modules -============== - -.. Do not edit this section. It was auto-generated from the -.. by the `update_README.py` script. - -.. image:: tree_dependency.png - -* `Bitmask `_ - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Bitmask `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`n_det_generators `_ - For Single reference wave functions, the number of generators is 1 : the - Hartree-Fock determinant - - -`psi_coef_generators `_ - For Single reference wave functions, the generator is the - Hartree-Fock determinant - - -`psi_det_generators `_ - For Single reference wave functions, the generator is the - Hartree-Fock determinant - - -`select_max `_ - Memo to skip useless selectors - - -`size_select_max `_ - Size of select_max - diff --git a/src/Slave/NEED b/src/Slave/NEED new file mode 100644 index 00000000..05f7bca8 --- /dev/null +++ b/src/Slave/NEED @@ -0,0 +1 @@ +FCI MPI diff --git a/src/Slave/README.rst b/src/Slave/README.rst new file mode 100644 index 00000000..749b428f --- /dev/null +++ b/src/Slave/README.rst @@ -0,0 +1,15 @@ +===== +Slave +===== + +Slave processes for distributed parallelism. + + +Needed Modules +============== +.. Do not edit this section It was auto-generated +.. by the `update_README.py` script. +Documentation +============= +.. Do not edit this section It was auto-generated +.. by the `update_README.py` script. diff --git a/src/FCI/selection_davidson_slave.irp.f b/src/Slave/slave_cipsi.irp.f similarity index 98% rename from src/FCI/selection_davidson_slave.irp.f rename to src/Slave/slave_cipsi.irp.f index ad22e644..e5cb86f2 100644 --- a/src/FCI/selection_davidson_slave.irp.f +++ b/src/Slave/slave_cipsi.irp.f @@ -1,7 +1,7 @@ -program selection_slave +program slave implicit none BEGIN_DOC -! Helper program to compute the PT2 in distributed mode. +! Helper program for distributed parallelism END_DOC call omp_set_nested(.false.) @@ -31,7 +31,7 @@ subroutine run_wf integer(ZMQ_PTR), external :: new_zmq_to_qp_run_socket integer(ZMQ_PTR) :: zmq_to_qp_run_socket double precision :: energy(N_states) - character*(64) :: states(3) + character*(64) :: states(10) character*(64) :: old_state integer :: rc, i, ierr double precision :: t0, t1 diff --git a/src/Integrals_Bielec/qp_ao_ints.irp.f b/src/Slave/slave_eri.irp.f similarity index 94% rename from src/Integrals_Bielec/qp_ao_ints.irp.f rename to src/Slave/slave_eri.irp.f index f499c848..e0c03ff1 100644 --- a/src/Integrals_Bielec/qp_ao_ints.irp.f +++ b/src/Slave/slave_eri.irp.f @@ -7,7 +7,7 @@ program qp_ao_ints integer :: ierr BEGIN_DOC -! Increments a running calculation to compute AO integrals +! Slave for electron repulsion integrals END_DOC integer :: i PROVIDE zmq_context mpi_master zmq_state zmq_context diff --git a/src/Tools/README.rst b/src/Tools/README.rst new file mode 100644 index 00000000..e560b35a --- /dev/null +++ b/src/Tools/README.rst @@ -0,0 +1,5 @@ +===== +Tools +===== + +Useful tools are grouped in this module. diff --git a/plugins/FCIdump/fcidump.irp.f b/src/Tools/fcidump.irp.f similarity index 100% rename from plugins/FCIdump/fcidump.irp.f rename to src/Tools/fcidump.irp.f diff --git a/plugins/Molden/print_mo.irp.f b/src/Tools/molden.irp.f similarity index 100% rename from plugins/Molden/print_mo.irp.f rename to src/Tools/molden.irp.f diff --git a/src/Determinants/save_natorb.irp.f b/src/Tools/save_natorb.irp.f similarity index 100% rename from src/Determinants/save_natorb.irp.f rename to src/Tools/save_natorb.irp.f diff --git a/src/MO_one_e_integrals/save_ortho_mos.irp.f b/src/Tools/save_ortho_mos.irp.f similarity index 100% rename from src/MO_one_e_integrals/save_ortho_mos.irp.f rename to src/Tools/save_ortho_mos.irp.f diff --git a/src/Utils/NEED b/src/Utils/NEED new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/src/Utils/NEED @@ -0,0 +1 @@ + diff --git a/src/Utils/README.rst b/src/Utils/README.rst index ea5f2854..bd60ec67 100644 --- a/src/Utils/README.rst +++ b/src/Utils/README.rst @@ -4,795 +4,3 @@ Utils Module Contains general purpose utilities. -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`a_coef `_ - Undocumented - - -`add_poly `_ - Add two polynomials - D(t) =! D(t) +( B(t)+C(t)) - - -`add_poly_multiply `_ - Add a polynomial multiplied by a constant - D(t) =! D(t) +( cst * B(t)) - - -`align_double `_ - Compute 1st dimension such that it is aligned for vectorization. - - -`apply_rotation `_ - Apply the rotation found by find_rotation - - -`approx_dble `_ - Undocumented - - -`b_coef `_ - Undocumented - - -`binom `_ - Binomial coefficients - - -`binom_func `_ - .. math :: - .br - \frac{i!}{j!(i-j)!} - .br - - -`binom_transp `_ - Binomial coefficients - - -`dble_fact `_ - Undocumented - - -`dble_fact_even `_ - n!! - - -`dble_fact_odd `_ - n!! - - -`dble_logfact `_ - n!! - - -`ddfact2 `_ - Undocumented - - -`degree_max_integration_lebedev `_ - integrate correctly a polynom of order "degree_max_integration_lebedev" - needed for the angular integration according to LEBEDEV formulae - - -`dset_order `_ - array A has already been sorted, and iorder has contains the new order of - elements of A. This subroutine changes the order of x to match the new order of A. - - -`dset_order_big `_ - array A has already been sorted, and iorder has contains the new order of - elements of A. This subroutine changes the order of x to match the new order of A. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`dsort `_ - Sort array x(isize). - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`dtranspose `_ - Transpose input matrix A into output matrix B - - -`erf0 `_ - Undocumented - - -`f_integral `_ - function that calculates the following integral - \int_{\-infty}^{+\infty} x^n \exp(-p x^2) dx - - -`fact `_ - n! - - -`fact_inv `_ - 1/n! - - -`find_rotation `_ - Find A.C = B - - -`gammln `_ - Undocumented - - -`gammp `_ - Undocumented - - -`gaussian_product `_ - Gaussian product in 1D. - e^{-a (x-x_A)^2} e^{-b (x-x_B)^2} = K_{ab}^x e^{-p (x-x_P)^2} - - -`gaussian_product_x `_ - Gaussian product in 1D. - e^{-a (x-x_A)^2} e^{-b (x-x_B)^2} = K_{ab}^x e^{-p (x-x_P)^2} - - -`gcf `_ - Undocumented - - -`get_inverse `_ - Returns the inverse of the square matrix A - - -`get_pseudo_inverse `_ - Find C = A^-1 - - -`give_explicit_poly_and_gaussian `_ - Transforms the product of - (x-x_A)^a(1) (x-x_B)^b(1) (x-x_A)^a(2) (y-y_B)^b(2) (z-z_A)^a(3) (z-z_B)^b(3) exp(-(r-A)^2 alpha) exp(-(r-B)^2 beta) - into - fact_k * [ sum (l_x = 0,i_order(1)) P_new(l_x,1) * (x-P_center(1))^l_x ] exp (- p (x-P_center(1))^2 ) - * [ sum (l_y = 0,i_order(2)) P_new(l_y,2) * (y-P_center(2))^l_y ] exp (- p (y-P_center(2))^2 ) - * [ sum (l_z = 0,i_order(3)) P_new(l_z,3) * (z-P_center(3))^l_z ] exp (- p (z-P_center(3))^2 ) - - -`give_explicit_poly_and_gaussian_double `_ - Transforms the product of - (x-x_A)^a(1) (x-x_B)^b(1) (x-x_A)^a(2) (y-y_B)^b(2) (z-z_A)^a(3) (z-z_B)^b(3) - exp(-(r-A)^2 alpha) exp(-(r-B)^2 beta) exp(-(r-Nucl_center)^2 gama - .br - into - fact_k * [ sum (l_x = 0,i_order(1)) P_new(l_x,1) * (x-P_center(1))^l_x ] exp (- p (x-P_center(1))^2 ) - * [ sum (l_y = 0,i_order(2)) P_new(l_y,2) * (y-P_center(2))^l_y ] exp (- p (y-P_center(2))^2 ) - * [ sum (l_z = 0,i_order(3)) P_new(l_z,3) * (z-P_center(3))^l_z ] exp (- p (z-P_center(3))^2 ) - - -`give_explicit_poly_and_gaussian_x `_ - Transform the product of - (x-x_A)^a(1) (x-x_B)^b(1) (x-x_A)^a(2) (y-y_B)^b(2) (z-z_A)^a(3) (z-z_B)^b(3) exp(-(r-A)^2 alpha) exp(-(r-B)^2 beta) - into - fact_k (x-x_P)^iorder(1) (y-y_P)^iorder(2) (z-z_P)^iorder(3) exp(-p(r-P)^2) - - -`gser `_ - Undocumented - - -`heap_dsort `_ - Sort array x(isize) using the heap sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`heap_dsort_big `_ - Sort array x(isize) using the heap sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`heap_i2sort `_ - Sort array x(isize) using the heap sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`heap_i2sort_big `_ - Sort array x(isize) using the heap sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`heap_i8sort `_ - Sort array x(isize) using the heap sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`heap_i8sort_big `_ - Sort array x(isize) using the heap sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`heap_isort `_ - Sort array x(isize) using the heap sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`heap_isort_big `_ - Sort array x(isize) using the heap sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`heap_sort `_ - Sort array x(isize) using the heap sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`heap_sort_big `_ - Sort array x(isize) using the heap sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`hermite `_ - Hermite polynomial - - -`i2radix_sort `_ - Sort integer array x(isize) using the radix sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - iradix should be -1 in input. - - -`i2set_order `_ - array A has already been sorted, and iorder has contains the new order of - elements of A. This subroutine changes the order of x to match the new order of A. - - -`i2set_order_big `_ - array A has already been sorted, and iorder has contains the new order of - elements of A. This subroutine changes the order of x to match the new order of A. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`i2sort `_ - Sort array x(isize). - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`i8radix_sort `_ - Sort integer array x(isize) using the radix sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - iradix should be -1 in input. - - -`i8radix_sort_big `_ - Sort integer array x(isize) using the radix sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - iradix should be -1 in input. - - -`i8set_order `_ - array A has already been sorted, and iorder has contains the new order of - elements of A. This subroutine changes the order of x to match the new order of A. - - -`i8set_order_big `_ - array A has already been sorted, and iorder has contains the new order of - elements of A. This subroutine changes the order of x to match the new order of A. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`i8sort `_ - Sort array x(isize). - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`insertion_dsort `_ - Sort array x(isize) using the insertion sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`insertion_dsort_big `_ - Sort array x(isize) using the insertion sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`insertion_i2sort `_ - Sort array x(isize) using the insertion sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`insertion_i2sort_big `_ - Sort array x(isize) using the insertion sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`insertion_i8sort `_ - Sort array x(isize) using the insertion sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`insertion_i8sort_big `_ - Sort array x(isize) using the insertion sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`insertion_isort `_ - Sort array x(isize) using the insertion sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`insertion_isort_big `_ - Sort array x(isize) using the insertion sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`insertion_sort `_ - Sort array x(isize) using the insertion sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`insertion_sort_big `_ - Sort array x(isize) using the insertion sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`inv_int `_ - 1/i - - -`iradix_sort `_ - Sort integer array x(isize) using the radix sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - iradix should be -1 in input. - - -`iradix_sort_big `_ - Sort integer array x(isize) using the radix sort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - iradix should be -1 in input. - - -`iset_order `_ - array A has already been sorted, and iorder has contains the new order of - elements of A. This subroutine changes the order of x to match the new order of A. - - -`iset_order_big `_ - array A has already been sorted, and iorder has contains the new order of - elements of A. This subroutine changes the order of x to match the new order of A. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`isort `_ - Sort array x(isize). - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`lapack_diag `_ - Diagonalize matrix H - .br - H is untouched between input and ouptut - .br - eigevalues(i) = ith lowest eigenvalue of the H matrix - .br - eigvectors(i,j) = where i is the basis function and psi_j is the j th eigenvector - .br - - -`lapack_diag_s2 `_ - Diagonalize matrix H - .br - H is untouched between input and ouptut - .br - eigevalues(i) = ith lowest eigenvalue of the H matrix - .br - eigvectors(i,j) = where i is the basis function and psi_j is the j th eigenvector - .br - - -`lapack_diagd `_ - Diagonalize matrix H - .br - H is untouched between input and ouptut - .br - eigevalues(i) = ith lowest eigenvalue of the H matrix - .br - eigvectors(i,j) = where i is the basis function and psi_j is the j th eigenvector - .br - - -`lapack_partial_diag `_ - Diagonalize matrix H - .br - H is untouched between input and ouptut - .br - eigevalues(i) = ith lowest eigenvalue of the H matrix - .br - eigvectors(i,j) = where i is the basis function and psi_j is the j th eigenvector - .br - - -`logfact `_ - n! - - -`lowercase `_ - Transform to lower case - - -`map_load_from_disk `_ - Undocumented - - -`map_save_to_disk `_ - Undocumented - - -`matrix_vector_product `_ - performs u1 =! performs u1 +( u0 * matrix) - - -`multiply_poly `_ - Multiply two polynomials - D(t) =! D(t) +( B(t)*C(t)) - - -`n_points_integration_angular_lebedev `_ - Number of points needed for the angular integral - - -`normalize `_ - Normalizes vector u - u is expected to be aligned in memory. - - -`nproc `_ - Number of current OpenMP threads - - -`ortho_canonical `_ - Compute C_new=C_old.U.s^-1/2 canonical orthogonalization. - .br - overlap : overlap matrix - .br - LDA : leftmost dimension of overlap array - .br - N : Overlap matrix is NxN (array is (LDA,N) ) - .br - C : Coefficients of the vectors to orthogonalize. On exit, - orthogonal vectors - .br - LDC : leftmost dimension of C - .br - m : Coefficients matrix is MxN, ( array is (LDC,N) ) - .br - - -`ortho_lowdin `_ - Compute C_new=C_old.S^-1/2 orthogonalization. - .br - overlap : overlap matrix - .br - LDA : leftmost dimension of overlap array - .br - N : Overlap matrix is NxN (array is (LDA,N) ) - .br - C : Coefficients of the vectors to orthogonalize. On exit, - orthogonal vectors - .br - LDC : leftmost dimension of C - .br - M : Coefficients matrix is MxN, ( array is (LDC,N) ) - .br - - -`ortho_qr `_ - Orthogonalization using Q.R factorization - .br - A : matrix to orthogonalize - .br - LDA : leftmost dimension of A - .br - n : Number of rows of A - .br - m : Number of columns of A - .br - - -`ortho_qr_unblocked `_ - Orthogonalization using Q.R factorization - .br - A : matrix to orthogonalize - .br - LDA : leftmost dimension of A - .br - n : Number of rows of A - .br - m : Number of columns of A - .br - - -`overlap_a_b_c `_ - Undocumented - - -`overlap_gaussian_x `_ - .. math:: - .br - \sum_{-infty}^{+infty} (x-A_x)^ax (x-B_x)^bx exp(-alpha(x-A_x)^2) exp(-beta(x-B_X)^2) dx - .br - - -`overlap_gaussian_xyz `_ - .. math:: - .br - S_x = \int (x-A_x)^{a_x} exp(-\alpha(x-A_x)^2) (x-B_x)^{b_x} exp(-beta(x-B_x)^2) dx \\ - S = S_x S_y S_z - .br - - -`overlap_x_abs `_ - .. math :: - .br - \int_{-infty}^{+infty} (x-A_center)^(power_A) * (x-B_center)^power_B * exp(-alpha(x-A_center)^2) * exp(-beta(x-B_center)^2) dx - .br - - -`phi_angular_integration_lebedev `_ - Theta phi values together with the weights values for the angular integration : - integral [dphi,dtheta] f(x,y,z) = 4 * pi * sum (1`_ - Current status for displaying progress bars. Global variable. - - -`progress_bar `_ - Current status for displaying progress bars. Global variable. - - -`progress_timeout `_ - Current status for displaying progress bars. Global variable. - - -`progress_title `_ - Current status for displaying progress bars. Global variable. - - -`progress_value `_ - Current status for displaying progress bars. Global variable. - - -`quick_dsort `_ - Sort array x(isize) using the quicksort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`quick_i2sort `_ - Sort array x(isize) using the quicksort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`quick_i8sort `_ - Sort array x(isize) using the quicksort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`quick_isort `_ - Sort array x(isize) using the quicksort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`quick_sort `_ - Sort array x(isize) using the quicksort algorithm. - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`rec__quicksort `_ - Undocumented - - -`rec_d_quicksort `_ - Undocumented - - -`rec_i2_quicksort `_ - Undocumented - - -`rec_i8_quicksort `_ - Undocumented - - -`rec_i_quicksort `_ - Undocumented - - -`recentered_poly2 `_ - Recenter two polynomials - - -`rint `_ - .. math:: - .br - \int_0^1 dx \exp(-p x^2) x^n - .br - - -`rint1 `_ - Standard version of rint - - -`rint_large_n `_ - Version of rint for large values of n - - -`rint_sum `_ - Needed for the calculation of two-electron integrals. - - -`rinteg `_ - Undocumented - - -`rintgauss `_ - Undocumented - - -`run_progress `_ - Display a progress bar with documentation of what is happening - - -`sabpartial `_ - Undocumented - - -`set_order `_ - array A has already been sorted, and iorder has contains the new order of - elements of A. This subroutine changes the order of x to match the new order of A. - - -`set_order_big `_ - array A has already been sorted, and iorder has contains the new order of - elements of A. This subroutine changes the order of x to match the new order of A. - This is a version for very large arrays where the indices need - to be in integer*8 format - - -`set_zero_extra_diag `_ - Undocumented - - -`sort `_ - Sort array x(isize). - iorder in input should be (1,2,3,...,isize), and in output - contains the new order of the elements. - - -`sorted_dnumber `_ - Returns the number of sorted elements - - -`sorted_i2number `_ - Returns the number of sorted elements - - -`sorted_i8number `_ - Returns the number of sorted elements - - -`sorted_inumber `_ - Returns the number of sorted elements - - -`sorted_number `_ - Returns the number of sorted elements - - -`start_progress `_ - Starts the progress bar - - -`stop_progress `_ - Stop the progress bar - - -`svd `_ - Compute A = U.D.Vt - .br - LDx : leftmost dimension of x - .br - Dimsneion of A is m x n - .br - - -`theta_angular_integration_lebedev `_ - Theta phi values together with the weights values for the angular integration : - integral [dphi,dtheta] f(x,y,z) = 4 * pi * sum (1`_ - Transpose input matrix A into output matrix B - - -`u_dot_u `_ - Compute - - -`u_dot_v `_ - Compute - - -`wall_time `_ - The equivalent of cpu_time, but for the wall time. - - -`weights_angular_integration_lebedev `_ - Theta phi values together with the weights values for the angular integration : - integral [dphi,dtheta] f(x,y,z) = 4 * pi * sum (1`_ - Write the last git commit in file iunit. - diff --git a/src/ZMQ/NEEDED_CHILDREN_MODULES b/src/ZMQ/NEED similarity index 100% rename from src/ZMQ/NEEDED_CHILDREN_MODULES rename to src/ZMQ/NEED diff --git a/src/ZMQ/README.rst b/src/ZMQ/README.rst index 860346fb..7461ecf9 100644 --- a/src/ZMQ/README.rst +++ b/src/ZMQ/README.rst @@ -2,181 +2,6 @@ ZMQ === -Socket address : defined as an environment variable : QP_RUN_ADDRESS +Socket address : defined as an environment variable : `QP_RUN_ADDRESS` -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Utils `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`add_task_to_taskserver `_ - Get a task from the task server - - -`add_task_to_taskserver_recv `_ - Get a task from the task server - - -`add_task_to_taskserver_send `_ - Get a task from the task server - - -`connect_to_taskserver `_ - Connect to the task server and obtain the worker ID - - -`disconnect_from_taskserver `_ - Disconnect from the task server - - -`end_parallel_job `_ - End a new parallel job with name 'name'. The slave tasks execute subroutine 'slave' - - -`end_zmq_pair_socket `_ - Terminate socket on which the results are sent. - - -`end_zmq_pull_socket `_ - Terminate socket on which the results are sent. - - -`end_zmq_push_socket `_ - Terminate socket on which the results are sent. - - -`end_zmq_sub_socket `_ - Terminate socket on which the results are sent. - - -`end_zmq_to_qp_run_socket `_ - Terminate the socket from the application to qp_run - - -`get_task_from_taskserver `_ - Get a task from the task server - - -`new_parallel_job `_ - Start a new parallel job with name 'name'. The slave tasks execute subroutine 'slave' - - -`new_zmq_pair_socket `_ - Socket on which the collector and the main communicate - - -`new_zmq_pull_socket `_ - Socket on which the results are sent. If thread is 1, use inproc - - -`new_zmq_push_socket `_ - Socket on which the results are sent. If thread is 1, use inproc - - -`new_zmq_sub_socket `_ - Socket to read the state published by the Task server - - -`new_zmq_to_qp_run_socket `_ - Socket on which the qp_run process replies - - -`qp_run_address `_ - Address of the qp_run socket - Example : tcp://130.120.229.139:12345 - - -`reset_zmq_addresses `_ - Socket which pulls the results (2) - - -`switch_qp_run_to_master `_ - Address of the master qp_run socket - Example : tcp://130.120.229.139:12345 - - -`task_done_to_taskserver `_ - Get a task from the task server - - -`wait_for_next_state `_ - Undocumented - - -`wait_for_state `_ - Wait for the ZMQ state to be ready - - -`wait_for_states `_ - Wait for the ZMQ state to be ready - - -`zmq_abort `_ - Aborts a running parallel computation - - -`zmq_context `_ - Context for the ZeroMQ library - - -`zmq_delete_task `_ - When a task is done, it has to be removed from the list of tasks on the qp_run - queue. This guarantees that the results have been received in the pull. - - -`zmq_lock `_ - Context for the ZeroMQ library - - -`zmq_port `_ - Return the value of the ZMQ port from the corresponding integer - - -`zmq_port_start `_ - Address of the qp_run socket - Example : tcp://130.120.229.139:12345 - - -`zmq_set_running `_ - Set the job to Running in QP-run - - -`zmq_socket_pair_inproc_address `_ - Socket which pulls the results (2) - - -`zmq_socket_pull_inproc_address `_ - Socket which pulls the results (2) - - -`zmq_socket_pull_tcp_address `_ - Socket which pulls the results (2) - - -`zmq_socket_push_inproc_address `_ - Socket which pulls the results (2) - - -`zmq_socket_push_tcp_address `_ - Socket which pulls the results (2) - - -`zmq_socket_sub_tcp_address `_ - Socket which pulls the results (2) - - -`zmq_state `_ - Threads executing work through the ZeroMQ interface - diff --git a/src/dress_zmq/NEEDED_CHILDREN_MODULES b/src/dress_zmq/NEEDED_CHILDREN_MODULES deleted file mode 100644 index 96b2cfdc..00000000 --- a/src/dress_zmq/NEEDED_CHILDREN_MODULES +++ /dev/null @@ -1 +0,0 @@ -ZMQ diff --git a/src/dummy/NEED b/src/dummy/NEED new file mode 100644 index 00000000..aeff397e --- /dev/null +++ b/src/dummy/NEED @@ -0,0 +1 @@ +AO_Basis AO_one_e_integrals Bitmask CIS CISD Davidson DavidsonDressed DavidsonUndressed Determinants Dressing Electrons Ezfio_files FCI FourIdx Generators_CAS Generators_full Hartree_Fock Integrals_Bielec MO_Basis MOGuess MO_one_e_integrals MPI Nuclei Perturbation Pseudo Psiref_CAS Psiref_Utils Selectors_CASSD Selectors_full Selectors_no_sorted Selectors_Utils SingleRefMethod Utils ZMQ diff --git a/src/dummy/README.rst b/src/dummy/README.rst new file mode 100644 index 00000000..6bdb2ca7 --- /dev/null +++ b/src/dummy/README.rst @@ -0,0 +1,6 @@ +===== +dummy +===== + +Module necessary to avoid the ``xxx is a root module but does not contain a main file`` message. + diff --git a/src/dummy/dummy.main.irp.f b/src/dummy/dummy.main.irp.f new file mode 100644 index 00000000..0b789ea1 --- /dev/null +++ b/src/dummy/dummy.main.irp.f @@ -0,0 +1,7 @@ +program dummy + implicit none + BEGIN_DOC +! Dummy test file + END_DOC + print *, 'OK' +end diff --git a/tests/bats/cassd.bats b/tests/bats/cassd.bats deleted file mode 100644 index e2cc26c0..00000000 --- a/tests/bats/cassd.bats +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bats - -source $QP_ROOT/tests/bats/common.bats.sh - -@test "CAS_SD H2O cc-pVDZ" { - test_exe cassd_zmq || skip - INPUT=h2o.ezfio - rm -rf work/h2o.ezfio/determinants/ - qp_edit -c $INPUT - ezfio set_file $INPUT - ezfio set perturbation do_pt2 True - ezfio set determinants n_det_max 16384 - qp_set_mo_class $INPUT -core "[1]" -inact "[2,5]" -act "[3,4,6,7]" -virt "[8-24]" - qp_run cassd_zmq $INPUT - energy="$(ezfio get cas_sd_zmq energy_pt2)" - eq $energy -76.231248286858 5.E-5 - - ezfio set determinants n_det_max 1024 - ezfio set determinants read_wf True - ezfio set perturbation do_pt2 True - qp_run cassd_zmq $INPUT - ezfio set determinants read_wf False - energy="$(ezfio get cas_sd_zmq energy)" - eq $energy -76.2225678834779 2.E-5 -} - diff --git a/tests/bats/fci.bats b/tests/bats/fci.bats index c67d9b0d..dd103490 100644 --- a/tests/bats/fci.bats +++ b/tests/bats/fci.bats @@ -4,23 +4,7 @@ source $QP_ROOT/tests/bats/common.bats.sh function run_FCI() { thresh=5.e-5 - test_exe full_ci || skip - qp_edit -c $1 - ezfio set_file $1 - ezfio set perturbation do_pt2 True - ezfio set determinants n_det_max $2 - ezfio set davidson threshold_davidson 1.e-10 - - qp_run full_ci $1 - energy="$(ezfio get full_ci energy)" - eq $energy $3 $thresh - energy_pt2="$(ezfio get full_ci energy_pt2)" - eq $energy_pt2 $4 $thresh -} - -function run_FCI_ZMQ() { - thresh=5.e-5 - test_exe fci_zmq || skip + test_exe FCI || skip qp_edit -c $1 ezfio set_file $1 ezfio set perturbation do_pt2 True @@ -28,10 +12,10 @@ function run_FCI_ZMQ() { ezfio set determinants n_det_max $2 ezfio set davidson threshold_davidson 1.e-10 - qp_run fci_zmq $1 - energy="$(ezfio get full_ci_zmq energy)" + qp_run FCI $1 + energy="$(ezfio get FCI energy | tr '[]' ' ')" eq $energy $3 $thresh - energy_pt2="$(ezfio get full_ci_zmq energy_pt2)" + energy_pt2="$(ezfio get FCI energy_pt2 | tr '[]' ' ')" eq $energy_pt2 $4 $thresh } @@ -42,15 +26,9 @@ function run_FCI_ZMQ() { @test "qp_set_mo_class H2O cc-pVDZ" { qp_set_mo_class h2o.ezfio -core "[1]" -act "[2-12]" -del "[13-24]" } + @test "FCI H2O cc-pVDZ" { - run_FCI h2o.ezfio 2000 -76.1253757275131 -76.1258128174355 -} - - - - -@test "FCI-ZMQ H2O cc-pVDZ" { - run_FCI_ZMQ h2o.ezfio 2000 -76.1255113765945 -76.12588757 + run_FCI h2o.ezfio 2000 -76.1255113765945 -76.12588757 } diff --git a/tests/bats/mrcc.bats b/tests/bats/mrcc.bats deleted file mode 100644 index 3742551a..00000000 --- a/tests/bats/mrcc.bats +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bats - -source $QP_ROOT/tests/bats/common.bats.sh - -#=== H2O -@test "MRCC-lambda H2O cc-pVDZ" { - INPUT=h2o.ezfio - EXE=mrcc - test_exe $EXE || skip - qp_edit -c $INPUT - ezfio set_file $INPUT - ezfio set determinants threshold_generators 1. - ezfio set determinants threshold_selectors 1. - ezfio set determinants read_wf True - ezfio set mrcc lambda_type 1 - ezfio set mrcc perturbative_triples 0 - ezfio set mrcc n_it_max_dressed_ci 3 - cp -r $INPUT TMP ; qp_run $EXE TMP - ezfio set_file TMP - energy="$(ezfio get mrcc energy)" - energy_pt2="$(ezfio get mrcc energy_pt2)" - rm -rf TMP - eq $energy -76.2294920123364 1.e-4 - eq $energy_pt2 -76.2382119593925 1.e-4 -} - - -@test "MRCC H2O cc-pVDZ" { - INPUT=h2o.ezfio - EXE=mrcc - test_exe $EXE || skip - qp_edit -c $INPUT - ezfio set_file $INPUT - ezfio set determinants threshold_generators 1. - ezfio set determinants threshold_selectors 1. - ezfio set determinants read_wf True - ezfio set mrcc lambda_type 0 - ezfio set mrcc perturbative_triples 0 - ezfio set mrcc n_it_max_dressed_ci 3 - cp -r $INPUT TMP ; qp_run $EXE TMP - ezfio set_file TMP - energy="$(ezfio get mrcc energy)" - energy_pt2="$(ezfio get mrcc energy_pt2)" - rm -rf TMP - eq $energy -76.2294460531211 1.e-4 - eq $energy_pt2 -76.2381753982904 1.e-4 -} - diff --git a/tests/run_tests.sh b/tests/run_tests.sh index d1f125e2..5aafe84b 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -4,8 +4,6 @@ LIST=" convert.bats hf.bats fci.bats -cassd.bats -mrcc.bats pseudo.bats " #foboci.bats