diff --git a/plugins/Full_CI/README.rst b/plugins/Full_CI/README.rst index 396fbcd6..d94675eb 100644 --- a/plugins/Full_CI/README.rst +++ b/plugins/Full_CI/README.rst @@ -14,7 +14,7 @@ Documentation Undocumented -`h_apply_fci `_ +`h_apply_fci `_ 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. @@ -25,126 +25,126 @@ Documentation Assume N_int is already provided. -`h_apply_fci_mono `_ +`h_apply_fci_mono `_ 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_fci_mono_diexc `_ +`h_apply_fci_mono_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_fci_mono_monoexc `_ +`h_apply_fci_mono_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_fci_monoexc `_ +`h_apply_fci_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_fci_no_skip `_ +`h_apply_fci_no_skip `_ 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_fci_no_skip_diexc `_ +`h_apply_fci_no_skip_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_fci_no_skip_monoexc `_ +`h_apply_fci_no_skip_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_fci_pt2 `_ +`h_apply_fci_pt2 `_ 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_fci_pt2_diexc `_ +`h_apply_fci_pt2_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_fci_pt2_monoexc `_ +`h_apply_fci_pt2_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_pt2_mono_delta_rho `_ +`h_apply_pt2_mono_delta_rho `_ 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_pt2_mono_delta_rho_diexc `_ +`h_apply_pt2_mono_delta_rho_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_pt2_mono_delta_rho_monoexc `_ +`h_apply_pt2_mono_delta_rho_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_pt2_mono_di_delta_rho `_ +`h_apply_pt2_mono_di_delta_rho `_ 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_pt2_mono_di_delta_rho_diexc `_ +`h_apply_pt2_mono_di_delta_rho_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_pt2_mono_di_delta_rho_monoexc `_ +`h_apply_pt2_mono_di_delta_rho_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_select_mono_delta_rho `_ +`h_apply_select_mono_delta_rho `_ 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_select_mono_delta_rho_diexc `_ +`h_apply_select_mono_delta_rho_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_select_mono_delta_rho_monoexc `_ +`h_apply_select_mono_delta_rho_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_select_mono_di_delta_rho `_ +`h_apply_select_mono_di_delta_rho `_ 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_select_mono_di_delta_rho_diexc `_ +`h_apply_select_mono_di_delta_rho_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_select_mono_di_delta_rho_monoexc `_ +`h_apply_select_mono_di_delta_rho_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/scripts/ezfio_interface/ei_handler.py b/scripts/ezfio_interface/ei_handler.py index 18fb055d..1be604da 100755 --- a/scripts/ezfio_interface/ei_handler.py +++ b/scripts/ezfio_interface/ei_handler.py @@ -239,13 +239,13 @@ def get_dict_config_file(module_obj): # Check if type is avalaible try: - type_ = config_file.get(section, "type") + type_ = config_file.get(section, "type").strip() except ConfigParser.NoOptionError: error("type", pvd, module_obj.path) sys.exit(1) if type_ not in type_dict: - print "{0} not avalaible. Choose in:".format(type_) + print "{0} not avalaible. Choose in:".format(type_).strip() print ", ".join(sorted([i for i in type_dict])) sys.exit(1) else: @@ -279,13 +279,16 @@ def get_dict_config_file(module_obj): d[pvd][option] = d_default[option] # If interface is input we need a default value information - if "ocaml" in d[pvd]["interface"]: - try: - default_raw = config_file.get(section, "default") - except ConfigParser.NoOptionError: + + try: + default_raw = config_file.get(section, "default") + except ConfigParser.NoOptionError: + if "ocaml" in d[pvd]["interface"]: error("default", pvd, module_obj.path) sys.exit(1) - + else: + pass + else: try: d[pvd]["default"] = is_bool(default_raw) except TypeError: @@ -435,13 +438,18 @@ def create_ezfio_stuff(dict_ezfio_cfg, config_or_default="config"): # It is the last so we don't need to right align it str_size = size_format_to_ezfio(size_raw) if size_raw else "" + if "default" in provider_info and provider_info["default"].fortran.startswith("="): + str_default = provider_info["default"].fortran.replace('.', '_') + else: + str_default = "" + # Get the string in to good format (left align and co) str_name = str_name_format(name_raw) str_fortran_type = str_type_format(fortran_type_raw) # Return the string if config_or_default == "config": - s = " {0} {1} {2}".format(str_name, str_fortran_type, str_size) + s = " {0} {1} {2} {3}".format(str_name, str_fortran_type, str_size, str_default) elif config_or_default == "default": try: str_value = provider_info["default"].ocaml diff --git a/scripts/generate_h_apply.py b/scripts/generate_h_apply.py index 9f878d7d..ce944864 100755 --- a/scripts/generate_h_apply.py +++ b/scripts/generate_h_apply.py @@ -43,7 +43,8 @@ class H_apply(object): self.perturbation = None #s["omp_parallel"] = """!$OMP PARALLEL DEFAULT(NONE) & - s["omp_parallel"] = """!$OMP PARALLEL DEFAULT(SHARED) & + s["omp_parallel"] = """ PROVIDE elec_num_tab + !$OMP PARALLEL DEFAULT(SHARED) & !$OMP PRIVATE(i,j,k,l,keys_out,hole,particle, & !$OMP occ_particle,occ_hole,j_a,k_a,other_spin, & !$OMP hole_save,ispin,jj,l_a,ib_jb_pairs,array_pairs, & diff --git a/src/.gitignore b/src/.gitignore index 9bba1426..1e9f0bc4 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -23,3 +23,4 @@ QmcChem Selectors_full Selectors_no_sorted SingleRefMethod +Casino \ No newline at end of file diff --git a/src/AO_Basis/EZFIO.cfg b/src/AO_Basis/EZFIO.cfg index afcd941e..6ace9e9a 100644 --- a/src/AO_Basis/EZFIO.cfg +++ b/src/AO_Basis/EZFIO.cfg @@ -6,7 +6,7 @@ interface: ezfio [ao_num] type: integer doc: number of ao -interface: ezfio +interface: ezfio, provider [ao_prim_num] type: integer @@ -17,7 +17,7 @@ interface: ezfio [ao_prim_num_max] type: integer doc: number of power -size: =maxval(ao_basis.ao_prim_num) +default: =maxval(ao_basis.ao_prim_num) interface: ezfio [ao_nucl] diff --git a/src/AO_Basis/README.rst b/src/AO_Basis/README.rst index da1ba1dc..ec73b14f 100644 --- a/src/AO_Basis/README.rst +++ b/src/AO_Basis/README.rst @@ -46,61 +46,61 @@ Documentation .. Do not edit this section. It was auto-generated from the .. by the `update_README.py` script. -`ao_coef `_ +`ao_coef `_ AO Coefficients, read from input. Those should not be used directly, as the MOs are expressed on the basis of **normalized** AOs. -`ao_coef_normalized `_ +`ao_coef_normalized `_ Coefficients including the AO normalization -`ao_coef_normalized_ordered `_ +`ao_coef_normalized_ordered `_ Sorted primitives to accelerate 4 index MO transformation -`ao_coef_normalized_ordered_transp `_ +`ao_coef_normalized_ordered_transp `_ Transposed ao_coef_normalized_ordered -`ao_expo `_ +`ao_expo `_ AO Exponents read from input -`ao_expo_ordered `_ +`ao_expo_ordered `_ Sorted primitives to accelerate 4 index MO transformation -`ao_expo_ordered_transp `_ +`ao_expo_ordered_transp `_ Transposed ao_expo_ordered -`ao_l `_ +`ao_l `_ ao_l = l value of the AO: a+b+c in x^a y^b z^c -`ao_l_char `_ +`ao_l_char `_ ao_l = l value of the AO: a+b+c in x^a y^b z^c -`ao_l_char_space `_ +`ao_l_char_space `_ Undocumented -`ao_md5 `_ +`ao_md5 `_ MD5 key characteristic of the AO basis -`ao_nucl `_ +`ao_nucl `_ Index of the nuclei on which the ao is centered -`ao_num `_ - Number of atomic orbitals +`ao_num `_ + number of ao -`ao_num_align `_ - Number of atomic orbitals +`ao_num_align `_ + Number of atomic orbitals align `ao_overlap `_ @@ -128,27 +128,27 @@ Documentation :math:`\int \chi_i(r) \chi_j(r) dr)` -`ao_power `_ +`ao_power `_ Powers of x,y and z read from input -`ao_prim_num `_ +`ao_prim_num `_ Number of primitives per atomic orbital -`ao_prim_num_max `_ +`ao_prim_num_max `_ Undocumented -`ao_prim_num_max_align `_ +`ao_prim_num_max_align `_ Undocumented -`l_to_charater `_ +`l_to_charater `_ character corresponding to the "L" value of an AO orbital -`n_aos_max `_ +`n_aos_max `_ Number of AOs per atom @@ -160,21 +160,21 @@ Documentation Undocumented -`nucl_aos `_ +`nucl_aos `_ List of AOs attached on each atom -`nucl_list_shell_aos `_ +`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 `_ +`nucl_n_aos `_ Number of AOs per atom -`nucl_num_shell_aos `_ +`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_Basis/aos.irp.f b/src/AO_Basis/aos.irp.f index b9c82327..b990e7c2 100644 --- a/src/AO_Basis/aos.irp.f +++ b/src/AO_Basis/aos.irp.f @@ -1,17 +1,10 @@ - BEGIN_PROVIDER [ integer, ao_num ] -&BEGIN_PROVIDER [ integer, ao_num_align ] +BEGIN_PROVIDER [ integer, ao_num_align ] implicit none BEGIN_DOC - ! Number of atomic orbitals + ! Number of atomic orbitals align END_DOC - ao_num = -1 - PROVIDE ezfio_filename - call ezfio_get_ao_basis_ao_num(ao_num) - if (ao_num <= 0) then - stop 'Number of contracted gaussians should be > 0' - endif integer :: align_double ao_num_align = align_double(ao_num) END_PROVIDER diff --git a/src/Electrons/EZFIO.cfg b/src/Electrons/EZFIO.cfg index 33801fce..aecf2dc0 100644 --- a/src/Electrons/EZFIO.cfg +++ b/src/Electrons/EZFIO.cfg @@ -1,15 +1,15 @@ [elec_alpha_num] -type: integer -doc: elec_alpha_num -interface: ezfio +type: Positive_int +doc: Numbers of electrons alpha ("up") +interface: ezfio, provider [elec_beta_num] -type: integer -doc: elec_beta_num -interface: ezfio +type: Positive_int +doc: Numbers of electrons beta ("down") +interface: ezfio, provider [elec_num] -type: integer -doc: name of the ao basis -size: =(electrons.elec_alpha_num + electrons.elec_beta_num) -interface: ezfio \ No newline at end of file +type: Positive_int +doc: Numbers total of electrons (alpha + beta) +default: =(electrons.elec_alpha_num + electrons.elec_beta_num) +interface: ezfio, provider \ No newline at end of file diff --git a/src/Electrons/README.rst b/src/Electrons/README.rst index ecbcf9c4..9c313547 100644 --- a/src/Electrons/README.rst +++ b/src/Electrons/README.rst @@ -34,18 +34,18 @@ Documentation .. Do not edit this section. It was auto-generated from the .. by the `update_README.py` script. -`elec_alpha_num `_ - Numbers of alpha ("up") , beta ("down") and total electrons - - -`elec_beta_num `_ - Numbers of alpha ("up") , beta ("down") and total electrons - - -`elec_num `_ - Numbers of alpha ("up") , beta ("down") and total electrons - - -`elec_num_tab `_ +`elec_alpha_num `_ + Numbers of electrons alpha ("up") + + +`elec_beta_num `_ + Numbers of electrons beta ("down") + + +`elec_num `_ + Numbers total of electrons (alpha + beta) + + +`elec_num_tab `_ Numbers of alpha ("up") , beta ("down") and total electrons diff --git a/src/Electrons/electrons.irp.f b/src/Electrons/electrons.irp.f index c442489d..939243cd 100644 --- a/src/Electrons/electrons.irp.f +++ b/src/Electrons/electrons.irp.f @@ -1,29 +1,13 @@ - BEGIN_PROVIDER [ integer, elec_alpha_num ] -&BEGIN_PROVIDER [ integer, elec_beta_num ] -&BEGIN_PROVIDER [ integer, elec_num ] -&BEGIN_PROVIDER [ integer, elec_num_tab, (2) ] +BEGIN_PROVIDER [ integer, elec_num_tab, (2)] implicit none BEGIN_DOC ! Numbers of alpha ("up") , beta ("down") and total electrons END_DOC PROVIDE ezfio_filename - call ezfio_get_electrons_elec_alpha_num(elec_alpha_num) - call ezfio_get_electrons_elec_beta_num(elec_beta_num) - call ezfio_get_electrons_elec_num(elec_num) + elec_num_tab(1) = elec_alpha_num elec_num_tab(2) = elec_beta_num - ASSERT (elec_alpha_num > 0) - ASSERT (elec_beta_num >= 0) - call write_time(output_Electrons) - call write_int(output_Electrons,elec_num, & - 'Number of electrons' ) - call write_int(output_Electrons,elec_alpha_num, & - 'Number of alpha electrons' ) - call write_int(output_Electrons,elec_beta_num, & - 'Number of beta electrons' ) - write(output_Electrons,*) + END_PROVIDER - -