From 2929828ae3ed78a989d7783ece7ac8ac5f3086f8 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Mon, 26 Nov 2018 13:45:32 +0100 Subject: [PATCH] Working on doc --- data/.gitignore | 1 + data/module_gitignore | 44 + docs/.gitignore | 2 + docs/source/auto_generate.py | 91 +- docs/source/modules/ao_basis.rst | 481 +- docs/source/modules/ao_one_e_integrals.rst | 889 +++- docs/source/modules/bitmask.rst | 1177 +++++ docs/source/modules/cis.rst | 90 +- docs/source/modules/cisd.rst | 76 +- docs/source/modules/davidson.rst | 518 +- docs/source/modules/davidsonundressed.rst | 32 + docs/source/modules/determinants.rst | 4483 ++++++++++++++++- docs/source/modules/dressing.rst | 12 +- docs/source/modules/electrons.rst | 40 +- docs/source/modules/ezfio_files.rst | 134 + docs/source/modules/fci.rst | 958 +++- docs/source/modules/fouridx.rst | 18 + docs/source/modules/generators_full.rst | 129 + docs/source/modules/hartree_fock.rst | 650 +-- docs/source/modules/integrals_bielec.rst | 1213 ++++- docs/source/modules/iterations.rst | 86 +- docs/source/modules/mo_basis.rst | 296 +- docs/source/modules/mo_one_e_integrals.rst | 256 +- docs/source/modules/moguess.rst | 74 + docs/source/modules/mpi.rst | 104 + docs/source/modules/mrpt_utils.rst | 1872 ++++++- docs/source/modules/nuclei.rst | 315 +- docs/source/modules/perturbation.rst | 715 ++- docs/source/modules/pseudo.rst | 36 +- docs/source/modules/psiref_cas.rst | 163 + docs/source/modules/psiref_utils.rst | 366 ++ docs/source/modules/selectors_full.rst | 45 + docs/source/modules/selectors_utils.rst | 349 ++ docs/source/modules/slave.rst | 60 + docs/source/modules/tools.rst | 116 + docs/source/modules/utils.rst | 2021 ++++++++ docs/source/modules/zmq.rst | 871 ++++ docs/source/programmers_guide/index.rst | 18 +- .../programmers_guide/index_providers.rst | 1307 +++++ include/.gitignore | 1 + src/AO_Basis/aos.irp.f | 73 +- src/AO_Basis/aos_value.irp.f | 5 +- src/AO_Basis/dimensions_integrals.irp.f | 3 + src/AO_one_e_integrals/NEED | 3 +- src/AO_one_e_integrals/ao_mono_ints.irp.f | 3 +- .../ao_ortho_canonical.irp.f | 7 +- src/AO_one_e_integrals/ao_overlap.irp.f | 14 +- src/AO_one_e_integrals/kin_ao_ints.irp.f | 21 +- src/AO_one_e_integrals/pot_ao_ints.irp.f | 1028 ++-- .../pot_ao_pseudo_ints.irp.f | 4 +- src/AO_one_e_integrals/read_write.irp.f | 2 +- src/AO_one_e_integrals/spread_dipole_ao.irp.f | 83 +- src/CIS/NEED | 4 +- src/CISD/NEED | 4 +- src/Determinants/NEED | 4 +- src/FCI/NEED | 8 +- src/Generators_full/NEED | 3 +- src/Hartree_Fock/NEED | 5 +- src/Integrals_Bielec/NEED | 8 +- src/MOGuess/NEED | 3 +- src/MO_Basis/NEED | 4 +- src/MO_one_e_integrals/NEED | 4 +- src/MRPT_Utils/NEED | 4 +- src/Nuclei/NEED | 3 +- src/Perturbation/NEED | 5 +- src/Psiref_Utils/NEED | 3 +- src/Selectors_full/NEED | 4 +- src/Slave/NEED | 3 +- src/dummy/NEED | 35 +- 69 files changed, 20153 insertions(+), 1306 deletions(-) create mode 100644 data/module_gitignore create mode 100644 docs/.gitignore create mode 100644 docs/source/programmers_guide/index_providers.rst diff --git a/data/.gitignore b/data/.gitignore index cd42f456..3401c0fe 100644 --- a/data/.gitignore +++ b/data/.gitignore @@ -1,2 +1,3 @@ executables ezfio_defaults +list_element.txt diff --git a/data/module_gitignore b/data/module_gitignore new file mode 100644 index 00000000..1c1ac198 --- /dev/null +++ b/data/module_gitignore @@ -0,0 +1,44 @@ +IRPF90_temp/ +IRPF90_man/ +irpf90.make +irpf90_entities +tags +AO_Basis +AO_one_e_integrals +Bitmask +CIS +CISD +Davidson +DavidsonDressed +DavidsonUndressed +Determinants +Dressing +dummy +Electrons +Ezfio_files +FCI +FourIdx +Generators_CAS +Generators_full +gitignore +Hartree_Fock +Integrals_Bielec +Iterations +MO_Basis +MOGuess +MO_one_e_integrals +MPI +MRPT_Utils +Nuclei +Perturbation +Pseudo +Psiref_CAS +Psiref_Utils +Selectors_CASSD +Selectors_full +Selectors_Utils +SingleRefMethod +Slave +Tools +Utils +ZMQ diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 00000000..8e38ac0f --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,2 @@ + +build diff --git a/docs/source/auto_generate.py b/docs/source/auto_generate.py index 25e30b80..8984d7e8 100755 --- a/docs/source/auto_generate.py +++ b/docs/source/auto_generate.py @@ -1,4 +1,4 @@ -#!/bin/env python2 +#!/usr/bin/env python2 from __future__ import print_function import os @@ -28,19 +28,19 @@ def generate_modules(abs_module, entities): config_file.readfp(f) for section in config_file.sections(): doc = config_file.get(section,"doc") - doc = " " + doc.replace("\n","\n\n ")+"\n" + doc = " " + doc.replace("\n","\n\n ")+"\n" try: default = config_file.get(section,"default") - default = " " + "Default: %s\n"%default + default = " " + "Default: %s\n"%default except: default = "" rst += [ ".. option:: %s\n"%(section), doc, default ] providers = [] subroutines = [] - for k in entities: + for k in sorted(entities.keys()): e = entities[k] - if e["module"] == module: + if e["module"].lower() == module.lower(): if "/" not in e["file"] and e["file"] != "ezfio_interface.irp.f": if e["type"] == 's': subroutines.append(e) @@ -51,13 +51,13 @@ def generate_modules(abs_module, entities): rst += [ "", "Providers", "---------", "" ] for p in providers: rst += [ """ -.. option:: %s +.. c:var:: %s .. code:: text %s - File: %s + File: :file:`%s` %s @@ -65,7 +65,31 @@ def generate_modules(abs_module, entities): """ % ( p["name"], "\n ".join(p["decl"]), p["file"], - " ".join(p["doc"]).replace(".br","\n"), + " ".join(p["doc"]).replace("\n ","\n "), + ) ] + + + + if subroutines: + rst += [ "", "Subroutines / functions", "-----------------------", "" ] + for p in subroutines: + rst += [ """ + +.. c:function:: %s + + .. code:: text + + %s + + File: :file:`%s` + + %s + + +""" % ( p["name"], + "\n ".join(p["decl"]), + p["file"], + " ".join(p["doc"]).replace("\n ","\n "), ) ] @@ -114,11 +138,14 @@ def generate_providers(abs_module): state = 3 continue if line.startswith(".SH Need"): - break + state = 0 + continue if line.startswith(".SH Instability"): - break + state = 0 + continue if line.startswith(".SH Call"): - break + state = 0 + continue if state == 1: entity["decl"] += [ line ] @@ -129,17 +156,49 @@ def generate_providers(abs_module): else: entity["type"] = 'p' elif state == 2: + if line.startswith(".br"): + line = "\n" entity["doc"] += [ line ] elif state == 3: if line.startswith(".br"): continue - entity["file"] = line + entity["file"] = line.split("/")[-1] + try: + entity["module"] = line.split("/")[-2] + except: pass + break entities [ entity["name"] ] = entity return entities +def generate_index(entities): + + rst_file = os.path.join('programmers_guide','index_providers.rst') + + with open(rst_file,'w') as f: + rst = [ "Index of Providers", + "------------------", + "" ] + + for e in sorted(entities.keys()): + e = entities[e] + if e["type"] == 'p': + rst.append("* :c:data:`%s`" % (e["name"])) + + rst += [ "", + "Index of Subroutines/Functions", + "------------------------------", + "" ] + + for e in sorted(entities.keys()): + e = entities[e] + if e["type"] == 's': + rst.append("* :c:func:`%s`" % (e["name"])) + + f.write("\n".join(rst)) + def main(): @@ -159,7 +218,13 @@ def main(): if read_entities: for k in read_entities: entities[k] = read_entities[k] - generate_modules(abs_module,entities) + + for abs_module in os.listdir(SRC): + abs_module = os.path.join(SRC,abs_module) + if os.path.exists( os.path.join(abs_module, "README.rst") ): + generate_modules(abs_module,entities) + + generate_index(entities) if __name__ == '__main__': main() diff --git a/docs/source/modules/ao_basis.rst b/docs/source/modules/ao_basis.rst index 3cd910fa..1f697881 100644 --- a/docs/source/modules/ao_basis.rst +++ b/docs/source/modules/ao_basis.rst @@ -40,52 +40,509 @@ EZFIO parameters .. option:: ao_basis - Name of the |AO| basis set + Name of the |AO| basis set .. option:: ao_num - Number of |AOs| + Number of |AOs| .. option:: ao_prim_num - Number of primitives per |AO| + Number of primitives per |AO| .. option:: ao_prim_num_max - Maximum number of primitives + Maximum number of primitives - Default: =maxval(ao_basis.ao_prim_num) + Default: =maxval(ao_basis.ao_prim_num) .. option:: ao_nucl - Index of the nucleus on which the |AO| is centered + Index of the nucleus on which the |AO| is centered .. option:: ao_power - Powers of x, y and z for each |AO| + Powers of x, y and z for each |AO| .. option:: ao_coef - Primitive coefficients, read from input. Those should not be used directly, as the MOs are expressed on the basis of **normalized** AOs. + Primitive coefficients, read from input. Those should not be used directly, as the MOs are expressed on the basis of **normalized** AOs. .. option:: ao_expo - Exponents for each primitive of each |AO| + Exponents for each primitive of each |AO| .. option:: ao_md5 - MD5 key, specific of the |AO| basis + MD5 key, specific of the |AO| basis .. option:: ao_cartesian - If |true|, use |AOs| in Cartesian coordinates (6d,10f,...) + If |true|, use |AOs| in Cartesian coordinates (6d,10f,...) + + Default: false + + +Providers +--------- + + +.. c:var:: ao_coef_normalization_factor + + .. code:: text + + double precision, allocatable :: ao_coef_normalized (ao_num,ao_prim_num_max) + double precision, allocatable :: ao_coef_normalization_factor (ao_num) + + File: :file:`aos.irp.f` + + Coefficients including the AO normalization + + + + +.. c:var:: ao_coef_normalization_libint_factor + + .. code:: text + + double precision, allocatable :: ao_coef_normalization_libint_factor (ao_num) + + File: :file:`aos.irp.f` + + Coefficients including the AO normalization + + + + +.. c:var:: ao_coef_normalized + + .. code:: text + + double precision, allocatable :: ao_coef_normalized (ao_num,ao_prim_num_max) + double precision, allocatable :: ao_coef_normalization_factor (ao_num) + + File: :file:`aos.irp.f` + + Coefficients including the AO normalization + + + + +.. c:var:: ao_coef_normalized_ordered + + .. code:: text + + double precision, allocatable :: ao_coef_normalized_ordered (ao_num,ao_prim_num_max) + double precision, allocatable :: ao_expo_ordered (ao_num,ao_prim_num_max) + + File: :file:`aos.irp.f` + + Sorted primitives to accelerate 4 index MO transformation + + + + +.. c:var:: ao_coef_normalized_ordered_transp + + .. code:: text + + double precision, allocatable :: ao_coef_normalized_ordered_transp (ao_prim_num_max,ao_num) + + File: :file:`aos.irp.f` + + Transposed ao_coef_normalized_ordered + + + + +.. c:var:: ao_expo_ordered + + .. code:: text + + double precision, allocatable :: ao_coef_normalized_ordered (ao_num,ao_prim_num_max) + double precision, allocatable :: ao_expo_ordered (ao_num,ao_prim_num_max) + + File: :file:`aos.irp.f` + + Sorted primitives to accelerate 4 index MO transformation + + + + +.. c:var:: ao_expo_ordered_transp + + .. code:: text + + double precision, allocatable :: ao_expo_ordered_transp (ao_prim_num_max,ao_num) + + File: :file:`aos.irp.f` + + Transposed ao_expo_ordered + + + + +.. c:var:: ao_l + + .. code:: text + + integer, allocatable :: ao_l (ao_num) + integer :: ao_l_max + character*(128), allocatable :: ao_l_char (ao_num) + + File: :file:`aos.irp.f` + + ao_l = l value of the AO: a+b+c in x^a y^b z^c + + + + +.. c:var:: ao_l_char + + .. code:: text + + integer, allocatable :: ao_l (ao_num) + integer :: ao_l_max + character*(128), allocatable :: ao_l_char (ao_num) + + File: :file:`aos.irp.f` + + ao_l = l value of the AO: a+b+c in x^a y^b z^c + + + + +.. c:var:: ao_l_char_space + + .. code:: text + + character*(4), allocatable :: ao_l_char_space (ao_num) + + File: :file:`aos.irp.f` + + + + + + +.. c:var:: ao_l_max + + .. code:: text + + integer, allocatable :: ao_l (ao_num) + integer :: ao_l_max + character*(128), allocatable :: ao_l_char (ao_num) + + File: :file:`aos.irp.f` + + ao_l = l value of the AO: a+b+c in x^a y^b z^c + + + + +.. c:var:: ao_prim_num_max + + .. code:: text + + integer :: ao_prim_num_max + + File: :file:`aos.irp.f` + + max number of primitives + + + + +.. c:var:: cart_to_sphe_0 + + .. code:: text + + double precision, allocatable :: cart_to_sphe_0 (1,1) + + File: :file:`spherical_to_cartesian.irp.f` + + Spherical -> Cartesian Transformation matrix for l=0 + + + + +.. c:var:: cart_to_sphe_1 + + .. code:: text + + double precision, allocatable :: cart_to_sphe_1 (3,3) + + File: :file:`spherical_to_cartesian.irp.f` + + Spherical -> Cartesian Transformation matrix for l=1 + + + + +.. c:var:: cart_to_sphe_2 + + .. code:: text + + double precision, allocatable :: cart_to_sphe_2 (6,5) + + File: :file:`spherical_to_cartesian.irp.f` + + Spherical -> Cartesian Transformation matrix for l=2 + + + + +.. c:var:: cart_to_sphe_3 + + .. code:: text + + double precision, allocatable :: cart_to_sphe_3 (10,7) + + File: :file:`spherical_to_cartesian.irp.f` + + Spherical -> Cartesian Transformation matrix for l=3 + + + + +.. c:var:: cart_to_sphe_4 + + .. code:: text + + double precision, allocatable :: cart_to_sphe_4 (15,9) + + File: :file:`spherical_to_cartesian.irp.f` + + Spherical -> Cartesian Transformation matrix for l=4 + + + + +.. c:var:: cart_to_sphe_5 + + .. code:: text + + double precision, allocatable :: cart_to_sphe_5 (21,11) + + File: :file:`spherical_to_cartesian.irp.f` + + Spherical -> Cartesian Transformation matrix for l=5 + + + + +.. c:var:: cart_to_sphe_6 + + .. code:: text + + double precision, allocatable :: cart_to_sphe_6 (28,13) + + File: :file:`spherical_to_cartesian.irp.f` + + Spherical -> Cartesian Transformation matrix for l=6 + + + + +.. c:var:: cart_to_sphe_7 + + .. code:: text + + double precision, allocatable :: cart_to_sphe_7 (36,15) + + File: :file:`spherical_to_cartesian.irp.f` + + Spherical -> Cartesian Transformation matrix for l=7 + + + + +.. c:var:: cart_to_sphe_8 + + .. code:: text + + double precision, allocatable :: cart_to_sphe_8 (45,17) + + File: :file:`spherical_to_cartesian.irp.f` + + Spherical -> Cartesian Transformation matrix for l=8 + + + + +.. c:var:: cart_to_sphe_9 + + .. code:: text + + double precision, allocatable :: cart_to_sphe_9 (55,19) + + File: :file:`spherical_to_cartesian.irp.f` + + Spherical -> Cartesian Transformation matrix for l=9 + + + + +.. c:var:: l_to_charater + + .. code:: text + + character*(128), allocatable :: l_to_charater (0:7) + + File: :file:`aos.irp.f` + + character corresponding to the "L" value of an AO orbital + + + + +.. c:var:: n_aos_max + + .. code:: text + + integer, allocatable :: nucl_n_aos (nucl_num) + integer :: n_aos_max + + File: :file:`aos.irp.f` + + Number of AOs per atom + + + + +.. c:var:: n_pt_max_i_x + + .. code:: text + + integer :: n_pt_max_integrals + integer :: n_pt_max_i_x + + File: :file:`dimensions_integrals.irp.f` + + + + + + +.. c:var:: n_pt_max_integrals + + .. code:: text + + integer :: n_pt_max_integrals + integer :: n_pt_max_i_x + + File: :file:`dimensions_integrals.irp.f` + + + + + + +.. c:var:: nucl_aos + + .. code:: text + + integer, allocatable :: nucl_aos (nucl_num,N_AOs_max) + + File: :file:`aos.irp.f` + + List of AOs attached on each atom + + + + +.. c:var:: nucl_list_shell_aos + + .. code:: text + + integer, allocatable :: nucl_list_shell_aos (nucl_num,N_AOs_max) + integer, allocatable :: nucl_num_shell_aos (nucl_num) + + File: :file:`aos.irp.f` + + 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 + + + + +.. c:var:: nucl_n_aos + + .. code:: text + + integer, allocatable :: nucl_n_aos (nucl_num) + integer :: n_aos_max + + File: :file:`aos.irp.f` + + Number of AOs per atom + + + + +.. c:var:: nucl_num_shell_aos + + .. code:: text + + integer, allocatable :: nucl_list_shell_aos (nucl_num,N_AOs_max) + integer, allocatable :: nucl_num_shell_aos (nucl_num) + + File: :file:`aos.irp.f` + + 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 + + + + +Subroutines / functions +----------------------- + + + +.. c:function:: ao_power_index + + .. code:: text + + integer function ao_power_index(nx,ny,nz) + + File: :file:`aos.irp.f` + + Unique index given to a triplet of powers: + 1/2 (l-n_x)*(l-n_x+1) + n_z + 1 + + + + + +.. c:function:: ao_value + + .. code:: text + + double precision function ao_value(i,r) + + File: :file:`aos_value.irp.f` + + return the value of the ith ao at point r + + + + + +.. c:function:: give_all_aos_at_r + + .. code:: text + + subroutine give_all_aos_at_r(r,aos_array) + + File: :file:`aos_value.irp.f` + + gives the values of aos at a given point r + - Default: false diff --git a/docs/source/modules/ao_one_e_integrals.rst b/docs/source/modules/ao_one_e_integrals.rst index 925f92a1..27e88a52 100644 --- a/docs/source/modules/ao_one_e_integrals.rst +++ b/docs/source/modules/ao_one_e_integrals.rst @@ -18,26 +18,903 @@ EZFIO parameters .. option:: integral_nuclear - Nucleus-electron integrals in |AO| basis set + Nucleus-electron integrals in |AO| basis set .. option:: integral_kinetic - Kinetic energy integrals in |AO| basis set + Kinetic energy integrals in |AO| basis set .. option:: integral_pseudo - Pseudopotential integrals in |AO| basis set + Pseudopotential integrals in |AO| basis set .. option:: integral_overlap - Overlap integrals in |AO| basis set + Overlap integrals in |AO| basis set .. option:: disk_access_ao_one_integrals - Read/Write |AO| one-electron integrals from/to disk [ Write | Read | None ] + Read/Write |AO| one-electron integrals from/to disk [ Write | Read | None ] + + Default: None + + +Providers +--------- + + +.. c:var:: ao_cart_to_sphe_coef + + .. code:: text + + double precision, allocatable :: ao_cart_to_sphe_coef (ao_num,ao_num) + integer :: ao_cart_to_sphe_num + + File: :file:`ao_ortho_canonical.irp.f` + + ao_cart_to_sphe coefficients of the current basis set + + + + +.. c:var:: ao_cart_to_sphe_inv + + .. code:: text + + double precision, allocatable :: ao_cart_to_sphe_inv (ao_cart_to_sphe_num,ao_num) + + File: :file:`ao_ortho_canonical.irp.f` + + AO_cart_to_sphe_coef^(-1) + + + + +.. c:var:: ao_cart_to_sphe_num + + .. code:: text + + double precision, allocatable :: ao_cart_to_sphe_coef (ao_num,ao_num) + integer :: ao_cart_to_sphe_num + + File: :file:`ao_ortho_canonical.irp.f` + + ao_cart_to_sphe coefficients of the current basis set + + + + +.. c:var:: ao_cart_to_sphe_overlap + + .. code:: text + + double precision, allocatable :: ao_cart_to_sphe_overlap (ao_cart_to_sphe_num,ao_cart_to_sphe_num) + + File: :file:`ao_ortho_canonical.irp.f` + + AO overlap matrix in the spherical basis set + + + + +.. c:var:: ao_deriv2_x + + .. code:: text + + double precision, allocatable :: ao_deriv2_x (ao_num,ao_num) + double precision, allocatable :: ao_deriv2_y (ao_num,ao_num) + double precision, allocatable :: ao_deriv2_z (ao_num,ao_num) + + File: :file:`kin_ao_ints.irp.f` + + Second derivatives matrix elements in the |AO| basis. + math:`{\tt ao_deriv2_x} = \langle \chi_i(x,y,z) | \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle` + + + + + +.. c:var:: ao_deriv2_y + + .. code:: text + + double precision, allocatable :: ao_deriv2_x (ao_num,ao_num) + double precision, allocatable :: ao_deriv2_y (ao_num,ao_num) + double precision, allocatable :: ao_deriv2_z (ao_num,ao_num) + + File: :file:`kin_ao_ints.irp.f` + + Second derivatives matrix elements in the |AO| basis. + math:`{\tt ao_deriv2_x} = \langle \chi_i(x,y,z) | \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle` + + + + + +.. c:var:: ao_deriv2_z + + .. code:: text + + double precision, allocatable :: ao_deriv2_x (ao_num,ao_num) + double precision, allocatable :: ao_deriv2_y (ao_num,ao_num) + double precision, allocatable :: ao_deriv2_z (ao_num,ao_num) + + File: :file:`kin_ao_ints.irp.f` + + Second derivatives matrix elements in the |AO| basis. + math:`{\tt ao_deriv2_x} = \langle \chi_i(x,y,z) | \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle` + + + + + +.. c:var:: ao_deriv_1_x + + .. code:: text + + double precision, allocatable :: ao_deriv_1_x (ao_num,ao_num) + double precision, allocatable :: ao_deriv_1_y (ao_num,ao_num) + double precision, allocatable :: ao_deriv_1_z (ao_num,ao_num) + + File: :file:`spread_dipole_ao.irp.f` + + array of the integrals of AO_i * d/dx AO_j array of the integrals of AO_i * d/dy AO_j array of the integrals of AO_i * d/dz AO_j + + + + +.. c:var:: ao_deriv_1_y + + .. code:: text + + double precision, allocatable :: ao_deriv_1_x (ao_num,ao_num) + double precision, allocatable :: ao_deriv_1_y (ao_num,ao_num) + double precision, allocatable :: ao_deriv_1_z (ao_num,ao_num) + + File: :file:`spread_dipole_ao.irp.f` + + array of the integrals of AO_i * d/dx AO_j array of the integrals of AO_i * d/dy AO_j array of the integrals of AO_i * d/dz AO_j + + + + +.. c:var:: ao_deriv_1_z + + .. code:: text + + double precision, allocatable :: ao_deriv_1_x (ao_num,ao_num) + double precision, allocatable :: ao_deriv_1_y (ao_num,ao_num) + double precision, allocatable :: ao_deriv_1_z (ao_num,ao_num) + + File: :file:`spread_dipole_ao.irp.f` + + array of the integrals of AO_i * d/dx AO_j array of the integrals of AO_i * d/dy AO_j array of the integrals of AO_i * d/dz AO_j + + + + +.. c:var:: ao_dipole_x + + .. code:: text + + double precision, allocatable :: ao_dipole_x (ao_num,ao_num) + double precision, allocatable :: ao_dipole_y (ao_num,ao_num) + double precision, allocatable :: ao_dipole_z (ao_num,ao_num) + + File: :file:`spread_dipole_ao.irp.f` + + array of the integrals of AO_i * x AO_j array of the integrals of AO_i * y AO_j array of the integrals of AO_i * z AO_j + + + + +.. c:var:: ao_dipole_y + + .. code:: text + + double precision, allocatable :: ao_dipole_x (ao_num,ao_num) + double precision, allocatable :: ao_dipole_y (ao_num,ao_num) + double precision, allocatable :: ao_dipole_z (ao_num,ao_num) + + File: :file:`spread_dipole_ao.irp.f` + + array of the integrals of AO_i * x AO_j array of the integrals of AO_i * y AO_j array of the integrals of AO_i * z AO_j + + + + +.. c:var:: ao_dipole_z + + .. code:: text + + double precision, allocatable :: ao_dipole_x (ao_num,ao_num) + double precision, allocatable :: ao_dipole_y (ao_num,ao_num) + double precision, allocatable :: ao_dipole_z (ao_num,ao_num) + + File: :file:`spread_dipole_ao.irp.f` + + array of the integrals of AO_i * x AO_j array of the integrals of AO_i * y AO_j array of the integrals of AO_i * z AO_j + + + + +.. c:var:: ao_kinetic_integral + + .. code:: text + + double precision, allocatable :: ao_kinetic_integral (ao_num,ao_num) + + File: :file:`kin_ao_ints.irp.f` + + Array of the priminitve basis kinetic integrals. + :math:`\langle \chi_i |\hat{T}| \chi_j \rangle` + + + + +.. c:var:: ao_mono_elec_integral + + .. code:: text + + double precision, allocatable :: ao_mono_elec_integral (ao_num,ao_num) + double precision, allocatable :: ao_mono_elec_integral_diag (ao_num) + + File: :file:`ao_mono_ints.irp.f` + + array of the mono electronic hamiltonian on the AOs basis : sum of the kinetic and nuclear electronic potential + + + + +.. c:var:: ao_mono_elec_integral_diag + + .. code:: text + + double precision, allocatable :: ao_mono_elec_integral (ao_num,ao_num) + double precision, allocatable :: ao_mono_elec_integral_diag (ao_num) + + File: :file:`ao_mono_ints.irp.f` + + array of the mono electronic hamiltonian on the AOs basis : sum of the kinetic and nuclear electronic potential + + + + +.. c:var:: ao_nucl_elec_integral + + .. code:: text + + double precision, allocatable :: ao_nucl_elec_integral (ao_num,ao_num) + + File: :file:`pot_ao_ints.irp.f` + + Nucleus-electron interaction, in the |AO| basis set. + :math:`\langle \chi_i | -\sum_A \frac{1}{|r-R_A|} | \chi_j \rangle` + + + + +.. c:var:: ao_nucl_elec_integral_per_atom + + .. code:: text + + double precision, allocatable :: ao_nucl_elec_integral_per_atom (ao_num,ao_num,nucl_num) + + File: :file:`pot_ao_ints.irp.f` + + Nucleus-electron interaction in the |AO| basis set, per atom A. + :math:`\langle \chi_i | -\frac{1}{|r-R_A|} | \chi_j \rangle` + + + + +.. c:var:: ao_ortho_canonical_coef + + .. code:: text + + double precision, allocatable :: ao_ortho_canonical_coef (ao_num,ao_num) + integer :: ao_ortho_canonical_num + + File: :file:`ao_ortho_canonical.irp.f` + + 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 + + + + +.. c:var:: ao_ortho_canonical_coef_inv + + .. code:: text + + double precision, allocatable :: ao_ortho_canonical_coef_inv (ao_num,ao_num) + + File: :file:`ao_ortho_canonical.irp.f` + + ao_ortho_canonical_coef^(-1) + + + + +.. c:var:: ao_ortho_canonical_num + + .. code:: text + + double precision, allocatable :: ao_ortho_canonical_coef (ao_num,ao_num) + integer :: ao_ortho_canonical_num + + File: :file:`ao_ortho_canonical.irp.f` + + 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 + + + + +.. c:var:: ao_ortho_canonical_overlap + + .. code:: text + + double precision, allocatable :: ao_ortho_canonical_overlap (ao_ortho_canonical_num,ao_ortho_canonical_num) + + File: :file:`ao_ortho_canonical.irp.f` + + overlap matrix of the ao_ortho_canonical. Expected to be the Identity + + + + +.. c:var:: ao_overlap + + .. code:: text + + double precision, allocatable :: ao_overlap (ao_num,ao_num) + double precision, allocatable :: ao_overlap_x (ao_num,ao_num) + double precision, allocatable :: ao_overlap_y (ao_num,ao_num) + double precision, allocatable :: ao_overlap_z (ao_num,ao_num) + + File: :file:`ao_overlap.irp.f` + + Overlap between atomic basis functions: :math:`\int \chi_i(r) \chi_j(r) dr)` + + + + +.. c:var:: ao_overlap_abs + + .. code:: text + + double precision, allocatable :: ao_overlap_abs (ao_num,ao_num) + + File: :file:`ao_overlap.irp.f` + + Overlap between absolute value of atomic basis functions: :math:`\int |\chi_i(r)| |\chi_j(r)| dr)` + + + + +.. c:var:: ao_overlap_x + + .. code:: text + + double precision, allocatable :: ao_overlap (ao_num,ao_num) + double precision, allocatable :: ao_overlap_x (ao_num,ao_num) + double precision, allocatable :: ao_overlap_y (ao_num,ao_num) + double precision, allocatable :: ao_overlap_z (ao_num,ao_num) + + File: :file:`ao_overlap.irp.f` + + Overlap between atomic basis functions: :math:`\int \chi_i(r) \chi_j(r) dr)` + + + + +.. c:var:: ao_overlap_y + + .. code:: text + + double precision, allocatable :: ao_overlap (ao_num,ao_num) + double precision, allocatable :: ao_overlap_x (ao_num,ao_num) + double precision, allocatable :: ao_overlap_y (ao_num,ao_num) + double precision, allocatable :: ao_overlap_z (ao_num,ao_num) + + File: :file:`ao_overlap.irp.f` + + Overlap between atomic basis functions: :math:`\int \chi_i(r) \chi_j(r) dr)` + + + + +.. c:var:: ao_overlap_z + + .. code:: text + + double precision, allocatable :: ao_overlap (ao_num,ao_num) + double precision, allocatable :: ao_overlap_x (ao_num,ao_num) + double precision, allocatable :: ao_overlap_y (ao_num,ao_num) + double precision, allocatable :: ao_overlap_z (ao_num,ao_num) + + File: :file:`ao_overlap.irp.f` + + Overlap between atomic basis functions: :math:`\int \chi_i(r) \chi_j(r) dr)` + + + + +.. c:var:: ao_pseudo_integral + + .. code:: text + + double precision, allocatable :: ao_pseudo_integral (ao_num,ao_num) + + File: :file:`pot_ao_pseudo_ints.irp.f` + + Pseudo-potential integrals + + + + +.. c:var:: ao_pseudo_integral_local + + .. code:: text + + double precision, allocatable :: ao_pseudo_integral_local (ao_num,ao_num) + + File: :file:`pot_ao_pseudo_ints.irp.f` + + Local pseudo-potential + + + + +.. c:var:: ao_pseudo_integral_non_local + + .. code:: text + + double precision, allocatable :: ao_pseudo_integral_non_local (ao_num,ao_num) + + File: :file:`pot_ao_pseudo_ints.irp.f` + + Local pseudo-potential + + + + +.. c:var:: ao_spread_x + + .. code:: text + + double precision, allocatable :: ao_spread_x (ao_num,ao_num) + double precision, allocatable :: ao_spread_y (ao_num,ao_num) + double precision, allocatable :: ao_spread_z (ao_num,ao_num) + + File: :file:`spread_dipole_ao.irp.f` + + array of the integrals of AO_i * x^2 AO_j array of the integrals of AO_i * y^2 AO_j array of the integrals of AO_i * z^2 AO_j + + + + +.. c:var:: ao_spread_y + + .. code:: text + + double precision, allocatable :: ao_spread_x (ao_num,ao_num) + double precision, allocatable :: ao_spread_y (ao_num,ao_num) + double precision, allocatable :: ao_spread_z (ao_num,ao_num) + + File: :file:`spread_dipole_ao.irp.f` + + array of the integrals of AO_i * x^2 AO_j array of the integrals of AO_i * y^2 AO_j array of the integrals of AO_i * z^2 AO_j + + + + +.. c:var:: ao_spread_z + + .. code:: text + + double precision, allocatable :: ao_spread_x (ao_num,ao_num) + double precision, allocatable :: ao_spread_y (ao_num,ao_num) + double precision, allocatable :: ao_spread_z (ao_num,ao_num) + + File: :file:`spread_dipole_ao.irp.f` + + array of the integrals of AO_i * x^2 AO_j array of the integrals of AO_i * y^2 AO_j array of the integrals of AO_i * z^2 AO_j + + + + +.. c:var:: i_x1_pol_mult_mono_elec + + .. code:: text + + recursive subroutine I_x1_pol_mult_mono_elec(a,c,R1x,R1xp,R2x,d,nd,n_pt_in) + + File: :file:`pot_ao_ints.irp.f` + + Recursive routine involved in the electron-nucleus potential + + + + +.. c:var:: i_x2_pol_mult_mono_elec + + .. code:: text + + recursive subroutine I_x2_pol_mult_mono_elec(c,R1x,R1xp,R2x,d,nd,dim) + + File: :file:`pot_ao_ints.irp.f` + + Recursive routine involved in the electron-nucleus potential + + + + +.. c:var:: pseudo_dz_k_transp + + .. code:: text + + double precision, allocatable :: pseudo_v_k_transp (pseudo_klocmax,nucl_num) + integer, allocatable :: pseudo_n_k_transp (pseudo_klocmax,nucl_num) + double precision, allocatable :: pseudo_dz_k_transp (pseudo_klocmax,nucl_num) + + File: :file:`pot_ao_pseudo_ints.irp.f` + + Transposed arrays for pseudopotentials + + + + +.. c:var:: pseudo_dz_kl_transp + + .. code:: text + + double precision, allocatable :: pseudo_v_kl_transp (pseudo_kmax,0:pseudo_lmax,nucl_num) + integer, allocatable :: pseudo_n_kl_transp (pseudo_kmax,0:pseudo_lmax,nucl_num) + double precision, allocatable :: pseudo_dz_kl_transp (pseudo_kmax,0:pseudo_lmax,nucl_num) + + File: :file:`pot_ao_pseudo_ints.irp.f` + + Transposed arrays for pseudopotentials + + + + +.. c:var:: pseudo_n_k_transp + + .. code:: text + + double precision, allocatable :: pseudo_v_k_transp (pseudo_klocmax,nucl_num) + integer, allocatable :: pseudo_n_k_transp (pseudo_klocmax,nucl_num) + double precision, allocatable :: pseudo_dz_k_transp (pseudo_klocmax,nucl_num) + + File: :file:`pot_ao_pseudo_ints.irp.f` + + Transposed arrays for pseudopotentials + + + + +.. c:var:: pseudo_n_kl_transp + + .. code:: text + + double precision, allocatable :: pseudo_v_kl_transp (pseudo_kmax,0:pseudo_lmax,nucl_num) + integer, allocatable :: pseudo_n_kl_transp (pseudo_kmax,0:pseudo_lmax,nucl_num) + double precision, allocatable :: pseudo_dz_kl_transp (pseudo_kmax,0:pseudo_lmax,nucl_num) + + File: :file:`pot_ao_pseudo_ints.irp.f` + + Transposed arrays for pseudopotentials + + + + +.. c:var:: pseudo_v_k_transp + + .. code:: text + + double precision, allocatable :: pseudo_v_k_transp (pseudo_klocmax,nucl_num) + integer, allocatable :: pseudo_n_k_transp (pseudo_klocmax,nucl_num) + double precision, allocatable :: pseudo_dz_k_transp (pseudo_klocmax,nucl_num) + + File: :file:`pot_ao_pseudo_ints.irp.f` + + Transposed arrays for pseudopotentials + + + + +.. c:var:: pseudo_v_kl_transp + + .. code:: text + + double precision, allocatable :: pseudo_v_kl_transp (pseudo_kmax,0:pseudo_lmax,nucl_num) + integer, allocatable :: pseudo_n_kl_transp (pseudo_kmax,0:pseudo_lmax,nucl_num) + double precision, allocatable :: pseudo_dz_kl_transp (pseudo_kmax,0:pseudo_lmax,nucl_num) + + File: :file:`pot_ao_pseudo_ints.irp.f` + + Transposed arrays for pseudopotentials + + + + +.. c:var:: read_ao_one_integrals + + .. code:: text + + logical :: read_ao_one_integrals + logical :: write_ao_one_integrals + + File: :file:`read_write.irp.f` + + One level of abstraction for disk_access_ao_integrals and disk_access_mo_integrals + + + + +.. c:var:: s_half + + .. code:: text + + double precision, allocatable :: s_half (ao_num,ao_num) + + File: :file:`ao_overlap.irp.f` + + S^{1/2} + + + + +.. c:var:: s_half_inv + + .. code:: text + + double precision, allocatable :: s_half_inv (AO_num,AO_num) + + File: :file:`ao_overlap.irp.f` + + Matrix X = S^{-1/2} obtained by SVD + + + + +.. c:var:: s_inv + + .. code:: text + + double precision, allocatable :: s_inv (ao_num,ao_num) + + File: :file:`ao_overlap.irp.f` + + S^-1 + + + + +.. c:var:: write_ao_one_integrals + + .. code:: text + + logical :: read_ao_one_integrals + logical :: write_ao_one_integrals + + File: :file:`read_write.irp.f` + + One level of abstraction for disk_access_ao_integrals and disk_access_mo_integrals + + + + +Subroutines / functions +----------------------- + + + +.. c:function:: give_polynom_mult_center_mono_elec + + .. code:: text + + subroutine give_polynom_mult_center_mono_elec(A_center,B_center,alpha,beta,power_A,power_B,C_center,n_pt_in,d,n_pt_out) + + File: :file:`pot_ao_ints.irp.f` + + Returns the explicit polynomial in terms of the "t" variable of the following + :math:`I_x1(a_x, d_x,p,q) * I_x1(a_y, d_y,p,q) * I_x1(a_z, d_z,p,q)` + + + + + +.. c:function:: int_gaus_pol + + .. code:: text + + double precision function int_gaus_pol(alpha,n) + + File: :file:`pot_ao_ints.irp.f` + + Computes the integral: + :math:`\int_{-\infty}^{\infty} x^n \exp(-\alpha x^2) dx` + + + + + +.. c:function:: nai_pol_mult + + .. code:: text + + double precision function NAI_pol_mult(A_center,B_center,power_A,power_B,alpha,beta,C_center,n_pt_in) + + File: :file:`pot_ao_ints.irp.f` + + Computes the electron-nucleus attraction with two primitves. + :math:`\langle g_i | \frac{1}{|r-R_c|} | g_j \rangle` + + + + + +.. c:function:: overlap_bourrin_deriv_x + + .. code:: text + + subroutine overlap_bourrin_deriv_x(i_component,A_center,B_center,alpha,beta,power_A,power_B,dx,lower_exp_val,overlap_x,nx) + + File: :file:`spread_dipole_ao.irp.f` + + + + + + + +.. c:function:: overlap_bourrin_dipole + + .. code:: text + + subroutine overlap_bourrin_dipole(A_center,B_center,alpha,beta,power_A,power_B,overlap_x,lower_exp_val,dx,nx) + + File: :file:`spread_dipole_ao.irp.f` + + + + + + + +.. c:function:: overlap_bourrin_spread + + .. code:: text + + subroutine overlap_bourrin_spread(A_center,B_center,alpha,beta,power_A,power_B,overlap_x,lower_exp_val,dx,nx) + + File: :file:`spread_dipole_ao.irp.f` + + + + + + + +.. c:function:: overlap_bourrin_x + + .. code:: text + + subroutine overlap_bourrin_x(A_center,B_center,alpha,beta,power_A,power_B,overlap_x,lower_exp_val,dx,nx) + + File: :file:`spread_dipole_ao.irp.f` + + + + + + + +.. c:function:: overlap_bourrin_x_abs + + .. code:: text + + subroutine overlap_bourrin_x_abs(A_center,B_center,alpha,beta,power_A,power_B,overlap_x,lower_exp_val,dx,nx) + + File: :file:`spread_dipole_ao.irp.f` + + + + + + + +.. c:function:: power + + .. code:: text + + double precision function power(n,x) + + File: :file:`spread_dipole_ao.irp.f` + + + + + + + +.. c:function:: v_e_n + + .. code:: text + + double precision function V_e_n(a_x,a_y,a_z,b_x,b_y,b_z,alpha,beta) + + File: :file:`pot_ao_ints.irp.f` + + Primitve nuclear attraction between the two primitves centered on the same atom. + primitive_1 = x**(a_x) y**(a_y) z**(a_z) exp(-alpha * r**2) + primitive_2 = x**(b_x) y**(b_y) z**(b_z) exp(- beta * r**2) + + + + + +.. c:function:: v_phi + + .. code:: text + + double precision function V_phi(n,m) + + File: :file:`pot_ao_ints.irp.f` + + Computes the angular "phi" part of the nuclear attraction integral: + :math:`\int_{0}^{2 \pi} \cos(\phi)^n \sin(\phi)^m d\phi` + + + + + +.. c:function:: v_r + + .. code:: text + + double precision function V_r(n,alpha) + + File: :file:`pot_ao_ints.irp.f` + + Computes the radial part of the nuclear attraction integral: + :math:`\int_{0}^{\infty} r^n \exp(-\alpha r^2) dr` + + + + + + +.. c:function:: v_theta + + .. code:: text + + double precision function V_theta(n,m) + + File: :file:`pot_ao_ints.irp.f` + + Computes the angular "theta" part of the nuclear attraction integral: + :math:`\int_{0}^{\pi} \cos(\theta)^n \sin(\theta)^m d\theta` + + + + + +.. c:function:: wallis + + .. code:: text + + double precision function Wallis(n) + + File: :file:`pot_ao_ints.irp.f` + + Wallis integral: + :math:`\int_{0}^{\pi} \cos(\theta)^n d\theta` + - Default: None diff --git a/docs/source/modules/bitmask.rst b/docs/source/modules/bitmask.rst index 1b57d9a6..a79c31fd 100644 --- a/docs/source/modules/bitmask.rst +++ b/docs/source/modules/bitmask.rst @@ -33,3 +33,1180 @@ transforming a bit string to a list of integers for example. + + +Providers +--------- + + +.. c:var:: cas_bitmask + + .. code:: text + + integer(bit_kind), allocatable :: cas_bitmask (N_int,2,N_cas_bitmask) + + File: :file:`bitmasks.irp.f` + + Bitmasks for CAS reference determinants. (N_int, alpha/beta, CAS reference) + + + + +.. c:var:: closed_shell_ref_bitmask + + .. code:: text + + integer(bit_kind), allocatable :: closed_shell_ref_bitmask (N_int,2) + + File: :file:`bitmasks.irp.f` + + + + + + +.. c:var:: core_bitmask + + .. code:: text + + integer(bit_kind), allocatable :: core_bitmask (N_int,2) + integer :: n_core_orb + + File: :file:`bitmasks.irp.f` + + Core + deleted orbitals bitmask + + + + +.. c:var:: core_inact_act_bitmask_4 + + .. code:: text + + integer(bit_kind), allocatable :: core_inact_act_bitmask_4 (N_int,4) + + File: :file:`bitmasks.irp.f` + + + + + + +.. c:var:: core_inact_virt_bitmask + + .. code:: text + + integer(bit_kind), allocatable :: inact_virt_bitmask (N_int,2) + integer(bit_kind), allocatable :: core_inact_virt_bitmask (N_int,2) + + File: :file:`bitmasks.irp.f` + + Reunion of the inactive and virtual bitmasks + + + + +.. c:var:: full_ijkl_bitmask + + .. code:: text + + integer(bit_kind), allocatable :: full_ijkl_bitmask (N_int) + + File: :file:`bitmasks.irp.f` + + Bitmask to include all possible MOs + + + + +.. c:var:: full_ijkl_bitmask_4 + + .. code:: text + + integer(bit_kind), allocatable :: full_ijkl_bitmask_4 (N_int,4) + + File: :file:`bitmasks.irp.f` + + + + + + +.. c:var:: generators_bitmask + + .. code:: text + + integer(bit_kind), allocatable :: generators_bitmask (N_int,2,6,N_generators_bitmask) + + File: :file:`bitmasks.irp.f` + + Bitmasks for generator determinants. (N_int, alpha/beta, hole/particle, generator). + 3rd index is : + * 1 : hole for single exc + * 2 : particle for single exc + * 3 : hole for 1st exc of double + * 4 : particle for 1st exc of double + * 5 : hole for 2nd exc of double + * 6 : particle for 2nd exc of double + + + + + +.. c:var:: generators_bitmask_restart + + .. code:: text + + integer(bit_kind), allocatable :: generators_bitmask_restart (N_int,2,6,N_generators_bitmask_restart) + + File: :file:`bitmasks.irp.f` + + Bitmasks for generator determinants. (N_int, alpha/beta, hole/particle, generator). + 3rd index is : + * 1 : hole for single exc + * 2 : particle for single exc + * 3 : hole for 1st exc of double + * 4 : particle for 1st exc of double + * 5 : hole for 2nd exc of double + * 6 : particle for 2nd exc of double + + + + + +.. c:var:: hf_bitmask + + .. code:: text + + integer(bit_kind), allocatable :: hf_bitmask (N_int,2) + + File: :file:`bitmasks.irp.f` + + Hartree Fock bit mask + + + + +.. c:var:: i_bitmask_gen + + .. code:: text + + integer :: i_bitmask_gen + + File: :file:`bitmasks.irp.f` + + Current bitmask for the generators + + + + +.. c:var:: inact_bitmask + + .. code:: text + + integer(bit_kind), allocatable :: inact_bitmask (N_int,2) + integer(bit_kind), allocatable :: virt_bitmask (N_int,2) + integer :: n_inact_orb + integer :: n_virt_orb + + File: :file:`bitmasks.irp.f` + + 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 + + + + +.. c:var:: inact_virt_bitmask + + .. code:: text + + integer(bit_kind), allocatable :: inact_virt_bitmask (N_int,2) + integer(bit_kind), allocatable :: core_inact_virt_bitmask (N_int,2) + + File: :file:`bitmasks.irp.f` + + Reunion of the inactive and virtual bitmasks + + + + +.. c:var:: index_holes_bitmask + + .. code:: text + + integer, allocatable :: index_holes_bitmask (3) + + File: :file:`modify_bitmasks.irp.f` + + Index of the holes in the generators_bitmasks + + + + +.. c:var:: index_particl_bitmask + + .. code:: text + + integer, allocatable :: index_particl_bitmask (3) + + File: :file:`modify_bitmasks.irp.f` + + Index of the holes in the generators_bitmasks + + + + +.. c:var:: list_act + + .. code:: text + + integer, allocatable :: list_act (n_act_orb) + integer, allocatable :: list_act_reverse (mo_tot_num) + + File: :file:`bitmasks.irp.f` + + list_act(i) = index of the ith active orbital + 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 + + + + +.. c:var:: list_act_reverse + + .. code:: text + + integer, allocatable :: list_act (n_act_orb) + integer, allocatable :: list_act_reverse (mo_tot_num) + + File: :file:`bitmasks.irp.f` + + list_act(i) = index of the ith active orbital + 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 + + + + +.. c:var:: list_core + + .. code:: text + + integer, allocatable :: list_core (n_core_orb) + integer, allocatable :: list_core_reverse (mo_tot_num) + + File: :file:`bitmasks.irp.f` + + List of the core orbitals that are never excited in post CAS method + + + + +.. c:var:: list_core_inact + + .. code:: text + + integer, allocatable :: list_core_inact (n_core_inact_orb) + integer, allocatable :: list_core_inact_reverse (mo_tot_num) + + File: :file:`bitmasks.irp.f` + + + + + + +.. c:var:: list_core_inact_act + + .. code:: text + + integer, allocatable :: list_core_inact_act (n_core_inact_act_orb) + integer, allocatable :: list_core_inact_act_reverse (mo_tot_num) + + File: :file:`bitmasks.irp.f` + + + + + + +.. c:var:: list_core_inact_act_reverse + + .. code:: text + + integer, allocatable :: list_core_inact_act (n_core_inact_act_orb) + integer, allocatable :: list_core_inact_act_reverse (mo_tot_num) + + File: :file:`bitmasks.irp.f` + + + + + + +.. c:var:: list_core_inact_reverse + + .. code:: text + + integer, allocatable :: list_core_inact (n_core_inact_orb) + integer, allocatable :: list_core_inact_reverse (mo_tot_num) + + File: :file:`bitmasks.irp.f` + + + + + + +.. c:var:: list_core_reverse + + .. code:: text + + integer, allocatable :: list_core (n_core_orb) + integer, allocatable :: list_core_reverse (mo_tot_num) + + File: :file:`bitmasks.irp.f` + + List of the core orbitals that are never excited in post CAS method + + + + +.. c:var:: list_inact + + .. code:: text + + integer, allocatable :: list_inact (n_inact_orb) + integer, allocatable :: list_virt (n_virt_orb) + integer, allocatable :: list_inact_reverse (mo_tot_num) + integer, allocatable :: list_virt_reverse (mo_tot_num) + + File: :file:`bitmasks.irp.f` + + 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 + + + + +.. c:var:: list_inact_reverse + + .. code:: text + + integer, allocatable :: list_inact (n_inact_orb) + integer, allocatable :: list_virt (n_virt_orb) + integer, allocatable :: list_inact_reverse (mo_tot_num) + integer, allocatable :: list_virt_reverse (mo_tot_num) + + File: :file:`bitmasks.irp.f` + + 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 + + + + +.. c:var:: list_virt + + .. code:: text + + integer, allocatable :: list_inact (n_inact_orb) + integer, allocatable :: list_virt (n_virt_orb) + integer, allocatable :: list_inact_reverse (mo_tot_num) + integer, allocatable :: list_virt_reverse (mo_tot_num) + + File: :file:`bitmasks.irp.f` + + 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 + + + + +.. c:var:: list_virt_reverse + + .. code:: text + + integer, allocatable :: list_inact (n_inact_orb) + integer, allocatable :: list_virt (n_virt_orb) + integer, allocatable :: list_inact_reverse (mo_tot_num) + integer, allocatable :: list_virt_reverse (mo_tot_num) + + File: :file:`bitmasks.irp.f` + + 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 + + + + +.. c:var:: mpi_bit_kind + + .. code:: text + + integer :: mpi_bit_kind + + File: :file:`mpi.irp.f` + + MPI bit kind type + + + + +.. c:var:: n_act_orb + + .. code:: text + + integer :: n_act_orb + + File: :file:`bitmasks.irp.f` + + number of active orbitals + + + + +.. c:var:: n_cas_bitmask + + .. code:: text + + integer :: n_cas_bitmask + + File: :file:`bitmasks.irp.f` + + Number of bitmasks for CAS + + + + +.. c:var:: n_core_inact_act_orb + + .. code:: text + + integer(bit_kind), allocatable :: reunion_of_core_inact_act_bitmask (N_int,2) + integer :: n_core_inact_act_orb + + File: :file:`bitmasks.irp.f` + + Reunion of the core, inactive and active bitmasks + + + + +.. c:var:: n_core_inact_orb + + .. code:: text + + integer :: n_core_inact_orb + + File: :file:`bitmasks.irp.f` + + + + + + +.. c:var:: n_core_orb + + .. code:: text + + integer(bit_kind), allocatable :: core_bitmask (N_int,2) + integer :: n_core_orb + + File: :file:`bitmasks.irp.f` + + Core + deleted orbitals bitmask + + + + +.. c:var:: n_core_orb_allocate + + .. code:: text + + integer :: n_core_orb_allocate + + File: :file:`bitmasks.irp.f` + + + + + + +.. c:var:: n_generators_bitmask + + .. code:: text + + integer :: n_generators_bitmask + + File: :file:`bitmasks.irp.f` + + Number of bitmasks for generators + + + + +.. c:var:: n_generators_bitmask_restart + + .. code:: text + + integer :: n_generators_bitmask_restart + + File: :file:`bitmasks.irp.f` + + Number of bitmasks for generators + + + + +.. c:var:: n_inact_orb + + .. code:: text + + integer(bit_kind), allocatable :: inact_bitmask (N_int,2) + integer(bit_kind), allocatable :: virt_bitmask (N_int,2) + integer :: n_inact_orb + integer :: n_virt_orb + + File: :file:`bitmasks.irp.f` + + 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 + + + + +.. c:var:: n_inact_orb_allocate + + .. code:: text + + integer :: n_inact_orb_allocate + + File: :file:`bitmasks.irp.f` + + + + + + +.. c:var:: n_int + + .. code:: text + + integer :: n_int + + File: :file:`bitmasks.irp.f` + + Number of 64-bit integers needed to represent determinants as binary strings + + + + +.. c:var:: n_virt_orb + + .. code:: text + + integer(bit_kind), allocatable :: inact_bitmask (N_int,2) + integer(bit_kind), allocatable :: virt_bitmask (N_int,2) + integer :: n_inact_orb + integer :: n_virt_orb + + File: :file:`bitmasks.irp.f` + + 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 + + + + +.. c:var:: n_virt_orb_allocate + + .. code:: text + + integer :: n_virt_orb_allocate + + File: :file:`bitmasks.irp.f` + + + + + + +.. c:var:: ref_bitmask + + .. code:: text + + integer(bit_kind), allocatable :: ref_bitmask (N_int,2) + + File: :file:`bitmasks.irp.f` + + Reference bit mask, used in Slater rules, chosen as Hartree-Fock bitmask + + + + +.. c:var:: reunion_of_bitmask + + .. code:: text + + integer(bit_kind), allocatable :: reunion_of_bitmask (N_int,2) + + File: :file:`bitmasks.irp.f` + + Reunion of the inactive, active and virtual bitmasks + + + + +.. c:var:: reunion_of_cas_inact_bitmask + + .. code:: text + + integer(bit_kind), allocatable :: reunion_of_cas_inact_bitmask (N_int,2) + + File: :file:`bitmasks.irp.f` + + Reunion of the inactive, active and virtual bitmasks + + + + +.. c:var:: reunion_of_core_inact_act_bitmask + + .. code:: text + + integer(bit_kind), allocatable :: reunion_of_core_inact_act_bitmask (N_int,2) + integer :: n_core_inact_act_orb + + File: :file:`bitmasks.irp.f` + + Reunion of the core, inactive and active bitmasks + + + + +.. c:var:: reunion_of_core_inact_bitmask + + .. code:: text + + integer(bit_kind), allocatable :: reunion_of_core_inact_bitmask (N_int,2) + + File: :file:`bitmasks.irp.f` + + Reunion of the core and inactive and virtual bitmasks + + + + +.. c:var:: unpaired_alpha_electrons + + .. code:: text + + integer(bit_kind), allocatable :: unpaired_alpha_electrons (N_int) + + File: :file:`bitmasks.irp.f` + + Bitmask reprenting the unpaired alpha electrons in the HF_bitmask + + + + +.. c:var:: virt_bitmask + + .. code:: text + + integer(bit_kind), allocatable :: inact_bitmask (N_int,2) + integer(bit_kind), allocatable :: virt_bitmask (N_int,2) + integer :: n_inact_orb + integer :: n_virt_orb + + File: :file:`bitmasks.irp.f` + + 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 + + + + +.. c:var:: virt_bitmask_4 + + .. code:: text + + integer(bit_kind), allocatable :: virt_bitmask_4 (N_int,4) + + File: :file:`bitmasks.irp.f` + + + + + + +Subroutines / functions +----------------------- + + + +.. c:function:: bitstring_to_hexa + + .. code:: text + + subroutine bitstring_to_hexa( output, string, Nint ) + + File: :file:`bitmasks_routines.irp.f` + + Transform a bit string to a string in hexadecimal format for printing + + + + + +.. c:function:: bitstring_to_list + + .. code:: text + + subroutine bitstring_to_list( string, list, n_elements, Nint) + + File: :file:`bitmasks_routines.irp.f` + + Gives the inidices(+1) of the bits set to 1 in the bit string + + + + + +.. c:function:: bitstring_to_str + + .. code:: text + + subroutine bitstring_to_str( output, string, Nint ) + + File: :file:`bitmasks_routines.irp.f` + + Transform a bit string to a string for printing + + + + + +.. c:function:: broadcast_chunks_bit_kind + + .. code:: text + + subroutine broadcast_chunks_bit_kind(A, LDA) + + File: :file:`mpi.irp.f` + + Broadcast with chunks of ~2GB + + + + + +.. c:function:: debug_det + + .. code:: text + + subroutine debug_det(string,Nint) + + File: :file:`bitmasks_routines.irp.f` + + Subroutine to print the content of a determinant in '+-' notation and hexadecimal representation. + + + + + +.. c:function:: debug_spindet + + .. code:: text + + subroutine debug_spindet(string,Nint) + + File: :file:`bitmasks_routines.irp.f` + + Subroutine to print the content of a determinant in '+-' notation and hexadecimal representation. + + + + + +.. c:function:: initialize_bitmask_to_restart_ones + + .. code:: text + + subroutine initialize_bitmask_to_restart_ones + + File: :file:`modify_bitmasks.irp.f` + + Initialization of the generators_bitmask to the restart bitmask + + + + + +.. c:function:: is_a_1h + + .. code:: text + + logical function is_a_1h(key_in) + + File: :file:`bitmask_cas_routines.irp.f` + + + + + + + +.. c:function:: is_a_1h1p + + .. code:: text + + logical function is_a_1h1p(key_in) + + File: :file:`bitmask_cas_routines.irp.f` + + + + + + + +.. c:function:: is_a_1h2p + + .. code:: text + + logical function is_a_1h2p(key_in) + + File: :file:`bitmask_cas_routines.irp.f` + + + + + + + +.. c:function:: is_a_1p + + .. code:: text + + logical function is_a_1p(key_in) + + File: :file:`bitmask_cas_routines.irp.f` + + + + + + + +.. c:function:: is_a_2h + + .. code:: text + + logical function is_a_2h(key_in) + + File: :file:`bitmask_cas_routines.irp.f` + + + + + + + +.. c:function:: is_a_2h1p + + .. code:: text + + logical function is_a_2h1p(key_in) + + File: :file:`bitmask_cas_routines.irp.f` + + + + + + + +.. c:function:: is_a_2p + + .. code:: text + + logical function is_a_2p(key_in) + + File: :file:`bitmask_cas_routines.irp.f` + + + + + + + +.. c:function:: is_a_two_holes_two_particles + + .. code:: text + + logical function is_a_two_holes_two_particles(key_in) + + File: :file:`bitmask_cas_routines.irp.f` + + 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 + + + + + +.. c:function:: is_i_in_virtual + + .. code:: text + + logical function is_i_in_virtual(i) + + File: :file:`bitmask_cas_routines.irp.f` + + + + + + + +.. c:function:: is_the_hole_in_det + + .. code:: text + + logical function is_the_hole_in_det(key_in,ispin,i_hole) + + File: :file:`find_hole.irp.f` + + + + + + + +.. c:function:: is_the_particl_in_det + + .. code:: text + + logical function is_the_particl_in_det(key_in,ispin,i_particl) + + File: :file:`find_hole.irp.f` + + + + + + + +.. c:function:: list_to_bitstring + + .. code:: text + + subroutine list_to_bitstring( string, list, n_elements, Nint) + + File: :file:`bitmasks_routines.irp.f` + + Returns the physical string "string(N_int,2)" from the array of occupations "list(N_int*bit_kind_size,2) + + + + + +.. c:function:: modify_bitmasks_for_hole + + .. code:: text + + subroutine modify_bitmasks_for_hole(i_hole) + + File: :file:`modify_bitmasks.irp.f` + + modify the generators_bitmask in order that one can only excite the electrons occupying i_hole + + + + + +.. c:function:: modify_bitmasks_for_hole_in_out + + .. code:: text + + subroutine modify_bitmasks_for_hole_in_out(i_hole) + + File: :file:`modify_bitmasks.irp.f` + + modify the generators_bitmask in order that one can only excite the electrons occupying i_hole + + + + + +.. c:function:: modify_bitmasks_for_particl + + .. code:: text + + subroutine modify_bitmasks_for_particl(i_part) + + File: :file:`modify_bitmasks.irp.f` + + modify the generators_bitmask in order that one can only excite the electrons to the orbital i_part + + + + + +.. c:function:: number_of_holes + + .. code:: text + + integer function number_of_holes(key_in) + + File: :file:`bitmask_cas_routines.irp.f` + + Function that returns the number of holes in the inact space + + + + + +.. c:function:: number_of_holes_verbose + + .. code:: text + + integer function number_of_holes_verbose(key_in) + + File: :file:`bitmask_cas_routines.irp.f` + + function that returns the number of holes in the inact space + + + + + +.. c:function:: number_of_particles + + .. code:: text + + integer function number_of_particles(key_in) + + File: :file:`bitmask_cas_routines.irp.f` + + function that returns the number of particles in the virtual space + + + + + +.. c:function:: number_of_particles_verbose + + .. code:: text + + integer function number_of_particles_verbose(key_in) + + File: :file:`bitmask_cas_routines.irp.f` + + function that returns the number of particles in the inact space + + + + + +.. c:function:: print_det + + .. code:: text + + subroutine print_det(string,Nint) + + File: :file:`bitmasks_routines.irp.f` + + Subroutine to print the content of a determinant using the '+-' notation + + + + + +.. c:function:: print_generators_bitmasks_holes + + .. code:: text + + subroutine print_generators_bitmasks_holes + + File: :file:`modify_bitmasks.irp.f` + + + + + + + +.. c:function:: print_generators_bitmasks_holes_for_one_generator + + .. code:: text + + subroutine print_generators_bitmasks_holes_for_one_generator(i_gen) + + File: :file:`modify_bitmasks.irp.f` + + + + + + + +.. c:function:: print_generators_bitmasks_particles + + .. code:: text + + subroutine print_generators_bitmasks_particles + + File: :file:`modify_bitmasks.irp.f` + + + + + + + +.. c:function:: print_generators_bitmasks_particles_for_one_generator + + .. code:: text + + subroutine print_generators_bitmasks_particles_for_one_generator(i_gen) + + File: :file:`modify_bitmasks.irp.f` + + + + + + + +.. c:function:: print_spindet + + .. code:: text + + subroutine print_spindet(string,Nint) + + File: :file:`bitmasks_routines.irp.f` + + Subroutine to print the content of a determinant using the '+-' notation + + + + + +.. c:function:: set_bitmask_hole_as_input + + .. code:: text + + subroutine set_bitmask_hole_as_input(input_bimask) + + File: :file:`modify_bitmasks.irp.f` + + set the generators_bitmask for the holes as the input_bimask + + + + + +.. c:function:: set_bitmask_particl_as_input + + .. code:: text + + subroutine set_bitmask_particl_as_input(input_bimask) + + File: :file:`modify_bitmasks.irp.f` + + set the generators_bitmask for the particles as the input_bimask + + diff --git a/docs/source/modules/cis.rst b/docs/source/modules/cis.rst index 86e88906..129692f2 100644 --- a/docs/source/modules/cis.rst +++ b/docs/source/modules/cis.rst @@ -25,5 +25,93 @@ EZFIO parameters .. option:: energy - Variational CIS energy + Variational CIS energy + + + +Subroutines / functions +----------------------- + + + +.. c:function:: cis + + .. code:: text + + subroutine cis + + File: :file:`CIS.irp.f` + + + + + + + +.. c:function:: h_apply_cis + + .. code:: text + + subroutine H_apply_cis() + + File: :file:`H_apply.irp.f_shell_8` + + 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. + + + + + +.. c:function:: h_apply_cis_diexc + + .. code:: text + + subroutine H_apply_cis_diexc(key_in, key_prev, hole_1,particl_1, hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in ) + + File: :file:`H_apply.irp.f_shell_8` + + + + + + + +.. c:function:: h_apply_cis_diexcorg + + .. code:: text + + subroutine H_apply_cis_diexcOrg(key_in,key_mask,hole_1,particl_1,hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in ) + + File: :file:`H_apply.irp.f_shell_8` + + Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. + + + + + +.. c:function:: h_apply_cis_diexcp + + .. code:: text + + subroutine H_apply_cis_diexcP(key_in, fs1, fh1, particl_1, fs2, fh2, particl_2, fock_diag_tmp, i_generator, iproc_in ) + + File: :file:`H_apply.irp.f_shell_8` + + + + + + + +.. c:function:: h_apply_cis_monoexc + + .. code:: text + + subroutine H_apply_cis_monoexc(key_in, hole_1,particl_1,fock_diag_tmp,i_generator,iproc_in ) + + File: :file:`H_apply.irp.f_shell_8` + + Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. + diff --git a/docs/source/modules/cisd.rst b/docs/source/modules/cisd.rst index 9ab31163..76a07968 100644 --- a/docs/source/modules/cisd.rst +++ b/docs/source/modules/cisd.rst @@ -25,5 +25,79 @@ EZFIO parameters .. option:: energy - Variational CISD energy + Variational CISD energy + + + +Subroutines / functions +----------------------- + + + +.. c:function:: h_apply_cisd + + .. code:: text + + subroutine H_apply_cisd() + + File: :file:`H_apply.irp.f_shell_8` + + 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. + + + + + +.. c:function:: h_apply_cisd_diexc + + .. code:: text + + subroutine H_apply_cisd_diexc(key_in, key_prev, hole_1,particl_1, hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in ) + + File: :file:`H_apply.irp.f_shell_8` + + + + + + + +.. c:function:: h_apply_cisd_diexcorg + + .. code:: text + + subroutine H_apply_cisd_diexcOrg(key_in,key_mask,hole_1,particl_1,hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in ) + + File: :file:`H_apply.irp.f_shell_8` + + Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. + + + + + +.. c:function:: h_apply_cisd_diexcp + + .. code:: text + + subroutine H_apply_cisd_diexcP(key_in, fs1, fh1, particl_1, fs2, fh2, particl_2, fock_diag_tmp, i_generator, iproc_in ) + + File: :file:`H_apply.irp.f_shell_8` + + + + + + + +.. c:function:: h_apply_cisd_monoexc + + .. code:: text + + subroutine H_apply_cisd_monoexc(key_in, hole_1,particl_1,fock_diag_tmp,i_generator,iproc_in ) + + File: :file:`H_apply.irp.f_shell_8` + + Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. + diff --git a/docs/source/modules/davidson.rst b/docs/source/modules/davidson.rst index 0193c20b..b5d7dc60 100644 --- a/docs/source/modules/davidson.rst +++ b/docs/source/modules/davidson.rst @@ -23,36 +23,530 @@ EZFIO parameters .. option:: threshold_davidson - Thresholds of Davidson's algorithm + Thresholds of Davidson's algorithm - Default: 1.e-10 + Default: 1.e-10 .. option:: n_states_diag - Number of states to consider during the Davdison diagonalization + Number of states to consider during the Davdison diagonalization - Default: 4 + Default: 4 .. option:: davidson_sze_max - Number of micro-iterations before re-contracting + Number of micro-iterations before re-contracting - Default: 8 + Default: 8 .. option:: state_following - If |true|, the states are re-ordered to match the input states + If |true|, the states are re-ordered to match the input states - Default: False + Default: False .. option:: disk_based_davidson - If |true|, disk space is used to store the vectors + If |true|, disk space is used to store the vectors - Default: False + Default: False .. option:: distributed_davidson - If |true|, use the distributed algorithm + If |true|, use the distributed algorithm + + Default: True + + +Providers +--------- + + +.. c:var:: ci_eigenvectors + + .. code:: text + + double precision, allocatable :: ci_electronic_energy (N_states_diag) + double precision, allocatable :: ci_eigenvectors (N_det,N_states_diag) + double precision, allocatable :: ci_eigenvectors_s2 (N_states_diag) + + File: :file:`diagonalize_CI.irp.f` + + Eigenvectors/values of the CI matrix + + + + +.. c:var:: ci_eigenvectors_s2 + + .. code:: text + + double precision, allocatable :: ci_electronic_energy (N_states_diag) + double precision, allocatable :: ci_eigenvectors (N_det,N_states_diag) + double precision, allocatable :: ci_eigenvectors_s2 (N_states_diag) + + File: :file:`diagonalize_CI.irp.f` + + Eigenvectors/values of the CI matrix + + + + +.. c:var:: ci_electronic_energy + + .. code:: text + + double precision, allocatable :: ci_electronic_energy (N_states_diag) + double precision, allocatable :: ci_eigenvectors (N_det,N_states_diag) + double precision, allocatable :: ci_eigenvectors_s2 (N_states_diag) + + File: :file:`diagonalize_CI.irp.f` + + Eigenvectors/values of the CI matrix + + + + +.. c:var:: ci_energy + + .. code:: text + + double precision, allocatable :: ci_energy (N_states_diag) + + File: :file:`diagonalize_CI.irp.f` + + N_states lowest eigenvalues of the CI matrix + + + + +.. c:var:: davidson_criterion + + .. code:: text + + character(64) :: davidson_criterion + + File: :file:`parameters.irp.f` + + Can be : [ energy | residual | both | wall_time | cpu_time | iterations ] + + + + +.. c:var:: dressed_column_idx + + .. code:: text + + integer, allocatable :: dressed_column_idx (N_states) + + File: :file:`diagonalization_hs2_dressed.irp.f` + + Index of the dressed columns + + + + +.. c:var:: n_states_diag + + .. code:: text + + integer :: n_states_diag + + File: :file:`input.irp.f` + + Number of states to consider during the Davdison diagonalization + + + + +.. c:var:: nthreads_davidson + + .. code:: text + + integer :: nthreads_davidson + + File: :file:`davidson_parallel.irp.f` + + Number of threads for Davdison + + + + +.. c:var:: psi_energy + + .. code:: text + + double precision, allocatable :: psi_energy (N_states) + + File: :file:`u0Hu0.irp.f` + + Energy of the current wave function + + + + +.. c:var:: psi_energy_with_nucl_rep + + .. code:: text + + double precision, allocatable :: psi_energy_with_nucl_rep (N_states) + + File: :file:`u0Hu0.irp.f` + + Energy of the wave function with the nuclear repulsion energy. + + + + +Subroutines / functions +----------------------- + + + +.. c:function:: davidson_collector + + .. code:: text + + subroutine davidson_collector(zmq_to_qp_run_socket, zmq_socket_pull, v0, s0, sze, N_st) + + File: :file:`davidson_parallel.irp.f` + + + + + + + +.. c:function:: davidson_converged + + .. code:: text + + subroutine davidson_converged(energy,residual,wall,iterations,cpu,N_st,converged) + + File: :file:`parameters.irp.f` + + True if the Davidson algorithm is converged + + + + + +.. c:function:: davidson_diag_hjj_sjj + + .. code:: text + + subroutine davidson_diag_hjj_sjj(dets_in,u_in,H_jj,s2_out,energies,dim_in,sze,N_st,N_st_diag,Nint,dressing_state,converged) + + File: :file:`diagonalization_hs2_dressed.irp.f` + + Davidson diagonalization with specific diagonal elements of the H matrix + H_jj : specific diagonal H matrix elements to diagonalize de Davidson + S2_out : Output : s^2 + dets_in : bitmasks corresponding to determinants + u_in : guess coefficients on the various states. Overwritten on exit + dim_in : leftmost dimension of u_in + sze : Number of determinants + N_st : Number of eigenstates + N_st_diag : Number of states in which H is diagonalized. Assumed > sze + Initial guess vectors are not necessarily orthonormal + + + + + +.. c:function:: davidson_diag_hs2 + + .. code:: text + + subroutine davidson_diag_hs2(dets_in,u_in,s2_out,dim_in,energies,sze,N_st,N_st_diag,Nint,dressing_state) + + File: :file:`diagonalization_hs2_dressed.irp.f` + + Davidson diagonalization. + dets_in : bitmasks corresponding to determinants + u_in : guess coefficients on the various states. Overwritten on exit + dim_in : leftmost dimension of u_in + sze : Number of determinants + N_st : Number of eigenstates + Initial guess vectors are not necessarily orthonormal + + + + + +.. c:function:: davidson_pull_results + + .. code:: text + + subroutine davidson_pull_results(zmq_socket_pull, v_t, s_t, imin, imax, task_id) + + File: :file:`davidson_parallel.irp.f` + + + + + + + +.. c:function:: davidson_push_results + + .. code:: text + + subroutine davidson_push_results(zmq_socket_push, v_t, s_t, imin, imax, task_id) + + File: :file:`davidson_parallel.irp.f` + + + + + + + +.. c:function:: davidson_run_slave + + .. code:: text + + subroutine davidson_run_slave(thread,iproc) + + File: :file:`davidson_parallel.irp.f` + + + + + + + +.. c:function:: davidson_slave_inproc + + .. code:: text + + subroutine davidson_slave_inproc(i) + + File: :file:`davidson_parallel.irp.f` + + + + + + + +.. c:function:: davidson_slave_tcp + + .. code:: text + + subroutine davidson_slave_tcp(i) + + File: :file:`davidson_parallel.irp.f` + + + + + + + +.. c:function:: davidson_slave_work + + .. code:: text + + subroutine davidson_slave_work(zmq_to_qp_run_socket, zmq_socket_push, N_st, sze, worker_id) + + File: :file:`davidson_parallel.irp.f` + + + + + + + +.. c:function:: diagonalize_ci + + .. code:: text + + subroutine diagonalize_CI + + File: :file:`diagonalize_CI.irp.f` + + Replace the coefficients of the CI states by the coefficients of the eigenstates of the CI matrix + + + + + +.. c:function:: find_reference + + .. code:: text + + subroutine find_reference(thresh,n_ref,result) + + File: :file:`find_reference.irp.f` + + + + + + + +.. c:function:: h_s2_u_0_nstates_openmp + + .. code:: text + + subroutine H_S2_u_0_nstates_openmp(v_0,s_0,u_0,N_st,sze) + + File: :file:`u0Hu0.irp.f` + + Computes v_0 = H|u_0> and s_0 = S^2 |u_0> + Assumes that the determinants are in psi_det + istart, iend, ishift, istep are used in ZMQ parallelization. + + + + + +.. c:function:: h_s2_u_0_nstates_openmp_work + + .. code:: text + + subroutine H_S2_u_0_nstates_openmp_work(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep) + + File: :file:`u0Hu0.irp.f` + + Computes v_t = H|u_t> and s_t = S^2 |u_t> + Default should be 1,N_det,0,1 + + + + + +.. c:function:: h_s2_u_0_nstates_openmp_work_1 + + .. code:: text + + subroutine H_S2_u_0_nstates_openmp_work_1(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep) + + File: :file:`u0Hu0.irp.f_template_468` + + Computes v_t = H|u_t> and s_t = S^2 |u_t> + Default should be 1,N_det,0,1 + + + + + +.. c:function:: h_s2_u_0_nstates_openmp_work_2 + + .. code:: text + + subroutine H_S2_u_0_nstates_openmp_work_2(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep) + + File: :file:`u0Hu0.irp.f_template_468` + + Computes v_t = H|u_t> and s_t = S^2 |u_t> + Default should be 1,N_det,0,1 + + + + + +.. c:function:: h_s2_u_0_nstates_openmp_work_3 + + .. code:: text + + subroutine H_S2_u_0_nstates_openmp_work_3(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep) + + File: :file:`u0Hu0.irp.f_template_468` + + Computes v_t = H|u_t> and s_t = S^2 |u_t> + Default should be 1,N_det,0,1 + + + + + +.. c:function:: h_s2_u_0_nstates_openmp_work_4 + + .. code:: text + + subroutine H_S2_u_0_nstates_openmp_work_4(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep) + + File: :file:`u0Hu0.irp.f_template_468` + + Computes v_t = H|u_t> and s_t = S^2 |u_t> + Default should be 1,N_det,0,1 + + + + + +.. c:function:: h_s2_u_0_nstates_openmp_work_n_int + + .. code:: text + + subroutine H_S2_u_0_nstates_openmp_work_N_int(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep) + + File: :file:`u0Hu0.irp.f_template_468` + + Computes v_t = H|u_t> and s_t = S^2 |u_t> + Default should be 1,N_det,0,1 + + + + + +.. c:function:: h_s2_u_0_nstates_zmq + + .. code:: text + + subroutine H_S2_u_0_nstates_zmq(v_0,s_0,u_0,N_st,sze) + + File: :file:`davidson_parallel.irp.f` + + Computes v_0 = H|u_0> and s_0 = S^2 |u_0> + n : number of determinants + H_jj : array of + S2_jj : array of + + + + + +.. c:function:: u_0_h_u_0 + + .. code:: text + + subroutine u_0_H_u_0(e_0,u_0,n,keys_tmp,Nint,N_st,sze) + + File: :file:`u0Hu0.irp.f` + + Computes e_0 = / + n : number of determinants + + + + + + +.. c:function:: zmq_get_n_states_diag + + .. code:: text + + integer function zmq_get_N_states_diag(zmq_to_qp_run_socket, worker_id) + + File: :file:`davidson_parallel.irp.f` + + Get N_states_diag from the qp_run scheduler + + + + + +.. c:function:: zmq_put_n_states_diag + + .. code:: text + + integer function zmq_put_N_states_diag(zmq_to_qp_run_socket,worker_id) + + File: :file:`davidson_parallel.irp.f` + + Put N_states_diag on the qp_run scheduler + - Default: True diff --git a/docs/source/modules/davidsonundressed.rst b/docs/source/modules/davidsonundressed.rst index 49808521..ccb87324 100644 --- a/docs/source/modules/davidsonundressed.rst +++ b/docs/source/modules/davidsonundressed.rst @@ -11,3 +11,35 @@ DavidsonUndressed Module for main files Davidson's algorithm with no dressing. + + +Providers +--------- + + +.. c:var:: dressing_column_h + + .. code:: text + + double precision, allocatable :: dressing_column_h (N_det,N_states) + double precision, allocatable :: dressing_column_s (N_det,N_states) + + File: :file:`null_dressing_vector.irp.f` + + Null dressing vectors + + + + +.. c:var:: dressing_column_s + + .. code:: text + + double precision, allocatable :: dressing_column_h (N_det,N_states) + double precision, allocatable :: dressing_column_s (N_det,N_states) + + File: :file:`null_dressing_vector.irp.f` + + Null dressing vectors + + diff --git a/docs/source/modules/determinants.rst b/docs/source/modules/determinants.rst index 8a51c665..c1f8bb84 100644 --- a/docs/source/modules/determinants.rst +++ b/docs/source/modules/determinants.rst @@ -17,106 +17,4529 @@ EZFIO parameters .. option:: n_det_max - Maximum number of determinants in the wave function + Maximum number of determinants in the wave function - Default: 1000000 + Default: 1000000 .. option:: n_det_max_full - Maximum number of determinants where |H| is fully diagonalized + Maximum number of determinants where |H| is fully diagonalized - Default: 1000 + Default: 1000 .. option:: n_states - Number of states to consider + Number of states to consider - Default: 1 + Default: 1 .. option:: read_wf - If |true|, read the wave function from the |EZFIO| file + If |true|, read the wave function from the |EZFIO| file - Default: False + Default: False .. option:: s2_eig - Force the wave function to be an eigenfunction of |S^2| + Force the wave function to be an eigenfunction of |S^2| - Default: True + Default: True .. option:: used_weight - 0: 1./(c_0^2), 1: 1/N_states, 2: input state-average weight, 3: 1/(Norm_L3(Psi)) + 0: 1./(c_0^2), 1: 1/N_states, 2: input state-average weight, 3: 1/(Norm_L3(Psi)) - Default: 0 + Default: 0 .. option:: threshold_generators - Thresholds on generators (fraction of the square of the norm) + Thresholds on generators (fraction of the square of the norm) - Default: 0.99 + Default: 0.99 .. option:: threshold_selectors - Thresholds on selectors (fraction of the square of the norm) + Thresholds on selectors (fraction of the square of the norm) - Default: 0.999 + Default: 0.999 .. option:: n_int - Number of integers required to represent bitstrings (set in module :ref:`bitmask`) + Number of integers required to represent bitstrings (set in module :ref:`bitmask`) .. option:: bit_kind - (set in module :ref:`bitmask`) + (set in module :ref:`bitmask`) .. option:: mo_label - Label of the |MOs| on which the determinants are expressed + Label of the |MOs| on which the determinants are expressed .. option:: n_det - Number of determinants in the current wave function + Number of determinants in the current wave function .. option:: psi_coef - Coefficients of the wave function + Coefficients of the wave function .. option:: psi_det - Determinants of the variational space + Determinants of the variational space .. option:: expected_s2 - Expected value of |S^2| + Expected value of |S^2| .. option:: target_energy - Energy that should be obtained when truncating the wave function (optional) + Energy that should be obtained when truncating the wave function (optional) - Default: 0. + Default: 0. .. option:: 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 + 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 - Default: False + Default: False .. option:: 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 represents a matrix of size 60 Gb. + 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 represents a matrix of size 60 Gb. - Default: 90000 + Default: 90000 .. option:: state_average_weight - Weight of the states in state-average calculations. + Weight of the states in state-average calculations. + + + +Providers +--------- + + +.. c:var:: abs_psi_coef_max + + .. code:: text + + double precision, allocatable :: psi_coef_max (N_states) + double precision, allocatable :: psi_coef_min (N_states) + double precision, allocatable :: abs_psi_coef_max (N_states) + double precision, allocatable :: abs_psi_coef_min (N_states) + + File: :file:`determinants.irp.f` + + Max and min values of the coefficients + + + + +.. c:var:: abs_psi_coef_min + + .. code:: text + + double precision, allocatable :: psi_coef_max (N_states) + double precision, allocatable :: psi_coef_min (N_states) + double precision, allocatable :: abs_psi_coef_max (N_states) + double precision, allocatable :: abs_psi_coef_min (N_states) + + File: :file:`determinants.irp.f` + + Max and min values of the coefficients + + + + +.. c:var:: barycentric_electronic_energy + + .. code:: text + + double precision, allocatable :: barycentric_electronic_energy (N_states) + + File: :file:`energy.irp.f` + + TODO : ASCII Elephant + + + + +.. c:var:: bi_elec_ref_bitmask_energy + + .. code:: text + + double precision :: ref_bitmask_energy + double precision :: mono_elec_ref_bitmask_energy + double precision :: kinetic_ref_bitmask_energy + double precision :: nucl_elec_ref_bitmask_energy + double precision :: bi_elec_ref_bitmask_energy + + File: :file:`ref_bitmask.irp.f` + + Energy of the reference bitmask used in Slater rules + + + + +.. c:var:: c0_weight + + .. code:: text + + double precision, allocatable :: c0_weight (N_states) + + File: :file:`density_matrix.irp.f` + + Weight of the states in the selection : 1/c_0^2 + + + + +.. c:var:: det_alpha_norm + + .. code:: text + + double precision, allocatable :: det_alpha_norm (N_det_alpha_unique) + double precision, allocatable :: det_beta_norm (N_det_beta_unique) + + File: :file:`spindeterminants.irp.f` + + Norm of the alpha and beta spin determinants in the wave function: + ||Da||_i \sum_j C_{ij}**2 + + + + +.. c:var:: det_beta_norm + + .. code:: text + + double precision, allocatable :: det_alpha_norm (N_det_alpha_unique) + double precision, allocatable :: det_beta_norm (N_det_beta_unique) + + File: :file:`spindeterminants.irp.f` + + Norm of the alpha and beta spin determinants in the wave function: + ||Da||_i \sum_j C_{ij}**2 + + + + +.. c:var:: det_to_occ_pattern + + .. code:: text + + integer, allocatable :: det_to_occ_pattern (N_det) + + File: :file:`occ_pattern.irp.f` + + Returns the index of the occupation pattern for each determinant + + + + +.. c:var:: diag_algorithm + + .. code:: text + + character*(64) :: diag_algorithm + + File: :file:`determinants.irp.f` + + Diagonalization algorithm (Davidson or Lapack) + + + + +.. c:var:: diagonal_h_matrix_on_psi_det + + .. code:: text + + double precision, allocatable :: diagonal_h_matrix_on_psi_det (N_det) + + File: :file:`energy.irp.f` + + Diagonal of the Hamiltonian ordered as psi_det + + + + +.. c:var:: double_exc_bitmask + + .. code:: text + + integer(bit_kind), allocatable :: double_exc_bitmask (N_int,4,N_double_exc_bitmasks) + + File: :file:`determinants_bitmasks.irp.f` + + 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. + + + + +.. c:var:: expected_s2 + + .. code:: text + + double precision :: expected_s2 + + File: :file:`s2.irp.f` + + Expected value of S2 : S*(S+1) + + + + +.. c:var:: fock_operator_closed_shell_ref_bitmask + + .. code:: text + + double precision, allocatable :: fock_operator_closed_shell_ref_bitmask (mo_tot_num,mo_tot_num) + + File: :file:`mono_excitations.irp.f` + + + + + + +.. c:var:: h_apply_buffer_allocated + + .. code:: text + + logical :: h_apply_buffer_allocated + integer(omp_lock_kind), allocatable :: h_apply_buffer_lock (64,0:nproc-1) + + File: :file:`H_apply.irp.f` + + Buffer of determinants/coefficients/perturbative energy for H_apply. Uninitialized. Filled by H_apply subroutines. + + + + +.. c:var:: h_apply_buffer_lock + + .. code:: text + + logical :: h_apply_buffer_allocated + integer(omp_lock_kind), allocatable :: h_apply_buffer_lock (64,0:nproc-1) + + File: :file:`H_apply.irp.f` + + Buffer of determinants/coefficients/perturbative energy for H_apply. Uninitialized. Filled by H_apply subroutines. + + + + +.. c:var:: h_matrix_all_dets + + .. code:: text + + double precision, allocatable :: h_matrix_all_dets (N_det,N_det) + + File: :file:`utils.irp.f` + + H matrix on the basis of the slater determinants defined by psi_det + + + + +.. c:var:: h_matrix_cas + + .. code:: text + + double precision, allocatable :: h_matrix_cas (N_det_cas,N_det_cas) + + File: :file:`psi_cas.irp.f` + + + + + + +.. c:var:: idx_cas + + .. code:: text + + integer(bit_kind), allocatable :: psi_cas (N_int,2,psi_det_size) + double precision, allocatable :: psi_cas_coef (psi_det_size,n_states) + integer, allocatable :: idx_cas (psi_det_size) + integer :: n_det_cas + + File: :file:`psi_cas.irp.f` + + 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. + + + + +.. c:var:: idx_non_cas + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_cas (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_cas_coef (psi_det_size,n_states) + integer, allocatable :: idx_non_cas (psi_det_size) + integer :: n_det_non_cas + + File: :file:`psi_cas.irp.f` + + 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. + + + + +.. c:var:: kinetic_ref_bitmask_energy + + .. code:: text + + double precision :: ref_bitmask_energy + double precision :: mono_elec_ref_bitmask_energy + double precision :: kinetic_ref_bitmask_energy + double precision :: nucl_elec_ref_bitmask_energy + double precision :: bi_elec_ref_bitmask_energy + + File: :file:`ref_bitmask.irp.f` + + Energy of the reference bitmask used in Slater rules + + + + +.. c:var:: l3_weight + + .. code:: text + + double precision, allocatable :: l3_weight (N_states) + + File: :file:`density_matrix.irp.f` + + Weight of the states in the selection : 1/(sum_i |c_i|^3) + + + + +.. c:var:: max_degree_exc + + .. code:: text + + integer :: max_degree_exc + + File: :file:`determinants.irp.f` + + Maximum degree of excitation in the wf + + + + +.. c:var:: mo_energy_expval + + .. code:: text + + double precision, allocatable :: mo_energy_expval (N_states,mo_tot_num,2,2) + + File: :file:`mo_energy_expval.irp.f` + + Third index is spin. Fourth index is 1:creation, 2:annihilation + + + + +.. c:var:: mono_elec_ref_bitmask_energy + + .. code:: text + + double precision :: ref_bitmask_energy + double precision :: mono_elec_ref_bitmask_energy + double precision :: kinetic_ref_bitmask_energy + double precision :: nucl_elec_ref_bitmask_energy + double precision :: bi_elec_ref_bitmask_energy + + File: :file:`ref_bitmask.irp.f` + + Energy of the reference bitmask used in Slater rules + + + + +.. c:var:: n_det + + .. code:: text + + integer :: n_det + + File: :file:`determinants.irp.f` + + Number of determinants in the wave function + + + + +.. c:var:: n_det_alpha_unique + + .. code:: text + + integer(bit_kind), allocatable :: psi_det_alpha_unique (N_int,psi_det_size) + integer :: n_det_alpha_unique + + File: :file:`spindeterminants.irp.f_template_141` + + Unique alpha determinants + + + + +.. c:var:: n_det_beta_unique + + .. code:: text + + integer(bit_kind), allocatable :: psi_det_beta_unique (N_int,psi_det_size) + integer :: n_det_beta_unique + + File: :file:`spindeterminants.irp.f_template_141` + + Unique beta determinants + + + + +.. c:var:: n_det_cas + + .. code:: text + + integer(bit_kind), allocatable :: psi_cas (N_int,2,psi_det_size) + double precision, allocatable :: psi_cas_coef (psi_det_size,n_states) + integer, allocatable :: idx_cas (psi_det_size) + integer :: n_det_cas + + File: :file:`psi_cas.irp.f` + + 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. + + + + +.. c:var:: n_det_non_cas + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_cas (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_cas_coef (psi_det_size,n_states) + integer, allocatable :: idx_non_cas (psi_det_size) + integer :: n_det_non_cas + + File: :file:`psi_cas.irp.f` + + 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. + + + + +.. c:var:: n_double_exc_bitmasks + + .. code:: text + + integer :: n_double_exc_bitmasks + + File: :file:`determinants_bitmasks.irp.f` + + Number of double excitation bitmasks + + + + +.. c:var:: n_occ_pattern + + .. code:: text + + integer(bit_kind), allocatable :: psi_occ_pattern (N_int,2,psi_det_size) + integer :: n_occ_pattern + + File: :file:`occ_pattern.irp.f` + + 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 The occ patterns are sorted by occ_pattern_search_key + + + + +.. c:var:: n_single_exc_bitmasks + + .. code:: text + + integer :: n_single_exc_bitmasks + + File: :file:`determinants_bitmasks.irp.f` + + Number of single excitation bitmasks + + + + +.. c:var:: nucl_elec_ref_bitmask_energy + + .. code:: text + + double precision :: ref_bitmask_energy + double precision :: mono_elec_ref_bitmask_energy + double precision :: kinetic_ref_bitmask_energy + double precision :: nucl_elec_ref_bitmask_energy + double precision :: bi_elec_ref_bitmask_energy + + File: :file:`ref_bitmask.irp.f` + + Energy of the reference bitmask used in Slater rules + + + + +.. c:var:: one_body_dm_ao_alpha + + .. code:: text + + double precision, allocatable :: one_body_dm_ao_alpha (ao_num,ao_num) + double precision, allocatable :: one_body_dm_ao_beta (ao_num,ao_num) + + File: :file:`density_matrix.irp.f` + + one body density matrix on the AO basis : rho_AO(alpha) , rho_AO(beta) + + + + +.. c:var:: one_body_dm_ao_beta + + .. code:: text + + double precision, allocatable :: one_body_dm_ao_alpha (ao_num,ao_num) + double precision, allocatable :: one_body_dm_ao_beta (ao_num,ao_num) + + File: :file:`density_matrix.irp.f` + + one body density matrix on the AO basis : rho_AO(alpha) , rho_AO(beta) + + + + +.. c:var:: one_body_dm_dagger_mo_spin_index + + .. code:: text + + double precision, allocatable :: one_body_dm_dagger_mo_spin_index (mo_tot_num,mo_tot_num,N_states,2) + + File: :file:`density_matrix.irp.f` + + + + + + +.. c:var:: one_body_dm_mo + + .. code:: text + + double precision, allocatable :: one_body_dm_mo (mo_tot_num,mo_tot_num) + + File: :file:`density_matrix.irp.f` + + One-body density matrix + + + + +.. c:var:: one_body_dm_mo_alpha + + .. code:: text + + double precision, allocatable :: one_body_dm_mo_alpha (mo_tot_num,mo_tot_num,N_states) + double precision, allocatable :: one_body_dm_mo_beta (mo_tot_num,mo_tot_num,N_states) + + File: :file:`density_matrix.irp.f` + + Alpha and beta one-body density matrix for each state + + + + +.. c:var:: one_body_dm_mo_alpha_average + + .. code:: text + + double precision, allocatable :: one_body_dm_mo_alpha_average (mo_tot_num,mo_tot_num) + double precision, allocatable :: one_body_dm_mo_beta_average (mo_tot_num,mo_tot_num) + + File: :file:`density_matrix.irp.f` + + Alpha and beta one-body density matrix for each state + + + + +.. c:var:: one_body_dm_mo_alpha_old + + .. code:: text + + double precision, allocatable :: one_body_dm_mo_alpha_old (mo_tot_num,mo_tot_num,N_states) + double precision, allocatable :: one_body_dm_mo_beta_old (mo_tot_num,mo_tot_num,N_states) + + File: :file:`density_matrix.irp.f` + + Alpha and beta one-body density matrix for each state + + + + +.. c:var:: one_body_dm_mo_beta + + .. code:: text + + double precision, allocatable :: one_body_dm_mo_alpha (mo_tot_num,mo_tot_num,N_states) + double precision, allocatable :: one_body_dm_mo_beta (mo_tot_num,mo_tot_num,N_states) + + File: :file:`density_matrix.irp.f` + + Alpha and beta one-body density matrix for each state + + + + +.. c:var:: one_body_dm_mo_beta_average + + .. code:: text + + double precision, allocatable :: one_body_dm_mo_alpha_average (mo_tot_num,mo_tot_num) + double precision, allocatable :: one_body_dm_mo_beta_average (mo_tot_num,mo_tot_num) + + File: :file:`density_matrix.irp.f` + + Alpha and beta one-body density matrix for each state + + + + +.. c:var:: one_body_dm_mo_beta_old + + .. code:: text + + double precision, allocatable :: one_body_dm_mo_alpha_old (mo_tot_num,mo_tot_num,N_states) + double precision, allocatable :: one_body_dm_mo_beta_old (mo_tot_num,mo_tot_num,N_states) + + File: :file:`density_matrix.irp.f` + + Alpha and beta one-body density matrix for each state + + + + +.. c:var:: one_body_dm_mo_diff + + .. code:: text + + double precision, allocatable :: one_body_dm_mo_diff (mo_tot_num,mo_tot_num,2:N_states) + + File: :file:`density_matrix.irp.f` + + Difference of the one-body density matrix with respect to the ground state + + + + +.. c:var:: one_body_dm_mo_spin_index + + .. code:: text + + double precision, allocatable :: one_body_dm_mo_spin_index (mo_tot_num,mo_tot_num,N_states,2) + + File: :file:`density_matrix.irp.f` + + + + + + +.. c:var:: one_body_single_double_dm_mo_alpha + + .. code:: text + + double precision, allocatable :: one_body_single_double_dm_mo_alpha (mo_tot_num,mo_tot_num) + double precision, allocatable :: one_body_single_double_dm_mo_beta (mo_tot_num,mo_tot_num) + + File: :file:`density_matrix.irp.f` + + Alpha and beta one-body density matrix for each state + + + + +.. c:var:: one_body_single_double_dm_mo_beta + + .. code:: text + + double precision, allocatable :: one_body_single_double_dm_mo_alpha (mo_tot_num,mo_tot_num) + double precision, allocatable :: one_body_single_double_dm_mo_beta (mo_tot_num,mo_tot_num) + + File: :file:`density_matrix.irp.f` + + Alpha and beta one-body density matrix for each state + + + + +.. c:var:: one_body_spin_density_ao + + .. code:: text + + double precision, allocatable :: one_body_spin_density_ao (ao_num,ao_num) + + File: :file:`density_matrix.irp.f` + + one body spin density matrix on the AO basis : rho_AO(alpha) - rho_AO(beta) + + + + +.. c:var:: one_body_spin_density_mo + + .. code:: text + + double precision, allocatable :: one_body_spin_density_mo (mo_tot_num,mo_tot_num) + + File: :file:`density_matrix.irp.f` + + rho(alpha) - rho(beta) + + + + +.. c:var:: psi_average_norm_contrib + + .. code:: text + + double precision, allocatable :: psi_average_norm_contrib (psi_det_size) + + File: :file:`determinants.irp.f` + + Contribution of determinants to the state-averaged density + + + + +.. c:var:: psi_average_norm_contrib_sorted + + .. code:: text + + integer(bit_kind), allocatable :: psi_det_sorted (N_int,2,psi_det_size) + double precision, allocatable :: psi_coef_sorted (psi_det_size,N_states) + double precision, allocatable :: psi_average_norm_contrib_sorted (psi_det_size) + integer, allocatable :: psi_det_sorted_order (psi_det_size) + + File: :file:`determinants.irp.f` + + Wave function sorted by determinants contribution to the norm (state-averaged) + psi_det_sorted_order(i) -> k : index in psi_det + + + + +.. c:var:: psi_bilinear_matrix + + .. code:: text + + double precision, allocatable :: psi_bilinear_matrix (N_det_alpha_unique,N_det_beta_unique,N_states) + + File: :file:`spindeterminants.irp.f` + + Coefficient matrix if the wave function is expressed in a bilinear form : D_a^t C D_b + + + + +.. c:var:: psi_bilinear_matrix_columns + + .. code:: text + + double precision, allocatable :: psi_bilinear_matrix_values (N_det,N_states) + integer, allocatable :: psi_bilinear_matrix_rows (N_det) + integer, allocatable :: psi_bilinear_matrix_columns (N_det) + integer, allocatable :: psi_bilinear_matrix_order (N_det) + + File: :file:`spindeterminants.irp.f` + + Sparse coefficient matrix if the wave function is expressed in a bilinear form : D_a^t C D_b + Rows are alpha determinants and columns are beta. + Order refers to psi_det + + + + +.. c:var:: psi_bilinear_matrix_columns_loc + + .. code:: text + + integer, allocatable :: psi_bilinear_matrix_columns_loc (N_det_beta_unique+1) + + File: :file:`spindeterminants.irp.f` + + Sparse coefficient matrix if the wave function is expressed in a bilinear form : D_a^t C D_b + Rows are alpha determinants and columns are beta. + Order refers to psi_det + + + + +.. c:var:: psi_bilinear_matrix_order + + .. code:: text + + double precision, allocatable :: psi_bilinear_matrix_values (N_det,N_states) + integer, allocatable :: psi_bilinear_matrix_rows (N_det) + integer, allocatable :: psi_bilinear_matrix_columns (N_det) + integer, allocatable :: psi_bilinear_matrix_order (N_det) + + File: :file:`spindeterminants.irp.f` + + Sparse coefficient matrix if the wave function is expressed in a bilinear form : D_a^t C D_b + Rows are alpha determinants and columns are beta. + Order refers to psi_det + + + + +.. c:var:: psi_bilinear_matrix_order_reverse + + .. code:: text + + integer, allocatable :: psi_bilinear_matrix_order_reverse (N_det) + + File: :file:`spindeterminants.irp.f` + + Order which allows to go from psi_bilinear_matrix to psi_det + + + + +.. c:var:: psi_bilinear_matrix_order_transp_reverse + + .. code:: text + + integer, allocatable :: psi_bilinear_matrix_order_transp_reverse (N_det) + + File: :file:`spindeterminants.irp.f` + + Order which allows to go from psi_bilinear_matrix_order_transp to psi_bilinear_matrix + + + + +.. c:var:: psi_bilinear_matrix_rows + + .. code:: text + + double precision, allocatable :: psi_bilinear_matrix_values (N_det,N_states) + integer, allocatable :: psi_bilinear_matrix_rows (N_det) + integer, allocatable :: psi_bilinear_matrix_columns (N_det) + integer, allocatable :: psi_bilinear_matrix_order (N_det) + + File: :file:`spindeterminants.irp.f` + + Sparse coefficient matrix if the wave function is expressed in a bilinear form : D_a^t C D_b + Rows are alpha determinants and columns are beta. + Order refers to psi_det + + + + +.. c:var:: psi_bilinear_matrix_transp_columns + + .. code:: text + + double precision, allocatable :: psi_bilinear_matrix_transp_values (N_det,N_states) + integer, allocatable :: psi_bilinear_matrix_transp_rows (N_det) + integer, allocatable :: psi_bilinear_matrix_transp_columns (N_det) + integer, allocatable :: psi_bilinear_matrix_transp_order (N_det) + + File: :file:`spindeterminants.irp.f` + + Transpose of psi_bilinear_matrix D_b^t C^t D_a + Rows are Alpha determinants and columns are beta, but the matrix is stored in row major format + + + + +.. c:var:: psi_bilinear_matrix_transp_order + + .. code:: text + + double precision, allocatable :: psi_bilinear_matrix_transp_values (N_det,N_states) + integer, allocatable :: psi_bilinear_matrix_transp_rows (N_det) + integer, allocatable :: psi_bilinear_matrix_transp_columns (N_det) + integer, allocatable :: psi_bilinear_matrix_transp_order (N_det) + + File: :file:`spindeterminants.irp.f` + + Transpose of psi_bilinear_matrix D_b^t C^t D_a + Rows are Alpha determinants and columns are beta, but the matrix is stored in row major format + + + + +.. c:var:: psi_bilinear_matrix_transp_rows + + .. code:: text + + double precision, allocatable :: psi_bilinear_matrix_transp_values (N_det,N_states) + integer, allocatable :: psi_bilinear_matrix_transp_rows (N_det) + integer, allocatable :: psi_bilinear_matrix_transp_columns (N_det) + integer, allocatable :: psi_bilinear_matrix_transp_order (N_det) + + File: :file:`spindeterminants.irp.f` + + Transpose of psi_bilinear_matrix D_b^t C^t D_a + Rows are Alpha determinants and columns are beta, but the matrix is stored in row major format + + + + +.. c:var:: psi_bilinear_matrix_transp_rows_loc + + .. code:: text + + integer, allocatable :: psi_bilinear_matrix_transp_rows_loc (N_det_alpha_unique+1) + + File: :file:`spindeterminants.irp.f` + + Location of the columns in the psi_bilinear_matrix + + + + +.. c:var:: psi_bilinear_matrix_transp_values + + .. code:: text + + double precision, allocatable :: psi_bilinear_matrix_transp_values (N_det,N_states) + integer, allocatable :: psi_bilinear_matrix_transp_rows (N_det) + integer, allocatable :: psi_bilinear_matrix_transp_columns (N_det) + integer, allocatable :: psi_bilinear_matrix_transp_order (N_det) + + File: :file:`spindeterminants.irp.f` + + Transpose of psi_bilinear_matrix D_b^t C^t D_a + Rows are Alpha determinants and columns are beta, but the matrix is stored in row major format + + + + +.. c:var:: psi_bilinear_matrix_values + + .. code:: text + + double precision, allocatable :: psi_bilinear_matrix_values (N_det,N_states) + integer, allocatable :: psi_bilinear_matrix_rows (N_det) + integer, allocatable :: psi_bilinear_matrix_columns (N_det) + integer, allocatable :: psi_bilinear_matrix_order (N_det) + + File: :file:`spindeterminants.irp.f` + + Sparse coefficient matrix if the wave function is expressed in a bilinear form : D_a^t C D_b + Rows are alpha determinants and columns are beta. + Order refers to psi_det + + + + +.. c:var:: psi_cas + + .. code:: text + + integer(bit_kind), allocatable :: psi_cas (N_int,2,psi_det_size) + double precision, allocatable :: psi_cas_coef (psi_det_size,n_states) + integer, allocatable :: idx_cas (psi_det_size) + integer :: n_det_cas + + File: :file:`psi_cas.irp.f` + + 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. + + + + +.. c:var:: psi_cas_coef + + .. code:: text + + integer(bit_kind), allocatable :: psi_cas (N_int,2,psi_det_size) + double precision, allocatable :: psi_cas_coef (psi_det_size,n_states) + integer, allocatable :: idx_cas (psi_det_size) + integer :: n_det_cas + + File: :file:`psi_cas.irp.f` + + 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. + + + + +.. c:var:: psi_cas_coef_sorted_bit + + .. code:: text + + integer(bit_kind), allocatable :: psi_cas_sorted_bit (N_int,2,psi_det_size) + double precision, allocatable :: psi_cas_coef_sorted_bit (psi_det_size,N_states) + + File: :file:`psi_cas.irp.f` + + CAS determinants sorted to accelerate the search of a random determinant in the wave function. + + + + +.. c:var:: psi_cas_energy + + .. code:: text + + double precision, allocatable :: psi_cas_energy (N_states) + + File: :file:`psi_cas.irp.f` + + + + + + +.. c:var:: psi_cas_energy_diagonalized + + .. code:: text + + double precision, allocatable :: psi_coef_cas_diagonalized (N_det_cas,N_states) + double precision, allocatable :: psi_cas_energy_diagonalized (N_states) + + File: :file:`psi_cas.irp.f` + + + + + + +.. c:var:: psi_cas_sorted_bit + + .. code:: text + + integer(bit_kind), allocatable :: psi_cas_sorted_bit (N_int,2,psi_det_size) + double precision, allocatable :: psi_cas_coef_sorted_bit (psi_det_size,N_states) + + File: :file:`psi_cas.irp.f` + + CAS determinants sorted to accelerate the search of a random determinant in the wave function. + + + + +.. c:var:: psi_coef + + .. code:: text + + double precision, allocatable :: psi_coef (psi_det_size,N_states) + + File: :file:`determinants.irp.f` + + The wave function coefficients. Initialized with Hartree-Fock if the EZFIO file is empty + + + + +.. c:var:: psi_coef_cas_diagonalized + + .. code:: text + + double precision, allocatable :: psi_coef_cas_diagonalized (N_det_cas,N_states) + double precision, allocatable :: psi_cas_energy_diagonalized (N_states) + + File: :file:`psi_cas.irp.f` + + + + + + +.. c:var:: psi_coef_max + + .. code:: text + + double precision, allocatable :: psi_coef_max (N_states) + double precision, allocatable :: psi_coef_min (N_states) + double precision, allocatable :: abs_psi_coef_max (N_states) + double precision, allocatable :: abs_psi_coef_min (N_states) + + File: :file:`determinants.irp.f` + + Max and min values of the coefficients + + + + +.. c:var:: psi_coef_min + + .. code:: text + + double precision, allocatable :: psi_coef_max (N_states) + double precision, allocatable :: psi_coef_min (N_states) + double precision, allocatable :: abs_psi_coef_max (N_states) + double precision, allocatable :: abs_psi_coef_min (N_states) + + File: :file:`determinants.irp.f` + + Max and min values of the coefficients + + + + +.. c:var:: psi_coef_sorted + + .. code:: text + + integer(bit_kind), allocatable :: psi_det_sorted (N_int,2,psi_det_size) + double precision, allocatable :: psi_coef_sorted (psi_det_size,N_states) + double precision, allocatable :: psi_average_norm_contrib_sorted (psi_det_size) + integer, allocatable :: psi_det_sorted_order (psi_det_size) + + File: :file:`determinants.irp.f` + + Wave function sorted by determinants contribution to the norm (state-averaged) + psi_det_sorted_order(i) -> k : index in psi_det + + + + +.. c:var:: psi_coef_sorted_bit + + .. code:: text + + integer(bit_kind), allocatable :: psi_det_sorted_bit (N_int,2,psi_det_size) + double precision, allocatable :: psi_coef_sorted_bit (psi_det_size,N_states) + + File: :file:`determinants.irp.f` + + 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. + + + + +.. c:var:: psi_det + + .. code:: text + + integer(bit_kind), allocatable :: psi_det (N_int,2,psi_det_size) + + File: :file:`determinants.irp.f` + + The wave function determinants. Initialized with Hartree-Fock if the EZFIO file is empty + + + + +.. c:var:: psi_det_alpha + + .. code:: text + + integer(bit_kind), allocatable :: psi_det_alpha (N_int,psi_det_size) + + File: :file:`spindeterminants.irp.f` + + List of alpha determinants of psi_det + + + + +.. c:var:: psi_det_alpha_unique + + .. code:: text + + integer(bit_kind), allocatable :: psi_det_alpha_unique (N_int,psi_det_size) + integer :: n_det_alpha_unique + + File: :file:`spindeterminants.irp.f_template_141` + + Unique alpha determinants + + + + +.. c:var:: psi_det_beta + + .. code:: text + + integer(bit_kind), allocatable :: psi_det_beta (N_int,psi_det_size) + + File: :file:`spindeterminants.irp.f` + + List of beta determinants of psi_det + + + + +.. c:var:: psi_det_beta_unique + + .. code:: text + + integer(bit_kind), allocatable :: psi_det_beta_unique (N_int,psi_det_size) + integer :: n_det_beta_unique + + File: :file:`spindeterminants.irp.f_template_141` + + Unique beta determinants + + + + +.. c:var:: psi_det_hii + + .. code:: text + + double precision, allocatable :: psi_det_hii (N_det) + + File: :file:`determinants.irp.f` + + for all determinants. + + + + +.. c:var:: psi_det_size + + .. code:: text + + integer :: psi_det_size + + File: :file:`determinants.irp.f` + + Size of the psi_det/psi_coef arrays + + + + +.. c:var:: psi_det_sorted + + .. code:: text + + integer(bit_kind), allocatable :: psi_det_sorted (N_int,2,psi_det_size) + double precision, allocatable :: psi_coef_sorted (psi_det_size,N_states) + double precision, allocatable :: psi_average_norm_contrib_sorted (psi_det_size) + integer, allocatable :: psi_det_sorted_order (psi_det_size) + + File: :file:`determinants.irp.f` + + Wave function sorted by determinants contribution to the norm (state-averaged) + psi_det_sorted_order(i) -> k : index in psi_det + + + + +.. c:var:: psi_det_sorted_bit + + .. code:: text + + integer(bit_kind), allocatable :: psi_det_sorted_bit (N_int,2,psi_det_size) + double precision, allocatable :: psi_coef_sorted_bit (psi_det_size,N_states) + + File: :file:`determinants.irp.f` + + 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. + + + + +.. c:var:: psi_det_sorted_order + + .. code:: text + + integer(bit_kind), allocatable :: psi_det_sorted (N_int,2,psi_det_size) + double precision, allocatable :: psi_coef_sorted (psi_det_size,N_states) + double precision, allocatable :: psi_average_norm_contrib_sorted (psi_det_size) + integer, allocatable :: psi_det_sorted_order (psi_det_size) + + File: :file:`determinants.irp.f` + + Wave function sorted by determinants contribution to the norm (state-averaged) + psi_det_sorted_order(i) -> k : index in psi_det + + + + +.. c:var:: psi_non_cas + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_cas (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_cas_coef (psi_det_size,n_states) + integer, allocatable :: idx_non_cas (psi_det_size) + integer :: n_det_non_cas + + File: :file:`psi_cas.irp.f` + + 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. + + + + +.. c:var:: psi_non_cas_coef + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_cas (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_cas_coef (psi_det_size,n_states) + integer, allocatable :: idx_non_cas (psi_det_size) + integer :: n_det_non_cas + + File: :file:`psi_cas.irp.f` + + 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. + + + + +.. c:var:: psi_non_cas_coef_sorted_bit + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_cas_sorted_bit (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_cas_coef_sorted_bit (psi_det_size,N_states) + + File: :file:`psi_cas.irp.f` + + CAS determinants sorted to accelerate the search of a random determinant in the wave function. + + + + +.. c:var:: psi_non_cas_sorted_bit + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_cas_sorted_bit (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_cas_coef_sorted_bit (psi_det_size,N_states) + + File: :file:`psi_cas.irp.f` + + CAS determinants sorted to accelerate the search of a random determinant in the wave function. + + + + +.. c:var:: psi_occ_pattern + + .. code:: text + + integer(bit_kind), allocatable :: psi_occ_pattern (N_int,2,psi_det_size) + integer :: n_occ_pattern + + File: :file:`occ_pattern.irp.f` + + 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 The occ patterns are sorted by occ_pattern_search_key + + + + +.. c:var:: psi_occ_pattern_hii + + .. code:: text + + double precision, allocatable :: psi_occ_pattern_hii (N_occ_pattern) + + File: :file:`occ_pattern.irp.f` + + where |I> is an occupation pattern. This is the minimum Hii of all , where the |i> are the determinants if oI> + + + + +.. c:var:: ref_bitmask_energy + + .. code:: text + + double precision :: ref_bitmask_energy + double precision :: mono_elec_ref_bitmask_energy + double precision :: kinetic_ref_bitmask_energy + double precision :: nucl_elec_ref_bitmask_energy + double precision :: bi_elec_ref_bitmask_energy + + File: :file:`ref_bitmask.irp.f` + + Energy of the reference bitmask used in Slater rules + + + + +.. c:var:: ref_closed_shell_bitmask + + .. code:: text + + integer(bit_kind), allocatable :: ref_closed_shell_bitmask (N_int,2) + + File: :file:`mono_excitations.irp.f` + + + + + + +.. c:var:: s2_values + + .. code:: text + + double precision, allocatable :: s2_values (N_states) + + File: :file:`s2.irp.f` + + array of the averaged values of the S^2 operator on the various states + + + + +.. c:var:: s_z + + .. code:: text + + double precision :: s_z + double precision :: s_z2_sz + + File: :file:`s2.irp.f` + + z component of the Spin + + + + +.. c:var:: s_z2_sz + + .. code:: text + + double precision :: s_z + double precision :: s_z2_sz + + File: :file:`s2.irp.f` + + z component of the Spin + + + + +.. c:var:: single_exc_bitmask + + .. code:: text + + integer(bit_kind), allocatable :: single_exc_bitmask (N_int,2,N_single_exc_bitmasks) + + File: :file:`determinants_bitmasks.irp.f` + + 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. + + + + +.. c:var:: singles_alpha_csc + + .. code:: text + + integer, allocatable :: singles_alpha_csc (singles_alpha_csc_size) + + File: :file:`spindeterminants.irp.f` + + Dimension of the singles_alpha array + + + + +.. c:var:: singles_alpha_csc_idx + + .. code:: text + + integer*8, allocatable :: singles_alpha_csc_idx (N_det_alpha_unique+1) + integer*8 :: singles_alpha_csc_size + + File: :file:`spindeterminants.irp.f` + + Dimension of the singles_alpha array + + + + +.. c:var:: singles_alpha_csc_size + + .. code:: text + + integer*8, allocatable :: singles_alpha_csc_idx (N_det_alpha_unique+1) + integer*8 :: singles_alpha_csc_size + + File: :file:`spindeterminants.irp.f` + + Dimension of the singles_alpha array + + + + +.. c:var:: singles_alpha_size + + .. code:: text + + integer :: singles_alpha_size + + File: :file:`spindeterminants.irp.f` + + Dimension of the singles_alpha array + + + + +.. c:var:: state_average_weight + + .. code:: text + + double precision, allocatable :: state_average_weight (N_states) + + File: :file:`density_matrix.irp.f` + + Weights in the state-average calculation of the density matrix + + + + +.. c:var:: two_body_dm_ab_big_array_act + + .. code:: text + + double precision, allocatable :: two_body_dm_ab_big_array_act (n_act_orb,n_act_orb,n_act_orb,n_act_orb) + double precision, allocatable :: two_body_dm_ab_big_array_core_act (n_core_orb_allocate,n_act_orb,n_act_orb) + + File: :file:`two_body_dm_map.irp.f` + + 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 + 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) + + + + +.. c:var:: two_body_dm_ab_big_array_core_act + + .. code:: text + + double precision, allocatable :: two_body_dm_ab_big_array_act (n_act_orb,n_act_orb,n_act_orb,n_act_orb) + double precision, allocatable :: two_body_dm_ab_big_array_core_act (n_core_orb_allocate,n_act_orb,n_act_orb) + + File: :file:`two_body_dm_map.irp.f` + + 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 + 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) + + + + +.. c:var:: two_body_dm_ab_diag_act + + .. code:: text + + double precision, allocatable :: two_body_dm_ab_diag_act (n_act_orb,n_act_orb) + double precision, allocatable :: two_body_dm_ab_diag_inact (n_inact_orb_allocate,n_inact_orb_allocate) + double precision, allocatable :: two_body_dm_ab_diag_core (n_core_orb_allocate,n_core_orb_allocate) + double precision, allocatable :: two_body_dm_ab_diag_all (mo_tot_num,mo_tot_num) + double precision, allocatable :: two_body_dm_diag_core_a_act_b (n_core_orb_allocate,n_act_orb) + double precision, allocatable :: two_body_dm_diag_core_b_act_a (n_core_orb_allocate,n_act_orb) + double precision, allocatable :: two_body_dm_diag_core_act (n_core_orb_allocate,n_act_orb) + + File: :file:`two_body_dm_map.irp.f` + + 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) + + + + +.. c:var:: two_body_dm_ab_diag_all + + .. code:: text + + double precision, allocatable :: two_body_dm_ab_diag_act (n_act_orb,n_act_orb) + double precision, allocatable :: two_body_dm_ab_diag_inact (n_inact_orb_allocate,n_inact_orb_allocate) + double precision, allocatable :: two_body_dm_ab_diag_core (n_core_orb_allocate,n_core_orb_allocate) + double precision, allocatable :: two_body_dm_ab_diag_all (mo_tot_num,mo_tot_num) + double precision, allocatable :: two_body_dm_diag_core_a_act_b (n_core_orb_allocate,n_act_orb) + double precision, allocatable :: two_body_dm_diag_core_b_act_a (n_core_orb_allocate,n_act_orb) + double precision, allocatable :: two_body_dm_diag_core_act (n_core_orb_allocate,n_act_orb) + + File: :file:`two_body_dm_map.irp.f` + + 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) + + + + +.. c:var:: two_body_dm_ab_diag_core + + .. code:: text + + double precision, allocatable :: two_body_dm_ab_diag_act (n_act_orb,n_act_orb) + double precision, allocatable :: two_body_dm_ab_diag_inact (n_inact_orb_allocate,n_inact_orb_allocate) + double precision, allocatable :: two_body_dm_ab_diag_core (n_core_orb_allocate,n_core_orb_allocate) + double precision, allocatable :: two_body_dm_ab_diag_all (mo_tot_num,mo_tot_num) + double precision, allocatable :: two_body_dm_diag_core_a_act_b (n_core_orb_allocate,n_act_orb) + double precision, allocatable :: two_body_dm_diag_core_b_act_a (n_core_orb_allocate,n_act_orb) + double precision, allocatable :: two_body_dm_diag_core_act (n_core_orb_allocate,n_act_orb) + + File: :file:`two_body_dm_map.irp.f` + + 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) + + + + +.. c:var:: two_body_dm_ab_diag_inact + + .. code:: text + + double precision, allocatable :: two_body_dm_ab_diag_act (n_act_orb,n_act_orb) + double precision, allocatable :: two_body_dm_ab_diag_inact (n_inact_orb_allocate,n_inact_orb_allocate) + double precision, allocatable :: two_body_dm_ab_diag_core (n_core_orb_allocate,n_core_orb_allocate) + double precision, allocatable :: two_body_dm_ab_diag_all (mo_tot_num,mo_tot_num) + double precision, allocatable :: two_body_dm_diag_core_a_act_b (n_core_orb_allocate,n_act_orb) + double precision, allocatable :: two_body_dm_diag_core_b_act_a (n_core_orb_allocate,n_act_orb) + double precision, allocatable :: two_body_dm_diag_core_act (n_core_orb_allocate,n_act_orb) + + File: :file:`two_body_dm_map.irp.f` + + 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) + + + + +.. c:var:: two_body_dm_ab_map + + .. code:: text + + type(map_type) :: two_body_dm_ab_map + + File: :file:`two_body_dm_map.irp.f` + + Map of the two body density matrix elements for the alpha/beta elements + + + + +.. c:var:: two_body_dm_diag_core_a_act_b + + .. code:: text + + double precision, allocatable :: two_body_dm_ab_diag_act (n_act_orb,n_act_orb) + double precision, allocatable :: two_body_dm_ab_diag_inact (n_inact_orb_allocate,n_inact_orb_allocate) + double precision, allocatable :: two_body_dm_ab_diag_core (n_core_orb_allocate,n_core_orb_allocate) + double precision, allocatable :: two_body_dm_ab_diag_all (mo_tot_num,mo_tot_num) + double precision, allocatable :: two_body_dm_diag_core_a_act_b (n_core_orb_allocate,n_act_orb) + double precision, allocatable :: two_body_dm_diag_core_b_act_a (n_core_orb_allocate,n_act_orb) + double precision, allocatable :: two_body_dm_diag_core_act (n_core_orb_allocate,n_act_orb) + + File: :file:`two_body_dm_map.irp.f` + + 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) + + + + +.. c:var:: two_body_dm_diag_core_act + + .. code:: text + + double precision, allocatable :: two_body_dm_ab_diag_act (n_act_orb,n_act_orb) + double precision, allocatable :: two_body_dm_ab_diag_inact (n_inact_orb_allocate,n_inact_orb_allocate) + double precision, allocatable :: two_body_dm_ab_diag_core (n_core_orb_allocate,n_core_orb_allocate) + double precision, allocatable :: two_body_dm_ab_diag_all (mo_tot_num,mo_tot_num) + double precision, allocatable :: two_body_dm_diag_core_a_act_b (n_core_orb_allocate,n_act_orb) + double precision, allocatable :: two_body_dm_diag_core_b_act_a (n_core_orb_allocate,n_act_orb) + double precision, allocatable :: two_body_dm_diag_core_act (n_core_orb_allocate,n_act_orb) + + File: :file:`two_body_dm_map.irp.f` + + 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) + + + + +.. c:var:: two_body_dm_diag_core_b_act_a + + .. code:: text + + double precision, allocatable :: two_body_dm_ab_diag_act (n_act_orb,n_act_orb) + double precision, allocatable :: two_body_dm_ab_diag_inact (n_inact_orb_allocate,n_inact_orb_allocate) + double precision, allocatable :: two_body_dm_ab_diag_core (n_core_orb_allocate,n_core_orb_allocate) + double precision, allocatable :: two_body_dm_ab_diag_all (mo_tot_num,mo_tot_num) + double precision, allocatable :: two_body_dm_diag_core_a_act_b (n_core_orb_allocate,n_act_orb) + double precision, allocatable :: two_body_dm_diag_core_b_act_a (n_core_orb_allocate,n_act_orb) + double precision, allocatable :: two_body_dm_diag_core_act (n_core_orb_allocate,n_act_orb) + + File: :file:`two_body_dm_map.irp.f` + + 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) + + + + +.. c:var:: two_body_dm_in_map + + .. code:: text + + logical :: two_body_dm_in_map + + File: :file:`two_body_dm_map.irp.f` + + If True, the map of the two body density matrix alpha/beta is provided + + + + +.. c:var:: weight_occ_pattern + + .. code:: text + + double precision, allocatable :: weight_occ_pattern (N_occ_pattern,N_states) + + File: :file:`occ_pattern.irp.f` + + Weight of the occupation patterns in the wave function + + + + +Subroutines / functions +----------------------- + + + +.. c:function:: a_operator + + .. code:: text + + subroutine a_operator(iorb,ispin,key,hjj,Nint,na,nb) + + File: :file:`slater_rules.irp.f` + + Needed for diag_H_mat_elem + + + + + +.. c:function:: ac_operator + + .. code:: text + + subroutine ac_operator(iorb,ispin,key,hjj,Nint,na,nb) + + File: :file:`slater_rules.irp.f` + + Needed for diag_H_mat_elem + + + + + +.. c:function:: add_values_to_two_body_dm_map + + .. code:: text + + subroutine add_values_to_two_body_dm_map(mask_ijkl) + + File: :file:`two_body_dm_map.irp.f` + + Adds values to the map of two_body_dm according to some bitmask + + + + + +.. c:function:: apply_excitation + + .. code:: text + + subroutine apply_excitation(det, exc, res, ok, Nint) + + File: :file:`determinants.irp.f` + + + + + + + +.. c:function:: apply_hole + + .. code:: text + + subroutine apply_hole(det, s1, h1, res, ok, Nint) + + File: :file:`determinants.irp.f` + + + + + + + +.. c:function:: apply_holes + + .. code:: text + + subroutine apply_holes(det, s1, h1, s2, h2, res, ok, Nint) + + File: :file:`determinants.irp.f` + + + + + + + +.. c:function:: apply_mono + + .. code:: text + + subroutine apply_mono(i_hole,i_particle,ispin_excit,key_in,Nint) + + File: :file:`excitations_utils.irp.f` + + + + + + + +.. c:function:: apply_particle + + .. code:: text + + subroutine apply_particle(det, s1, p1, res, ok, Nint) + + File: :file:`determinants.irp.f` + + + + + + + +.. c:function:: apply_particles + + .. code:: text + + subroutine apply_particles(det, s1, p1, s2, p2, res, ok, Nint) + + File: :file:`determinants.irp.f` + + + + + + + +.. c:function:: au0_h_au0 + + .. code:: text + + subroutine au0_h_au0(energies,psi_in,psi_in_coef,ndet,dim_psi_coef) + + File: :file:`mo_energy_expval.irp.f` + + + + + + + +.. c:function:: bitstring_to_list_ab + + .. code:: text + + subroutine bitstring_to_list_ab( string, list, n_elements, Nint) + + File: :file:`slater_rules.irp.f` + + Gives the inidices(+1) of the bits set to 1 in the bit string For alpha/beta determinants + + + + + +.. c:function:: bitstring_to_list_ab_old + + .. code:: text + + subroutine bitstring_to_list_ab_old( string, list, n_elements, Nint) + + File: :file:`slater_rules.irp.f` + + Gives the inidices(+1) of the bits set to 1 in the bit string For alpha/beta determinants + + + + + +.. c:function:: build_fock_tmp + + .. code:: text + + subroutine build_fock_tmp(fock_diag_tmp,det_ref,Nint) + + File: :file:`Fock_diag.irp.f` + + Build the diagonal of the Fock matrix corresponding to a generator determinant. F_00 is = E0. + + + + + +.. c:function:: clear_bit_to_integer + + .. code:: text + + subroutine clear_bit_to_integer(i_physical,key,Nint) + + File: :file:`create_excitations.irp.f` + + + + + + + +.. c:function:: compute_diag_two_body_dm_ab + + .. code:: text + + double precision function compute_diag_two_body_dm_ab(r1,r2) + + File: :file:`two_body_dm_map.irp.f` + + + + + + + +.. c:function:: compute_diag_two_body_dm_ab_act + + .. code:: text + + double precision function compute_diag_two_body_dm_ab_act(r1,r2) + + File: :file:`two_body_dm_map.irp.f` + + + + + + + +.. c:function:: compute_diag_two_body_dm_ab_core + + .. code:: text + + double precision function compute_diag_two_body_dm_ab_core(r1,r2) + + File: :file:`two_body_dm_map.irp.f` + + + + + + + +.. c:function:: compute_diag_two_body_dm_ab_core_act + + .. code:: text + + double precision function compute_diag_two_body_dm_ab_core_act(r1,r2) + + File: :file:`two_body_dm_map.irp.f` + + + + + + + +.. c:function:: compute_extra_diag_two_body_dm_ab + + .. code:: text + + double precision function compute_extra_diag_two_body_dm_ab(r1,r2) + + File: :file:`two_body_dm_map.irp.f` + + compute the extra diagonal contribution to the alpha/bet two body density at r1, r2 + + + + + +.. c:function:: compute_extra_diag_two_body_dm_ab_act + + .. code:: text + + double precision function compute_extra_diag_two_body_dm_ab_act(r1,r2) + + File: :file:`two_body_dm_map.irp.f` + + 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 + + + + + +.. c:function:: compute_extra_diag_two_body_dm_ab_core_act + + .. code:: text + + double precision function compute_extra_diag_two_body_dm_ab_core_act(r1,r2) + + File: :file:`two_body_dm_map.irp.f` + + 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 + + + + + +.. c:function:: connected_to_ref + + .. code:: text + + integer function connected_to_ref(key,keys,Nint,N_past_in,Ndet) + + File: :file:`connected_to_ref.irp.f` + + + + + + + +.. c:function:: connected_to_ref_by_mono + + .. code:: text + + integer function connected_to_ref_by_mono(key,keys,Nint,N_past_in,Ndet) + + File: :file:`connected_to_ref.irp.f` + + + + + + + +.. c:function:: copy_h_apply_buffer_to_wf + + .. code:: text + + subroutine copy_H_apply_buffer_to_wf + + File: :file:`H_apply.irp.f` + + Copies the H_apply buffer to psi_coef. After calling this subroutine, N_det, psi_det and psi_coef need to be touched + + + + + +.. c:function:: copy_psi_bilinear_to_psi + + .. code:: text + + subroutine copy_psi_bilinear_to_psi(psi, isize) + + File: :file:`spindeterminants.irp.f` + + Overwrites psi_det and psi_coef with the wf in bilinear order + + + + + +.. c:function:: create_microlist + + .. code:: text + + subroutine create_microlist(minilist, N_minilist, key_mask, microlist, idx_microlist, N_microlist, ptr_microlist, Nint) + + File: :file:`filter_connected.irp.f` + + + + + + + +.. c:function:: create_minilist + + .. code:: text + + subroutine create_minilist(key_mask, fullList, miniList, idx_miniList, N_fullList, N_miniList, Nint) + + File: :file:`slater_rules.irp.f` + + + + + + + +.. c:function:: create_minilist_find_previous + + .. code:: text + + subroutine create_minilist_find_previous(key_mask, fullList, miniList, N_fullList, N_miniList, fullMatch, Nint) + + File: :file:`slater_rules.irp.f` + + + + + + + +.. c:function:: create_wf_of_psi_bilinear_matrix + + .. code:: text + + subroutine create_wf_of_psi_bilinear_matrix(truncate) + + File: :file:`spindeterminants.irp.f` + + Generate a wave function containing all possible products of alpha and beta determinants + + + + + +.. c:function:: decode_exc + + .. code:: text + + subroutine decode_exc(exc,degree,h1,p1,h2,p2,s1,s2) + + File: :file:`slater_rules.irp.f` + + 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 + + + + + +.. c:function:: decode_exc_spin + + .. code:: text + + subroutine decode_exc_spin(exc,h1,p1,h2,p2) + + File: :file:`slater_rules.irp.f` + + Decodes the exc arrays returned by get_excitation. h1,h2 : Holes p1,p2 : Particles + + + + + +.. c:function:: decode_exc_spin_new + + .. code:: text + + subroutine decode_exc_spin_new(exc,h1,p1,h2,p2) + + File: :file:`slater_rules.irp.f` + + Decodes the exc arrays returned by get_excitation. h1,h2 : Holes p1,p2 : Particles + + + + + +.. c:function:: det_inf + + .. code:: text + + logical function det_inf(key1, key2, Nint) + + File: :file:`sort_dets_ab.irp.f` + + Ordering function for determinants + + + + + +.. c:function:: det_search_key + + .. code:: text + + integer*8 function det_search_key(det,Nint) + + File: :file:`connected_to_ref.irp.f` + + Return an integer*8 corresponding to a determinant index for searching + + + + + +.. c:function:: detcmp + + .. code:: text + + integer function detCmp(a,b,Nint) + + File: :file:`determinants.irp.f` + + + + + + + +.. c:function:: deteq + + .. code:: text + + logical function detEq(a,b,Nint) + + File: :file:`determinants.irp.f` + + + + + + + +.. c:function:: diag_h_mat_elem + + .. code:: text + + double precision function diag_H_mat_elem(det_in,Nint) + + File: :file:`slater_rules.irp.f` + + Computes + + + + + +.. c:function:: diag_h_mat_elem_au0_h_au0 + + .. code:: text + + subroutine diag_H_mat_elem_au0_h_au0(det_in,Nint,hii) + + File: :file:`mo_energy_expval.irp.f` + + Computes for any determinant i. Used for wave functions with an additional electron. + + + + + +.. c:function:: diag_h_mat_elem_fock + + .. code:: text + + double precision function diag_H_mat_elem_fock(det_ref,det_pert,fock_diag_tmp,Nint) + + File: :file:`slater_rules.irp.f` + + Computes when i is at most a double excitation from a reference. + + + + + +.. c:function:: diag_s_mat_elem + + .. code:: text + + double precision function diag_S_mat_elem(key_i,Nint) + + File: :file:`s2.irp.f` + + Returns + + + + + +.. c:function:: diagonalize_s2_betweenstates + + .. code:: text + + subroutine diagonalize_s2_betweenstates(keys_tmp,u_0,n,nmax_keys,nmax_coefs,nstates,s2_eigvalues) + + File: :file:`s2.irp.f` + + 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 + + + + + +.. c:function:: do_mono_excitation + + .. code:: text + + subroutine do_mono_excitation(key_in,i_hole,i_particle,ispin,i_ok) + + File: :file:`create_excitations.irp.f` + + 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 + + + + + +.. c:function:: do_spin_flip + + .. code:: text + + subroutine do_spin_flip(key_in,i_flip,ispin,i_ok) + + File: :file:`create_excitations.irp.f` + + 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 + + + + + +.. c:function:: doubly_occ_empty_in_couple + + .. code:: text + + subroutine doubly_occ_empty_in_couple(det_in,n_couples,couples,couples_out) + + File: :file:`useful_for_ovb.irp.f` + + 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 + + + + + +.. c:function:: doubly_occ_empty_in_couple_and_no_hund_elsewhere + + .. code:: text + + subroutine doubly_occ_empty_in_couple_and_no_hund_elsewhere(det_in,n_couple_no_hund,couple_ion,couple_no_hund,is_ok) + + File: :file:`useful_for_ovb.irp.f` + + 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 + + + + + +.. c:function:: fill_h_apply_buffer_no_selection + + .. code:: text + + subroutine fill_H_apply_buffer_no_selection(n_selected,det_buffer,Nint,iproc) + + File: :file:`H_apply.irp.f` + + Fill the H_apply buffer with determiants for CISD + + + + + +.. c:function:: filter_connected + + .. code:: text + + subroutine filter_connected(key1,key2,Nint,sze,idx) + + File: :file:`filter_connected.irp.f` + + Filters out the determinants that are not connected by H + returns the array idx which contains the index of the + determinants in the array key1 that interact + via the H operator with key2. + idx(0) is the number of determinants that interact with key1 + + + + + +.. c:function:: filter_connected_i_h_psi0 + + .. code:: text + + subroutine filter_connected_i_H_psi0(key1,key2,Nint,sze,idx) + + File: :file:`filter_connected.irp.f` + + returns the array idx which contains the index of the + determinants in the array key1 that interact + via the H operator with key2. + idx(0) is the number of determinants that interact with key1 + + + + + +.. c:function:: filter_connected_i_h_psi0_sc2 + + .. code:: text + + subroutine filter_connected_i_H_psi0_SC2(key1,key2,Nint,sze,idx,idx_repeat) + + File: :file:`filter_connected.irp.f` + + standard filter_connected_i_H_psi but returns in addition + the array of the index of the non connected determinants to key1 + in order to know what double excitation can be repeated on key1 + idx_repeat(0) is the number of determinants that can be used + to repeat the excitations + + + + + +.. c:function:: filter_not_connected + + .. code:: text + + subroutine filter_not_connected(key1,key2,Nint,sze,idx) + + File: :file:`filter_connected.irp.f` + + Returns the array idx which contains the index of the + determinants in the array key1 that DO NOT interact + via the H operator with key2. + idx(0) is the number of determinants that DO NOT interact with key1 + + + + + +.. c:function:: flip_generators + + .. code:: text + + subroutine flip_generators() + + File: :file:`determinants.irp.f` + + + + + + + +.. c:function:: generate_all_alpha_beta_det_products + + .. code:: text + + subroutine generate_all_alpha_beta_det_products + + File: :file:`spindeterminants.irp.f` + + Create a wave function from all possible alpha x beta determinants + + + + + +.. c:function:: get_all_spin_doubles + + .. code:: text + + subroutine get_all_spin_doubles(buffer, idx, spindet, Nint, size_buffer, doubles, n_doubles) + + File: :file:`spindeterminants.irp.f` + + + Returns the indices of all the double excitations in the list of unique alpha determinants. + + + + + + +.. c:function:: get_all_spin_doubles_1 + + .. code:: text + + subroutine get_all_spin_doubles_1(buffer, idx, spindet, size_buffer, doubles, n_doubles) + + File: :file:`spindeterminants.irp.f` + + + Returns the indices of all the double excitations in the list of unique alpha determinants. + + + + + + +.. c:function:: get_all_spin_doubles_2 + + .. code:: text + + subroutine get_all_spin_doubles_2(buffer, idx, spindet, size_buffer, doubles, n_doubles) + + File: :file:`spindeterminants.irp.f_template_1215` + + + Returns the indices of all the double excitations in the list of unique alpha determinants. + + + + + + +.. c:function:: get_all_spin_doubles_3 + + .. code:: text + + subroutine get_all_spin_doubles_3(buffer, idx, spindet, size_buffer, doubles, n_doubles) + + File: :file:`spindeterminants.irp.f_template_1215` + + + Returns the indices of all the double excitations in the list of unique alpha determinants. + + + + + + +.. c:function:: get_all_spin_doubles_4 + + .. code:: text + + subroutine get_all_spin_doubles_4(buffer, idx, spindet, size_buffer, doubles, n_doubles) + + File: :file:`spindeterminants.irp.f_template_1215` + + + Returns the indices of all the double excitations in the list of unique alpha determinants. + + + + + + +.. c:function:: get_all_spin_doubles_n_int + + .. code:: text + + subroutine get_all_spin_doubles_N_int(buffer, idx, spindet, size_buffer, doubles, n_doubles) + + File: :file:`spindeterminants.irp.f_template_1215` + + + Returns the indices of all the double excitations in the list of unique alpha determinants. + + + + + + +.. c:function:: get_all_spin_singles + + .. code:: text + + subroutine get_all_spin_singles(buffer, idx, spindet, Nint, size_buffer, singles, n_singles) + + File: :file:`spindeterminants.irp.f` + + + Returns the indices of all the single excitations in the list of unique alpha determinants. + + + + + + +.. c:function:: get_all_spin_singles_1 + + .. code:: text + + subroutine get_all_spin_singles_1(buffer, idx, spindet, size_buffer, singles, n_singles) + + File: :file:`spindeterminants.irp.f` + + + Returns the indices of all the single excitations in the list of unique alpha determinants. + + + + + + +.. c:function:: get_all_spin_singles_2 + + .. code:: text + + subroutine get_all_spin_singles_2(buffer, idx, spindet, size_buffer, singles, n_singles) + + File: :file:`spindeterminants.irp.f_template_1215` + + + Returns the indices of all the single excitations in the list of unique alpha determinants. + + + + + + +.. c:function:: get_all_spin_singles_3 + + .. code:: text + + subroutine get_all_spin_singles_3(buffer, idx, spindet, size_buffer, singles, n_singles) + + File: :file:`spindeterminants.irp.f_template_1215` + + + Returns the indices of all the single excitations in the list of unique alpha determinants. + + + + + + +.. c:function:: get_all_spin_singles_4 + + .. code:: text + + subroutine get_all_spin_singles_4(buffer, idx, spindet, size_buffer, singles, n_singles) + + File: :file:`spindeterminants.irp.f_template_1215` + + + Returns the indices of all the single excitations in the list of unique alpha determinants. + + + + + + +.. c:function:: get_all_spin_singles_and_doubles + + .. code:: text + + subroutine get_all_spin_singles_and_doubles(buffer, idx, spindet, Nint, size_buffer, singles, doubles, n_singles, n_doubles) + + File: :file:`spindeterminants.irp.f` + + + Returns the indices of all the single and double excitations in the list of unique alpha determinants. + /!\ : The buffer is transposed ! + + + + + + +.. c:function:: get_all_spin_singles_and_doubles_1 + + .. code:: text + + subroutine get_all_spin_singles_and_doubles_1(buffer, idx, spindet, size_buffer, singles, doubles, n_singles, n_doubles) + + File: :file:`spindeterminants.irp.f` + + + Returns the indices of all the single and double excitations in the list of unique alpha determinants. + /!\ : The buffer is transposed ! + + + + + + +.. c:function:: get_all_spin_singles_and_doubles_2 + + .. code:: text + + subroutine get_all_spin_singles_and_doubles_2(buffer, idx, spindet, size_buffer, singles, doubles, n_singles, n_doubles) + + File: :file:`spindeterminants.irp.f_template_1215` + + + Returns the indices of all the single and double excitations in the list of unique alpha determinants. + /!\ : The buffer is transposed ! + + + + + + +.. c:function:: get_all_spin_singles_and_doubles_3 + + .. code:: text + + subroutine get_all_spin_singles_and_doubles_3(buffer, idx, spindet, size_buffer, singles, doubles, n_singles, n_doubles) + + File: :file:`spindeterminants.irp.f_template_1215` + + + Returns the indices of all the single and double excitations in the list of unique alpha determinants. + /!\ : The buffer is transposed ! + + + + + + +.. c:function:: get_all_spin_singles_and_doubles_4 + + .. code:: text + + subroutine get_all_spin_singles_and_doubles_4(buffer, idx, spindet, size_buffer, singles, doubles, n_singles, n_doubles) + + File: :file:`spindeterminants.irp.f_template_1215` + + + Returns the indices of all the single and double excitations in the list of unique alpha determinants. + /!\ : The buffer is transposed ! + + + + + + +.. c:function:: get_all_spin_singles_and_doubles_n_int + + .. code:: text + + subroutine get_all_spin_singles_and_doubles_N_int(buffer, idx, spindet, size_buffer, singles, doubles, n_singles, n_doubles) + + File: :file:`spindeterminants.irp.f_template_1215` + + + Returns the indices of all the single and double excitations in the list of unique alpha determinants. + /!\ : The buffer is transposed ! + + + + + + +.. c:function:: get_all_spin_singles_n_int + + .. code:: text + + subroutine get_all_spin_singles_N_int(buffer, idx, spindet, size_buffer, singles, n_singles) + + File: :file:`spindeterminants.irp.f_template_1215` + + + Returns the indices of all the single excitations in the list of unique alpha determinants. + + + + + + +.. c:function:: get_double_excitation + + .. code:: text + + subroutine get_double_excitation(det1,det2,exc,phase,Nint) + + File: :file:`slater_rules.irp.f` + + Returns the two excitation operators between two doubly excited determinants and the phase + + + + + +.. c:function:: get_double_excitation_phase + + .. code:: text + + subroutine get_double_excitation_phase(det1,det2,exc,phase,Nint) + + File: :file:`slater_rules.irp.f` + + + + + + + +.. c:function:: get_double_excitation_phase_new + + .. code:: text + + subroutine get_double_excitation_phase_new(det1,det2,exc,phase,Nint) + + File: :file:`slater_rules.irp.f` + + + + + + + +.. c:function:: get_double_excitation_spin + + .. code:: text + + subroutine get_double_excitation_spin(det1,det2,exc,phase,Nint) + + File: :file:`slater_rules.irp.f` + + Returns the two excitation operators between two doubly excited spin-determinants and the phase + + + + + +.. c:function:: get_double_excitation_spin_new + + .. code:: text + + subroutine get_double_excitation_spin_new(det1,det2,exc,phase,Nint) + + File: :file:`slater_rules.irp.f` + + Returns the two excitation operators between two doubly excited spin-determinants and the phase + + + + + +.. c:function:: get_excitation + + .. code:: text + + subroutine get_excitation(det1,det2,exc,degree,phase,Nint) + + File: :file:`slater_rules.irp.f` + + Returns the excitation operators between two determinants and the phase + + + + + +.. c:function:: get_excitation_degree + + .. code:: text + + subroutine get_excitation_degree(key1,key2,degree,Nint) + + File: :file:`slater_rules.irp.f` + + Returns the excitation degree between two determinants + + + + + +.. c:function:: get_excitation_degree_spin + + .. code:: text + + subroutine get_excitation_degree_spin(key1,key2,degree,Nint) + + File: :file:`slater_rules.irp.f` + + Returns the excitation degree between two determinants + + + + + +.. c:function:: get_excitation_degree_spin_new + + .. code:: text + + subroutine get_excitation_degree_spin_new(key1,key2,degree,Nint) + + File: :file:`slater_rules.irp.f` + + Returns the excitation degree between two determinants + + + + + +.. c:function:: get_excitation_degree_vector + + .. code:: text + + subroutine get_excitation_degree_vector(key1,key2,degree,Nint,sze,idx) + + File: :file:`slater_rules.irp.f` + + Applies get_excitation_degree to an array of determinants + + + + + +.. c:function:: get_excitation_degree_vector_double_alpha_beta + + .. code:: text + + subroutine get_excitation_degree_vector_double_alpha_beta(key1,key2,degree,Nint,sze,idx) + + File: :file:`slater_rules.irp.f` + + Applies get_excitation_degree to an array of determinants and return only the mono excitations and the connections through exchange integrals + + + + + +.. c:function:: get_excitation_degree_vector_mono + + .. code:: text + + subroutine get_excitation_degree_vector_mono(key1,key2,degree,Nint,sze,idx) + + File: :file:`slater_rules.irp.f` + + Applies get_excitation_degree to an array of determinants and return only the mono excitations + + + + + +.. c:function:: get_excitation_degree_vector_mono_or_exchange + + .. code:: text + + subroutine get_excitation_degree_vector_mono_or_exchange(key1,key2,degree,Nint,sze,idx) + + File: :file:`slater_rules.irp.f` + + Applies get_excitation_degree to an array of determinants and return only the mono excitations and the connections through exchange integrals + + + + + +.. c:function:: get_excitation_degree_vector_mono_or_exchange_verbose + + .. code:: text + + subroutine get_excitation_degree_vector_mono_or_exchange_verbose(key1,key2,degree,Nint,sze,idx) + + File: :file:`slater_rules.irp.f` + + Applies get_excitation_degree to an array of determinants and return only the mono excitations and the connections through exchange integrals + + + + + +.. c:function:: get_excitation_spin + + .. code:: text + + subroutine get_excitation_spin(det1,det2,exc,degree,phase,Nint) + + File: :file:`slater_rules.irp.f` + + Returns the excitation operators between two determinants and the phase + + + + + +.. c:function:: get_excitation_spin_new + + .. code:: text + + subroutine get_excitation_spin_new(det1,det2,exc,degree,phase,Nint) + + File: :file:`slater_rules.irp.f` + + Returns the excitation operators between two determinants and the phase + + + + + +.. c:function:: get_get_two_body_dm_ab_map_elements + + .. code:: text + + subroutine get_get_two_body_dm_ab_map_elements(j,k,l,sze,out_val,map) + + File: :file:`two_body_dm_map.irp.f` + + Returns multiple elements of the \rho_{ijkl}^{\alpha \beta }, all i for j,k,l fixed. + + + + + +.. c:function:: get_index_in_psi_det_alpha_unique + + .. code:: text + + integer function get_index_in_psi_det_alpha_unique(key,Nint) + + File: :file:`spindeterminants.irp.f` + + Returns the index of the determinant in the ``psi_det_alpha_unique`` array + + + + + +.. c:function:: get_index_in_psi_det_beta_unique + + .. code:: text + + integer function get_index_in_psi_det_beta_unique(key,Nint) + + File: :file:`spindeterminants.irp.f` + + Returns the index of the determinant in the ``psi_det_beta_unique`` array + + + + + +.. c:function:: get_index_in_psi_det_sorted_bit + + .. code:: text + + integer function get_index_in_psi_det_sorted_bit(key,Nint) + + File: :file:`connected_to_ref.irp.f` + + Returns the index of the determinant in the ``psi_det_sorted_bit`` array + + + + + +.. c:function:: get_mono_excitation + + .. code:: text + + subroutine get_mono_excitation(det1,det2,exc,phase,Nint) + + File: :file:`slater_rules.irp.f` + + Returns the excitation operator between two singly excited determinants and the phase + + + + + +.. c:function:: get_mono_excitation_from_fock + + .. code:: text + + subroutine get_mono_excitation_from_fock(det_1,det_2,h,p,spin,phase,hij) + + File: :file:`mono_excitations.irp.f` + + + + + + + +.. c:function:: get_mono_excitation_spin + + .. code:: text + + subroutine get_mono_excitation_spin(det1,det2,exc,phase,Nint) + + File: :file:`slater_rules.irp.f` + + Returns the excitation operator between two singly excited determinants and the phase + + + + + +.. c:function:: get_mono_excitation_spin_new + + .. code:: text + + subroutine get_mono_excitation_spin_new(det1,det2,exc,phase,Nint) + + File: :file:`slater_rules.irp.f` + + Returns the excitation operator between two singly excited determinants and the phase + + + + + +.. c:function:: get_occ_from_key + + .. code:: text + + subroutine get_occ_from_key(key,occ,Nint) + + File: :file:`slater_rules.irp.f` + + Returns a list of occupation numbers from a bitstring + + + + + +.. c:function:: get_phase + + .. code:: text + + subroutine get_phase(key1,key2,phase,Nint) + + File: :file:`slater_rules.irp.f` + + Returns the phase between key1 and key2 + + + + + +.. c:function:: get_phasemask_bit + + .. code:: text + + subroutine get_phasemask_bit(det1, pm, Nint) + + File: :file:`slater_rules.irp.f` + + + + + + + +.. c:function:: get_s2 + + .. code:: text + + subroutine get_s2(key_i,key_j,Nint,s2) + + File: :file:`s2.irp.f` + + Returns + + + + + +.. c:function:: get_two_body_dm_ab_map_element + + .. code:: text + + double precision function get_two_body_dm_ab_map_element(i,j,k,l,map) + + File: :file:`two_body_dm_map.irp.f` + + 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> + + + + + +.. c:function:: get_uj_s2_ui + + .. code:: text + + subroutine get_uJ_s2_uI(psi_keys_tmp,psi_coefs_tmp,n,nmax_coefs,nmax_keys,s2,nstates) + + File: :file:`s2.irp.f` + + returns the matrix elements of S^2 "s2(i,j)" between the "nstates" states psi_coefs_tmp(:,i) and psi_coefs_tmp(:,j) + + + + + +.. c:function:: getmobiles + + .. code:: text + + subroutine getMobiles(key,key_mask, mobiles,Nint) + + File: :file:`filter_connected.irp.f` + + + + + + + +.. c:function:: give_index_of_doubly_occ_in_active_space + + .. code:: text + + subroutine give_index_of_doubly_occ_in_active_space(det_in,doubly_occupied_array) + + File: :file:`useful_for_ovb.irp.f` + + + + + + + +.. c:function:: h_u_0_stored + + .. code:: text + + subroutine H_u_0_stored(v_0,u_0,hmatrix,sze) + + File: :file:`slater_rules.irp.f` + + Computes v_0 = H|u_0> + n : number of determinants + uses the big_matrix_stored array + + + + + +.. c:function:: i_h_j + + .. code:: text + + subroutine i_H_j(key_i,key_j,Nint,hij) + + File: :file:`slater_rules.irp.f` + + Returns where i and j are determinants + + + + + +.. c:function:: i_h_j_double_alpha_beta + + .. code:: text + + subroutine i_H_j_double_alpha_beta(key_i,key_j,Nint,hij) + + File: :file:`slater_rules.irp.f` + + Returns where i and j are determinants differing by an opposite-spin double excitation + + + + + +.. c:function:: i_h_j_double_spin + + .. code:: text + + subroutine i_H_j_double_spin(key_i,key_j,Nint,hij) + + File: :file:`slater_rules.irp.f` + + Returns where i and j are determinants differing by a same-spin double excitation + + + + + +.. c:function:: i_h_j_mono_spin + + .. code:: text + + subroutine i_H_j_mono_spin(key_i,key_j,Nint,spin,hij) + + File: :file:`slater_rules.irp.f` + + Returns where i and j are determinants differing by a single excitation + + + + + +.. c:function:: i_h_j_phase_out + + .. code:: text + + subroutine i_H_j_phase_out(key_i,key_j,Nint,hij,phase,exc,degree) + + File: :file:`slater_rules.irp.f` + + Returns where i and j are determinants + + + + + +.. c:function:: i_h_j_s2 + + .. code:: text + + subroutine i_H_j_s2(key_i,key_j,Nint,hij,s2) + + File: :file:`slater_rules.irp.f` + + Returns where i and j are determinants + + + + + +.. c:function:: i_h_j_verbose + + .. code:: text + + subroutine i_H_j_verbose(key_i,key_j,Nint,hij,hmono,hdouble) + + File: :file:`slater_rules.irp.f` + + Returns where i and j are determinants + + + + + +.. c:function:: i_h_psi + + .. code:: text + + subroutine i_H_psi(key,keys,coef,Nint,Ndet,Ndet_max,Nstate,i_H_psi_array) + + File: :file:`slater_rules.irp.f` + + Computes = \sum_J c_J . + 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 + + + + + +.. c:function:: i_h_psi_minilist + + .. code:: text + + subroutine i_H_psi_minilist(key,keys,idx_key,N_minilist,coef,Nint,Ndet,Ndet_max,Nstate,i_H_psi_array) + + File: :file:`slater_rules.irp.f` + + Computes = \sum_J c_J . + 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. + + + + + +.. c:function:: i_h_psi_sc2 + + .. code:: text + + subroutine i_H_psi_SC2(key,keys,coef,Nint,Ndet,Ndet_max,Nstate,i_H_psi_array,idx_repeat) + + File: :file:`slater_rules.irp.f` + + for the various Nstate + returns in addition + the array of the index of the non connected determinants to key1 + in order to know what double excitation can be repeated on key1 + idx_repeat(0) is the number of determinants that can be used + to repeat the excitations + + + + + +.. c:function:: i_h_psi_sc2_verbose + + .. code:: text + + subroutine i_H_psi_SC2_verbose(key,keys,coef,Nint,Ndet,Ndet_max,Nstate,i_H_psi_array,idx_repeat) + + File: :file:`slater_rules.irp.f` + + for the various Nstate + returns in addition + the array of the index of the non connected determinants to key1 + in order to know what double excitation can be repeated on key1 + idx_repeat(0) is the number of determinants that can be used + to repeat the excitations + + + + + +.. c:function:: i_h_psi_sec_ord + + .. code:: text + + subroutine i_H_psi_sec_ord(key,keys,coef,Nint,Ndet,Ndet_max,Nstate,i_H_psi_array,idx_interaction,interactions) + + File: :file:`slater_rules.irp.f` + + for the various Nstates + + + + + +.. c:function:: i_s2_psi_minilist + + .. code:: text + + subroutine i_S2_psi_minilist(key,keys,idx_key,N_minilist,coef,Nint,Ndet,Ndet_max,Nstate,i_S2_psi_array) + + File: :file:`s2.irp.f` + + Computes = \sum_J c_J . + 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. + + + + + +.. c:function:: insert_into_two_body_dm_ab_map + + .. code:: text + + subroutine insert_into_two_body_dm_ab_map(n_product,buffer_i, buffer_values, thr) + + File: :file:`two_body_dm_map.irp.f` + + Create new entry into two_body_dm_ab_map, or accumulate in an existing entry + + + + + +.. c:function:: insert_into_two_body_dm_big_array + + .. code:: text + + subroutine insert_into_two_body_dm_big_array(big_array,dim1,dim2,dim3,dim4,contrib,h1,p1,h2,p2) + + File: :file:`two_body_dm_map.irp.f` + + + + + + + +.. c:function:: is_connected_to + + .. code:: text + + logical function is_connected_to(key,keys,Nint,Ndet) + + File: :file:`connected_to_ref.irp.f` + + + + + + + +.. c:function:: is_connected_to_by_mono + + .. code:: text + + logical function is_connected_to_by_mono(key,keys,Nint,Ndet) + + File: :file:`connected_to_ref.irp.f` + + + + + + + +.. c:function:: is_generable_cassd + + .. code:: text + + logical function is_generable_cassd(det1, det2, Nint) + + File: :file:`connected_to_ref.irp.f` + + + + + + + +.. c:function:: is_in_wavefunction + + .. code:: text + + logical function is_in_wavefunction(key,Nint) + + File: :file:`connected_to_ref.irp.f` + + True if the determinant ``det`` is in the wave function + + + + + +.. c:function:: is_spin_flip_possible + + .. code:: text + + logical function is_spin_flip_possible(key_in,i_flip,ispin) + + File: :file:`create_excitations.irp.f` + + returns .True. if the spin-flip of spin ispin in the orbital i_flip is possible on key_in + + + + + +.. c:function:: make_s2_eigenfunction + + .. code:: text + + subroutine make_s2_eigenfunction + + File: :file:`occ_pattern.irp.f` + + + + + + + +.. c:function:: n_closed_shell + + .. code:: text + + integer function n_closed_shell(det_in,nint) + + File: :file:`useful_for_ovb.irp.f` + + + + + + + +.. c:function:: n_closed_shell_cas + + .. code:: text + + integer function n_closed_shell_cas(det_in,nint) + + File: :file:`useful_for_ovb.irp.f` + + + + + + + +.. c:function:: n_open_shell + + .. code:: text + + integer function n_open_shell(det_in,nint) + + File: :file:`useful_for_ovb.irp.f` + + + + + + + +.. c:function:: neutral_no_hund_in_couple + + .. code:: text + + subroutine neutral_no_hund_in_couple(det_in,n_couples,couples,couples_out) + + File: :file:`useful_for_ovb.irp.f` + + 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 + + + + + +.. c:function:: occ_pattern_of_det + + .. code:: text + + subroutine occ_pattern_of_det(d,o,Nint) + + File: :file:`occ_pattern.irp.f` + + Transforms a determinant to an occupation pattern + occ(:,1) : Single occupations + occ(:,2) : Double occupations + + + + + + +.. c:function:: occ_pattern_search_key + + .. code:: text + + integer*8 function occ_pattern_search_key(det,Nint) + + File: :file:`connected_to_ref.irp.f` + + Return an integer*8 corresponding to a determinant index for searching + + + + + +.. c:function:: occ_pattern_to_dets + + .. code:: text + + subroutine occ_pattern_to_dets(o,d,sze,n_alpha,Nint) + + File: :file:`occ_pattern.irp.f` + + Generate all possible determinants for a give occ_pattern + + + + + +.. c:function:: occ_pattern_to_dets_size + + .. code:: text + + subroutine occ_pattern_to_dets_size(o,sze,n_alpha,Nint) + + File: :file:`occ_pattern.irp.f` + + Number of possible determinants for a given occ_pattern + + + + + +.. c:function:: pull_pt2 + + .. code:: text + + subroutine pull_pt2(zmq_socket_pull,pt2,norm_pert,H_pert_diag,i_generator,N_st,n,task_id) + + File: :file:`H_apply.irp.f` + + Pull PT2 calculation in the collector + + + + + +.. c:function:: push_pt2 + + .. code:: text + + subroutine push_pt2(zmq_socket_push,pt2,norm_pert,H_pert_diag,i_generator,N_st,task_id) + + File: :file:`H_apply.irp.f` + + Push PT2 calculation to the collector + + + + + +.. c:function:: read_dets + + .. code:: text + + subroutine read_dets(det,Nint,Ndet) + + File: :file:`determinants.irp.f` + + Reads the determinants from the EZFIO file + + + + + +.. c:function:: remove_duplicates_in_psi_det + + .. code:: text + + subroutine remove_duplicates_in_psi_det(found_duplicates) + + File: :file:`H_apply.irp.f` + + Removes duplicate determinants in the wave function. + + + + + +.. c:function:: resize_h_apply_buffer + + .. code:: text + + subroutine resize_H_apply_buffer(new_size,iproc) + + File: :file:`H_apply.irp.f` + + Resizes the H_apply buffer of proc iproc. The buffer lock should be set before calling this function. + + + + + +.. c:function:: s2_u_0 + + .. code:: text + + subroutine S2_u_0(v_0,u_0,n,keys_tmp,Nint) + + File: :file:`s2.irp.f` + + Computes v_0 = S^2|u_0> + n : number of determinants + + + + + + +.. c:function:: s2_u_0_nstates + + .. code:: text + + subroutine S2_u_0_nstates(v_0,u_0,n,keys_tmp,Nint,N_st,sze_8) + + File: :file:`s2.irp.f` + + Computes v_0 = S^2|u_0> + n : number of determinants + + + + + + +.. c:function:: save_natural_mos + + .. code:: text + + subroutine save_natural_mos + + File: :file:`density_matrix.irp.f` + + Save natural orbitals, obtained by diagonalization of the one-body density matrix in the MO basis + + + + + +.. c:function:: save_ref_determinant + + .. code:: text + + subroutine save_ref_determinant + + File: :file:`determinants.irp.f` + + + + + + + +.. c:function:: save_wavefunction + + .. code:: text + + subroutine save_wavefunction + + File: :file:`determinants.irp.f` + + Save the wave function into the EZFIO file + + + + + +.. c:function:: save_wavefunction_general + + .. code:: text + + subroutine save_wavefunction_general(ndet,nstates,psidet,dim_psicoef,psicoef) + + File: :file:`determinants.irp.f` + + Save the wave function into the EZFIO file + + + + + +.. c:function:: save_wavefunction_specified + + .. code:: text + + subroutine save_wavefunction_specified(ndet,nstates,psidet,psicoef,ndetsave,index_det_save) + + File: :file:`determinants.irp.f` + + Save the wave function into the EZFIO file + + + + + +.. c:function:: save_wavefunction_truncated + + .. code:: text + + subroutine save_wavefunction_truncated(thr) + + File: :file:`determinants.irp.f` + + Save the wave function into the EZFIO file + + + + + +.. c:function:: save_wavefunction_unsorted + + .. code:: text + + subroutine save_wavefunction_unsorted + + File: :file:`determinants.irp.f` + + Save the wave function into the EZFIO file + + + + + +.. c:function:: set_bit_to_integer + + .. code:: text + + subroutine set_bit_to_integer(i_physical,key,Nint) + + File: :file:`create_excitations.irp.f` + + + + + + + +.. c:function:: set_natural_mos + + .. code:: text + + subroutine set_natural_mos + + File: :file:`density_matrix.irp.f` + + Set natural orbitals, obtained by diagonalization of the one-body density matrix in the MO basis + + + + + +.. c:function:: sort_dets_ab + + .. code:: text + + subroutine sort_dets_ab(key, idx, shortcut, N_key, Nint) + + File: :file:`sort_dets_ab.irp.f` + + Uncodumented : TODO + + + + + +.. c:function:: sort_dets_ab_v + + .. code:: text + + subroutine sort_dets_ab_v(key_in, key_out, idx, shortcut, version, N_key, Nint) + + File: :file:`sort_dets_ab.irp.f` + + Uncodumented : TODO + + + + + +.. c:function:: sort_dets_ba_v + + .. code:: text + + subroutine sort_dets_ba_v(key_in, key_out, idx, shortcut, version, N_key, Nint) + + File: :file:`sort_dets_ab.irp.f` + + Uncodumented : TODO + + + + + +.. c:function:: sort_dets_by_det_search_key + + .. code:: text + + subroutine sort_dets_by_det_search_key(Ndet, det_in, coef_in, sze, det_out, coef_out, N_st) + + File: :file:`determinants.irp.f` + + Determinants are sorted are sorted according to their det_search_key. Useful to accelerate the search of a random determinant in the wave function. + /!\ The first dimension of coef_out and coef_in need to be psi_det_size + + + + + + +.. c:function:: spin_det_search_key + + .. code:: text + + integer*8 function spin_det_search_key(det,Nint) + + File: :file:`spindeterminants.irp.f` + + Return an integer(8) corresponding to a determinant index for searching + + + + + +.. c:function:: tamiser + + .. code:: text + + subroutine tamiser(key, idx, no, n, Nint, N_key) + + File: :file:`sort_dets_ab.irp.f` + + Uncodumented : TODO + + + + + +.. c:function:: u_0_h_u_0_stored + + .. code:: text + + subroutine u_0_H_u_0_stored(e_0,u_0,hmatrix,sze) + + File: :file:`slater_rules.irp.f` + + Computes e_0 = + n : number of determinants + uses the big_matrix_stored array + + + + + +.. c:function:: u_0_s2_u_0 + + .. code:: text + + subroutine u_0_S2_u_0(e_0,u_0,n,keys_tmp,Nint,N_st,sze_8) + + File: :file:`s2.irp.f` + + Computes e_0 = / + n : number of determinants + + + + + + +.. c:function:: wf_of_psi_bilinear_matrix + + .. code:: text + + subroutine wf_of_psi_bilinear_matrix(truncate) + + File: :file:`spindeterminants.irp.f` + + Generate a wave function containing all possible products of alpha and beta determinants + + + + + +.. c:function:: write_spindeterminants + + .. code:: text + + subroutine write_spindeterminants + + File: :file:`spindeterminants.irp.f` + + + + + + + +.. c:function:: zmq_get_n_det + + .. code:: text + + integer function zmq_get_N_det(zmq_to_qp_run_socket, worker_id) + + File: :file:`zmq.irp.f_template_379` + + Get N_det from the qp_run scheduler + + + + + +.. c:function:: zmq_get_n_det_alpha_unique + + .. code:: text + + integer function zmq_get_N_det_alpha_unique(zmq_to_qp_run_socket, worker_id) + + File: :file:`zmq.irp.f_template_379` + + Get N_det_alpha_unique from the qp_run scheduler + + + + + +.. c:function:: zmq_get_n_det_beta_unique + + .. code:: text + + integer function zmq_get_N_det_beta_unique(zmq_to_qp_run_socket, worker_id) + + File: :file:`zmq.irp.f_template_379` + + Get N_det_beta_unique from the qp_run scheduler + + + + + +.. c:function:: zmq_get_n_states + + .. code:: text + + integer function zmq_get_N_states(zmq_to_qp_run_socket, worker_id) + + File: :file:`zmq.irp.f_template_379` + + Get N_states from the qp_run scheduler + + + + + +.. c:function:: zmq_get_psi + + .. code:: text + + integer function zmq_get_psi(zmq_to_qp_run_socket, worker_id) + + File: :file:`zmq.irp.f` + + Get the wave function from the qp_run scheduler + + + + + +.. c:function:: zmq_get_psi_bilinear + + .. code:: text + + integer function zmq_get_psi_bilinear(zmq_to_qp_run_socket, worker_id) + + File: :file:`zmq.irp.f` + + Get the wave function from the qp_run scheduler + + + + + +.. c:function:: zmq_get_psi_bilinear_matrix_columns + + .. code:: text + + integer*8 function zmq_get_psi_bilinear_matrix_columns(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_500` + + Get psi_bilinear_matrix_columns on the qp_run scheduler + + + + + +.. c:function:: zmq_get_psi_bilinear_matrix_order + + .. code:: text + + integer*8 function zmq_get_psi_bilinear_matrix_order(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_500` + + Get psi_bilinear_matrix_order on the qp_run scheduler + + + + + +.. c:function:: zmq_get_psi_bilinear_matrix_rows + + .. code:: text + + integer*8 function zmq_get_psi_bilinear_matrix_rows(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_500` + + Get psi_bilinear_matrix_rows on the qp_run scheduler + + + + + +.. c:function:: zmq_get_psi_bilinear_matrix_values + + .. code:: text + + integer*8 function zmq_get_psi_bilinear_matrix_values(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_564` + + get psi_bilinear_matrix_values on the qp_run scheduler + + + + + +.. c:function:: zmq_get_psi_coef + + .. code:: text + + integer*8 function zmq_get_psi_coef(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_564` + + get psi_coef on the qp_run scheduler + + + + + +.. c:function:: zmq_get_psi_det + + .. code:: text + + integer*8 function zmq_get_psi_det(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_440` + + Get psi_det on the qp_run scheduler + + + + + +.. c:function:: zmq_get_psi_det_alpha_unique + + .. code:: text + + integer*8 function zmq_get_psi_det_alpha_unique(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_440` + + Get psi_det_alpha_unique on the qp_run scheduler + + + + + +.. c:function:: zmq_get_psi_det_beta_unique + + .. code:: text + + integer*8 function zmq_get_psi_det_beta_unique(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_440` + + Get psi_det_beta_unique on the qp_run scheduler + + + + + +.. c:function:: zmq_get_psi_det_size + + .. code:: text + + integer function zmq_get_psi_det_size(zmq_to_qp_run_socket, worker_id) + + File: :file:`zmq.irp.f_template_379` + + Get psi_det_size from the qp_run scheduler + + + + + +.. c:function:: zmq_get_psi_notouch + + .. code:: text + + integer function zmq_get_psi_notouch(zmq_to_qp_run_socket, worker_id) + + File: :file:`zmq.irp.f` + + Get the wave function from the qp_run scheduler + + + + + +.. c:function:: zmq_put_n_det + + .. code:: text + + integer function zmq_put_N_det(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_379` + + Put N_det on the qp_run scheduler + + + + + +.. c:function:: zmq_put_n_det_alpha_unique + + .. code:: text + + integer function zmq_put_N_det_alpha_unique(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_379` + + Put N_det_alpha_unique on the qp_run scheduler + + + + + +.. c:function:: zmq_put_n_det_beta_unique + + .. code:: text + + integer function zmq_put_N_det_beta_unique(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_379` + + Put N_det_beta_unique on the qp_run scheduler + + + + + +.. c:function:: zmq_put_n_states + + .. code:: text + + integer function zmq_put_N_states(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_379` + + Put N_states on the qp_run scheduler + + + + + +.. c:function:: zmq_put_psi + + .. code:: text + + integer function zmq_put_psi(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f` + + Put the wave function on the qp_run scheduler + + + + + +.. c:function:: zmq_put_psi_bilinear + + .. code:: text + + integer function zmq_put_psi_bilinear(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f` + + Put the wave function on the qp_run scheduler + + + + + +.. c:function:: zmq_put_psi_bilinear_matrix_columns + + .. code:: text + + integer*8 function zmq_put_psi_bilinear_matrix_columns(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_500` + + Put psi_bilinear_matrix_columns on the qp_run scheduler + + + + + +.. c:function:: zmq_put_psi_bilinear_matrix_order + + .. code:: text + + integer*8 function zmq_put_psi_bilinear_matrix_order(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_500` + + Put psi_bilinear_matrix_order on the qp_run scheduler + + + + + +.. c:function:: zmq_put_psi_bilinear_matrix_rows + + .. code:: text + + integer*8 function zmq_put_psi_bilinear_matrix_rows(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_500` + + Put psi_bilinear_matrix_rows on the qp_run scheduler + + + + + +.. c:function:: zmq_put_psi_bilinear_matrix_values + + .. code:: text + + integer*8 function zmq_put_psi_bilinear_matrix_values(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_564` + + Put psi_bilinear_matrix_values on the qp_run scheduler + + + + + +.. c:function:: zmq_put_psi_coef + + .. code:: text + + integer*8 function zmq_put_psi_coef(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_564` + + Put psi_coef on the qp_run scheduler + + + + + +.. c:function:: zmq_put_psi_det + + .. code:: text + + integer*8 function zmq_put_psi_det(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_440` + + Put psi_det on the qp_run scheduler + + + + + +.. c:function:: zmq_put_psi_det_alpha_unique + + .. code:: text + + integer*8 function zmq_put_psi_det_alpha_unique(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_440` + + Put psi_det_alpha_unique on the qp_run scheduler + + + + + +.. c:function:: zmq_put_psi_det_beta_unique + + .. code:: text + + integer*8 function zmq_put_psi_det_beta_unique(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_440` + + Put psi_det_beta_unique on the qp_run scheduler + + + + + +.. c:function:: zmq_put_psi_det_size + + .. code:: text + + integer function zmq_put_psi_det_size(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_379` + + Put psi_det_size on the qp_run scheduler + diff --git a/docs/source/modules/dressing.rst b/docs/source/modules/dressing.rst index 33e4b189..519ab370 100644 --- a/docs/source/modules/dressing.rst +++ b/docs/source/modules/dressing.rst @@ -19,18 +19,18 @@ EZFIO parameters .. option:: thresh_dressed_ci - Threshold on the convergence of the dressed |CI| energy + Threshold on the convergence of the dressed |CI| energy - Default: 1.e-5 + Default: 1.e-5 .. option:: n_it_max_dressed_ci - Maximum number of dressed |CI| iterations + Maximum number of dressed |CI| iterations - Default: 10 + Default: 10 .. option:: dress_relative_error - Stop stochastic dressing when the relative error is smaller than :option:`perturbation PT2_relative_error` + Stop stochastic dressing when the relative error is smaller than :option:`perturbation PT2_relative_error` - Default: 0.001 + Default: 0.001 diff --git a/docs/source/modules/electrons.rst b/docs/source/modules/electrons.rst index 429c339e..aea56135 100644 --- a/docs/source/modules/electrons.rst +++ b/docs/source/modules/electrons.rst @@ -29,16 +29,48 @@ EZFIO parameters .. option:: elec_alpha_num - Numbers of electrons alpha ("up") + Numbers of electrons alpha ("up") .. option:: elec_beta_num - Numbers of electrons beta ("down") + Numbers of electrons beta ("down") .. option:: elec_num - Numbers total of electrons (alpha + beta) + Numbers total of electrons (alpha + beta) + + Default: = electrons.elec_alpha_num + electrons.elec_beta_num + + +Providers +--------- + + +.. c:var:: elec_num + + .. code:: text + + integer :: elec_num + integer, allocatable :: elec_num_tab (2) + + File: :file:`electrons.irp.f` + + Numbers of alpha ("up") , beta ("down") and total electrons + + + + +.. c:var:: elec_num_tab + + .. code:: text + + integer :: elec_num + integer, allocatable :: elec_num_tab (2) + + File: :file:`electrons.irp.f` + + Numbers of alpha ("up") , beta ("down") and total electrons + - Default: = electrons.elec_alpha_num + electrons.elec_beta_num diff --git a/docs/source/modules/ezfio_files.rst b/docs/source/modules/ezfio_files.rst index 56706c1f..472516fd 100644 --- a/docs/source/modules/ezfio_files.rst +++ b/docs/source/modules/ezfio_files.rst @@ -13,3 +13,137 @@ This modules essentially contains the name of the |EZFIO| directory in the command-line, or as the :envvar:`QP_INPUT` environment variable. + + +Providers +--------- + + +.. c:var:: ezfio_filename + + .. code:: text + + character*(128) :: ezfio_filename + + File: :file:`ezfio.irp.f` + + 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. + + + + +.. c:var:: ezfio_work_dir + + .. code:: text + + character*(128) :: ezfio_work_dir + + File: :file:`ezfio.irp.f` + + EZFIO/work/ + + + + +.. c:var:: output_cpu_time_0 + + .. code:: text + + double precision :: output_wall_time_0 + double precision :: output_cpu_time_0 + + File: :file:`output.irp.f` + + Initial CPU and wall times when printing in the output files + + + + +.. c:var:: output_wall_time_0 + + .. code:: text + + double precision :: output_wall_time_0 + double precision :: output_cpu_time_0 + + File: :file:`output.irp.f` + + Initial CPU and wall times when printing in the output files + + + + +Subroutines / functions +----------------------- + + + +.. c:function:: getunitandopen + + .. code:: text + + integer function getUnitAndOpen(f,mode) + + File: :file:`get_unit_and_open.irp.f` + + :f: file name + :mode: 'R' : READ, UNFORMATTED 'W' : WRITE, UNFORMATTED 'r' : READ, FORMATTED 'w' : WRITE, FORMATTED 'a' : APPEND, FORMATTED 'x' : READ/WRITE, FORMATTED + + + + + + +.. c:function:: write_bool + + .. code:: text + + subroutine write_bool(iunit,value,label) + + File: :file:`output.irp.f` + + Write an logical value in output + + + + + +.. c:function:: write_double + + .. code:: text + + subroutine write_double(iunit,value,label) + + File: :file:`output.irp.f` + + Write a double precision value in output + + + + + +.. c:function:: write_int + + .. code:: text + + subroutine write_int(iunit,value,label) + + File: :file:`output.irp.f` + + Write an integer value in output + + + + + +.. c:function:: write_time + + .. code:: text + + subroutine write_time(iunit) + + File: :file:`output.irp.f` + + Write a time stamp in the output for chronological reconstruction + + diff --git a/docs/source/modules/fci.rst b/docs/source/modules/fci.rst index c52650f2..59d22c65 100644 --- a/docs/source/modules/fci.rst +++ b/docs/source/modules/fci.rst @@ -124,12 +124,12 @@ EZFIO parameters .. option:: energy - Calculated Selected |FCI| energy + Calculated Selected |FCI| energy .. option:: energy_pt2 - Calculated |FCI| energy + |PT2| + Calculated |FCI| energy + |PT2| @@ -137,235 +137,785 @@ Providers --------- -.. option:: pt2_e0_denominator - - .. code:: text - - double precision, allocatable :: pt2_e0_denominator (N_states) - - File: energy.irp.f - - E0 in the denominator of the PT2 - - - - -.. option:: pt2_u_0 - - .. code:: text - - double precision, allocatable :: pt2_w (N_det_generators) - double precision, allocatable :: pt2_cw (0:N_det_generators) - double precision :: pt2_w_t - double precision :: pt2_u_0 - integer, allocatable :: pt2_n_0 (pt2_N_teeth+1) - - File: pt2_stoch_routines.irp.f - - - - - - -.. option:: pt2_r - - .. code:: text - - integer, allocatable :: pt2_j (N_det_generators) - integer, allocatable :: pt2_r (N_det_generators) - - File: pt2_stoch_routines.irp.f - - - - - - -.. option:: pt2_w - - .. code:: text - - double precision, allocatable :: pt2_w (N_det_generators) - double precision, allocatable :: pt2_cw (0:N_det_generators) - double precision :: pt2_w_t - double precision :: pt2_u_0 - integer, allocatable :: pt2_n_0 (pt2_N_teeth+1) - - File: pt2_stoch_routines.irp.f - - - - - - -.. option:: pt2_u - - .. code:: text - - double precision, allocatable :: pt2_u (N_det_generators) - - File: pt2_stoch_routines.irp.f - - - - - - -.. option:: pt2_j - - .. code:: text - - integer, allocatable :: pt2_j (N_det_generators) - integer, allocatable :: pt2_r (N_det_generators) - - File: pt2_stoch_routines.irp.f - - - - - - -.. option:: pt2_f - - .. code:: text - - integer, allocatable :: pt2_f (N_det_generators) - integer :: pt2_n_tasks_max - - File: pt2_stoch_routines.irp.f - - - - - - -.. option:: pt2_cw - - .. code:: text - - double precision, allocatable :: pt2_w (N_det_generators) - double precision, allocatable :: pt2_cw (0:N_det_generators) - double precision :: pt2_w_t - double precision :: pt2_u_0 - integer, allocatable :: pt2_n_0 (pt2_N_teeth+1) - - File: pt2_stoch_routines.irp.f - - - - - - -.. option:: pt2_w_t - - .. code:: text - - double precision, allocatable :: pt2_w (N_det_generators) - double precision, allocatable :: pt2_cw (0:N_det_generators) - double precision :: pt2_w_t - double precision :: pt2_u_0 - integer, allocatable :: pt2_n_0 (pt2_N_teeth+1) - - File: pt2_stoch_routines.irp.f - - - - - - -.. option:: pt2_n_tasks - - .. code:: text - - integer :: pt2_n_tasks - - File: pt2_stoch_routines.irp.f - - Number of parallel tasks for the Monte Carlo - - - - -.. option:: pt2_n_0 - - .. code:: text - - double precision, allocatable :: pt2_w (N_det_generators) - double precision, allocatable :: pt2_cw (0:N_det_generators) - double precision :: pt2_w_t - double precision :: pt2_u_0 - integer, allocatable :: pt2_n_0 (pt2_N_teeth+1) - - File: pt2_stoch_routines.irp.f - - - - - - -.. option:: pt2_n_tasks_max - - .. code:: text - - integer, allocatable :: pt2_f (N_det_generators) - integer :: pt2_n_tasks_max - - File: pt2_stoch_routines.irp.f - - - - - - -.. option:: pt2_n_teeth - - .. code:: text - - integer :: pt2_n_teeth - integer :: pt2_mindetinfirstteeth - - File: pt2_stoch_routines.irp.f - - - - - - -.. option:: initialize_pt2_e0_denominator +.. c:var:: initialize_pt2_e0_denominator .. code:: text logical :: initialize_pt2_e0_denominator - File: energy.irp.f + File: :file:`energy.irp.f` If true, initialize pt2_E0_denominator -.. option:: pt2_mindetinfirstteeth +.. c:var:: pt2_cw .. code:: text - integer :: pt2_n_teeth - integer :: pt2_mindetinfirstteeth + double precision, allocatable :: pt2_w (N_det_generators) + double precision, allocatable :: pt2_cw (0:N_det_generators) + double precision :: pt2_w_t + double precision :: pt2_u_0 + integer, allocatable :: pt2_n_0 (pt2_N_teeth+1) - File: pt2_stoch_routines.irp.f + File: :file:`pt2_stoch_routines.irp.f` -.. option:: pt2_stoch_istate +.. c:var:: pt2_e0_denominator + + .. code:: text + + double precision, allocatable :: pt2_e0_denominator (N_states) + + File: :file:`energy.irp.f` + + E0 in the denominator of the PT2 + + + + +.. c:var:: pt2_f + + .. code:: text + + integer, allocatable :: pt2_f (N_det_generators) + integer :: pt2_n_tasks_max + + File: :file:`pt2_stoch_routines.irp.f` + + + + + + +.. c:var:: pt2_j + + .. code:: text + + integer, allocatable :: pt2_j (N_det_generators) + integer, allocatable :: pt2_r (N_det_generators) + + File: :file:`pt2_stoch_routines.irp.f` + + + + + + +.. c:var:: pt2_mindetinfirstteeth + + .. code:: text + + integer :: pt2_n_teeth + integer :: pt2_mindetinfirstteeth + + File: :file:`pt2_stoch_routines.irp.f` + + + + + + +.. c:var:: pt2_n_0 + + .. code:: text + + double precision, allocatable :: pt2_w (N_det_generators) + double precision, allocatable :: pt2_cw (0:N_det_generators) + double precision :: pt2_w_t + double precision :: pt2_u_0 + integer, allocatable :: pt2_n_0 (pt2_N_teeth+1) + + File: :file:`pt2_stoch_routines.irp.f` + + + + + + +.. c:var:: pt2_n_tasks + + .. code:: text + + integer :: pt2_n_tasks + + File: :file:`pt2_stoch_routines.irp.f` + + Number of parallel tasks for the Monte Carlo + + + + +.. c:var:: pt2_n_tasks_max + + .. code:: text + + integer, allocatable :: pt2_f (N_det_generators) + integer :: pt2_n_tasks_max + + File: :file:`pt2_stoch_routines.irp.f` + + + + + + +.. c:var:: pt2_n_teeth + + .. code:: text + + integer :: pt2_n_teeth + integer :: pt2_mindetinfirstteeth + + File: :file:`pt2_stoch_routines.irp.f` + + + + + + +.. c:var:: pt2_r + + .. code:: text + + integer, allocatable :: pt2_j (N_det_generators) + integer, allocatable :: pt2_r (N_det_generators) + + File: :file:`pt2_stoch_routines.irp.f` + + + + + + +.. c:var:: pt2_stoch_istate .. code:: text integer :: pt2_stoch_istate - File: pt2_stoch_routines.irp.f + File: :file:`pt2_stoch_routines.irp.f` State for stochatsic PT2 + + +.. c:var:: pt2_u + + .. code:: text + + double precision, allocatable :: pt2_u (N_det_generators) + + File: :file:`pt2_stoch_routines.irp.f` + + + + + + +.. c:var:: pt2_u_0 + + .. code:: text + + double precision, allocatable :: pt2_w (N_det_generators) + double precision, allocatable :: pt2_cw (0:N_det_generators) + double precision :: pt2_w_t + double precision :: pt2_u_0 + integer, allocatable :: pt2_n_0 (pt2_N_teeth+1) + + File: :file:`pt2_stoch_routines.irp.f` + + + + + + +.. c:var:: pt2_w + + .. code:: text + + double precision, allocatable :: pt2_w (N_det_generators) + double precision, allocatable :: pt2_cw (0:N_det_generators) + double precision :: pt2_w_t + double precision :: pt2_u_0 + integer, allocatable :: pt2_n_0 (pt2_N_teeth+1) + + File: :file:`pt2_stoch_routines.irp.f` + + + + + + +.. c:var:: pt2_w_t + + .. code:: text + + double precision, allocatable :: pt2_w (N_det_generators) + double precision, allocatable :: pt2_cw (0:N_det_generators) + double precision :: pt2_w_t + double precision :: pt2_u_0 + integer, allocatable :: pt2_n_0 (pt2_N_teeth+1) + + File: :file:`pt2_stoch_routines.irp.f` + + + + + + +Subroutines / functions +----------------------- + + + +.. c:function:: add_to_selection_buffer + + .. code:: text + + subroutine add_to_selection_buffer(b, det, val) + + File: :file:`selection_buffer.irp.f` + + + + + + + +.. c:function:: bitstring_to_list_in_selection + + .. code:: text + + subroutine bitstring_to_list_in_selection( string, list, n_elements, Nint) + + File: :file:`selection.irp.f` + + Gives the inidices(+1) of the bits set to 1 in the bit string + + + + + +.. c:function:: create_selection_buffer + + .. code:: text + + subroutine create_selection_buffer(N, siz_, res) + + File: :file:`selection_buffer.irp.f` + + + + + + + +.. c:function:: delete_selection_buffer + + .. code:: text + + subroutine delete_selection_buffer(b) + + File: :file:`selection_buffer.irp.f` + + + + + + + +.. c:function:: fci_zmq + + .. code:: text + + subroutine fci_zmq + + File: :file:`FCI.irp.f` + + + + + + + +.. c:function:: fill_buffer_double + + .. code:: text + + subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_diag_tmp, E0, pt2, variance, norm, mat, buf) + + File: :file:`selection.irp.f` + + + + + + + +.. c:function:: get_d0 + + .. code:: text + + subroutine get_d0(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs) + + File: :file:`selection.irp.f` + + + + + + + +.. c:function:: get_d1 + + .. code:: text + + subroutine get_d1(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs) + + File: :file:`selection.irp.f` + + + + + + + +.. c:function:: get_d2 + + .. code:: text + + subroutine get_d2(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs) + + File: :file:`selection.irp.f` + + + + + + + +.. c:function:: get_m0 + + .. code:: text + + subroutine get_m0(gen, phasemask, bannedOrb, vect, mask, h, p, sp, coefs) + + File: :file:`selection.irp.f` + + + + + + + +.. c:function:: get_m1 + + .. code:: text + + subroutine get_m1(gen, phasemask, bannedOrb, vect, mask, h, p, sp, coefs) + + File: :file:`selection.irp.f` + + + + + + + +.. c:function:: get_m2 + + .. code:: text + + subroutine get_m2(gen, phasemask, bannedOrb, vect, mask, h, p, sp, coefs) + + File: :file:`selection.irp.f` + + + + + + + +.. c:function:: get_mask_phase + + .. code:: text + + subroutine get_mask_phase(det1, pm, Nint) + + File: :file:`selection.irp.f` + + + + + + + +.. c:function:: get_phase_bi + + .. code:: text + + double precision function get_phase_bi(phasemask, s1, s2, h1, p1, h2, p2, Nint) + + File: :file:`selection.irp.f` + + + + + + + +.. c:function:: make_selection_buffer_s2 + + .. code:: text + + subroutine make_selection_buffer_s2(b) + + File: :file:`selection_buffer.irp.f` + + + + + + + +.. c:function:: merge_selection_buffers + + .. code:: text + + subroutine merge_selection_buffers(b1, b2) + + File: :file:`selection_buffer.irp.f` + + Merges the selection buffers b1 and b2 into b2 + + + + + +.. c:function:: past_d1 + + .. code:: text + + subroutine past_d1(bannedOrb, p) + + File: :file:`selection.irp.f` + + + + + + + +.. c:function:: past_d2 + + .. code:: text + + subroutine past_d2(banned, p, sp) + + File: :file:`selection.irp.f` + + + + + + + +.. c:function:: pt2_collector + + .. code:: text + + subroutine pt2_collector(zmq_socket_pull, E, relative_error, pt2, error, variance, norm) + + File: :file:`pt2_stoch_routines.irp.f` + + + + + + + +.. c:function:: pt2_find_sample + + .. code:: text + + integer function pt2_find_sample(v, w) + + File: :file:`pt2_stoch_routines.irp.f` + + + + + + + +.. c:function:: pt2_find_sample_lr + + .. code:: text + + integer function pt2_find_sample_lr(v, w, l_in, r_in) + + File: :file:`pt2_stoch_routines.irp.f` + + + + + + + +.. c:function:: pt2_slave_inproc + + .. code:: text + + subroutine pt2_slave_inproc(i) + + File: :file:`pt2_stoch_routines.irp.f` + + + + + + + +.. c:function:: pt2_stoch + + .. code:: text + + subroutine pt2_stoch + + File: :file:`PT2.irp.f` + + + + + + + +.. c:function:: pull_pt2_results + + .. code:: text + + subroutine pull_pt2_results(zmq_socket_pull, index, pt2, variance, norm, task_id, n_tasks) + + File: :file:`run_pt2_slave.irp.f` + + + + + + + +.. c:function:: pull_selection_results + + .. code:: text + + subroutine pull_selection_results(zmq_socket_pull, pt2, variance, norm, val, det, N, task_id, ntask) + + File: :file:`run_selection_slave.irp.f` + + + + + + + +.. c:function:: push_pt2_results + + .. code:: text + + subroutine push_pt2_results(zmq_socket_push, index, pt2, variance, norm, task_id, n_tasks) + + File: :file:`run_pt2_slave.irp.f` + + + + + + + +.. c:function:: push_selection_results + + .. code:: text + + subroutine push_selection_results(zmq_socket_push, pt2, variance, norm, b, task_id, ntask) + + File: :file:`run_selection_slave.irp.f` + + + + + + + +.. c:function:: run_pt2_slave + + .. code:: text + + subroutine run_pt2_slave(thread,iproc,energy) + + File: :file:`run_pt2_slave.irp.f` + + + + + + + +.. c:function:: run_selection_slave + + .. code:: text + + subroutine run_selection_slave(thread,iproc,energy) + + File: :file:`run_selection_slave.irp.f` + + + + + + + +.. c:function:: select_connected + + .. code:: text + + subroutine select_connected(i_generator,E0,pt2,variance,norm,b,subset,csubset) + + File: :file:`selection.irp.f` + + + + + + + +.. c:function:: select_singles_and_doubles + + .. code:: text + + subroutine select_singles_and_doubles(i_generator,hole_mask,particle_mask,fock_diag_tmp,E0,pt2,variance,norm,buf,subset,csubset) + + File: :file:`selection.irp.f` + + WARNING /!\ : It is assumed that the generators and selectors are psi_det_sorted + + + + + +.. c:function:: selection_collector + + .. code:: text + + subroutine selection_collector(zmq_socket_pull, b, N, pt2, variance, norm) + + File: :file:`zmq_selection.irp.f` + + + + + + + +.. c:function:: selection_slave_inproc + + .. code:: text + + subroutine selection_slave_inproc(i) + + File: :file:`zmq_selection.irp.f` + + + + + + + +.. c:function:: sort_selection_buffer + + .. code:: text + + subroutine sort_selection_buffer(b) + + File: :file:`selection_buffer.irp.f` + + + + + + + +.. c:function:: splash_pq + + .. code:: text + + subroutine splash_pq(mask, sp, det, i_gen, N_sel, bannedOrb, banned, mat, interesting) + + File: :file:`selection.irp.f` + + + + + + + +.. c:function:: spot_isinwf + + .. code:: text + + subroutine spot_isinwf(mask, det, i_gen, N, banned, fullMatch, interesting) + + File: :file:`selection.irp.f` + + + + + + + +.. c:function:: testteethbuilding + + .. code:: text + + logical function testTeethBuilding(minF, N) + + File: :file:`pt2_stoch_routines.irp.f` + + + + + + + +.. c:function:: zmq_pt2 + + .. code:: text + + subroutine ZMQ_pt2(E, pt2,relative_error, error, variance, norm) + + File: :file:`pt2_stoch_routines.irp.f` + + + + + + + +.. c:function:: zmq_selection + + .. code:: text + + subroutine ZMQ_selection(N_in, pt2, variance, norm) + + File: :file:`zmq_selection.irp.f` + + + + diff --git a/docs/source/modules/fouridx.rst b/docs/source/modules/fouridx.rst index fce5c0e5..b2981147 100644 --- a/docs/source/modules/fouridx.rst +++ b/docs/source/modules/fouridx.rst @@ -11,3 +11,21 @@ FourIdx Four-index transformation. + + +Subroutines / functions +----------------------- + + + +.. c:function:: four_idx + + .. code:: text + + subroutine four_idx + + File: :file:`Four_idx_transform.irp.f` + + 4-index transformation from AO to MO integrals + + diff --git a/docs/source/modules/generators_full.rst b/docs/source/modules/generators_full.rst index d1fd3885..71d3db76 100644 --- a/docs/source/modules/generators_full.rst +++ b/docs/source/modules/generators_full.rst @@ -14,3 +14,132 @@ variational space. This module is intended to be included in the :file:`NEED` file to define a full set of generators. + + +Providers +--------- + + +.. c:var:: degree_max_generators + + .. code:: text + + integer :: degree_max_generators + + File: :file:`generators.irp.f` + + Max degree of excitation (respect to HF) of the generators + + + + +.. c:var:: n_det_generators + + .. code:: text + + integer :: n_det_generators + + File: :file:`generators.irp.f` + + For Single reference wave functions, the number of generators is 1 : the Hartree-Fock determinant + + + + +.. c:var:: psi_coef_generators + + .. code:: text + + integer(bit_kind), allocatable :: psi_det_generators (N_int,2,psi_det_size) + double precision, allocatable :: psi_coef_generators (psi_det_size,N_states) + + File: :file:`generators.irp.f` + + For Single reference wave functions, the generator is the Hartree-Fock determinant + + + + +.. c:var:: psi_coef_sorted_gen + + .. code:: text + + integer(bit_kind), allocatable :: psi_det_sorted_gen (N_int,2,psi_det_size) + double precision, allocatable :: psi_coef_sorted_gen (psi_det_size,N_states) + integer, allocatable :: psi_det_sorted_gen_order (psi_det_size) + + File: :file:`generators.irp.f` + + For Single reference wave functions, the generator is the Hartree-Fock determinant + + + + +.. c:var:: psi_det_generators + + .. code:: text + + integer(bit_kind), allocatable :: psi_det_generators (N_int,2,psi_det_size) + double precision, allocatable :: psi_coef_generators (psi_det_size,N_states) + + File: :file:`generators.irp.f` + + For Single reference wave functions, the generator is the Hartree-Fock determinant + + + + +.. c:var:: psi_det_sorted_gen + + .. code:: text + + integer(bit_kind), allocatable :: psi_det_sorted_gen (N_int,2,psi_det_size) + double precision, allocatable :: psi_coef_sorted_gen (psi_det_size,N_states) + integer, allocatable :: psi_det_sorted_gen_order (psi_det_size) + + File: :file:`generators.irp.f` + + For Single reference wave functions, the generator is the Hartree-Fock determinant + + + + +.. c:var:: psi_det_sorted_gen_order + + .. code:: text + + integer(bit_kind), allocatable :: psi_det_sorted_gen (N_int,2,psi_det_size) + double precision, allocatable :: psi_coef_sorted_gen (psi_det_size,N_states) + integer, allocatable :: psi_det_sorted_gen_order (psi_det_size) + + File: :file:`generators.irp.f` + + For Single reference wave functions, the generator is the Hartree-Fock determinant + + + + +.. c:var:: select_max + + .. code:: text + + double precision, allocatable :: select_max (size_select_max) + + File: :file:`generators.irp.f` + + Memo to skip useless selectors + + + + +.. c:var:: size_select_max + + .. code:: text + + integer :: size_select_max + + File: :file:`generators.irp.f` + + Size of the select_max array + + diff --git a/docs/source/modules/hartree_fock.rst b/docs/source/modules/hartree_fock.rst index d594b412..a0e76a28 100644 --- a/docs/source/modules/hartree_fock.rst +++ b/docs/source/modules/hartree_fock.rst @@ -45,76 +45,160 @@ EZFIO parameters .. option:: max_dim_diis - Maximum size of the |DIIS| extrapolation procedure + Maximum size of the |DIIS| extrapolation procedure - Default: 15 + Default: 15 .. option:: 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 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. - Default: 0. + Default: 0. .. option:: thresh_scf - Threshold on the convergence of the Hartree Fock energy. + Threshold on the convergence of the Hartree Fock energy. - Default: 1.e-10 + Default: 1.e-10 .. option:: n_it_scf_max - Maximum number of |SCF| iterations + Maximum number of |SCF| iterations - Default: 500 + Default: 500 .. option:: level_shift - Initial value of the energy shift on the virtual |MOs| + Initial value of the energy shift on the virtual |MOs| - Default: 0.0 + Default: 0.0 .. option:: scf_algorithm - Type of |SCF| algorithm used. Possible choices are [ Simple | DIIS] + Type of |SCF| algorithm used. Possible choices are [ Simple | DIIS] - Default: DIIS + Default: DIIS .. option:: mo_guess_type - Initial MO guess. Can be [ Huckel | HCore ] + Initial MO guess. Can be [ Huckel | HCore ] - Default: Huckel + Default: Huckel .. option:: energy - Calculated HF energy + Calculated HF energy .. option:: no_oa_or_av_opt - If |true|, skip the (inactive+core) --> (active) and the (active) --> (virtual) orbital rotations within the |SCF| procedure + If |true|, skip the (inactive+core) --> (active) and the (active) --> (virtual) orbital rotations within the |SCF| procedure - Default: False + Default: False Providers --------- -.. option:: fock_matrix_mo_alpha +.. c:var:: ao_bi_elec_integral_alpha .. code:: text - double precision, allocatable :: fock_matrix_mo_alpha (mo_tot_num,mo_tot_num) + double precision, allocatable :: ao_bi_elec_integral_alpha (ao_num,ao_num) + double precision, allocatable :: ao_bi_elec_integral_beta (ao_num,ao_num) - File: Fock_matrix.irp.f + File: :file:`Fock_matrix.irp.f` - Fock matrix on the MO basis + Alpha Fock matrix in AO basis set -.. option:: extrapolate_fock_matrix +.. c:var:: ao_bi_elec_integral_beta + + .. code:: text + + double precision, allocatable :: ao_bi_elec_integral_alpha (ao_num,ao_num) + double precision, allocatable :: ao_bi_elec_integral_beta (ao_num,ao_num) + + File: :file:`Fock_matrix.irp.f` + + Alpha Fock matrix in AO basis set + + + + +.. c:var:: diagonal_fock_matrix_mo + + .. code:: text + + double precision, allocatable :: diagonal_fock_matrix_mo (mo_tot_num) + double precision, allocatable :: eigenvectors_fock_matrix_mo (ao_num,mo_tot_num) + + File: :file:`diagonalize_fock.irp.f` + + Diagonal Fock matrix in the MO basis + + + + +.. c:var:: diagonal_fock_matrix_mo_sum + + .. code:: text + + double precision, allocatable :: diagonal_fock_matrix_mo_sum (mo_tot_num) + + File: :file:`diagonalize_fock.irp.f` + + 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 + + + + +.. c:var:: eigenvalues_fock_matrix_ao + + .. code:: text + + double precision, allocatable :: eigenvalues_fock_matrix_ao (AO_num) + double precision, allocatable :: eigenvectors_fock_matrix_ao (AO_num,AO_num) + + File: :file:`DIIS.irp.f` + + Eigenvalues and eigenvectors of the Fock matrix over the AO basis + + + + +.. c:var:: eigenvectors_fock_matrix_ao + + .. code:: text + + double precision, allocatable :: eigenvalues_fock_matrix_ao (AO_num) + double precision, allocatable :: eigenvectors_fock_matrix_ao (AO_num,AO_num) + + File: :file:`DIIS.irp.f` + + Eigenvalues and eigenvectors of the Fock matrix over the AO basis + + + + +.. c:var:: eigenvectors_fock_matrix_mo + + .. code:: text + + double precision, allocatable :: diagonal_fock_matrix_mo (mo_tot_num) + double precision, allocatable :: eigenvectors_fock_matrix_mo (ao_num,mo_tot_num) + + File: :file:`diagonalize_fock.irp.f` + + Diagonal Fock matrix in the MO basis + + + + +.. c:var:: extrapolate_fock_matrix .. code:: text @@ -124,286 +208,290 @@ Providers iteration_SCF,dim_DIIS & ) - File: Roothaan_Hall_SCF.irp.f + File: :file:`Roothaan_Hall_SCF.irp.f` Compute the extrapolated Fock matrix using the DIIS procedure -.. option:: fock_matrix_ao_alpha - - .. code:: text - - double precision, allocatable :: fock_matrix_ao_alpha (ao_num,ao_num) - double precision, allocatable :: fock_matrix_ao_beta (ao_num,ao_num) - - File: Fock_matrix.irp.f - - Alpha Fock matrix in AO basis set - - - - -.. option:: hf_energy - - .. code:: text - - double precision :: hf_energy - - File: Fock_matrix.irp.f - - Hartree-Fock energy - - - - -.. option:: fock_matrix_diag_mo - - .. code:: text - - double precision, allocatable :: fock_matrix_mo (mo_tot_num,mo_tot_num) - double precision, allocatable :: fock_matrix_diag_mo (mo_tot_num) - - File: Fock_matrix.irp.f - - Fock matrix on the MO basis. For open shells, the ROHF Fock Matrix is - | F-K | F + K/2 | F | |---------------------------------| | F + K/2 | F | F - K/2 | |---------------------------------| | F | F - K/2 | F + K | - F = 1/2 (Fa + Fb) - K = Fb - Fa - - - - - -.. option:: fock_matrix_ao_beta - - .. code:: text - - double precision, allocatable :: fock_matrix_ao_alpha (ao_num,ao_num) - double precision, allocatable :: fock_matrix_ao_beta (ao_num,ao_num) - - File: Fock_matrix.irp.f - - Alpha Fock matrix in AO basis set - - - - -.. option:: hf_density_matrix_ao - - .. code:: text - - double precision, allocatable :: hf_density_matrix_ao (ao_num,ao_num) - - File: HF_density_matrix_ao.irp.f - - S^{-1}.P.S^{-1} where P = C.C^t - - - - -.. option:: fps_spf_matrix_ao - - .. code:: text - - double precision, allocatable :: fps_spf_matrix_ao (AO_num,AO_num) - - File: DIIS.irp.f - - Commutator FPS - SPF - - - - -.. option:: threshold_diis_nonzero - - .. code:: text - - double precision :: threshold_diis_nonzero - - File: DIIS.irp.f - - If threshold_DIIS is zero, choose sqrt(thresh_scf) - - - - -.. option:: ao_bi_elec_integral_alpha - - .. code:: text - - double precision, allocatable :: ao_bi_elec_integral_alpha (ao_num,ao_num) - double precision, allocatable :: ao_bi_elec_integral_beta (ao_num,ao_num) - - File: Fock_matrix.irp.f - - Alpha Fock matrix in AO basis set - - - - -.. option:: eigenvectors_fock_matrix_ao - - .. code:: text - - double precision, allocatable :: eigenvalues_fock_matrix_ao (AO_num) - double precision, allocatable :: eigenvectors_fock_matrix_ao (AO_num,AO_num) - - File: DIIS.irp.f - - Eigenvalues and eigenvectors of the Fock matrix over the AO basis - - - - -.. option:: fock_matrix_mo_beta - - .. code:: text - - double precision, allocatable :: fock_matrix_mo_beta (mo_tot_num,mo_tot_num) - - File: Fock_matrix.irp.f - - Fock matrix on the MO basis - - - - -.. option:: eigenvectors_fock_matrix_mo - - .. code:: text - - double precision, allocatable :: diagonal_fock_matrix_mo (mo_tot_num) - double precision, allocatable :: eigenvectors_fock_matrix_mo (ao_num,mo_tot_num) - - File: diagonalize_fock.irp.f - - Diagonal Fock matrix in the MO basis - - - - -.. option:: fock_matrix_mo - - .. code:: text - - double precision, allocatable :: fock_matrix_mo (mo_tot_num,mo_tot_num) - double precision, allocatable :: fock_matrix_diag_mo (mo_tot_num) - - File: Fock_matrix.irp.f - - Fock matrix on the MO basis. For open shells, the ROHF Fock Matrix is - | F-K | F + K/2 | F | |---------------------------------| | F + K/2 | F | F - K/2 | |---------------------------------| | F | F - K/2 | F + K | - F = 1/2 (Fa + Fb) - K = Fb - Fa - - - - - -.. option:: fps_spf_matrix_mo - - .. code:: text - - double precision, allocatable :: fps_spf_matrix_mo (mo_tot_num,mo_tot_num) - - File: DIIS.irp.f - - Commutator FPS - SPF in MO basis - - - - -.. option:: diagonal_fock_matrix_mo_sum - - .. code:: text - - double precision, allocatable :: diagonal_fock_matrix_mo_sum (mo_tot_num) - - File: diagonalize_fock.irp.f - - 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 - - - - -.. option:: hf_density_matrix_ao_alpha - - .. code:: text - - double precision, allocatable :: hf_density_matrix_ao_alpha (ao_num,ao_num) - - File: HF_density_matrix_ao.irp.f - - S^{-1}.P_alpha.S^{-1} - - - - -.. option:: hf_density_matrix_ao_beta - - .. code:: text - - double precision, allocatable :: hf_density_matrix_ao_beta (ao_num,ao_num) - - File: HF_density_matrix_ao.irp.f - - S^{-1}.P_beta.S^{-1} - - - - -.. option:: eigenvalues_fock_matrix_ao - - .. code:: text - - double precision, allocatable :: eigenvalues_fock_matrix_ao (AO_num) - double precision, allocatable :: eigenvectors_fock_matrix_ao (AO_num,AO_num) - - File: DIIS.irp.f - - Eigenvalues and eigenvectors of the Fock matrix over the AO basis - - - - -.. option:: ao_bi_elec_integral_beta - - .. code:: text - - double precision, allocatable :: ao_bi_elec_integral_alpha (ao_num,ao_num) - double precision, allocatable :: ao_bi_elec_integral_beta (ao_num,ao_num) - - File: Fock_matrix.irp.f - - Alpha Fock matrix in AO basis set - - - - -.. option:: fock_matrix_ao +.. c:var:: fock_matrix_ao .. code:: text double precision, allocatable :: fock_matrix_ao (ao_num,ao_num) - File: Fock_matrix.irp.f + File: :file:`Fock_matrix.irp.f` Fock matrix in AO basis set -.. option:: diagonal_fock_matrix_mo +.. c:var:: fock_matrix_ao_alpha .. code:: text - double precision, allocatable :: diagonal_fock_matrix_mo (mo_tot_num) - double precision, allocatable :: eigenvectors_fock_matrix_mo (ao_num,mo_tot_num) + double precision, allocatable :: fock_matrix_ao_alpha (ao_num,ao_num) + double precision, allocatable :: fock_matrix_ao_beta (ao_num,ao_num) - File: diagonalize_fock.irp.f + File: :file:`Fock_matrix.irp.f` - Diagonal Fock matrix in the MO basis + Alpha Fock matrix in AO basis set + + + + +.. c:var:: fock_matrix_ao_beta + + .. code:: text + + double precision, allocatable :: fock_matrix_ao_alpha (ao_num,ao_num) + double precision, allocatable :: fock_matrix_ao_beta (ao_num,ao_num) + + File: :file:`Fock_matrix.irp.f` + + Alpha Fock matrix in AO basis set + + + + +.. c:var:: fock_matrix_diag_mo + + .. code:: text + + double precision, allocatable :: fock_matrix_mo (mo_tot_num,mo_tot_num) + double precision, allocatable :: fock_matrix_diag_mo (mo_tot_num) + + File: :file:`Fock_matrix.irp.f` + + Fock matrix on the MO basis. For open shells, the ROHF Fock Matrix is + | F-K | F + K/2 | F | |---------------------------------| | F + K/2 | F | F - K/2 | |---------------------------------| | F | F - K/2 | F + K | + F = 1/2 (Fa + Fb) + K = Fb - Fa + + + + + +.. c:var:: fock_matrix_mo + + .. code:: text + + double precision, allocatable :: fock_matrix_mo (mo_tot_num,mo_tot_num) + double precision, allocatable :: fock_matrix_diag_mo (mo_tot_num) + + File: :file:`Fock_matrix.irp.f` + + Fock matrix on the MO basis. For open shells, the ROHF Fock Matrix is + | F-K | F + K/2 | F | |---------------------------------| | F + K/2 | F | F - K/2 | |---------------------------------| | F | F - K/2 | F + K | + F = 1/2 (Fa + Fb) + K = Fb - Fa + + + + + +.. c:var:: fock_matrix_mo_alpha + + .. code:: text + + double precision, allocatable :: fock_matrix_mo_alpha (mo_tot_num,mo_tot_num) + + File: :file:`Fock_matrix.irp.f` + + Fock matrix on the MO basis + + + + +.. c:var:: fock_matrix_mo_beta + + .. code:: text + + double precision, allocatable :: fock_matrix_mo_beta (mo_tot_num,mo_tot_num) + + File: :file:`Fock_matrix.irp.f` + + Fock matrix on the MO basis + + + + +.. c:var:: fps_spf_matrix_ao + + .. code:: text + + double precision, allocatable :: fps_spf_matrix_ao (AO_num,AO_num) + + File: :file:`DIIS.irp.f` + + Commutator FPS - SPF + + + + +.. c:var:: fps_spf_matrix_mo + + .. code:: text + + double precision, allocatable :: fps_spf_matrix_mo (mo_tot_num,mo_tot_num) + + File: :file:`DIIS.irp.f` + + Commutator FPS - SPF in MO basis + + + + +.. c:var:: hf_density_matrix_ao + + .. code:: text + + double precision, allocatable :: hf_density_matrix_ao (ao_num,ao_num) + + File: :file:`HF_density_matrix_ao.irp.f` + + S^{-1}.P.S^{-1} where P = C.C^t + + + + +.. c:var:: hf_density_matrix_ao_alpha + + .. code:: text + + double precision, allocatable :: hf_density_matrix_ao_alpha (ao_num,ao_num) + + File: :file:`HF_density_matrix_ao.irp.f` + + S^{-1}.P_alpha.S^{-1} + + + + +.. c:var:: hf_density_matrix_ao_beta + + .. code:: text + + double precision, allocatable :: hf_density_matrix_ao_beta (ao_num,ao_num) + + File: :file:`HF_density_matrix_ao.irp.f` + + S^{-1}.P_beta.S^{-1} + + + + +.. c:var:: hf_energy + + .. code:: text + + double precision :: hf_energy + + File: :file:`Fock_matrix.irp.f` + + Hartree-Fock energy + + + + +.. c:var:: threshold_diis_nonzero + + .. code:: text + + double precision :: threshold_diis_nonzero + + File: :file:`DIIS.irp.f` + + If threshold_DIIS is zero, choose sqrt(thresh_scf) + + + + +Subroutines / functions +----------------------- + + + +.. c:function:: create_guess + + .. code:: text + + subroutine create_guess + + File: :file:`SCF.irp.f` + + Create a MO guess if no MOs are present in the EZFIO directory + + + + + +.. c:function:: damping_scf + + .. code:: text + + subroutine damping_SCF + + File: :file:`damping_SCF.irp.f` + + + + + + + +.. c:function:: huckel_guess + + .. code:: text + + subroutine huckel_guess + + File: :file:`huckel.irp.f` + + Build the MOs using the extended Huckel model + + + + + +.. c:function:: roothaan_hall_scf + + .. code:: text + + subroutine Roothaan_Hall_SCF + + File: :file:`Roothaan_Hall_SCF.irp.f` + + Roothaan-Hall algorithm for SCF Hartree-Fock calculation + + + + + +.. c:function:: run + + .. code:: text + + subroutine run + + File: :file:`SCF.irp.f` + + Run SCF calculation + + + + + +.. c:function:: scf + + .. code:: text + + subroutine scf + + File: :file:`SCF.irp.f` + + 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 diff --git a/docs/source/modules/integrals_bielec.rst b/docs/source/modules/integrals_bielec.rst index 5fd3b58a..361ae68d 100644 --- a/docs/source/modules/integrals_bielec.rst +++ b/docs/source/modules/integrals_bielec.rst @@ -33,48 +33,1229 @@ EZFIO parameters .. option:: disk_access_mo_integrals - Read/Write |MO| integrals from/to disk [ Write | Read | None ] + Read/Write |MO| integrals from/to disk [ Write | Read | None ] - Default: None + Default: None .. option:: disk_access_ao_integrals - Read/Write |AO| integrals from/to disk [ Write | Read | None ] + Read/Write |AO| integrals from/to disk [ Write | Read | None ] - Default: None + Default: None .. option:: ao_integrals_threshold - If | (pq|rs) | < `ao_integrals_threshold` then (pq|rs) is zero + If | (pq|rs) | < `ao_integrals_threshold` then (pq|rs) is zero - Default: 1.e-15 + Default: 1.e-15 .. option:: mo_integrals_threshold - If | | < `mo_integrals_threshold` then is zero + If | | < `mo_integrals_threshold` then is zero - Default: 1.e-15 + Default: 1.e-15 .. option:: no_vvvv_integrals - If `True`, computes all integrals except for the integrals having 4 virtual indices + If `True`, computes all integrals except for the integrals having 4 virtual indices - Default: False + Default: False .. option:: no_ivvv_integrals - Can be switched on only if `no_vvvv_integrals` is `True`, then does not compute the integrals with 3 virtual indices and 1 belonging to the core inactive active orbitals + Can be switched on only if `no_vvvv_integrals` is `True`, then does not compute the integrals with 3 virtual indices and 1 belonging to the core inactive active orbitals - Default: False + Default: False .. option:: no_vvv_integrals - Can be switched on only if `no_vvvv_integrals` is `True`, then does not compute the integrals with 3 virtual orbitals + Can be switched on only if `no_vvvv_integrals` is `True`, then does not compute the integrals with 3 virtual orbitals - Default: False + Default: False .. option:: do_direct_integrals - Compute integrals on the fly (very slow, only for debugging) + Compute integrals on the fly (very slow, only for debugging) + + Default: False + + +Providers +--------- + + +.. c:var:: ao_bielec_integral_schwartz + + .. code:: text + + double precision, allocatable :: ao_bielec_integral_schwartz (ao_num,ao_num) + + File: :file:`ao_bi_integrals.irp.f` + + Needed to compute Schwartz inequalities + + + + +.. c:var:: ao_bielec_integrals_in_map + + .. code:: text + + logical :: ao_bielec_integrals_in_map + + File: :file:`ao_bi_integrals.irp.f` + + Map of Atomic integrals i(r1) j(r2) 1/r12 k(r1) l(r2) + + + + +.. c:var:: ao_integrals_cache + + .. code:: text + + double precision, allocatable :: ao_integrals_cache (0:64*64*64*64) + + File: :file:`map_integrals.irp.f` + + Cache of AO integrals for fast access + + + + +.. c:var:: ao_integrals_cache_max + + .. code:: text + + integer :: ao_integrals_cache_min + integer :: ao_integrals_cache_max + + File: :file:`map_integrals.irp.f` + + Min and max values of the AOs for which the integrals are in the cache + + + + +.. c:var:: ao_integrals_cache_min + + .. code:: text + + integer :: ao_integrals_cache_min + integer :: ao_integrals_cache_max + + File: :file:`map_integrals.irp.f` + + Min and max values of the AOs for which the integrals are in the cache + + + + +.. c:var:: ao_integrals_map + + .. code:: text + + type(map_type) :: ao_integrals_map + + File: :file:`map_integrals.irp.f` + + AO integrals + + + + +.. c:var:: big_array_coulomb_integrals + + .. code:: text + + double precision, allocatable :: big_array_coulomb_integrals (mo_tot_num,mo_tot_num,mo_tot_num) + double precision, allocatable :: big_array_exchange_integrals (mo_tot_num,mo_tot_num,mo_tot_num) + + File: :file:`integrals_3_index.irp.f` + + + + + + +.. c:var:: big_array_exchange_integrals + + .. code:: text + + double precision, allocatable :: big_array_coulomb_integrals (mo_tot_num,mo_tot_num,mo_tot_num) + double precision, allocatable :: big_array_exchange_integrals (mo_tot_num,mo_tot_num,mo_tot_num) + + File: :file:`integrals_3_index.irp.f` + + + + + + +.. c:var:: core_energy + + .. code:: text + + double precision :: core_energy + + File: :file:`core_quantities.irp.f` + + + + + + +.. c:var:: core_fock_operator + + .. code:: text + + double precision, allocatable :: core_fock_operator (mo_tot_num,mo_tot_num) + + File: :file:`core_quantities.irp.f` + + this is the contribution to the Fock operator from the core electrons + + + + +.. c:var:: gauleg_t2 + + .. code:: text + + double precision, allocatable :: gauleg_t2 (n_pt_max_integrals,n_pt_max_integrals/2) + double precision, allocatable :: gauleg_w (n_pt_max_integrals,n_pt_max_integrals/2) + + File: :file:`gauss_legendre.irp.f` + + t_w(i,1,k) = w(i) t_w(i,2,k) = t(i) + + + + +.. c:var:: gauleg_w + + .. code:: text + + double precision, allocatable :: gauleg_t2 (n_pt_max_integrals,n_pt_max_integrals/2) + double precision, allocatable :: gauleg_w (n_pt_max_integrals,n_pt_max_integrals/2) + + File: :file:`gauss_legendre.irp.f` + + t_w(i,1,k) = w(i) t_w(i,2,k) = t(i) + + + + +.. c:var:: general_primitive_integral + + .. code:: text + + double precision function general_primitive_integral(dim, & + P_new,P_center,fact_p,p,p_inv,iorder_p, & + Q_new,Q_center,fact_q,q,q_inv,iorder_q) + + File: :file:`ao_bi_integrals.irp.f` + + Computes the integral where p,q,r,s are Gaussian primitives + + + + +.. c:var:: i_x1_new + + .. code:: text + + recursive subroutine I_x1_new(a,c,B_10,B_01,B_00,res,n_pt) + + File: :file:`ao_bi_integrals.irp.f` + + recursive function involved in the bielectronic integral + + + + +.. c:var:: i_x1_pol_mult_a1 + + .. code:: text + + recursive subroutine I_x1_pol_mult_a1(c,B_10,B_01,B_00,C_00,D_00,d,nd,n_pt_in) + + File: :file:`ao_bi_integrals.irp.f` + + recursive function involved in the bielectronic integral + + + + +.. c:var:: i_x1_pol_mult_a2 + + .. code:: text + + recursive subroutine I_x1_pol_mult_a2(c,B_10,B_01,B_00,C_00,D_00,d,nd,n_pt_in) + + File: :file:`ao_bi_integrals.irp.f` + + recursive function involved in the bielectronic integral + + + + +.. c:var:: i_x1_pol_mult_recurs + + .. code:: text + + recursive subroutine I_x1_pol_mult_recurs(a,c,B_10,B_01,B_00,C_00,D_00,d,nd,n_pt_in) + + File: :file:`ao_bi_integrals.irp.f` + + recursive function involved in the bielectronic integral + + + + +.. c:var:: i_x2_new + + .. code:: text + + recursive subroutine I_x2_new(c,B_10,B_01,B_00,res,n_pt) + + File: :file:`ao_bi_integrals.irp.f` + + recursive function involved in the bielectronic integral + + + + +.. c:var:: i_x2_pol_mult + + .. code:: text + + recursive subroutine I_x2_pol_mult(c,B_10,B_01,B_00,C_00,D_00,d,nd,dim) + + File: :file:`ao_bi_integrals.irp.f` + + recursive function involved in the bielectronic integral + + + + +.. c:var:: insert_into_mo_integrals_map + + .. code:: text + + subroutine insert_into_mo_integrals_map(n_integrals, & + buffer_i, buffer_values, thr) + + File: :file:`map_integrals.irp.f` + + Create new entry into MO map, or accumulate in an existing entry + + + + +.. c:var:: mo_bielec_integral_jj + + .. code:: text + + double precision, allocatable :: mo_bielec_integral_jj (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_bielec_integral_jj_exchange (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_bielec_integral_jj_anti (mo_tot_num,mo_tot_num) + + File: :file:`mo_bi_integrals.irp.f` + + 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 + + + + +.. c:var:: mo_bielec_integral_jj_anti + + .. code:: text + + double precision, allocatable :: mo_bielec_integral_jj (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_bielec_integral_jj_exchange (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_bielec_integral_jj_anti (mo_tot_num,mo_tot_num) + + File: :file:`mo_bi_integrals.irp.f` + + 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 + + + + +.. c:var:: mo_bielec_integral_jj_anti_from_ao + + .. code:: text + + double precision, allocatable :: mo_bielec_integral_jj_from_ao (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_bielec_integral_jj_exchange_from_ao (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_bielec_integral_jj_anti_from_ao (mo_tot_num,mo_tot_num) + + File: :file:`mo_bi_integrals.irp.f` + + 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 + + + + +.. c:var:: mo_bielec_integral_jj_exchange + + .. code:: text + + double precision, allocatable :: mo_bielec_integral_jj (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_bielec_integral_jj_exchange (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_bielec_integral_jj_anti (mo_tot_num,mo_tot_num) + + File: :file:`mo_bi_integrals.irp.f` + + 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 + + + + +.. c:var:: mo_bielec_integral_jj_exchange_from_ao + + .. code:: text + + double precision, allocatable :: mo_bielec_integral_jj_from_ao (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_bielec_integral_jj_exchange_from_ao (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_bielec_integral_jj_anti_from_ao (mo_tot_num,mo_tot_num) + + File: :file:`mo_bi_integrals.irp.f` + + 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 + + + + +.. c:var:: mo_bielec_integral_jj_from_ao + + .. code:: text + + double precision, allocatable :: mo_bielec_integral_jj_from_ao (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_bielec_integral_jj_exchange_from_ao (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_bielec_integral_jj_anti_from_ao (mo_tot_num,mo_tot_num) + + File: :file:`mo_bi_integrals.irp.f` + + 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 + + + + +.. c:var:: mo_bielec_integral_vv_anti_from_ao + + .. code:: text + + double precision, allocatable :: mo_bielec_integral_vv_from_ao (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_bielec_integral_vv_exchange_from_ao (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_bielec_integral_vv_anti_from_ao (mo_tot_num,mo_tot_num) + + File: :file:`mo_bi_integrals.irp.f` + + 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 + + + + +.. c:var:: mo_bielec_integral_vv_exchange_from_ao + + .. code:: text + + double precision, allocatable :: mo_bielec_integral_vv_from_ao (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_bielec_integral_vv_exchange_from_ao (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_bielec_integral_vv_anti_from_ao (mo_tot_num,mo_tot_num) + + File: :file:`mo_bi_integrals.irp.f` + + 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 + + + + +.. c:var:: mo_bielec_integral_vv_from_ao + + .. code:: text + + double precision, allocatable :: mo_bielec_integral_vv_from_ao (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_bielec_integral_vv_exchange_from_ao (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_bielec_integral_vv_anti_from_ao (mo_tot_num,mo_tot_num) + + File: :file:`mo_bi_integrals.irp.f` + + 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 + + + + +.. c:var:: mo_bielec_integrals_in_map + + .. code:: text + + logical :: mo_bielec_integrals_in_map + + File: :file:`mo_bi_integrals.irp.f` + + If True, the map of MO bielectronic integrals is provided + + + + +.. c:var:: mo_integrals_cache + + .. code:: text + + double precision, allocatable :: mo_integrals_cache (0_8:128_8*128_8*128_8*128_8) + + File: :file:`map_integrals.irp.f` + + Cache of MO integrals for fast access + + + + +.. c:var:: mo_integrals_cache_max + + .. code:: text + + integer*4 :: mo_integrals_cache_min + integer*4 :: mo_integrals_cache_max + integer*8 :: mo_integrals_cache_min_8 + integer*8 :: mo_integrals_cache_max_8 + + File: :file:`map_integrals.irp.f` + + Min and max values of the MOs for which the integrals are in the cache + + + + +.. c:var:: mo_integrals_cache_max_8 + + .. code:: text + + integer*4 :: mo_integrals_cache_min + integer*4 :: mo_integrals_cache_max + integer*8 :: mo_integrals_cache_min_8 + integer*8 :: mo_integrals_cache_max_8 + + File: :file:`map_integrals.irp.f` + + Min and max values of the MOs for which the integrals are in the cache + + + + +.. c:var:: mo_integrals_cache_min + + .. code:: text + + integer*4 :: mo_integrals_cache_min + integer*4 :: mo_integrals_cache_max + integer*8 :: mo_integrals_cache_min_8 + integer*8 :: mo_integrals_cache_max_8 + + File: :file:`map_integrals.irp.f` + + Min and max values of the MOs for which the integrals are in the cache + + + + +.. c:var:: mo_integrals_cache_min_8 + + .. code:: text + + integer*4 :: mo_integrals_cache_min + integer*4 :: mo_integrals_cache_max + integer*8 :: mo_integrals_cache_min_8 + integer*8 :: mo_integrals_cache_max_8 + + File: :file:`map_integrals.irp.f` + + Min and max values of the MOs for which the integrals are in the cache + + + + +.. c:var:: mo_integrals_map + + .. code:: text + + type(map_type) :: mo_integrals_map + + File: :file:`map_integrals.irp.f` + + MO integrals + + + + +.. c:var:: read_ao_integrals + + .. code:: text + + logical :: read_ao_integrals + logical :: read_mo_integrals + logical :: write_ao_integrals + logical :: write_mo_integrals + + File: :file:`read_write.irp.f` + + One level of abstraction for disk_access_ao_integrals and disk_access_mo_integrals + + + + +.. c:var:: read_mo_integrals + + .. code:: text + + logical :: read_ao_integrals + logical :: read_mo_integrals + logical :: write_ao_integrals + logical :: write_mo_integrals + + File: :file:`read_write.irp.f` + + One level of abstraction for disk_access_ao_integrals and disk_access_mo_integrals + + + + +.. c:var:: write_ao_integrals + + .. code:: text + + logical :: read_ao_integrals + logical :: read_mo_integrals + logical :: write_ao_integrals + logical :: write_mo_integrals + + File: :file:`read_write.irp.f` + + One level of abstraction for disk_access_ao_integrals and disk_access_mo_integrals + + + + +.. c:var:: write_mo_integrals + + .. code:: text + + logical :: read_ao_integrals + logical :: read_mo_integrals + logical :: write_ao_integrals + logical :: write_mo_integrals + + File: :file:`read_write.irp.f` + + One level of abstraction for disk_access_ao_integrals and disk_access_mo_integrals + + + + +Subroutines / functions +----------------------- + + + +.. c:function:: add_integrals_to_map + + .. code:: text + + subroutine add_integrals_to_map(mask_ijkl) + + File: :file:`mo_bi_integrals.irp.f` + + Adds integrals to tha MO map according to some bitmask + + + + + +.. c:function:: add_integrals_to_map_no_exit_34 + + .. code:: text + + subroutine add_integrals_to_map_no_exit_34(mask_ijkl) + + File: :file:`mo_bi_integrals.irp.f` + + Adds integrals to tha MO map according to some bitmask + + + + + +.. c:function:: add_integrals_to_map_three_indices + + .. code:: text + + subroutine add_integrals_to_map_three_indices(mask_ijk) + + File: :file:`mo_bi_integrals.irp.f` + + Adds integrals to tha MO map according to some bitmask + + + + + +.. c:function:: ao_bielec_integral + + .. code:: text + + double precision function ao_bielec_integral(i,j,k,l) + + File: :file:`ao_bi_integrals.irp.f` + + integral of the AO basis or (ij|kl) i(r1) j(r1) 1/r12 k(r2) l(r2) + + + + + +.. c:function:: ao_bielec_integral_schwartz_accel + + .. code:: text + + double precision function ao_bielec_integral_schwartz_accel(i,j,k,l) + + File: :file:`ao_bi_integrals.irp.f` + + integral of the AO basis or (ij|kl) i(r1) j(r1) 1/r12 k(r2) l(r2) + + + + + +.. c:function:: ao_bielec_integrals_in_map_collector + + .. code:: text + + subroutine ao_bielec_integrals_in_map_collector(zmq_socket_pull) + + File: :file:`ao_bielec_integrals_in_map_slave.irp.f` + + Collects results from the AO integral calculation + + + + + +.. c:function:: ao_bielec_integrals_in_map_slave + + .. code:: text + + subroutine ao_bielec_integrals_in_map_slave(thread,iproc) + + File: :file:`ao_bielec_integrals_in_map_slave.irp.f` + + Computes a buffer of integrals + + + + + +.. c:function:: ao_bielec_integrals_in_map_slave_inproc + + .. code:: text + + subroutine ao_bielec_integrals_in_map_slave_inproc(i) + + File: :file:`ao_bielec_integrals_in_map_slave.irp.f` + + Computes a buffer of integrals. i is the ID of the current thread. + + + + + +.. c:function:: ao_bielec_integrals_in_map_slave_tcp + + .. code:: text + + subroutine ao_bielec_integrals_in_map_slave_tcp(i) + + File: :file:`ao_bielec_integrals_in_map_slave.irp.f` + + Computes a buffer of integrals. i is the ID of the current thread. + + + + + +.. c:function:: ao_l4 + + .. code:: text + + integer function ao_l4(i,j,k,l) + + File: :file:`ao_bi_integrals.irp.f` + + Computes the product of l values of i,j,k,and l + + + + + +.. c:function:: bielec_integrals_index + + .. code:: text + + subroutine bielec_integrals_index(i,j,k,l,i1) + + File: :file:`map_integrals.irp.f` + + + + + + + +.. c:function:: bielec_integrals_index_reverse + + .. code:: text + + subroutine bielec_integrals_index_reverse(i,j,k,l,i1) + + File: :file:`map_integrals.irp.f` + + + + + + + +.. c:function:: clear_ao_map + + .. code:: text + + subroutine clear_ao_map + + File: :file:`map_integrals.irp.f` + + Frees the memory of the AO map + + + + + +.. c:function:: clear_mo_map + + .. code:: text + + subroutine clear_mo_map + + File: :file:`mo_bi_integrals.irp.f` + + Frees the memory of the MO map + + + + + +.. c:function:: compute_ao_bielec_integrals + + .. code:: text + + subroutine compute_ao_bielec_integrals(j,k,l,sze,buffer_value) + + File: :file:`ao_bi_integrals.irp.f` + + Compute AO 1/r12 integrals for all i and fixed j,k,l + + + + + +.. c:function:: compute_ao_integrals_jl + + .. code:: text + + subroutine compute_ao_integrals_jl(j,l,n_integrals,buffer_i,buffer_value) + + File: :file:`ao_bi_integrals.irp.f` + + Parallel client for AO integrals + + + + + +.. c:function:: dump_ao_integrals + + .. code:: text + + subroutine dump_ao_integrals(filename) + + File: :file:`map_integrals.irp.f_template_750` + + Save to disk the $ao integrals + + + + + +.. c:function:: dump_mo_integrals + + .. code:: text + + subroutine dump_mo_integrals(filename) + + File: :file:`map_integrals.irp.f_template_750` + + Save to disk the $ao integrals + + + + + +.. c:function:: eri + + .. code:: text + + double precision function ERI(alpha,beta,delta,gama,a_x,b_x,c_x,d_x,a_y,b_y,c_y,d_y,a_z,b_z,c_z,d_z) + + File: :file:`ao_bi_integrals.irp.f` + + 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) + + + + + +.. c:function:: gauleg + + .. code:: text + + subroutine gauleg(x1,x2,x,w,n) + + File: :file:`gauss_legendre.irp.f` + + Gauss-Legendre + + + + + +.. c:function:: get_ao_bielec_integral + + .. code:: text + + double precision function get_ao_bielec_integral(i,j,k,l,map) result(result) + + File: :file:`map_integrals.irp.f` + + Gets one AO bi-electronic integral from the AO map + + + + + +.. c:function:: get_ao_bielec_integrals + + .. code:: text + + subroutine get_ao_bielec_integrals(j,k,l,sze,out_val) + + File: :file:`map_integrals.irp.f` + + Gets multiple AO bi-electronic integral from the AO map . All i are retrieved for j,k,l fixed. + + + + + +.. c:function:: get_ao_bielec_integrals_non_zero + + .. code:: text + + subroutine get_ao_bielec_integrals_non_zero(j,k,l,sze,out_val,out_val_index,non_zero_int) + + File: :file:`map_integrals.irp.f` + + Gets multiple AO bi-electronic integral from the AO map . All non-zero i are retrieved for j,k,l fixed. + + + + + +.. c:function:: get_ao_map_size + + .. code:: text + + function get_ao_map_size() + + File: :file:`map_integrals.irp.f` + + Returns the number of elements in the AO map + + + + + +.. c:function:: get_mo_bielec_integral + + .. code:: text + + double precision function get_mo_bielec_integral(i,j,k,l,map) + + File: :file:`map_integrals.irp.f` + + Returns one integral in the MO basis + + + + + +.. c:function:: get_mo_bielec_integrals + + .. code:: text + + subroutine get_mo_bielec_integrals(j,k,l,sze,out_val,map) + + File: :file:`map_integrals.irp.f` + + Returns multiple integrals in the MO basis, all i for j,k,l fixed. + + + + + +.. c:function:: get_mo_bielec_integrals_coulomb_ii + + .. code:: text + + subroutine get_mo_bielec_integrals_coulomb_ii(k,l,sze,out_val,map) + + File: :file:`map_integrals.irp.f` + + Returns multiple integrals k(1)i(2) 1/r12 l(1)i(2) :: out_val(i1) for k,l fixed. + + + + + +.. c:function:: get_mo_bielec_integrals_exch_ii + + .. code:: text + + subroutine get_mo_bielec_integrals_exch_ii(k,l,sze,out_val,map) + + File: :file:`map_integrals.irp.f` + + Returns multiple integrals k(1)i(2) 1/r12 i(1)l(2) :: out_val(i1) for k,l fixed. + + + + + +.. c:function:: get_mo_bielec_integrals_ij + + .. code:: text + + subroutine get_mo_bielec_integrals_ij(k,l,sze,out_array,map) + + File: :file:`map_integrals.irp.f` + + Returns multiple integrals in the MO basis, all i(1)j(2) 1/r12 k(1)l(2) i, j for k,l fixed. + + + + + +.. c:function:: get_mo_map_size + + .. code:: text + + integer*8 function get_mo_map_size() + + File: :file:`map_integrals.irp.f` + + Return the number of elements in the MO map + + + + + +.. c:function:: give_polynom_mult_center_x + + .. code:: text + + subroutine give_polynom_mult_center_x(P_center,Q_center,a_x,d_x,p,q,n_pt_in,pq_inv,pq_inv_2,p10_1,p01_1,p10_2,p01_2,d,n_pt_out) + + File: :file:`ao_bi_integrals.irp.f` + + 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) + + + + + +.. c:function:: i_x1_pol_mult + + .. code:: text + + subroutine I_x1_pol_mult(a,c,B_10,B_01,B_00,C_00,D_00,d,nd,n_pt_in) + + File: :file:`ao_bi_integrals.irp.f` + + recursive function involved in the bielectronic integral + + + + + +.. c:function:: insert_into_ao_integrals_map + + .. code:: text + + subroutine insert_into_ao_integrals_map(n_integrals,buffer_i, buffer_values) + + File: :file:`map_integrals.irp.f` + + Create new entry into AO map + + + + + +.. c:function:: integrale_new + + .. code:: text + + 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,n_pt) + + File: :file:`ao_bi_integrals.irp.f` + + 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) + + + + + +.. c:function:: load_ao_integrals + + .. code:: text + + integer function load_ao_integrals(filename) + + File: :file:`map_integrals.irp.f_template_750` + + Read from disk the $ao integrals + + + + + +.. c:function:: load_mo_integrals + + .. code:: text + + integer function load_mo_integrals(filename) + + File: :file:`map_integrals.irp.f_template_750` + + Read from disk the $ao integrals + + + + + +.. c:function:: mo_bielec_integral + + .. code:: text + + double precision function mo_bielec_integral(i,j,k,l) + + File: :file:`map_integrals.irp.f` + + Returns one integral in the MO basis + + + + + +.. c:function:: mo_bielec_integrals_index + + .. code:: text + + subroutine mo_bielec_integrals_index(i,j,k,l,i1) + + File: :file:`mo_bi_integrals.irp.f` + + Computes an unique index for i,j,k,l integrals + + + + + +.. c:function:: n_pt_sup + + .. code:: text + + integer function n_pt_sup(a_x,b_x,c_x,d_x,a_y,b_y,c_y,d_y,a_z,b_z,c_z,d_z) + + File: :file:`ao_bi_integrals.irp.f` + + 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) + + + + + +.. c:function:: provide_all_mo_integrals + + .. code:: text + + subroutine provide_all_mo_integrals + + File: :file:`mo_bi_integrals.irp.f` + + + + + + + +.. c:function:: push_integrals + + .. code:: text + + subroutine push_integrals(zmq_socket_push, n_integrals, buffer_i, buffer_value, task_id) + + File: :file:`ao_bielec_integrals_in_map_slave.irp.f` + + Push integrals in the push socket + + + + + +.. c:function:: set_integrals_exchange_jj_into_map + + .. code:: text + + subroutine set_integrals_exchange_jj_into_map + + File: :file:`mo_bi_integrals.irp.f` + + + + + + + +.. c:function:: set_integrals_jj_into_map + + .. code:: text + + subroutine set_integrals_jj_into_map + + File: :file:`mo_bi_integrals.irp.f` + + + - Default: False diff --git a/docs/source/modules/iterations.rst b/docs/source/modules/iterations.rst index 79a4711c..9c108399 100644 --- a/docs/source/modules/iterations.rst +++ b/docs/source/modules/iterations.rst @@ -17,21 +17,97 @@ EZFIO parameters .. option:: n_iter - Number of saved iterations + Number of saved iterations - Default: 1 + Default: 1 .. option:: n_det_iterations - Number of determinants at each iteration + Number of determinants at each iteration .. option:: energy_iterations - The variational energy at each iteration + The variational energy at each iteration .. option:: pt2_iterations - The |PT2| correction at each iteration + The |PT2| correction at each iteration + + + +Providers +--------- + + +.. c:var:: extrapolated_energy + + .. code:: text + + double precision, allocatable :: extrapolated_energy (N_iter,N_states) + + File: :file:`iterations.irp.f` + + Extrapolated energy, using E_var = f(PT2) where PT2=0 + + + + +.. c:var:: n_iter + + .. code:: text + + integer :: n_iter + + File: :file:`io.irp.f` + + number of iterations + + + + +Subroutines / functions +----------------------- + + + +.. c:function:: print_extrapolated_energy + + .. code:: text + + subroutine print_extrapolated_energy(e_,pt2_) + + File: :file:`print_extrapolation.irp.f` + + Print the extrapolated energy in the output + + + + + +.. c:function:: print_summary + + .. code:: text + + subroutine print_summary(e_,pt2_,error_,variance_,norm_) + + File: :file:`print_summary.irp.f` + + Print the extrapolated energy in the output + + + + + +.. c:function:: save_iterations + + .. code:: text + + subroutine save_iterations(e_, pt2_,n_) + + File: :file:`iterations.irp.f` + + Update the energy in the EZFIO file. + diff --git a/docs/source/modules/mo_basis.rst b/docs/source/modules/mo_basis.rst index b53c5bfd..81f915fe 100644 --- a/docs/source/modules/mo_basis.rst +++ b/docs/source/modules/mo_basis.rst @@ -36,30 +36,314 @@ EZFIO parameters .. option:: mo_tot_num - Total number of |MOs| + Total number of |MOs| .. option:: mo_coef - Coefficient of the i-th |AO| on the j-th |MO| + Coefficient of the i-th |AO| on the j-th |MO| .. option:: mo_label - Label characterizing the MOS (Local, Canonical, Natural, *etc*) + Label characterizing the MOS (Local, Canonical, Natural, *etc*) .. option:: mo_occ - |MO| occupation numbers + |MO| occupation numbers .. option:: mo_class - [ Core | Inactive | Active | Virtual | Deleted ], as defined by :ref:`qp_set_mo_class` + [ Core | Inactive | Active | Virtual | Deleted ], as defined by :ref:`qp_set_mo_class` .. option:: ao_md5 - MD5 checksum characterizing the |AO| basis set. + MD5 checksum characterizing the |AO| basis set. + + + +Providers +--------- + + +.. c:var:: mo_coef + + .. code:: text + + double precision, allocatable :: mo_coef (ao_num,mo_tot_num) + + File: :file:`mos.irp.f` + + 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) + + + + +.. c:var:: mo_coef_in_ao_ortho_basis + + .. code:: text + + double precision, allocatable :: mo_coef_in_ao_ortho_basis (ao_num,mo_tot_num) + + File: :file:`mos.irp.f` + + MO coefficients in orthogonalized AO basis + C^(-1).C_mo + + + + +.. c:var:: mo_coef_transp + + .. code:: text + + double precision, allocatable :: mo_coef_transp (mo_tot_num,ao_num) + + File: :file:`mos.irp.f` + + Molecular orbital coefficients on AO basis set + + + + +.. c:var:: mo_label + + .. code:: text + + character*(64) :: mo_label + + File: :file:`mos.irp.f` + + 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) + + + + +.. c:var:: mo_num + + .. code:: text + + integer :: mo_num + + File: :file:`mos.irp.f` + + mo_tot_num without the highest deleted MOs + + + + +.. c:var:: mo_occ + + .. code:: text + + double precision, allocatable :: mo_occ (mo_tot_num) + + File: :file:`mos.irp.f` + + MO occupation numbers + + + + +.. c:var:: mo_tot_num + + .. code:: text + + integer :: mo_tot_num + + File: :file:`mos.irp.f` + + Number of MOs + + + + +Subroutines / functions +----------------------- + + + +.. c:function:: ao_ortho_cano_to_ao + + .. code:: text + + subroutine ao_ortho_cano_to_ao(A_ao,LDA_ao,A,LDA) + + File: :file:`mos.irp.f` + + Transform A from the AO basis to the orthogonal AO basis + C^(-1).A_ao.Ct^(-1) + + + + + +.. c:function:: ao_to_mo + + .. code:: text + + subroutine ao_to_mo(A_ao,LDA_ao,A_mo,LDA_mo) + + File: :file:`mos.irp.f` + + Transform A from the AO basis to the MO basis + Ct.A_ao.C + + + + + +.. c:function:: give_all_mos_at_r + + .. code:: text + + subroutine give_all_mos_at_r(r,mos_array) + + File: :file:`utils.irp.f` + + + + + + + +.. c:function:: give_specific_mos_at_r + + .. code:: text + + subroutine give_specific_mos_at_r(r,mos_array, mo_coef_specific) + + File: :file:`utils.irp.f` + + + + + + + +.. c:function:: mix_mo_jk + + .. code:: text + + subroutine mix_mo_jk(j,k) + + File: :file:`mos.irp.f` + + 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)) + + + + + +.. c:function:: mo_as_eigvectors_of_mo_matrix + + .. code:: text + + subroutine mo_as_eigvectors_of_mo_matrix(matrix,n,m,label,sign,output) + + File: :file:`utils.irp.f` + + + + + + + +.. c:function:: mo_as_eigvectors_of_mo_matrix_sort_by_observable + + .. code:: text + + subroutine mo_as_eigvectors_of_mo_matrix_sort_by_observable(matrix,observable,n,m,label) + + File: :file:`utils.irp.f` + + + + + + + +.. c:function:: mo_as_svd_vectors_of_mo_matrix + + .. code:: text + + subroutine mo_as_svd_vectors_of_mo_matrix(matrix,lda,m,n,label) + + File: :file:`utils.irp.f` + + + + + + + +.. c:function:: mo_as_svd_vectors_of_mo_matrix_eig + + .. code:: text + + subroutine mo_as_svd_vectors_of_mo_matrix_eig(matrix,lda,m,n,eig,label) + + File: :file:`utils.irp.f` + + + + + + + +.. c:function:: mo_sort_by_observable + + .. code:: text + + subroutine mo_sort_by_observable(observable,label) + + File: :file:`utils.irp.f` + + + + + + + +.. c:function:: mo_to_ao_no_overlap + + .. code:: text + + subroutine mo_to_ao_no_overlap(A_mo,LDA_mo,A_ao,LDA_ao) + + File: :file:`mos.irp.f` + + Transform A from the MO basis to the S^-1 AO basis Useful for density matrix + + + + + +.. c:function:: save_mos + + .. code:: text + + subroutine save_mos + + File: :file:`utils.irp.f` + + + + + + + +.. c:function:: save_mos_truncated + + .. code:: text + + subroutine save_mos_truncated(n) + + File: :file:`utils.irp.f` + + + diff --git a/docs/source/modules/mo_one_e_integrals.rst b/docs/source/modules/mo_one_e_integrals.rst index 3b7e9fd6..aedd40d6 100644 --- a/docs/source/modules/mo_one_e_integrals.rst +++ b/docs/source/modules/mo_one_e_integrals.rst @@ -18,21 +18,267 @@ EZFIO parameters .. option:: integral_nuclear - Nucleus-electron integrals in |MO| basis set + Nucleus-electron integrals in |MO| basis set .. option:: integral_kinetic - Kinetic energy integrals in |MO| basis set + Kinetic energy integrals in |MO| basis set .. option:: integral_pseudo - Pseudopotential integrals in |MO| basis set + Pseudopotential integrals in |MO| basis set .. option:: disk_access_mo_one_integrals - Read/Write |MO| one-electron integrals from/to disk [ Write | Read | None ] + Read/Write |MO| one-electron integrals from/to disk [ Write | Read | None ] + + Default: None + + +Providers +--------- + + +.. c:var:: mo_dipole_x + + .. code:: text + + double precision, allocatable :: mo_dipole_x (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_dipole_y (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_dipole_z (mo_tot_num,mo_tot_num) + + File: :file:`spread_dipole_mo.irp.f` + + array of the integrals of MO_i * x MO_j array of the integrals of MO_i * y MO_j array of the integrals of MO_i * z MO_j + + + + +.. c:var:: mo_dipole_y + + .. code:: text + + double precision, allocatable :: mo_dipole_x (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_dipole_y (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_dipole_z (mo_tot_num,mo_tot_num) + + File: :file:`spread_dipole_mo.irp.f` + + array of the integrals of MO_i * x MO_j array of the integrals of MO_i * y MO_j array of the integrals of MO_i * z MO_j + + + + +.. c:var:: mo_dipole_z + + .. code:: text + + double precision, allocatable :: mo_dipole_x (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_dipole_y (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_dipole_z (mo_tot_num,mo_tot_num) + + File: :file:`spread_dipole_mo.irp.f` + + array of the integrals of MO_i * x MO_j array of the integrals of MO_i * y MO_j array of the integrals of MO_i * z MO_j + + + + +.. c:var:: mo_kinetic_integral + + .. code:: text + + double precision, allocatable :: mo_kinetic_integral (mo_tot_num,mo_tot_num) + + File: :file:`kin_mo_ints.irp.f` + + Kinetic energy integrals in the MO basis + + + + +.. c:var:: mo_mono_elec_integral + + .. code:: text + + double precision, allocatable :: mo_mono_elec_integral (mo_tot_num,mo_tot_num) + + File: :file:`mo_mono_ints.irp.f` + + array of the mono electronic hamiltonian on the MOs basis : sum of the kinetic and nuclear electronic potential (and pseudo potential if needed) + + + + +.. c:var:: mo_nucl_elec_integral + + .. code:: text + + double precision, allocatable :: mo_nucl_elec_integral (mo_tot_num,mo_tot_num) + + File: :file:`pot_mo_ints.irp.f` + + interaction nuclear electron on the MO basis + + + + +.. c:var:: mo_nucl_elec_integral_per_atom + + .. code:: text + + double precision, allocatable :: mo_nucl_elec_integral_per_atom (mo_tot_num,mo_tot_num,nucl_num) + + File: :file:`pot_mo_ints.irp.f` + + mo_nucl_elec_integral_per_atom(i,j,k) = - where Rk is the geometry of the kth atom + + + + +.. c:var:: mo_overlap + + .. code:: text + + double precision, allocatable :: mo_overlap (mo_tot_num,mo_tot_num) + + File: :file:`mo_overlap.irp.f` + + + + + + +.. c:var:: mo_pseudo_integral + + .. code:: text + + double precision, allocatable :: mo_pseudo_integral (mo_tot_num,mo_tot_num) + + File: :file:`pot_mo_pseudo_ints.irp.f` + + interaction nuclear electron on the MO basis + + + + +.. c:var:: mo_spread_x + + .. code:: text + + double precision, allocatable :: mo_spread_x (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_spread_y (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_spread_z (mo_tot_num,mo_tot_num) + + File: :file:`spread_dipole_mo.irp.f` + + array of the integrals of MO_i * x^2 MO_j array of the integrals of MO_i * y^2 MO_j array of the integrals of MO_i * z^2 MO_j + + + + +.. c:var:: mo_spread_y + + .. code:: text + + double precision, allocatable :: mo_spread_x (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_spread_y (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_spread_z (mo_tot_num,mo_tot_num) + + File: :file:`spread_dipole_mo.irp.f` + + array of the integrals of MO_i * x^2 MO_j array of the integrals of MO_i * y^2 MO_j array of the integrals of MO_i * z^2 MO_j + + + + +.. c:var:: mo_spread_z + + .. code:: text + + double precision, allocatable :: mo_spread_x (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_spread_y (mo_tot_num,mo_tot_num) + double precision, allocatable :: mo_spread_z (mo_tot_num,mo_tot_num) + + File: :file:`spread_dipole_mo.irp.f` + + array of the integrals of MO_i * x^2 MO_j array of the integrals of MO_i * y^2 MO_j array of the integrals of MO_i * z^2 MO_j + + + + +.. c:var:: read_mo_one_integrals + + .. code:: text + + logical :: read_mo_one_integrals + logical :: write_mo_one_integrals + + File: :file:`read_write.irp.f` + + One level of abstraction for disk_access_mo_integrals + + + + +.. c:var:: s_mo_coef + + .. code:: text + + double precision, allocatable :: s_mo_coef (ao_num,mo_tot_num) + + File: :file:`ao_to_mo.irp.f` + + Product S.C where S is the overlap matrix in the AO basis and C the mo_coef matrix. + + + + +.. c:var:: write_mo_one_integrals + + .. code:: text + + logical :: read_mo_one_integrals + logical :: write_mo_one_integrals + + File: :file:`read_write.irp.f` + + One level of abstraction for disk_access_mo_integrals + + + + +Subroutines / functions +----------------------- + + + +.. c:function:: mo_to_ao + + .. code:: text + + subroutine mo_to_ao(A_mo,LDA_mo,A_ao,LDA_ao) + + File: :file:`ao_to_mo.irp.f` + + Transform A from the MO basis to the AO basis + (S.C).A_mo.(S.C)t + + + + + +.. c:function:: orthonormalize_mos + + .. code:: text + + subroutine orthonormalize_mos + + File: :file:`orthonormalize.irp.f` + + + - Default: None diff --git a/docs/source/modules/moguess.rst b/docs/source/modules/moguess.rst index 12520ef8..ddf72da5 100644 --- a/docs/source/modules/moguess.rst +++ b/docs/source/modules/moguess.rst @@ -11,3 +11,77 @@ MOGuess Guess for |MOs|. + + +Providers +--------- + + +.. c:var:: ao_ortho_canonical_nucl_elec_integral + + .. code:: text + + double precision, allocatable :: ao_ortho_canonical_nucl_elec_integral (mo_tot_num,mo_tot_num) + + File: :file:`pot_mo_ortho_canonical_ints.irp.f` + + + + + + +.. c:var:: ao_ortho_lowdin_coef + + .. code:: text + + double precision, allocatable :: ao_ortho_lowdin_coef (ao_num,ao_num) + + File: :file:`mo_ortho_lowdin.irp.f` + + 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 + + + + +.. c:var:: ao_ortho_lowdin_nucl_elec_integral + + .. code:: text + + double precision, allocatable :: ao_ortho_lowdin_nucl_elec_integral (mo_tot_num,mo_tot_num) + + File: :file:`pot_mo_ortho_lowdin_ints.irp.f` + + + + + + +.. c:var:: ao_ortho_lowdin_overlap + + .. code:: text + + double precision, allocatable :: ao_ortho_lowdin_overlap (ao_num,ao_num) + + File: :file:`mo_ortho_lowdin.irp.f` + + overlap matrix of the ao_ortho_lowdin supposed to be the Identity + + + + +Subroutines / functions +----------------------- + + + +.. c:function:: hcore_guess + + .. code:: text + + subroutine hcore_guess + + File: :file:`h_core_guess_routine.irp.f` + + Produce `H_core` MO orbital + + diff --git a/docs/source/modules/mpi.rst b/docs/source/modules/mpi.rst index 87f11536..5cc70a5a 100644 --- a/docs/source/modules/mpi.rst +++ b/docs/source/modules/mpi.rst @@ -10,3 +10,107 @@ MPI Contains all the functions and providers for parallelization with |MPI|. + + +Providers +--------- + + +.. c:var:: mpi_initialized + + .. code:: text + + logical :: mpi_initialized + + File: :file:`mpi.irp.f` + + Always true. Initialized MPI + + + + +.. c:var:: mpi_master + + .. code:: text + + logical :: mpi_master + + File: :file:`mpi.irp.f` + + If true, rank is zero + + + + +.. c:var:: mpi_rank + + .. code:: text + + integer :: mpi_rank + integer :: mpi_size + + File: :file:`mpi.irp.f` + + Rank of MPI process and number of MPI processes + + + + +.. c:var:: mpi_size + + .. code:: text + + integer :: mpi_rank + integer :: mpi_size + + File: :file:`mpi.irp.f` + + Rank of MPI process and number of MPI processes + + + + +Subroutines / functions +----------------------- + + + +.. c:function:: broadcast_chunks_double + + .. code:: text + + subroutine broadcast_chunks_double(A, LDA) + + File: :file:`mpi.irp.f_template_97` + + Broadcast with chunks of ~2GB + + + + + +.. c:function:: broadcast_chunks_integer + + .. code:: text + + subroutine broadcast_chunks_integer(A, LDA) + + File: :file:`mpi.irp.f_template_97` + + Broadcast with chunks of ~2GB + + + + + +.. c:function:: broadcast_chunks_integer8 + + .. code:: text + + subroutine broadcast_chunks_integer8(A, LDA) + + File: :file:`mpi.irp.f_template_97` + + Broadcast with chunks of ~2GB + + diff --git a/docs/source/modules/mrpt_utils.rst b/docs/source/modules/mrpt_utils.rst index e35f80b4..c7f0e161 100644 --- a/docs/source/modules/mrpt_utils.rst +++ b/docs/source/modules/mrpt_utils.rst @@ -17,6 +17,1874 @@ EZFIO parameters .. option:: do_third_order_1h1p - If `True`, compute the third order contribution for the 1h1p + If `True`, compute the third order contribution for the 1h1p + + Default: True + + +Providers +--------- + + +.. c:var:: apply_exc_to_psi + + .. code:: text + + subroutine apply_exc_to_psi(orb,hole_particle,spin_exc, & + norm_out,psi_in_out,psi_in_out_coef, ndet,dim_psi_in,dim_psi_coef,N_states_in) + + File: :file:`excitations_cas.irp.f` + + apply a contracted excitation to psi_in_out whose coefficients are psi_in_out_coef hole_particle = 1 ===> creation of an electron in psi_in_out = -1 ===> annhilation of an electron in psi_in_out orb ===> is the index of orbital where you want wether to create or annhilate an electron spin_exc ===> is the spin of the electron (1 == alpha) (2 == beta) the wave function gets out normalized to unity + norm_out is the sum of the squared of the coefficients on which the excitation has been possible + + + + +.. c:var:: ci_dressed_pt2_new_eigenvectors + + .. code:: text + + double precision, allocatable :: ci_electronic_dressed_pt2_new_energy (N_states) + double precision, allocatable :: ci_dressed_pt2_new_eigenvectors (N_det,N_states) + double precision, allocatable :: ci_dressed_pt2_new_eigenvectors_s2 (N_states) + + File: :file:`mrpt_utils.irp.f` + + Eigenvectors/values of the CI matrix + + + + +.. c:var:: ci_dressed_pt2_new_eigenvectors_s2 + + .. code:: text + + double precision, allocatable :: ci_electronic_dressed_pt2_new_energy (N_states) + double precision, allocatable :: ci_dressed_pt2_new_eigenvectors (N_det,N_states) + double precision, allocatable :: ci_dressed_pt2_new_eigenvectors_s2 (N_states) + + File: :file:`mrpt_utils.irp.f` + + Eigenvectors/values of the CI matrix + + + + +.. c:var:: ci_dressed_pt2_new_energy + + .. code:: text + + double precision, allocatable :: ci_dressed_pt2_new_energy (N_states) + + File: :file:`mrpt_utils.irp.f` + + N_states lowest eigenvalues of the CI matrix + + + + +.. c:var:: ci_electronic_dressed_pt2_new_energy + + .. code:: text + + double precision, allocatable :: ci_electronic_dressed_pt2_new_energy (N_states) + double precision, allocatable :: ci_dressed_pt2_new_eigenvectors (N_det,N_states) + double precision, allocatable :: ci_dressed_pt2_new_eigenvectors_s2 (N_states) + + File: :file:`mrpt_utils.irp.f` + + Eigenvectors/values of the CI matrix + + + + +.. c:var:: corr_e_from_1h1p + + .. code:: text + + double precision, allocatable :: one_anhil_one_creat_inact_virt_bis (n_inact_orb,n_virt_orb,N_det,N_States) + double precision, allocatable :: corr_e_from_1h1p (N_States) + + File: :file:`energies_cas.irp.f` + + + + + + +.. c:var:: delta_ij_mrpt + + .. code:: text + + double precision, allocatable :: delta_ij_mrpt (N_det,N_det,N_states) + double precision, allocatable :: second_order_pt_new (N_states) + double precision, allocatable :: second_order_pt_new_1h (N_states) + double precision, allocatable :: second_order_pt_new_1p (N_states) + double precision, allocatable :: second_order_pt_new_1h1p (N_states) + double precision, allocatable :: second_order_pt_new_2h (N_states) + double precision, allocatable :: second_order_pt_new_2p (N_states) + double precision, allocatable :: second_order_pt_new_1h2p (N_states) + double precision, allocatable :: second_order_pt_new_2h1p (N_states) + double precision, allocatable :: second_order_pt_new_2h2p (N_states) + + File: :file:`mrpt_utils.irp.f` + + Dressing matrix in N_det basis + + + + +.. c:var:: energy_cas_dyall + + .. code:: text + + double precision, allocatable :: energy_cas_dyall (N_states) + + File: :file:`energies_cas.irp.f` + + + + + + +.. c:var:: energy_cas_dyall_no_exchange + + .. code:: text + + double precision, allocatable :: energy_cas_dyall_no_exchange (N_states) + + File: :file:`energies_cas.irp.f` + + + + + + +.. c:var:: fock_core_inactive + + .. code:: text + + double precision, allocatable :: fock_core_inactive (mo_tot_num) + + File: :file:`fock_like_operators.irp.f` + + inactive part of the fock operator with contributions only from the inactive + + + + +.. c:var:: fock_core_inactive_from_act + + .. code:: text + + double precision, allocatable :: fock_core_inactive_from_act (mo_tot_num,2,N_states) + + File: :file:`fock_like_operators.irp.f` + + inactive part of the fock operator with contributions only from the active + + + + +.. c:var:: fock_core_inactive_total + + .. code:: text + + double precision, allocatable :: fock_core_inactive_total (mo_tot_num,2,N_states) + double precision, allocatable :: fock_core_inactive_total_spin_trace (mo_tot_num,N_states) + + File: :file:`fock_like_operators.irp.f` + + inactive part of the fock operator + + + + +.. c:var:: fock_core_inactive_total_spin_trace + + .. code:: text + + double precision, allocatable :: fock_core_inactive_total (mo_tot_num,2,N_states) + double precision, allocatable :: fock_core_inactive_total_spin_trace (mo_tot_num,N_states) + + File: :file:`fock_like_operators.irp.f` + + inactive part of the fock operator + + + + +.. c:var:: fock_operator_active_from_core_inact + + .. code:: text + + double precision, allocatable :: fock_operator_active_from_core_inact (mo_tot_num,mo_tot_num) + + File: :file:`fock_like_operators.irp.f` + + active part of the fock operator with contributions only from the inactive + + + + +.. c:var:: fock_virt_from_act + + .. code:: text + + double precision, allocatable :: fock_virt_from_act (mo_tot_num,2,N_states) + + File: :file:`fock_like_operators.irp.f` + + virtual part of the fock operator with contributions only from the active + + + + +.. c:var:: fock_virt_from_core_inact + + .. code:: text + + double precision, allocatable :: fock_virt_from_core_inact (mo_tot_num) + + File: :file:`fock_like_operators.irp.f` + + fock operator for the virtuals that comes from the doubly occupied orbitals + + + + +.. c:var:: fock_virt_total + + .. code:: text + + double precision, allocatable :: fock_virt_total (mo_tot_num,2,N_states) + double precision, allocatable :: fock_virt_total_spin_trace (mo_tot_num,N_states) + + File: :file:`fock_like_operators.irp.f` + + inactive part of the fock operator + + + + +.. c:var:: fock_virt_total_spin_trace + + .. code:: text + + double precision, allocatable :: fock_virt_total (mo_tot_num,2,N_states) + double precision, allocatable :: fock_virt_total_spin_trace (mo_tot_num,N_states) + + File: :file:`fock_like_operators.irp.f` + + inactive part of the fock operator + + + + +.. c:var:: gen_det_ref_idx + + .. code:: text + + integer(bit_kind), allocatable :: gen_det_ref_sorted (N_int,2,N_det_generators,2) + integer, allocatable :: gen_det_ref_shortcut (0:N_det_generators,2) + integer, allocatable :: gen_det_ref_version (N_int,N_det_generators,2) + integer, allocatable :: gen_det_ref_idx (N_det_generators,2) + + File: :file:`mrpt_dress.irp.f` + + + + + + +.. c:var:: gen_det_ref_shortcut + + .. code:: text + + integer(bit_kind), allocatable :: gen_det_ref_sorted (N_int,2,N_det_generators,2) + integer, allocatable :: gen_det_ref_shortcut (0:N_det_generators,2) + integer, allocatable :: gen_det_ref_version (N_int,N_det_generators,2) + integer, allocatable :: gen_det_ref_idx (N_det_generators,2) + + File: :file:`mrpt_dress.irp.f` + + + + + + +.. c:var:: gen_det_ref_sorted + + .. code:: text + + integer(bit_kind), allocatable :: gen_det_ref_sorted (N_int,2,N_det_generators,2) + integer, allocatable :: gen_det_ref_shortcut (0:N_det_generators,2) + integer, allocatable :: gen_det_ref_version (N_int,N_det_generators,2) + integer, allocatable :: gen_det_ref_idx (N_det_generators,2) + + File: :file:`mrpt_dress.irp.f` + + + + + + +.. c:var:: gen_det_ref_version + + .. code:: text + + integer(bit_kind), allocatable :: gen_det_ref_sorted (N_int,2,N_det_generators,2) + integer, allocatable :: gen_det_ref_shortcut (0:N_det_generators,2) + integer, allocatable :: gen_det_ref_version (N_int,N_det_generators,2) + integer, allocatable :: gen_det_ref_idx (N_det_generators,2) + + File: :file:`mrpt_dress.irp.f` + + + + + + +.. c:var:: give_holes_and_particles_in_active_space + + .. code:: text + + subroutine give_holes_and_particles_in_active_space(det_1,det_2,n_holes_spin,n_particles_spin,n_holes,n_particles,& + holes_active_list,particles_active_list) + + File: :file:`psi_active_prov.irp.f` + + returns the holes and particles operators WITHIN THE ACTIVE SPACE that connect det_1 and det_2. By definition, the holes/particles are such that one starts from det_1 and goes to det_2 + n_holes is the total number of holes n_particles is the total number of particles n_holes_spin is the number of number of holes per spin (1=alpha, 2=beta) n_particles_spin is the number of number of particles per spin (1=alpha, 2=beta) holes_active_list is the index of the holes per spin, that ranges from 1 to n_act_orb particles_active_list is the index of the particles per spin, that ranges from 1 to n_act_orb + + + + +.. c:var:: hmatrix_dressed_pt2_new + + .. code:: text + + double precision, allocatable :: hmatrix_dressed_pt2_new (N_det,N_det,N_states) + + File: :file:`mrpt_utils.irp.f` + + + + + + +.. c:var:: hmatrix_dressed_pt2_new_symmetrized + + .. code:: text + + double precision, allocatable :: hmatrix_dressed_pt2_new_symmetrized (N_det,N_det,N_states) + + File: :file:`mrpt_utils.irp.f` + + + + + + +.. c:var:: one_anhil + + .. code:: text + + double precision, allocatable :: one_anhil (n_act_orb,2,N_states) + + File: :file:`energies_cas.irp.f` + + + + + + +.. c:var:: one_anhil_inact + + .. code:: text + + double precision, allocatable :: one_anhil_inact (n_inact_orb,n_act_orb,N_States) + + File: :file:`energies_cas.irp.f` + + + + + + +.. c:var:: one_anhil_one_creat + + .. code:: text + + double precision, allocatable :: one_anhil_one_creat (n_act_orb,n_act_orb,2,2,N_States) + + File: :file:`energies_cas.irp.f` + + + + + + +.. c:var:: one_anhil_one_creat_inact_virt + + .. code:: text + + double precision, allocatable :: one_anhil_one_creat_inact_virt (n_inact_orb,n_virt_orb,N_States) + double precision, allocatable :: one_anhil_one_creat_inact_virt_norm (n_inact_orb,n_virt_orb,N_States,2) + + File: :file:`energies_cas.irp.f` + + + + + + +.. c:var:: one_anhil_one_creat_inact_virt_bis + + .. code:: text + + double precision, allocatable :: one_anhil_one_creat_inact_virt_bis (n_inact_orb,n_virt_orb,N_det,N_States) + double precision, allocatable :: corr_e_from_1h1p (N_States) + + File: :file:`energies_cas.irp.f` + + + + + + +.. c:var:: one_anhil_one_creat_inact_virt_norm + + .. code:: text + + double precision, allocatable :: one_anhil_one_creat_inact_virt (n_inact_orb,n_virt_orb,N_States) + double precision, allocatable :: one_anhil_one_creat_inact_virt_norm (n_inact_orb,n_virt_orb,N_States,2) + + File: :file:`energies_cas.irp.f` + + + + + + +.. c:var:: one_creat + + .. code:: text + + double precision, allocatable :: one_creat (n_act_orb,2,N_states) + + File: :file:`energies_cas.irp.f` + + + + + + +.. c:var:: one_creat_virt + + .. code:: text + + double precision, allocatable :: one_creat_virt (n_act_orb,n_virt_orb,N_States) + + File: :file:`energies_cas.irp.f` + + + + + + +.. c:var:: psi_active + + .. code:: text + + integer(bit_kind), allocatable :: psi_active (N_int,2,psi_det_size) + + File: :file:`psi_active_prov.irp.f` + + active part of psi + + + + +.. c:var:: psi_ref_bis_lock + + .. code:: text + + integer(omp_lock_kind), allocatable :: psi_ref_bis_lock (psi_det_size) + + File: :file:`mrpt_dress.irp.f` + + Locks on ref determinants to fill delta_ij + + + + +.. c:var:: second_order_pt_new + + .. code:: text + + double precision, allocatable :: delta_ij_mrpt (N_det,N_det,N_states) + double precision, allocatable :: second_order_pt_new (N_states) + double precision, allocatable :: second_order_pt_new_1h (N_states) + double precision, allocatable :: second_order_pt_new_1p (N_states) + double precision, allocatable :: second_order_pt_new_1h1p (N_states) + double precision, allocatable :: second_order_pt_new_2h (N_states) + double precision, allocatable :: second_order_pt_new_2p (N_states) + double precision, allocatable :: second_order_pt_new_1h2p (N_states) + double precision, allocatable :: second_order_pt_new_2h1p (N_states) + double precision, allocatable :: second_order_pt_new_2h2p (N_states) + + File: :file:`mrpt_utils.irp.f` + + Dressing matrix in N_det basis + + + + +.. c:var:: second_order_pt_new_1h + + .. code:: text + + double precision, allocatable :: delta_ij_mrpt (N_det,N_det,N_states) + double precision, allocatable :: second_order_pt_new (N_states) + double precision, allocatable :: second_order_pt_new_1h (N_states) + double precision, allocatable :: second_order_pt_new_1p (N_states) + double precision, allocatable :: second_order_pt_new_1h1p (N_states) + double precision, allocatable :: second_order_pt_new_2h (N_states) + double precision, allocatable :: second_order_pt_new_2p (N_states) + double precision, allocatable :: second_order_pt_new_1h2p (N_states) + double precision, allocatable :: second_order_pt_new_2h1p (N_states) + double precision, allocatable :: second_order_pt_new_2h2p (N_states) + + File: :file:`mrpt_utils.irp.f` + + Dressing matrix in N_det basis + + + + +.. c:var:: second_order_pt_new_1h1p + + .. code:: text + + double precision, allocatable :: delta_ij_mrpt (N_det,N_det,N_states) + double precision, allocatable :: second_order_pt_new (N_states) + double precision, allocatable :: second_order_pt_new_1h (N_states) + double precision, allocatable :: second_order_pt_new_1p (N_states) + double precision, allocatable :: second_order_pt_new_1h1p (N_states) + double precision, allocatable :: second_order_pt_new_2h (N_states) + double precision, allocatable :: second_order_pt_new_2p (N_states) + double precision, allocatable :: second_order_pt_new_1h2p (N_states) + double precision, allocatable :: second_order_pt_new_2h1p (N_states) + double precision, allocatable :: second_order_pt_new_2h2p (N_states) + + File: :file:`mrpt_utils.irp.f` + + Dressing matrix in N_det basis + + + + +.. c:var:: second_order_pt_new_1h2p + + .. code:: text + + double precision, allocatable :: delta_ij_mrpt (N_det,N_det,N_states) + double precision, allocatable :: second_order_pt_new (N_states) + double precision, allocatable :: second_order_pt_new_1h (N_states) + double precision, allocatable :: second_order_pt_new_1p (N_states) + double precision, allocatable :: second_order_pt_new_1h1p (N_states) + double precision, allocatable :: second_order_pt_new_2h (N_states) + double precision, allocatable :: second_order_pt_new_2p (N_states) + double precision, allocatable :: second_order_pt_new_1h2p (N_states) + double precision, allocatable :: second_order_pt_new_2h1p (N_states) + double precision, allocatable :: second_order_pt_new_2h2p (N_states) + + File: :file:`mrpt_utils.irp.f` + + Dressing matrix in N_det basis + + + + +.. c:var:: second_order_pt_new_1p + + .. code:: text + + double precision, allocatable :: delta_ij_mrpt (N_det,N_det,N_states) + double precision, allocatable :: second_order_pt_new (N_states) + double precision, allocatable :: second_order_pt_new_1h (N_states) + double precision, allocatable :: second_order_pt_new_1p (N_states) + double precision, allocatable :: second_order_pt_new_1h1p (N_states) + double precision, allocatable :: second_order_pt_new_2h (N_states) + double precision, allocatable :: second_order_pt_new_2p (N_states) + double precision, allocatable :: second_order_pt_new_1h2p (N_states) + double precision, allocatable :: second_order_pt_new_2h1p (N_states) + double precision, allocatable :: second_order_pt_new_2h2p (N_states) + + File: :file:`mrpt_utils.irp.f` + + Dressing matrix in N_det basis + + + + +.. c:var:: second_order_pt_new_2h + + .. code:: text + + double precision, allocatable :: delta_ij_mrpt (N_det,N_det,N_states) + double precision, allocatable :: second_order_pt_new (N_states) + double precision, allocatable :: second_order_pt_new_1h (N_states) + double precision, allocatable :: second_order_pt_new_1p (N_states) + double precision, allocatable :: second_order_pt_new_1h1p (N_states) + double precision, allocatable :: second_order_pt_new_2h (N_states) + double precision, allocatable :: second_order_pt_new_2p (N_states) + double precision, allocatable :: second_order_pt_new_1h2p (N_states) + double precision, allocatable :: second_order_pt_new_2h1p (N_states) + double precision, allocatable :: second_order_pt_new_2h2p (N_states) + + File: :file:`mrpt_utils.irp.f` + + Dressing matrix in N_det basis + + + + +.. c:var:: second_order_pt_new_2h1p + + .. code:: text + + double precision, allocatable :: delta_ij_mrpt (N_det,N_det,N_states) + double precision, allocatable :: second_order_pt_new (N_states) + double precision, allocatable :: second_order_pt_new_1h (N_states) + double precision, allocatable :: second_order_pt_new_1p (N_states) + double precision, allocatable :: second_order_pt_new_1h1p (N_states) + double precision, allocatable :: second_order_pt_new_2h (N_states) + double precision, allocatable :: second_order_pt_new_2p (N_states) + double precision, allocatable :: second_order_pt_new_1h2p (N_states) + double precision, allocatable :: second_order_pt_new_2h1p (N_states) + double precision, allocatable :: second_order_pt_new_2h2p (N_states) + + File: :file:`mrpt_utils.irp.f` + + Dressing matrix in N_det basis + + + + +.. c:var:: second_order_pt_new_2h2p + + .. code:: text + + double precision, allocatable :: delta_ij_mrpt (N_det,N_det,N_states) + double precision, allocatable :: second_order_pt_new (N_states) + double precision, allocatable :: second_order_pt_new_1h (N_states) + double precision, allocatable :: second_order_pt_new_1p (N_states) + double precision, allocatable :: second_order_pt_new_1h1p (N_states) + double precision, allocatable :: second_order_pt_new_2h (N_states) + double precision, allocatable :: second_order_pt_new_2p (N_states) + double precision, allocatable :: second_order_pt_new_1h2p (N_states) + double precision, allocatable :: second_order_pt_new_2h1p (N_states) + double precision, allocatable :: second_order_pt_new_2h2p (N_states) + + File: :file:`mrpt_utils.irp.f` + + Dressing matrix in N_det basis + + + + +.. c:var:: second_order_pt_new_2p + + .. code:: text + + double precision, allocatable :: delta_ij_mrpt (N_det,N_det,N_states) + double precision, allocatable :: second_order_pt_new (N_states) + double precision, allocatable :: second_order_pt_new_1h (N_states) + double precision, allocatable :: second_order_pt_new_1p (N_states) + double precision, allocatable :: second_order_pt_new_1h1p (N_states) + double precision, allocatable :: second_order_pt_new_2h (N_states) + double precision, allocatable :: second_order_pt_new_2p (N_states) + double precision, allocatable :: second_order_pt_new_1h2p (N_states) + double precision, allocatable :: second_order_pt_new_2h1p (N_states) + double precision, allocatable :: second_order_pt_new_2h2p (N_states) + + File: :file:`mrpt_utils.irp.f` + + Dressing matrix in N_det basis + + + + +.. c:var:: three_anhil + + .. code:: text + + double precision, allocatable :: three_anhil (n_act_orb,n_act_orb,n_act_orb,2,2,2,N_states) + + File: :file:`energies_cas.irp.f` + + + + + + +.. c:var:: three_creat + + .. code:: text + + double precision, allocatable :: three_creat (n_act_orb,n_act_orb,n_act_orb,2,2,2,N_states) + + File: :file:`energies_cas.irp.f` + + + + + + +.. c:var:: two_anhil + + .. code:: text + + double precision, allocatable :: two_anhil (n_act_orb,n_act_orb,2,2,N_states) + + File: :file:`energies_cas.irp.f` + + + + + + +.. c:var:: two_anhil_one_creat + + .. code:: text + + double precision, allocatable :: two_anhil_one_creat (n_act_orb,n_act_orb,n_act_orb,2,2,2,N_states) + + File: :file:`energies_cas.irp.f` + + + + + + +.. c:var:: two_creat + + .. code:: text + + double precision, allocatable :: two_creat (n_act_orb,n_act_orb,2,2,N_states) + + File: :file:`energies_cas.irp.f` + + + + + + +.. c:var:: two_creat_one_anhil + + .. code:: text + + double precision, allocatable :: two_creat_one_anhil (n_act_orb,n_act_orb,n_act_orb,2,2,2,N_states) + + File: :file:`energies_cas.irp.f` + + + + + + +Subroutines / functions +----------------------- + + + +.. c:function:: contrib_1h2p_dm_based + + .. code:: text + + subroutine contrib_1h2p_dm_based(accu) + + File: :file:`density_matrix_based.irp.f` + + + + + + + +.. c:function:: contrib_2h1p_dm_based + + .. code:: text + + subroutine contrib_2h1p_dm_based(accu) + + File: :file:`density_matrix_based.irp.f` + + + + + + + +.. c:function:: coulomb_value_no_check + + .. code:: text + + double precision function coulomb_value_no_check(det_in,Nint) + + File: :file:`excitations_cas.irp.f` + + Computes + + + + + +.. c:function:: diag_h_mat_elem_no_elec_check + + .. code:: text + + double precision function diag_H_mat_elem_no_elec_check(det_in,Nint) + + File: :file:`excitations_cas.irp.f` + + Computes + + + + + +.. c:function:: diag_h_mat_elem_no_elec_check_no_exchange + + .. code:: text + + double precision function diag_H_mat_elem_no_elec_check_no_exchange(det_in,Nint) + + File: :file:`excitations_cas.irp.f` + + Computes + + + + + +.. c:function:: find_connections_previous + + .. code:: text + + subroutine find_connections_previous(i_generator,n_selected,det_buffer,Nint,tq,N_tq,miniList,N_miniList) + + File: :file:`mrpt_dress.irp.f` + + + + + + + +.. c:function:: get_delta_e_dyall + + .. code:: text + + subroutine get_delta_e_dyall(det_1,det_2,delta_e_final) + + File: :file:`psi_active_prov.irp.f` + + routine that returns the delta_e with the Moller Plesset and Dyall operators + with det_1 being a determinant from the cas, and det_2 being a perturber + Delta_e(det_1,det_2) = sum (hole) epsilon(hole) + sum(part) espilon(part) + delta_e(act) + where hole is necessary in the inactive, part necessary in the virtuals + and delta_e(act) is obtained from the contracted application of the excitation + operator in the active space that lead from det_1 to det_2 + + + + + +.. c:function:: get_delta_e_dyall_general_mp + + .. code:: text + + subroutine get_delta_e_dyall_general_mp(det_1,det_2,delta_e_final) + + File: :file:`psi_active_prov.irp.f` + + routine that returns the delta_e with the Moller Plesset and Dyall operators + with det_1 being a determinant from the cas, and det_2 being a perturber + Delta_e(det_1,det_2) = sum (hole) epsilon(hole) + sum(part) espilon(part) + delta_e(act) + where hole is necessary in the inactive, part necessary in the virtuals + and delta_e(act) is obtained as the sum of energies of excitations a la MP + + + + + + +.. c:function:: give_1h1p_contrib + + .. code:: text + + subroutine give_1h1p_contrib(matrix_1h1p) + + File: :file:`new_way.irp.f` + + + + + + + +.. c:function:: give_1h1p_only_doubles_spin_cross + + .. code:: text + + subroutine give_1h1p_only_doubles_spin_cross(matrix_1h1p) + + File: :file:`new_way.irp.f` + + + + + + + +.. c:function:: give_1h1p_sec_order_singles_contrib + + .. code:: text + + subroutine give_1h1p_sec_order_singles_contrib(matrix_1h1p) + + File: :file:`new_way.irp.f` + + + + + + + +.. c:function:: give_1h2p_contrib + + .. code:: text + + subroutine give_1h2p_contrib(matrix_1h2p) + + File: :file:`new_way.irp.f` + + + + + + + +.. c:function:: give_1h2p_contrib_sec_order + + .. code:: text + + subroutine give_1h2p_contrib_sec_order(matrix_1h2p) + + File: :file:`new_way_second_order_coef.irp.f` + + + + + + + +.. c:function:: give_1h2p_new + + .. code:: text + + subroutine give_1h2p_new(matrix_1h2p) + + File: :file:`second_order_new.irp.f` + + + + + + + +.. c:function:: give_1p_sec_order_singles_contrib + + .. code:: text + + subroutine give_1p_sec_order_singles_contrib(matrix_1p) + + File: :file:`new_way.irp.f` + + + + + + + +.. c:function:: give_2h1p_contrib + + .. code:: text + + subroutine give_2h1p_contrib(matrix_2h1p) + + File: :file:`new_way.irp.f` + + + + + + + +.. c:function:: give_2h1p_contrib_sec_order + + .. code:: text + + subroutine give_2h1p_contrib_sec_order(matrix_2h1p) + + File: :file:`new_way_second_order_coef.irp.f` + + + + + + + +.. c:function:: give_2h1p_new + + .. code:: text + + subroutine give_2h1p_new(matrix_2h1p) + + File: :file:`second_order_new.irp.f` + + + + + + + +.. c:function:: give_2h2p + + .. code:: text + + subroutine give_2h2p(contrib_2h2p) + + File: :file:`give_2h2p.irp.f` + + + + + + + +.. c:function:: give_2p_new + + .. code:: text + + subroutine give_2p_new(matrix_2p) + + File: :file:`second_order_new_2p.irp.f` + + + + + + + +.. c:function:: give_active_part_determinant + + .. code:: text + + subroutine give_active_part_determinant(det_in,det_out) + + File: :file:`utils_bitmask.irp.f` + + + + + + + +.. c:function:: give_core_inactive_part_determinant + + .. code:: text + + subroutine give_core_inactive_part_determinant(det_in,det_out) + + File: :file:`utils_bitmask.irp.f` + + + + + + + +.. c:function:: give_holes_in_inactive_space + + .. code:: text + + subroutine give_holes_in_inactive_space(det_1,n_holes_spin,n_holes,holes_list) + + File: :file:`psi_active_prov.irp.f` + + returns the holes operators WITHIN THE INACTIVE SPACE that has lead to det_1. + n_holes is the total number of holes n_holes_spin is the number of number of holes per spin (1=alpha, 2=beta) holes_inactive_list is the index of the holes per spin, that ranges from 1 to mo_tot_num + + + + + +.. c:function:: give_particles_in_virt_space + + .. code:: text + + subroutine give_particles_in_virt_space(det_1,n_particles_spin,n_particles,particles_list) + + File: :file:`psi_active_prov.irp.f` + + returns the holes operators WITHIN THE VIRTUAL SPACE that has lead to det_1. + n_particles is the total number of particles n_particles_spin is the number of number of particles per spin (1=alpha, 2=beta) particles_inactive_list is the index of the particles per spin, that ranges from 1 to mo_tot_num + + + + + +.. c:function:: give_singles_and_partial_doubles_1h1p_contrib + + .. code:: text + + subroutine give_singles_and_partial_doubles_1h1p_contrib(matrix_1h1p,e_corr_from_1h1p_singles) + + File: :file:`energies_cas.irp.f` + + + + + + + +.. c:function:: give_virt_part_determinant + + .. code:: text + + subroutine give_virt_part_determinant(det_in,det_out) + + File: :file:`utils_bitmask.irp.f` + + + + + + + +.. c:function:: h_apply_mrpt + + .. code:: text + + subroutine H_apply_mrpt(delta_ij_, Ndet) + + File: :file:`H_apply.irp.f_shell_186` + + 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. + + + + + +.. c:function:: h_apply_mrpt_1h + + .. code:: text + + subroutine H_apply_mrpt_1h(delta_ij_, Ndet) + + File: :file:`H_apply.irp.f_shell_186` + + 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. + + + + + +.. c:function:: h_apply_mrpt_1h1p + + .. code:: text + + subroutine H_apply_mrpt_1h1p(delta_ij_, Ndet) + + File: :file:`H_apply.irp.f_shell_186` + + 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. + + + + + +.. c:function:: h_apply_mrpt_1h1p_diexc + + .. code:: text + + subroutine H_apply_mrpt_1h1p_diexc(key_in, key_prev, hole_1,particl_1, hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + + + + + + +.. c:function:: h_apply_mrpt_1h1p_diexcorg + + .. code:: text + + subroutine H_apply_mrpt_1h1p_diexcOrg(key_in,key_mask,hole_1,particl_1,hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. + + + + + +.. c:function:: h_apply_mrpt_1h1p_diexcp + + .. code:: text + + subroutine H_apply_mrpt_1h1p_diexcP(key_in, fs1, fh1, particl_1, fs2, fh2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + + + + + + +.. c:function:: h_apply_mrpt_1h1p_monoexc + + .. code:: text + + subroutine H_apply_mrpt_1h1p_monoexc(key_in, hole_1,particl_1,fock_diag_tmp,i_generator,iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. + + + + + +.. c:function:: h_apply_mrpt_1h2p + + .. code:: text + + subroutine H_apply_mrpt_1h2p(delta_ij_, Ndet) + + File: :file:`H_apply.irp.f_shell_186` + + 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. + + + + + +.. c:function:: h_apply_mrpt_1h2p_diexc + + .. code:: text + + subroutine H_apply_mrpt_1h2p_diexc(key_in, key_prev, hole_1,particl_1, hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + + + + + + +.. c:function:: h_apply_mrpt_1h2p_diexcorg + + .. code:: text + + subroutine H_apply_mrpt_1h2p_diexcOrg(key_in,key_mask,hole_1,particl_1,hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. + + + + + +.. c:function:: h_apply_mrpt_1h2p_diexcp + + .. code:: text + + subroutine H_apply_mrpt_1h2p_diexcP(key_in, fs1, fh1, particl_1, fs2, fh2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + + + + + + +.. c:function:: h_apply_mrpt_1h2p_monoexc + + .. code:: text + + subroutine H_apply_mrpt_1h2p_monoexc(key_in, hole_1,particl_1,fock_diag_tmp,i_generator,iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. + + + + + +.. c:function:: h_apply_mrpt_1h_diexc + + .. code:: text + + subroutine H_apply_mrpt_1h_diexc(key_in, key_prev, hole_1,particl_1, hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + + + + + + +.. c:function:: h_apply_mrpt_1h_diexcorg + + .. code:: text + + subroutine H_apply_mrpt_1h_diexcOrg(key_in,key_mask,hole_1,particl_1,hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. + + + + + +.. c:function:: h_apply_mrpt_1h_diexcp + + .. code:: text + + subroutine H_apply_mrpt_1h_diexcP(key_in, fs1, fh1, particl_1, fs2, fh2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + + + + + + +.. c:function:: h_apply_mrpt_1h_monoexc + + .. code:: text + + subroutine H_apply_mrpt_1h_monoexc(key_in, hole_1,particl_1,fock_diag_tmp,i_generator,iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. + + + + + +.. c:function:: h_apply_mrpt_1p + + .. code:: text + + subroutine H_apply_mrpt_1p(delta_ij_, Ndet) + + File: :file:`H_apply.irp.f_shell_186` + + 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. + + + + + +.. c:function:: h_apply_mrpt_1p_diexc + + .. code:: text + + subroutine H_apply_mrpt_1p_diexc(key_in, key_prev, hole_1,particl_1, hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + + + + + + +.. c:function:: h_apply_mrpt_1p_diexcorg + + .. code:: text + + subroutine H_apply_mrpt_1p_diexcOrg(key_in,key_mask,hole_1,particl_1,hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. + + + + + +.. c:function:: h_apply_mrpt_1p_diexcp + + .. code:: text + + subroutine H_apply_mrpt_1p_diexcP(key_in, fs1, fh1, particl_1, fs2, fh2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + + + + + + +.. c:function:: h_apply_mrpt_1p_monoexc + + .. code:: text + + subroutine H_apply_mrpt_1p_monoexc(key_in, hole_1,particl_1,fock_diag_tmp,i_generator,iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. + + + + + +.. c:function:: h_apply_mrpt_2h + + .. code:: text + + subroutine H_apply_mrpt_2h(delta_ij_, Ndet) + + File: :file:`H_apply.irp.f_shell_186` + + 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. + + + + + +.. c:function:: h_apply_mrpt_2h1p + + .. code:: text + + subroutine H_apply_mrpt_2h1p(delta_ij_, Ndet) + + File: :file:`H_apply.irp.f_shell_186` + + 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. + + + + + +.. c:function:: h_apply_mrpt_2h1p_diexc + + .. code:: text + + subroutine H_apply_mrpt_2h1p_diexc(key_in, key_prev, hole_1,particl_1, hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + + + + + + +.. c:function:: h_apply_mrpt_2h1p_diexcorg + + .. code:: text + + subroutine H_apply_mrpt_2h1p_diexcOrg(key_in,key_mask,hole_1,particl_1,hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. + + + + + +.. c:function:: h_apply_mrpt_2h1p_diexcp + + .. code:: text + + subroutine H_apply_mrpt_2h1p_diexcP(key_in, fs1, fh1, particl_1, fs2, fh2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + + + + + + +.. c:function:: h_apply_mrpt_2h1p_monoexc + + .. code:: text + + subroutine H_apply_mrpt_2h1p_monoexc(key_in, hole_1,particl_1,fock_diag_tmp,i_generator,iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. + + + + + +.. c:function:: h_apply_mrpt_2h2p + + .. code:: text + + subroutine H_apply_mrpt_2h2p(delta_ij_, Ndet) + + File: :file:`H_apply.irp.f_shell_186` + + 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. + + + + + +.. c:function:: h_apply_mrpt_2h2p_diexc + + .. code:: text + + subroutine H_apply_mrpt_2h2p_diexc(key_in, key_prev, hole_1,particl_1, hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + + + + + + +.. c:function:: h_apply_mrpt_2h2p_diexcorg + + .. code:: text + + subroutine H_apply_mrpt_2h2p_diexcOrg(key_in,key_mask,hole_1,particl_1,hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. + + + + + +.. c:function:: h_apply_mrpt_2h2p_diexcp + + .. code:: text + + subroutine H_apply_mrpt_2h2p_diexcP(key_in, fs1, fh1, particl_1, fs2, fh2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + + + + + + +.. c:function:: h_apply_mrpt_2h2p_monoexc + + .. code:: text + + subroutine H_apply_mrpt_2h2p_monoexc(key_in, hole_1,particl_1,fock_diag_tmp,i_generator,iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. + + + + + +.. c:function:: h_apply_mrpt_2h_diexc + + .. code:: text + + subroutine H_apply_mrpt_2h_diexc(key_in, key_prev, hole_1,particl_1, hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + + + + + + +.. c:function:: h_apply_mrpt_2h_diexcorg + + .. code:: text + + subroutine H_apply_mrpt_2h_diexcOrg(key_in,key_mask,hole_1,particl_1,hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. + + + + + +.. c:function:: h_apply_mrpt_2h_diexcp + + .. code:: text + + subroutine H_apply_mrpt_2h_diexcP(key_in, fs1, fh1, particl_1, fs2, fh2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + + + + + + +.. c:function:: h_apply_mrpt_2h_monoexc + + .. code:: text + + subroutine H_apply_mrpt_2h_monoexc(key_in, hole_1,particl_1,fock_diag_tmp,i_generator,iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. + + + + + +.. c:function:: h_apply_mrpt_2p + + .. code:: text + + subroutine H_apply_mrpt_2p(delta_ij_, Ndet) + + File: :file:`H_apply.irp.f_shell_186` + + 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. + + + + + +.. c:function:: h_apply_mrpt_2p_diexc + + .. code:: text + + subroutine H_apply_mrpt_2p_diexc(key_in, key_prev, hole_1,particl_1, hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + + + + + + +.. c:function:: h_apply_mrpt_2p_diexcorg + + .. code:: text + + subroutine H_apply_mrpt_2p_diexcOrg(key_in,key_mask,hole_1,particl_1,hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. + + + + + +.. c:function:: h_apply_mrpt_2p_diexcp + + .. code:: text + + subroutine H_apply_mrpt_2p_diexcP(key_in, fs1, fh1, particl_1, fs2, fh2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + + + + + + +.. c:function:: h_apply_mrpt_2p_monoexc + + .. code:: text + + subroutine H_apply_mrpt_2p_monoexc(key_in, hole_1,particl_1,fock_diag_tmp,i_generator,iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. + + + + + +.. c:function:: h_apply_mrpt_diexc + + .. code:: text + + subroutine H_apply_mrpt_diexc(key_in, key_prev, hole_1,particl_1, hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + + + + + + +.. c:function:: h_apply_mrpt_diexcorg + + .. code:: text + + subroutine H_apply_mrpt_diexcOrg(key_in,key_mask,hole_1,particl_1,hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. + + + + + +.. c:function:: h_apply_mrpt_diexcp + + .. code:: text + + subroutine H_apply_mrpt_diexcP(key_in, fs1, fh1, particl_1, fs2, fh2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + + + + + + +.. c:function:: h_apply_mrpt_monoexc + + .. code:: text + + subroutine H_apply_mrpt_monoexc(key_in, hole_1,particl_1,fock_diag_tmp,i_generator,iproc_in , delta_ij_, Ndet ) + + File: :file:`H_apply.irp.f_shell_186` + + Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. + + + + + +.. c:function:: i_h_j_dyall + + .. code:: text + + subroutine i_H_j_dyall(key_i,key_j,Nint,hij) + + File: :file:`excitations_cas.irp.f` + + Returns where i and j are determinants + + + + + +.. c:function:: i_h_j_dyall_no_exchange + + .. code:: text + + subroutine i_H_j_dyall_no_exchange(key_i,key_j,Nint,hij) + + File: :file:`excitations_cas.irp.f` + + Returns where i and j are determinants + + + + + +.. c:function:: mrpt_dress + + .. code:: text + + subroutine mrpt_dress(delta_ij_, Ndet,i_generator,n_selected,det_buffer,Nint,iproc,key_mask) + + File: :file:`mrpt_dress.irp.f` + + + + + + + +.. c:function:: set_generators_bitmasks_as_holes_and_particles + + .. code:: text + + subroutine set_generators_bitmasks_as_holes_and_particles + + File: :file:`set_as_holes_and_particles.irp.f` + + + + + + + +.. c:function:: u0_h_dyall_u0 + + .. code:: text + + subroutine u0_H_dyall_u0(energies,psi_in,psi_in_coef,ndet,dim_psi_in,dim_psi_coef,N_states_in,state_target) + + File: :file:`excitations_cas.irp.f` + + + + + + + +.. c:function:: u0_h_dyall_u0_no_exchange + + .. code:: text + + subroutine u0_H_dyall_u0_no_exchange(energies,psi_in,psi_in_coef,ndet,dim_psi_in,dim_psi_coef,N_states_in,state_target) + + File: :file:`excitations_cas.irp.f` + + + - Default: True diff --git a/docs/source/modules/nuclei.rst b/docs/source/modules/nuclei.rst index 4951ad70..033e62c9 100644 --- a/docs/source/modules/nuclei.rst +++ b/docs/source/modules/nuclei.rst @@ -20,31 +20,332 @@ EZFIO parameters .. option:: nucl_num - Number of nuclei + Number of nuclei .. option:: nucl_label - Nuclear labels + Nuclear labels .. option:: nucl_charge - Nuclear charges + Nuclear charges .. option:: nucl_coord - Nuclear coordinates in the format (:, {x,y,z}) + Nuclear coordinates in the format (:, {x,y,z}) .. option:: disk_access_nuclear_repulsion - Read/Write Nuclear Repulsion from/to disk [ Write | Read | None ] + Read/Write Nuclear Repulsion from/to disk [ Write | Read | None ] - Default: None + Default: None .. option:: nuclear_repulsion - Nuclear repulsion (Computed automaticaly or Read in the |EZFIO|) + Nuclear repulsion (Computed automaticaly or Read in the |EZFIO|) + + + +Providers +--------- + + +.. c:var:: center_of_mass + + .. code:: text + + double precision, allocatable :: center_of_mass (3) + + File: :file:`nuclei.irp.f` + + Center of mass of the molecule + + + + +.. c:var:: element_mass + + .. code:: text + + character*(4), allocatable :: element_name (0:127) + double precision, allocatable :: element_mass (0:127) + + File: :file:`nuclei.irp.f` + + Array of the name of element, sorted by nuclear charge (integer) + + + + +.. c:var:: element_name + + .. code:: text + + character*(4), allocatable :: element_name (0:127) + double precision, allocatable :: element_mass (0:127) + + File: :file:`nuclei.irp.f` + + Array of the name of element, sorted by nuclear charge (integer) + + + + +.. c:var:: inertia_tensor + + .. code:: text + + double precision, allocatable :: inertia_tensor (3,3) + + File: :file:`inertia.irp.f` + + Inertia tensor + + + + +.. c:var:: inertia_tensor_eigenvalues + + .. code:: text + + double precision, allocatable :: inertia_tensor_eigenvectors (3,3) + double precision, allocatable :: inertia_tensor_eigenvalues (3) + + File: :file:`inertia.irp.f` + + Eigenvectors/eigenvalues of the inertia_tensor. Used to find normal orientation. + + + + +.. c:var:: inertia_tensor_eigenvectors + + .. code:: text + + double precision, allocatable :: inertia_tensor_eigenvectors (3,3) + double precision, allocatable :: inertia_tensor_eigenvalues (3) + + File: :file:`inertia.irp.f` + + Eigenvectors/eigenvalues of the inertia_tensor. Used to find normal orientation. + + + + +.. c:var:: nucl_coord + + .. code:: text + + double precision, allocatable :: nucl_coord (nucl_num,3) + + File: :file:`nuclei.irp.f` + + Nuclear coordinates in the format (:, {x,y,z}) + + + + +.. c:var:: nucl_coord_transp + + .. code:: text + + double precision, allocatable :: nucl_coord_transp (3,nucl_num) + + File: :file:`nuclei.irp.f` + + Transposed array of nucl_coord + + + + +.. c:var:: nucl_dist + + .. code:: text + + double precision, allocatable :: nucl_dist_2 (nucl_num,nucl_num) + double precision, allocatable :: nucl_dist_vec_x (nucl_num,nucl_num) + double precision, allocatable :: nucl_dist_vec_y (nucl_num,nucl_num) + double precision, allocatable :: nucl_dist_vec_z (nucl_num,nucl_num) + double precision, allocatable :: nucl_dist (nucl_num,nucl_num) + + File: :file:`nuclei.irp.f` + + nucl_dist : Nucleus-nucleus distances nucl_dist_2 : Nucleus-nucleus distances squared nucl_dist_vec : Nucleus-nucleus distances vectors + + + + +.. c:var:: nucl_dist_2 + + .. code:: text + + double precision, allocatable :: nucl_dist_2 (nucl_num,nucl_num) + double precision, allocatable :: nucl_dist_vec_x (nucl_num,nucl_num) + double precision, allocatable :: nucl_dist_vec_y (nucl_num,nucl_num) + double precision, allocatable :: nucl_dist_vec_z (nucl_num,nucl_num) + double precision, allocatable :: nucl_dist (nucl_num,nucl_num) + + File: :file:`nuclei.irp.f` + + nucl_dist : Nucleus-nucleus distances nucl_dist_2 : Nucleus-nucleus distances squared nucl_dist_vec : Nucleus-nucleus distances vectors + + + + +.. c:var:: nucl_dist_vec_x + + .. code:: text + + double precision, allocatable :: nucl_dist_2 (nucl_num,nucl_num) + double precision, allocatable :: nucl_dist_vec_x (nucl_num,nucl_num) + double precision, allocatable :: nucl_dist_vec_y (nucl_num,nucl_num) + double precision, allocatable :: nucl_dist_vec_z (nucl_num,nucl_num) + double precision, allocatable :: nucl_dist (nucl_num,nucl_num) + + File: :file:`nuclei.irp.f` + + nucl_dist : Nucleus-nucleus distances nucl_dist_2 : Nucleus-nucleus distances squared nucl_dist_vec : Nucleus-nucleus distances vectors + + + + +.. c:var:: nucl_dist_vec_y + + .. code:: text + + double precision, allocatable :: nucl_dist_2 (nucl_num,nucl_num) + double precision, allocatable :: nucl_dist_vec_x (nucl_num,nucl_num) + double precision, allocatable :: nucl_dist_vec_y (nucl_num,nucl_num) + double precision, allocatable :: nucl_dist_vec_z (nucl_num,nucl_num) + double precision, allocatable :: nucl_dist (nucl_num,nucl_num) + + File: :file:`nuclei.irp.f` + + nucl_dist : Nucleus-nucleus distances nucl_dist_2 : Nucleus-nucleus distances squared nucl_dist_vec : Nucleus-nucleus distances vectors + + + + +.. c:var:: nucl_dist_vec_z + + .. code:: text + + double precision, allocatable :: nucl_dist_2 (nucl_num,nucl_num) + double precision, allocatable :: nucl_dist_vec_x (nucl_num,nucl_num) + double precision, allocatable :: nucl_dist_vec_y (nucl_num,nucl_num) + double precision, allocatable :: nucl_dist_vec_z (nucl_num,nucl_num) + double precision, allocatable :: nucl_dist (nucl_num,nucl_num) + + File: :file:`nuclei.irp.f` + + nucl_dist : Nucleus-nucleus distances nucl_dist_2 : Nucleus-nucleus distances squared nucl_dist_vec : Nucleus-nucleus distances vectors + + + + +.. c:var:: nuclear_repulsion + + .. code:: text + + double precision :: nuclear_repulsion + + File: :file:`nuclei.irp.f` + + Nuclear repulsion energy + + + + +.. c:var:: positive_charge_barycentre + + .. code:: text + + double precision, allocatable :: positive_charge_barycentre (3) + + File: :file:`nuclei.irp.f` + + Centroid of the positive charges + + + + +.. c:var:: slater_bragg_radii + + .. code:: text + + double precision, allocatable :: slater_bragg_radii (100) + + File: :file:`atomic_radii.irp.f` + + 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) + + + + +.. c:var:: slater_bragg_radii_per_atom + + .. code:: text + + double precision, allocatable :: slater_bragg_radii_per_atom (nucl_num) + + File: :file:`atomic_radii.irp.f` + + + + + + +.. c:var:: slater_bragg_radii_per_atom_ua + + .. code:: text + + double precision, allocatable :: slater_bragg_radii_per_atom_ua (nucl_num) + + File: :file:`atomic_radii.irp.f` + + + + + + +.. c:var:: slater_bragg_radii_ua + + .. code:: text + + double precision, allocatable :: slater_bragg_radii_ua (100) + + File: :file:`atomic_radii.irp.f` + + + + + + +.. c:var:: slater_bragg_type_inter_distance + + .. code:: text + + double precision, allocatable :: slater_bragg_type_inter_distance (nucl_num,nucl_num) + + File: :file:`atomic_radii.irp.f` + + + + + + +.. c:var:: slater_bragg_type_inter_distance_ua + + .. code:: text + + double precision, allocatable :: slater_bragg_type_inter_distance_ua (nucl_num,nucl_num) + + File: :file:`atomic_radii.irp.f` + + + diff --git a/docs/source/modules/perturbation.rst b/docs/source/modules/perturbation.rst index be3a2113..5dab7bb1 100644 --- a/docs/source/modules/perturbation.rst +++ b/docs/source/modules/perturbation.rst @@ -76,34 +76,725 @@ EZFIO parameters .. option:: do_pt2 - If `True`, compute the |PT2| contribution + If `True`, compute the |PT2| contribution - Default: True + Default: True .. option:: pt2_max - The selection process stops when the largest |PT2| (for all the state) is lower + The selection process stops when the largest |PT2| (for all the state) is lower - than `pt2_max` in absolute value + than `pt2_max` in absolute value - Default: 0.0001 + Default: 0.0001 .. option:: pt2_relative_error - Stop stochastic |PT2| when the relative error is smaller than `PT2_relative_error` + Stop stochastic |PT2| when the relative error is smaller than `PT2_relative_error` - Default: 0.005 + Default: 0.005 .. option:: correlation_energy_ratio_max - The selection process stops at a fixed correlation ratio (useful for getting same accuracy between molecules). + The selection process stops at a fixed correlation ratio (useful for getting same accuracy between molecules). - Defined as :math:`{E_{CI}-E_{HF}}/{E_{CI}+E_{PT2} - E_{HF}}`. + Defined as :math:`{E_{CI}-E_{HF}}/{E_{CI}+E_{PT2} - E_{HF}}`. - Default: 1.00 + Default: 1.00 .. option:: h0_type - Type of zeroth-order Hamiltonian [ EN | Barycentric | Variance | SOP ] + Type of zeroth-order Hamiltonian [ EN | Barycentric | Variance | SOP ] + + Default: EN + + +Providers +--------- + + +.. c:var:: fill_h_apply_buffer_selection + + .. code:: text + + subroutine fill_H_apply_buffer_selection(n_selected,det_buffer,e_2_pert_buffer,coef_pert_buffer, & + N_st,Nint,iproc,select_max_out) + + File: :file:`selection.irp.f` + + Fill the H_apply buffer with determiants for the selection + + + + +.. c:var:: max_exc_pert + + .. code:: text + + integer :: max_exc_pert + + File: :file:`exc_max.irp.f` + + + + + + +.. c:var:: selection_criterion + + .. code:: text + + double precision :: selection_criterion + double precision :: selection_criterion_min + double precision :: selection_criterion_factor + + File: :file:`selection.irp.f` + + Threshold to select determinants. Set by selection routines. + + + + +.. c:var:: selection_criterion_factor + + .. code:: text + + double precision :: selection_criterion + double precision :: selection_criterion_min + double precision :: selection_criterion_factor + + File: :file:`selection.irp.f` + + Threshold to select determinants. Set by selection routines. + + + + +.. c:var:: selection_criterion_min + + .. code:: text + + double precision :: selection_criterion + double precision :: selection_criterion_min + double precision :: selection_criterion_factor + + File: :file:`selection.irp.f` + + Threshold to select determinants. Set by selection routines. + + + + +.. c:var:: var_pt2_ratio + + .. code:: text + + double precision :: var_pt2_ratio + + File: :file:`var_pt2_ratio_provider.irp.f` + + The selection process stops when the energy ratio variational/(variational+PT2) is equal to var_pt2_ratio + + + + +Subroutines / functions +----------------------- + + + +.. c:function:: i_h_psi_pert_new_minilist + + .. code:: text + + subroutine i_H_psi_pert_new_minilist(key,keys,idx_key,N_minilist,coef,Nint,Ndet,Ndet_max,Nstate,i_H_psi_array,coef_pert) + + File: :file:`pt2_new.irp.f` + + Computes = \sum_J c_J . + 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. + + + + + +.. c:function:: perturb_buffer_by_mono_decontracted + + .. code:: text + + subroutine perturb_buffer_by_mono_decontracted(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``decontracted`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_by_mono_dummy + + .. code:: text + + subroutine perturb_buffer_by_mono_dummy(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``dummy`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_by_mono_epstein_nesbet + + .. code:: text + + subroutine perturb_buffer_by_mono_epstein_nesbet(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``epstein_nesbet`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_by_mono_epstein_nesbet_2x2 + + .. code:: text + + subroutine perturb_buffer_by_mono_epstein_nesbet_2x2(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``epstein_nesbet_2x2`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_by_mono_epstein_nesbet_2x2_no_ci_diag + + .. code:: text + + subroutine perturb_buffer_by_mono_epstein_nesbet_2x2_no_ci_diag(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``epstein_nesbet_2x2_no_ci_diag`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_by_mono_epstein_nesbet_sc2 + + .. code:: text + + subroutine perturb_buffer_by_mono_epstein_nesbet_sc2(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``epstein_nesbet_sc2`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_by_mono_epstein_nesbet_sc2_no_projected + + .. code:: text + + subroutine perturb_buffer_by_mono_epstein_nesbet_sc2_no_projected(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``epstein_nesbet_sc2_no_projected`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_by_mono_epstein_nesbet_sc2_projected + + .. code:: text + + subroutine perturb_buffer_by_mono_epstein_nesbet_sc2_projected(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``epstein_nesbet_sc2_projected`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_by_mono_h_core + + .. code:: text + + subroutine perturb_buffer_by_mono_h_core(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``h_core`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_by_mono_moller_plesset + + .. code:: text + + subroutine perturb_buffer_by_mono_moller_plesset(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``moller_plesset`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_by_mono_moller_plesset_general + + .. code:: text + + subroutine perturb_buffer_by_mono_moller_plesset_general(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``moller_plesset_general`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_by_mono_qdpt + + .. code:: text + + subroutine perturb_buffer_by_mono_qdpt(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``qdpt`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_decontracted + + .. code:: text + + subroutine perturb_buffer_decontracted(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``decontracted`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_dummy + + .. code:: text + + subroutine perturb_buffer_dummy(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``dummy`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_epstein_nesbet + + .. code:: text + + subroutine perturb_buffer_epstein_nesbet(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``epstein_nesbet`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_epstein_nesbet_2x2 + + .. code:: text + + subroutine perturb_buffer_epstein_nesbet_2x2(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``epstein_nesbet_2x2`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_epstein_nesbet_2x2_no_ci_diag + + .. code:: text + + subroutine perturb_buffer_epstein_nesbet_2x2_no_ci_diag(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``epstein_nesbet_2x2_no_ci_diag`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_epstein_nesbet_sc2 + + .. code:: text + + subroutine perturb_buffer_epstein_nesbet_sc2(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``epstein_nesbet_sc2`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_epstein_nesbet_sc2_no_projected + + .. code:: text + + subroutine perturb_buffer_epstein_nesbet_sc2_no_projected(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``epstein_nesbet_sc2_no_projected`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_epstein_nesbet_sc2_projected + + .. code:: text + + subroutine perturb_buffer_epstein_nesbet_sc2_projected(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``epstein_nesbet_sc2_projected`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_h_core + + .. code:: text + + subroutine perturb_buffer_h_core(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``h_core`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_moller_plesset + + .. code:: text + + subroutine perturb_buffer_moller_plesset(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``moller_plesset`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_moller_plesset_general + + .. code:: text + + subroutine perturb_buffer_moller_plesset_general(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``moller_plesset_general`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: perturb_buffer_qdpt + + .. code:: text + + subroutine perturb_buffer_qdpt(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy) + + File: :file:`perturbation.irp.f_shell_13` + + Applly pertubration ``qdpt`` to the buffer of determinants generated in the H_apply routine. + + + + + +.. c:function:: pt2_decontracted + + .. code:: text + + subroutine pt2_decontracted (electronic_energy,det_ref,det_pert,fock_diag_tmp,c_pert,e_2_pert,H_pert_diag,Nint,ndet,N_st,minilist,idx_minilist,N_minilist) + + File: :file:`pt2_equations.irp.f_template_606` + + + + + + + +.. c:function:: pt2_dummy + + .. code:: text + + subroutine pt2_dummy (electronic_energy,det_ref,det_pert,fock_diag_tmp,c_pert,e_2_pert,H_pert_diag,Nint,ndet,N_st,minilist,idx_minilist,N_minilist) + + File: :file:`pt2_equations.irp.f_template_606` + + Dummy perturbation to add all connected determinants. + + + + + +.. c:function:: pt2_epstein_nesbet + + .. code:: text + + subroutine pt2_epstein_nesbet (electronic_energy,det_ref,det_pert,fock_diag_tmp,c_pert,e_2_pert,H_pert_diag,Nint,ndet,N_st,minilist,idx_minilist,N_minilist) + + File: :file:`pt2_equations.irp.f_template_606` + + compute the standard Epstein-Nesbet perturbative first order coefficient and second order energetic contribution + for the various N_st states. + c_pert(i) = /( E(i) - ) + e_2_pert(i) = ^2/( E(i) - ) + + + + + + +.. c:function:: pt2_epstein_nesbet_2x2 + + .. code:: text + + subroutine pt2_epstein_nesbet_2x2 (electronic_energy,det_ref,det_pert,fock_diag_tmp,c_pert,e_2_pert,H_pert_diag,Nint,ndet,N_st,minilist,idx_minilist,N_minilist) + + File: :file:`pt2_equations.irp.f_template_606` + + compute the Epstein-Nesbet 2x2 diagonalization coefficient and energetic contribution + for the various N_st states. + e_2_pert(i) = 0.5 * (( - E(i) ) - sqrt( ( - E(i)) ^2 + 4 ^2 ) + c_pert(i) = e_2_pert(i)/ + + + + + + +.. c:function:: pt2_epstein_nesbet_2x2_no_ci_diag + + .. code:: text + + subroutine pt2_epstein_nesbet_2x2_no_ci_diag(electronic_energy,det_ref,det_pert,fock_diag_tmp,c_pert,e_2_pert,H_pert_diag,Nint,ndet,N_st,minilist,idx_minilist,N_minilist) + + File: :file:`pt2_equations.irp.f_template_606` + + compute the Epstein-Nesbet 2x2 diagonalization coefficient and energetic contribution + for the various N_st states. + e_2_pert(i) = 0.5 * (( - E(i) ) - sqrt( ( - E(i)) ^2 + 4 ^2 ) + c_pert(i) = e_2_pert(i)/ + + + + + + +.. c:function:: pt2_epstein_nesbet_sc2 + + .. code:: text + + subroutine pt2_epstein_nesbet_sc2 (electronic_energy,det_ref,det_pert,fock_diag_tmp,c_pert,e_2_pert,H_pert_diag,Nint,ndet,N_st,minilist,idx_minilist,N_minilist) + + File: :file:`pt2_equations.irp.f_template_606` + + compute the standard Epstein-Nesbet perturbative first order coefficient and second order energetic contribution + for the various N_st states, but with the CISD_SC2 energies and coefficients + c_pert(i) = /( E(i) - ) + e_2_pert(i) = ^2/( E(i) - ) + + + + + + +.. c:function:: pt2_epstein_nesbet_sc2_no_projected + + .. code:: text + + subroutine pt2_epstein_nesbet_SC2_no_projected (electronic_energy,det_ref,det_pert,fock_diag_tmp,c_pert,e_2_pert,H_pert_diag,Nint,ndet,N_st,minilist,idx_minilist,N_minilist) + + File: :file:`pt2_equations.irp.f_template_606` + + compute the Epstein-Nesbet perturbative first order coefficient and second order energetic contribution + for the various N_st states, + but with the correction in the denominator + comming from the interaction of that determinant with all the others determinants + that can be repeated by repeating all the double excitations + : you repeat all the correlation energy already taken into account in electronic_energy(1) + that could be repeated to this determinant. + In addition, for the perturbative energetic contribution you have the standard second order + e_2_pert = ^2/(Delta_E) + and also the purely projected contribution + H_pert_diag = c_pert + + + + + +.. c:function:: pt2_epstein_nesbet_sc2_projected + + .. code:: text + + subroutine pt2_epstein_nesbet_SC2_projected (electronic_energy,det_ref,det_pert,fock_diag_tmp,c_pert,e_2_pert,H_pert_diag,Nint,ndet,N_st,minilist,idx_minilist,N_minilist) + + File: :file:`pt2_equations.irp.f_template_606` + + compute the Epstein-Nesbet perturbative first order coefficient and second order energetic contribution + for the various N_st states, + but with the correction in the denominator + comming from the interaction of that determinant with all the others determinants + that can be repeated by repeating all the double excitations + : you repeat all the correlation energy already taken into account in electronic_energy(1) + that could be repeated to this determinant. + In addition, for the perturbative energetic contribution you have the standard second order + e_2_pert = ^2/(Delta_E) + and also the purely projected contribution + H_pert_diag = c_pert + + + + + +.. c:function:: pt2_h_core + + .. code:: text + + subroutine pt2_h_core(det_pert,c_pert,e_2_pert,H_pert_diag,Nint,ndet,N_st,minilist,idx_minilist,N_minilist) + + File: :file:`pert_single.irp.f` + + compute the standard Epstein-Nesbet perturbative first order coefficient and second order energetic contribution + for the various N_st states. + c_pert(i) = /( E(i) - ) + e_2_pert(i) = ^2/( E(i) - ) + + + + + + +.. c:function:: pt2_moller_plesset + + .. code:: text + + subroutine pt2_moller_plesset (electronic_energy,det_ref,det_pert,fock_diag_tmp,c_pert,e_2_pert,H_pert_diag,Nint,ndet,N_st,minilist,idx_minilist,N_minilist) + + File: :file:`pt2_equations.irp.f_template_606` + + compute the standard Moller-Plesset perturbative first order coefficient and second order energetic contribution + for the various n_st states. + c_pert(i) = /(difference of orbital energies) + e_2_pert(i) = ^2/(difference of orbital energies) + + + + + + +.. c:function:: pt2_moller_plesset_general + + .. code:: text + + subroutine pt2_moller_plesset_general (electronic_energy,det_ref,det_pert,fock_diag_tmp,c_pert,e_2_pert,H_pert_diag,Nint,ndet,N_st,minilist,idx_minilist,N_minilist) + + File: :file:`pt2_equations.irp.f_template_606` + + compute the general Moller-Plesset perturbative first order coefficient and second order energetic contribution + for the various n_st states. + c_pert(i) = /(difference of orbital energies) + e_2_pert(i) = ^2/(difference of orbital energies) + + + + + + +.. c:function:: pt2_qdpt + + .. code:: text + + subroutine pt2_qdpt (electronic_energy,det_ref,det_pert,fock_diag_tmp,c_pert,e_2_pert,H_pert_diag,Nint,ndet,N_st,minilist,idx_minilist,N_minilist) + + File: :file:`pt2_equations.irp.f_template_606` + + compute the QDPT first order coefficient and second order energetic contribution + for the various N_st states. + c_pert(i) = /( - ) + + + + + + +.. c:function:: remove_small_contributions + + .. code:: text + + subroutine remove_small_contributions + + File: :file:`selection.irp.f` + + Remove determinants with small contributions. N_states is assumed to be provided. + + + + + +.. c:function:: repeat_all_e_corr + + .. code:: text + + double precision function repeat_all_e_corr(key_in) + + File: :file:`pert_sc2.irp.f` + + + - Default: EN diff --git a/docs/source/modules/pseudo.rst b/docs/source/modules/pseudo.rst index 86f7587f..0b86d2fa 100644 --- a/docs/source/modules/pseudo.rst +++ b/docs/source/modules/pseudo.rst @@ -17,78 +17,78 @@ EZFIO parameters .. option:: nucl_charge_remove - Nuclear charges removed per atom + Nuclear charges removed per atom .. option:: pseudo_klocmax - Maximum value of k for the local component + Maximum value of k for the local component .. option:: pseudo_n_k - Number of gaussians in the local component + Number of gaussians in the local component .. option:: pseudo_v_k - Coefficients in the local component + Coefficients in the local component .. option:: pseudo_dz_k - Exponents in the local component + Exponents in the local component .. option:: pseudo_lmax - Maximum angular momentum + Maximum angular momentum .. option:: pseudo_kmax - Maximum number of functions in the non-local component + Maximum number of functions in the non-local component .. option:: pseudo_n_kl - Number of functions in the non-local component + Number of functions in the non-local component .. option:: pseudo_v_kl - Coefficients in the non-local component + Coefficients in the non-local component .. option:: pseudo_dz_kl - Exponents in the non-local component + Exponents in the non-local component .. option:: do_pseudo - If `True`, pseudo-potentials are used. + If `True`, pseudo-potentials are used. - Default: False + Default: False .. option:: pseudo_grid_size - Nb of points of the grid for the QMC interfaces + Nb of points of the grid for the QMC interfaces - Default: 1000 + Default: 1000 .. option:: pseudo_grid_rmax - R_max of the QMC grid + R_max of the QMC grid - Default: 10.0 + Default: 10.0 .. option:: ao_pseudo_grid - Grid for the QMC interface + Grid for the QMC interface .. option:: mo_pseudo_grid - Grid for the QMC interface + Grid for the QMC interface diff --git a/docs/source/modules/psiref_cas.rst b/docs/source/modules/psiref_cas.rst index f79eba38..9939cf82 100644 --- a/docs/source/modules/psiref_cas.rst +++ b/docs/source/modules/psiref_cas.rst @@ -12,3 +12,166 @@ Reference wave function is defined as a |CAS| wave function. This module is required for |CAS-SD|, |MRPT| or |MRCC|. + + +Providers +--------- + + +.. c:var:: idx_ref + + .. code:: text + + integer(bit_kind), allocatable :: psi_ref (N_int,2,psi_det_size) + double precision, allocatable :: psi_ref_coef (psi_det_size,n_states) + integer, allocatable :: idx_ref (psi_det_size) + integer :: n_det_ref + + File: :file:`psi_ref.irp.f` + + 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. + + + + +.. c:var:: inv_norm_psi_ref + + .. code:: text + + double precision, allocatable :: norm_psi_ref (N_states) + double precision, allocatable :: inv_norm_psi_ref (N_states) + + File: :file:`psi_ref.irp.f` + + + + + + +.. c:var:: n_det_ref + + .. code:: text + + integer(bit_kind), allocatable :: psi_ref (N_int,2,psi_det_size) + double precision, allocatable :: psi_ref_coef (psi_det_size,n_states) + integer, allocatable :: idx_ref (psi_det_size) + integer :: n_det_ref + + File: :file:`psi_ref.irp.f` + + 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. + + + + +.. c:var:: norm_psi_ref + + .. code:: text + + double precision, allocatable :: norm_psi_ref (N_states) + double precision, allocatable :: inv_norm_psi_ref (N_states) + + File: :file:`psi_ref.irp.f` + + + + + + +.. c:var:: psi_non_ref_coef_interm_norm + + .. code:: text + + double precision, allocatable :: psi_non_ref_coef_interm_norm (N_det_non_ref,N_states) + + File: :file:`psi_ref.irp.f` + + + + + + +.. c:var:: psi_ref + + .. code:: text + + integer(bit_kind), allocatable :: psi_ref (N_int,2,psi_det_size) + double precision, allocatable :: psi_ref_coef (psi_det_size,n_states) + integer, allocatable :: idx_ref (psi_det_size) + integer :: n_det_ref + + File: :file:`psi_ref.irp.f` + + 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. + + + + +.. c:var:: psi_ref_coef + + .. code:: text + + integer(bit_kind), allocatable :: psi_ref (N_int,2,psi_det_size) + double precision, allocatable :: psi_ref_coef (psi_det_size,n_states) + integer, allocatable :: idx_ref (psi_det_size) + integer :: n_det_ref + + File: :file:`psi_ref.irp.f` + + 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. + + + + +.. c:var:: psi_ref_coef_interm_norm + + .. code:: text + + double precision, allocatable :: psi_ref_coef_interm_norm (N_det_ref,N_states) + + File: :file:`psi_ref.irp.f` + + + + + + +.. c:var:: psi_ref_coef_inv + + .. code:: text + + double precision, allocatable :: psi_ref_coef_inv (psi_det_size,n_states) + + File: :file:`psi_ref.irp.f` + + 1/psi_ref_coef + + + + +.. c:var:: psi_ref_coef_restart + + .. code:: text + + integer(bit_kind), allocatable :: psi_ref_restart (N_int,2,psi_det_size) + double precision, allocatable :: psi_ref_coef_restart (psi_det_size,n_states) + + File: :file:`psi_ref.irp.f` + + Projection of the CAS wave function on the restart wave function. + + + + +.. c:var:: psi_ref_restart + + .. code:: text + + integer(bit_kind), allocatable :: psi_ref_restart (N_int,2,psi_det_size) + double precision, allocatable :: psi_ref_coef_restart (psi_det_size,n_states) + + File: :file:`psi_ref.irp.f` + + Projection of the CAS wave function on the restart wave function. + + diff --git a/docs/source/modules/psiref_utils.rst b/docs/source/modules/psiref_utils.rst index b6c195b3..4c37ff73 100644 --- a/docs/source/modules/psiref_utils.rst +++ b/docs/source/modules/psiref_utils.rst @@ -14,3 +14,369 @@ needs to be loaded with any `psi_ref_*` module. + + +Providers +--------- + + +.. c:var:: h_matrix_ref + + .. code:: text + + double precision, allocatable :: h_matrix_ref (N_det_ref,N_det_ref) + + File: :file:`psi_ref_utils.irp.f` + + + + + + +.. c:var:: holes_operators + + .. code:: text + + integer(bit_kind), allocatable :: holes_operators (N_int,2) + integer(bit_kind), allocatable :: particles_operators (N_int,2) + + File: :file:`psi_ref_excitations_operators.irp.f` + + 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 + + + + +.. c:var:: idx_non_ref + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_ref (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_ref_coef (psi_det_size,n_states) + integer, allocatable :: idx_non_ref (psi_det_size) + integer, allocatable :: idx_non_ref_rev (psi_det_size) + integer :: n_det_non_ref + + File: :file:`psi_ref_utils.irp.f` + + 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. + + + + +.. c:var:: idx_non_ref_from_sorted + + .. code:: text + + integer, allocatable :: idx_non_ref_from_sorted (N_det) + + File: :file:`psi_ref_utils.irp.f` + + + + + + +.. c:var:: idx_non_ref_rev + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_ref (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_ref_coef (psi_det_size,n_states) + integer, allocatable :: idx_non_ref (psi_det_size) + integer, allocatable :: idx_non_ref_rev (psi_det_size) + integer :: n_det_non_ref + + File: :file:`psi_ref_utils.irp.f` + + 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. + + + + +.. c:var:: n_det_non_ref + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_ref (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_ref_coef (psi_det_size,n_states) + integer, allocatable :: idx_non_ref (psi_det_size) + integer, allocatable :: idx_non_ref_rev (psi_det_size) + integer :: n_det_non_ref + + File: :file:`psi_ref_utils.irp.f` + + 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. + + + + +.. c:var:: particles_operators + + .. code:: text + + integer(bit_kind), allocatable :: holes_operators (N_int,2) + integer(bit_kind), allocatable :: particles_operators (N_int,2) + + File: :file:`psi_ref_excitations_operators.irp.f` + + 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 + + + + +.. c:var:: psi_non_ref + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_ref (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_ref_coef (psi_det_size,n_states) + integer, allocatable :: idx_non_ref (psi_det_size) + integer, allocatable :: idx_non_ref_rev (psi_det_size) + integer :: n_det_non_ref + + File: :file:`psi_ref_utils.irp.f` + + 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. + + + + +.. c:var:: psi_non_ref_coef + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_ref (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_ref_coef (psi_det_size,n_states) + integer, allocatable :: idx_non_ref (psi_det_size) + integer, allocatable :: idx_non_ref_rev (psi_det_size) + integer :: n_det_non_ref + + File: :file:`psi_ref_utils.irp.f` + + 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. + + + + +.. c:var:: psi_non_ref_coef_restart + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_ref_restart (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_ref_coef_restart (psi_det_size,n_states) + + File: :file:`psi_ref_utils.irp.f` + + 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. + + + + +.. c:var:: psi_non_ref_coef_sorted_bit + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_ref_sorted_bit (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_ref_coef_sorted_bit (psi_det_size,N_states) + + File: :file:`psi_ref_utils.irp.f` + + Reference determinants sorted to accelerate the search of a random determinant in the wave function. + + + + +.. c:var:: psi_non_ref_coef_transp + + .. code:: text + + double precision, allocatable :: psi_non_ref_coef_transp (n_states,psi_det_size) + + File: :file:`psi_ref_utils.irp.f` + + Transposed psi_non_ref_coef + + + + +.. c:var:: psi_non_ref_restart + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_ref_restart (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_ref_coef_restart (psi_det_size,n_states) + + File: :file:`psi_ref_utils.irp.f` + + 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. + + + + +.. c:var:: psi_non_ref_sorted_bit + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_ref_sorted_bit (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_ref_coef_sorted_bit (psi_det_size,N_states) + + File: :file:`psi_ref_utils.irp.f` + + Reference determinants sorted to accelerate the search of a random determinant in the wave function. + + + + +.. c:var:: psi_ref_coef_diagonalized + + .. code:: text + + double precision, allocatable :: psi_ref_coef_diagonalized (N_det_ref,N_states) + double precision, allocatable :: psi_ref_energy_diagonalized (N_states) + + File: :file:`psi_ref_utils.irp.f` + + + + + + +.. c:var:: psi_ref_coef_normalized + + .. code:: text + + double precision, allocatable :: psi_ref_coef_normalized (psi_det_size,n_states) + + File: :file:`psi_ref_utils.irp.f` + + Normalized coefficients of the reference + + + + +.. c:var:: psi_ref_coef_sorted_bit + + .. code:: text + + integer(bit_kind), allocatable :: psi_ref_sorted_bit (N_int,2,psi_det_size) + double precision, allocatable :: psi_ref_coef_sorted_bit (psi_det_size,N_states) + + File: :file:`psi_ref_utils.irp.f` + + Reference determinants sorted to accelerate the search of a random determinant in the wave function. + + + + +.. c:var:: psi_ref_coef_transp + + .. code:: text + + double precision, allocatable :: psi_ref_coef_transp (n_states,psi_det_size) + + File: :file:`psi_ref_utils.irp.f` + + Transposed psi_ref_coef + + + + +.. c:var:: psi_ref_energy + + .. code:: text + + double precision, allocatable :: psi_ref_energy (N_states) + + File: :file:`psi_ref_utils.irp.f` + + + + + + +.. c:var:: psi_ref_energy_diagonalized + + .. code:: text + + double precision, allocatable :: psi_ref_coef_diagonalized (N_det_ref,N_states) + double precision, allocatable :: psi_ref_energy_diagonalized (N_states) + + File: :file:`psi_ref_utils.irp.f` + + + + + + +.. c:var:: psi_ref_sorted_bit + + .. code:: text + + integer(bit_kind), allocatable :: psi_ref_sorted_bit (N_int,2,psi_det_size) + double precision, allocatable :: psi_ref_coef_sorted_bit (psi_det_size,N_states) + + File: :file:`psi_ref_utils.irp.f` + + Reference determinants sorted to accelerate the search of a random determinant in the wave function. + + + + +.. c:var:: ref_hamiltonian_matrix + + .. code:: text + + double precision, allocatable :: ref_hamiltonian_matrix (n_det_ref,n_det_ref) + + File: :file:`psi_ref_utils.irp.f` + + H matrix in the Reference space + + + + +Subroutines / functions +----------------------- + + + +.. c:function:: extract_ref + + .. code:: text + + subroutine extract_ref + + File: :file:`extract_ref.irp.f` + + Replaces the total wave function by the normalized projection on the reference + + + + + +.. c:function:: get_index_in_psi_ref_sorted_bit + + .. code:: text + + integer function get_index_in_psi_ref_sorted_bit(key,Nint) + + File: :file:`psi_ref_utils.irp.f` + + Returns the index of the determinant in the ``psi_ref_sorted_bit`` array + + + + + +.. c:function:: is_in_psi_ref + + .. code:: text + + logical function is_in_psi_ref(key,Nint) + + File: :file:`psi_ref_utils.irp.f` + + True if the determinant ``det`` is in the wave function + + diff --git a/docs/source/modules/selectors_full.rst b/docs/source/modules/selectors_full.rst index bf4fa136..5f46869b 100644 --- a/docs/source/modules/selectors_full.rst +++ b/docs/source/modules/selectors_full.rst @@ -12,3 +12,48 @@ All the determinants are possible selectors. Only the largest contributions are a threshold is applied to the squared norm of the wave function, with the :option:`determinants threshold_selectors` flag. + + +Providers +--------- + + +.. c:var:: n_det_selectors + + .. code:: text + + integer :: n_det_selectors + + File: :file:`selectors.irp.f` + + For Single reference wave functions, the number of selectors is 1 : the Hartree-Fock determinant + + + + +.. c:var:: psi_selectors + + .. code:: text + + integer(bit_kind), allocatable :: psi_selectors (N_int,2,psi_selectors_size) + double precision, allocatable :: psi_selectors_coef (psi_selectors_size,N_states) + + File: :file:`selectors.irp.f` + + Determinants on which we apply for perturbation. + + + + +.. c:var:: psi_selectors_coef + + .. code:: text + + integer(bit_kind), allocatable :: psi_selectors (N_int,2,psi_selectors_size) + double precision, allocatable :: psi_selectors_coef (psi_selectors_size,N_states) + + File: :file:`selectors.irp.f` + + Determinants on which we apply for perturbation. + + diff --git a/docs/source/modules/selectors_utils.rst b/docs/source/modules/selectors_utils.rst index b1a17110..1d0bd3e9 100644 --- a/docs/source/modules/selectors_utils.rst +++ b/docs/source/modules/selectors_utils.rst @@ -11,3 +11,352 @@ Selectors_Utils Helper functions for selectors. + + +Providers +--------- + + +.. c:var:: coef_hf_selector + + .. code:: text + + double precision :: coef_hf_selector + double precision :: inv_selectors_coef_hf + double precision :: inv_selectors_coef_hf_squared + double precision, allocatable :: e_corr_per_selectors (N_det_selectors) + double precision, allocatable :: i_h_hf_per_selectors (N_det_selectors) + double precision, allocatable :: delta_e_per_selector (N_det_selectors) + double precision :: e_corr_double_only + double precision :: e_corr_second_order + + File: :file:`e_corr_selectors.irp.f` + + energy of correlation per determinant respect to the Hartree Fock determinant + for the all the double excitations in the selectors determinants + E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation + E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation + coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants + + + + +.. c:var:: delta_e_per_selector + + .. code:: text + + double precision :: coef_hf_selector + double precision :: inv_selectors_coef_hf + double precision :: inv_selectors_coef_hf_squared + double precision, allocatable :: e_corr_per_selectors (N_det_selectors) + double precision, allocatable :: i_h_hf_per_selectors (N_det_selectors) + double precision, allocatable :: delta_e_per_selector (N_det_selectors) + double precision :: e_corr_double_only + double precision :: e_corr_second_order + + File: :file:`e_corr_selectors.irp.f` + + energy of correlation per determinant respect to the Hartree Fock determinant + for the all the double excitations in the selectors determinants + E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation + E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation + coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants + + + + +.. c:var:: double_index_selectors + + .. code:: text + + integer, allocatable :: exc_degree_per_selectors (N_det_selectors) + integer, allocatable :: double_index_selectors (N_det_selectors) + integer :: n_double_selectors + + File: :file:`e_corr_selectors.irp.f` + + degree of excitation respect to Hartree Fock for the wave function + for the all the selectors determinants + double_index_selectors = list of the index of the double excitations + n_double_selectors = number of double excitations in the selectors determinants + + + + +.. c:var:: e_corr_double_only + + .. code:: text + + double precision :: coef_hf_selector + double precision :: inv_selectors_coef_hf + double precision :: inv_selectors_coef_hf_squared + double precision, allocatable :: e_corr_per_selectors (N_det_selectors) + double precision, allocatable :: i_h_hf_per_selectors (N_det_selectors) + double precision, allocatable :: delta_e_per_selector (N_det_selectors) + double precision :: e_corr_double_only + double precision :: e_corr_second_order + + File: :file:`e_corr_selectors.irp.f` + + energy of correlation per determinant respect to the Hartree Fock determinant + for the all the double excitations in the selectors determinants + E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation + E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation + coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants + + + + +.. c:var:: e_corr_per_selectors + + .. code:: text + + double precision :: coef_hf_selector + double precision :: inv_selectors_coef_hf + double precision :: inv_selectors_coef_hf_squared + double precision, allocatable :: e_corr_per_selectors (N_det_selectors) + double precision, allocatable :: i_h_hf_per_selectors (N_det_selectors) + double precision, allocatable :: delta_e_per_selector (N_det_selectors) + double precision :: e_corr_double_only + double precision :: e_corr_second_order + + File: :file:`e_corr_selectors.irp.f` + + energy of correlation per determinant respect to the Hartree Fock determinant + for the all the double excitations in the selectors determinants + E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation + E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation + coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants + + + + +.. c:var:: e_corr_second_order + + .. code:: text + + double precision :: coef_hf_selector + double precision :: inv_selectors_coef_hf + double precision :: inv_selectors_coef_hf_squared + double precision, allocatable :: e_corr_per_selectors (N_det_selectors) + double precision, allocatable :: i_h_hf_per_selectors (N_det_selectors) + double precision, allocatable :: delta_e_per_selector (N_det_selectors) + double precision :: e_corr_double_only + double precision :: e_corr_second_order + + File: :file:`e_corr_selectors.irp.f` + + energy of correlation per determinant respect to the Hartree Fock determinant + for the all the double excitations in the selectors determinants + E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation + E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation + coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants + + + + +.. c:var:: exc_degree_per_selectors + + .. code:: text + + integer, allocatable :: exc_degree_per_selectors (N_det_selectors) + integer, allocatable :: double_index_selectors (N_det_selectors) + integer :: n_double_selectors + + File: :file:`e_corr_selectors.irp.f` + + degree of excitation respect to Hartree Fock for the wave function + for the all the selectors determinants + double_index_selectors = list of the index of the double excitations + n_double_selectors = number of double excitations in the selectors determinants + + + + +.. c:var:: i_h_hf_per_selectors + + .. code:: text + + double precision :: coef_hf_selector + double precision :: inv_selectors_coef_hf + double precision :: inv_selectors_coef_hf_squared + double precision, allocatable :: e_corr_per_selectors (N_det_selectors) + double precision, allocatable :: i_h_hf_per_selectors (N_det_selectors) + double precision, allocatable :: delta_e_per_selector (N_det_selectors) + double precision :: e_corr_double_only + double precision :: e_corr_second_order + + File: :file:`e_corr_selectors.irp.f` + + energy of correlation per determinant respect to the Hartree Fock determinant + for the all the double excitations in the selectors determinants + E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation + E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation + coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants + + + + +.. c:var:: inv_selectors_coef_hf + + .. code:: text + + double precision :: coef_hf_selector + double precision :: inv_selectors_coef_hf + double precision :: inv_selectors_coef_hf_squared + double precision, allocatable :: e_corr_per_selectors (N_det_selectors) + double precision, allocatable :: i_h_hf_per_selectors (N_det_selectors) + double precision, allocatable :: delta_e_per_selector (N_det_selectors) + double precision :: e_corr_double_only + double precision :: e_corr_second_order + + File: :file:`e_corr_selectors.irp.f` + + energy of correlation per determinant respect to the Hartree Fock determinant + for the all the double excitations in the selectors determinants + E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation + E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation + coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants + + + + +.. c:var:: inv_selectors_coef_hf_squared + + .. code:: text + + double precision :: coef_hf_selector + double precision :: inv_selectors_coef_hf + double precision :: inv_selectors_coef_hf_squared + double precision, allocatable :: e_corr_per_selectors (N_det_selectors) + double precision, allocatable :: i_h_hf_per_selectors (N_det_selectors) + double precision, allocatable :: delta_e_per_selector (N_det_selectors) + double precision :: e_corr_double_only + double precision :: e_corr_second_order + + File: :file:`e_corr_selectors.irp.f` + + energy of correlation per determinant respect to the Hartree Fock determinant + for the all the double excitations in the selectors determinants + E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation + E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation + coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants + + + + +.. c:var:: n_double_selectors + + .. code:: text + + integer, allocatable :: exc_degree_per_selectors (N_det_selectors) + integer, allocatable :: double_index_selectors (N_det_selectors) + integer :: n_double_selectors + + File: :file:`e_corr_selectors.irp.f` + + degree of excitation respect to Hartree Fock for the wave function + for the all the selectors determinants + double_index_selectors = list of the index of the double excitations + n_double_selectors = number of double excitations in the selectors determinants + + + + +.. c:var:: psi_selectors_coef_transp + + .. code:: text + + double precision, allocatable :: psi_selectors_coef_transp (N_states,psi_selectors_size) + + File: :file:`selectors.irp.f` + + Transposed psi_selectors + + + + +.. c:var:: psi_selectors_diag_h_mat + + .. code:: text + + double precision, allocatable :: psi_selectors_diag_h_mat (psi_selectors_size) + + File: :file:`selectors.irp.f` + + Diagonal elements of the H matrix for each selectors + + + + +.. c:var:: psi_selectors_size + + .. code:: text + + integer :: psi_selectors_size + + File: :file:`selectors.irp.f` + + + + + + +Subroutines / functions +----------------------- + + + +.. c:function:: zmq_get_n_det_generators + + .. code:: text + + integer function zmq_get_N_det_generators(zmq_to_qp_run_socket, worker_id) + + File: :file:`zmq.irp.f_template_102` + + Get N_det_generators from the qp_run scheduler + + + + + +.. c:function:: zmq_get_n_det_selectors + + .. code:: text + + integer function zmq_get_N_det_selectors(zmq_to_qp_run_socket, worker_id) + + File: :file:`zmq.irp.f_template_102` + + Get N_det_selectors from the qp_run scheduler + + + + + +.. c:function:: zmq_put_n_det_generators + + .. code:: text + + integer function zmq_put_N_det_generators(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_102` + + Put N_det_generators on the qp_run scheduler + + + + + +.. c:function:: zmq_put_n_det_selectors + + .. code:: text + + integer function zmq_put_N_det_selectors(zmq_to_qp_run_socket,worker_id) + + File: :file:`zmq.irp.f_template_102` + + Put N_det_selectors on the qp_run scheduler + + diff --git a/docs/source/modules/slave.rst b/docs/source/modules/slave.rst index 63bbe707..1dcf1c47 100644 --- a/docs/source/modules/slave.rst +++ b/docs/source/modules/slave.rst @@ -11,3 +11,63 @@ Slave Slave processes for distributed parallelism. + + +Subroutines / functions +----------------------- + + + +.. c:function:: provide_everything + + .. code:: text + + subroutine provide_everything + + File: :file:`slave_cipsi.irp.f` + + + + + + + +.. c:function:: qp_ao_ints + + .. code:: text + + subroutine qp_ao_ints + + File: :file:`slave_eri.irp.f` + + Slave for electron repulsion integrals + + + + + +.. c:function:: run_wf + + .. code:: text + + subroutine run_wf + + File: :file:`slave_cipsi.irp.f` + + + + + + + +.. c:function:: slave + + .. code:: text + + subroutine slave + + File: :file:`slave_cipsi.irp.f` + + Helper program for distributed parallelism + + diff --git a/docs/source/modules/tools.rst b/docs/source/modules/tools.rst index 27eed43f..7308e5b5 100644 --- a/docs/source/modules/tools.rst +++ b/docs/source/modules/tools.rst @@ -10,3 +10,119 @@ Tools Useful tools are grouped in this module. + + +Subroutines / functions +----------------------- + + + +.. c:function:: fcidump + + .. code:: text + + subroutine fcidump + + File: :file:`fcidump.irp.f` + + + + + + + +.. c:function:: print_mos + + .. code:: text + + subroutine print_mos + + File: :file:`molden.irp.f` + + + + + + + +.. c:function:: save_natorb + + .. code:: text + + subroutine save_natorb + + File: :file:`save_natorb.irp.f` + + + + + + + +.. c:function:: save_ortho_mos + + .. code:: text + + subroutine save_ortho_mos + + File: :file:`save_ortho_mos.irp.f` + + + + + + + +.. c:function:: write_ao_basis + + .. code:: text + + subroutine write_Ao_basis(i_unit_output) + + File: :file:`molden.irp.f` + + + + + + + +.. c:function:: write_geometry + + .. code:: text + + subroutine write_geometry(i_unit_output) + + File: :file:`molden.irp.f` + + + + + + + +.. c:function:: write_intro_gamess + + .. code:: text + + subroutine write_intro_gamess(i_unit_output) + + File: :file:`molden.irp.f` + + + + + + + +.. c:function:: write_mo_basis + + .. code:: text + + subroutine write_Mo_basis(i_unit_output) + + File: :file:`molden.irp.f` + + + + diff --git a/docs/source/modules/utils.rst b/docs/source/modules/utils.rst index 0783a612..37acfce7 100644 --- a/docs/source/modules/utils.rst +++ b/docs/source/modules/utils.rst @@ -11,3 +11,2024 @@ Utils Contains general purpose utilities (sorting, maps, etc). + + +Providers +--------- + + +.. c:var:: binom + + .. code:: text + + double precision, allocatable :: binom (0:40,0:40) + double precision, allocatable :: binom_transp (0:40,0:40) + + File: :file:`util.irp.f` + + Binomial coefficients + + + + +.. c:var:: binom_int + + .. code:: text + + integer*8, allocatable :: binom_int (0:40,0:40) + integer*8, allocatable :: binom_int_transp (0:40,0:40) + + File: :file:`util.irp.f` + + Binomial coefficients, as integers*8 + + + + +.. c:var:: binom_int_transp + + .. code:: text + + integer*8, allocatable :: binom_int (0:40,0:40) + integer*8, allocatable :: binom_int_transp (0:40,0:40) + + File: :file:`util.irp.f` + + Binomial coefficients, as integers*8 + + + + +.. c:var:: binom_transp + + .. code:: text + + double precision, allocatable :: binom (0:40,0:40) + double precision, allocatable :: binom_transp (0:40,0:40) + + File: :file:`util.irp.f` + + Binomial coefficients + + + + +.. c:var:: degree_max_integration_lebedev + + .. code:: text + + integer :: degree_max_integration_lebedev + + File: :file:`angular_integration.irp.f` + + integrate correctly a polynom of order "degree_max_integration_lebedev" needed for the angular integration according to LEBEDEV formulae + + + + +.. c:var:: dtranspose + + .. code:: text + + recursive subroutine dtranspose(A,LDA,B,LDB,d1,d2) + + File: :file:`transpose.irp.f` + + Transpose input matrix A into output matrix B + + + + +.. c:var:: fact_inv + + .. code:: text + + double precision, allocatable :: fact_inv (128) + + File: :file:`util.irp.f` + + 1/n! + + + + +.. c:var:: i2radix_sort + + .. code:: text + + recursive subroutine i2radix_sort(x,iorder,isize,iradix) + + File: :file:`sort.irp.f_template_644` + + 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. + + + + +.. c:var:: i8radix_sort + + .. code:: text + + recursive subroutine i8radix_sort(x,iorder,isize,iradix) + + File: :file:`sort.irp.f_template_644` + + 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. + + + + +.. c:var:: i8radix_sort_big + + .. code:: text + + recursive subroutine i8radix_sort_big(x,iorder,isize,iradix) + + File: :file:`sort.irp.f_template_644` + + 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. + + + + +.. c:var:: inv_int + + .. code:: text + + double precision, allocatable :: inv_int (128) + + File: :file:`util.irp.f` + + 1/i + + + + +.. c:var:: iradix_sort + + .. code:: text + + recursive subroutine iradix_sort(x,iorder,isize,iradix) + + File: :file:`sort.irp.f_template_644` + + 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. + + + + +.. c:var:: iradix_sort_big + + .. code:: text + + recursive subroutine iradix_sort_big(x,iorder,isize,iradix) + + File: :file:`sort.irp.f_template_644` + + 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. + + + + +.. c:var:: n_points_integration_angular_lebedev + + .. code:: text + + integer :: n_points_integration_angular_lebedev + + File: :file:`angular_integration.irp.f` + + Number of points needed for the angular integral + + + + +.. c:var:: nproc + + .. code:: text + + integer :: nproc + + File: :file:`util.irp.f` + + Number of current OpenMP threads + + + + +.. c:var:: overlap_gaussian_xyz + + .. code:: text + + subroutine overlap_gaussian_xyz(A_center,B_center,alpha,beta,power_A,& + power_B,overlap_x,overlap_y,overlap_z,overlap,dim) + + File: :file:`one_e_integration.irp.f` + + .. math:: + 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 + + + + + +.. c:var:: phi_angular_integration_lebedev + + .. code:: text + + double precision, allocatable :: theta_angular_integration_lebedev (n_points_integration_angular_lebedev) + double precision, allocatable :: phi_angular_integration_lebedev (n_points_integration_angular_lebedev) + double precision, allocatable :: weights_angular_integration_lebedev (n_points_integration_angular_lebedev) + + File: :file:`angular_integration.irp.f` + + Theta phi values together with the weights values for the angular integration : integral [dphi,dtheta] f(x,y,z) = 4 * pi * sum (1 where i is the basis function and psi_j is the j th eigenvector + + + + + + +.. c:function:: lapack_diag_s2 + + .. code:: text + + subroutine lapack_diag_s2(eigvalues,eigvectors,H,nmax,n) + + File: :file:`LinearAlgebra.irp.f` + + Diagonalize matrix H + H is untouched between input and ouptut + eigevalues(i) = ith lowest eigenvalue of the H matrix + eigvectors(i,j) = where i is the basis function and psi_j is the j th eigenvector + + + + + + +.. c:function:: lapack_diagd + + .. code:: text + + subroutine lapack_diagd(eigvalues,eigvectors,H,nmax,n) + + File: :file:`LinearAlgebra.irp.f` + + Diagonalize matrix H + H is untouched between input and ouptut + eigevalues(i) = ith lowest eigenvalue of the H matrix + eigvectors(i,j) = where i is the basis function and psi_j is the j th eigenvector + + + + + + +.. c:function:: lapack_partial_diag + + .. code:: text + + subroutine lapack_partial_diag(eigvalues,eigvectors,H,nmax,n,n_st) + + File: :file:`LinearAlgebra.irp.f` + + Diagonalize matrix H + H is untouched between input and ouptut + eigevalues(i) = ith lowest eigenvalue of the H matrix + eigvectors(i,j) = where i is the basis function and psi_j is the j th eigenvector + + + + + + +.. c:function:: logfact + + .. code:: text + + double precision function logfact(n) + + File: :file:`util.irp.f` + + n! + + + + + +.. c:function:: lowercase + + .. code:: text + + subroutine lowercase(txt,n) + + File: :file:`util.irp.f` + + Transform to lower case + + + + + +.. c:function:: map_load_from_disk + + .. code:: text + + subroutine map_load_from_disk(filename,map) + + File: :file:`map_functions.irp.f` + + + + + + + +.. c:function:: map_save_to_disk + + .. code:: text + + subroutine map_save_to_disk(filename,map) + + File: :file:`map_functions.irp.f` + + + + + + + +.. c:function:: matrix_vector_product + + .. code:: text + + subroutine matrix_vector_product(u0,u1,matrix,sze,lda) + + File: :file:`LinearAlgebra.irp.f` + + performs u1 =! performs u1 +( u0 * matrix) + + + + + +.. c:function:: multiply_poly + + .. code:: text + + subroutine multiply_poly(b,nb,c,nc,d,nd) + + File: :file:`integration.irp.f` + + Multiply two polynomials D(t) =! D(t) +( B(t)*C(t)) + + + + + +.. c:function:: normalize + + .. code:: text + + subroutine normalize(u,sze) + + File: :file:`util.irp.f` + + Normalizes vector u + + + + + +.. c:function:: ortho_canonical + + .. code:: text + + subroutine ortho_canonical(overlap,LDA,N,C,LDC,m) + + File: :file:`LinearAlgebra.irp.f` + + Compute C_new=C_old.U.s^-1/2 canonical orthogonalization. + overlap : overlap matrix + LDA : leftmost dimension of overlap array + N : Overlap matrix is NxN (array is (LDA,N) ) + C : Coefficients of the vectors to orthogonalize. On exit, orthogonal vectors + LDC : leftmost dimension of C + m : Coefficients matrix is MxN, ( array is (LDC,N) ) + + + + + + +.. c:function:: ortho_lowdin + + .. code:: text + + subroutine ortho_lowdin(overlap,LDA,N,C,LDC,m) + + File: :file:`LinearAlgebra.irp.f` + + Compute C_new=C_old.S^-1/2 orthogonalization. + overlap : overlap matrix + LDA : leftmost dimension of overlap array + N : Overlap matrix is NxN (array is (LDA,N) ) + C : Coefficients of the vectors to orthogonalize. On exit, orthogonal vectors + LDC : leftmost dimension of C + M : Coefficients matrix is MxN, ( array is (LDC,N) ) + + + + + + +.. c:function:: ortho_qr + + .. code:: text + + subroutine ortho_qr(A,LDA,m,n) + + File: :file:`LinearAlgebra.irp.f` + + Orthogonalization using Q.R factorization + A : matrix to orthogonalize + LDA : leftmost dimension of A + n : Number of rows of A + m : Number of columns of A + + + + + + +.. c:function:: ortho_qr_unblocked + + .. code:: text + + subroutine ortho_qr_unblocked(A,LDA,m,n) + + File: :file:`LinearAlgebra.irp.f` + + Orthogonalization using Q.R factorization + A : matrix to orthogonalize + LDA : leftmost dimension of A + n : Number of rows of A + m : Number of columns of A + + + + + + +.. c:function:: overlap_a_b_c + + .. code:: text + + subroutine overlap_A_B_C(dim,alpha,beta,gama,a,b,A_center,B_center,Nucl_center,overlap) + + File: :file:`one_e_integration.irp.f` + + + + + + + +.. c:function:: overlap_gaussian_x + + .. code:: text + + double precision function overlap_gaussian_x(A_center,B_center,alpha,beta,power_A,power_B,dim) + + File: :file:`one_e_integration.irp.f` + + .. math:: + \sum_{-infty}^{+infty} (x-A_x)^ax (x-B_x)^bx exp(-alpha(x-A_x)^2) exp(-beta(x-B_X)^2) dx + + + + + + +.. c:function:: overlap_x_abs + + .. code:: text + + subroutine overlap_x_abs(A_center,B_center,alpha,beta,power_A,power_B,overlap_x,lower_exp_val,dx,nx) + + File: :file:`one_e_integration.irp.f` + + .. math :: + \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 + + + + + + +.. c:function:: quick_dsort + + .. code:: text + + subroutine quick_dsort(x, iorder, isize) + + File: :file:`sort.irp.f_template_261` + + 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. + + + + + +.. c:function:: quick_i2sort + + .. code:: text + + subroutine quick_i2sort(x, iorder, isize) + + File: :file:`sort.irp.f_template_261` + + 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. + + + + + +.. c:function:: quick_i8sort + + .. code:: text + + subroutine quick_i8sort(x, iorder, isize) + + File: :file:`sort.irp.f_template_261` + + 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. + + + + + +.. c:function:: quick_isort + + .. code:: text + + subroutine quick_isort(x, iorder, isize) + + File: :file:`sort.irp.f_template_261` + + 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. + + + + + +.. c:function:: quick_sort + + .. code:: text + + subroutine quick_sort(x, iorder, isize) + + File: :file:`sort.irp.f_template_261` + + 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. + + + + + +.. c:function:: recentered_poly2 + + .. code:: text + + subroutine recentered_poly2(P_new,x_A,x_P,a,P_new2,x_B,x_Q,b) + + File: :file:`integration.irp.f` + + Recenter two polynomials + + + + + +.. c:function:: rint + + .. code:: text + + double precision function rint(n,rho) + + File: :file:`integration.irp.f` + + .. math:: + \int_0^1 dx \exp(-p x^2) x^n + + + + + + +.. c:function:: rint1 + + .. code:: text + + double precision function rint1(n,rho) + + File: :file:`integration.irp.f` + + Standard version of rint + + + + + +.. c:function:: rint_large_n + + .. code:: text + + double precision function rint_large_n(n,rho) + + File: :file:`integration.irp.f` + + Version of rint for large values of n + + + + + +.. c:function:: rint_sum + + .. code:: text + + double precision function rint_sum(n_pt_out,rho,d1) + + File: :file:`integration.irp.f` + + Needed for the calculation of two-electron integrals. + + + + + +.. c:function:: rinteg + + .. code:: text + + double precision function rinteg(n,u) + + File: :file:`need.irp.f` + + + + + + + +.. c:function:: rintgauss + + .. code:: text + + double precision function rintgauss(n) + + File: :file:`need.irp.f` + + + + + + + +.. c:function:: sabpartial + + .. code:: text + + double precision function SABpartial(zA,zB,A,B,nA,nB,gamA,gamB,l) + + File: :file:`need.irp.f` + + + + + + + +.. c:function:: set_order + + .. code:: text + + subroutine set_order(x,iorder,isize) + + File: :file:`sort.irp.f_template_347` + + 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. + + + + + +.. c:function:: set_order_big + + .. code:: text + + subroutine set_order_big(x,iorder,isize) + + File: :file:`sort.irp.f_template_412` + + 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 + + + + + +.. c:function:: set_zero_extra_diag + + .. code:: text + + subroutine set_zero_extra_diag(i1,i2,matrix,lda,m) + + File: :file:`LinearAlgebra.irp.f` + + + + + + + +.. c:function:: sort + + .. code:: text + + subroutine sort(x,iorder,isize) + + File: :file:`sort.irp.f_template_293` + + Sort array x(isize). iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. + + + + + +.. c:function:: sorted_dnumber + + .. code:: text + + subroutine sorted_dnumber(x,isize,n) + + File: :file:`sort.irp.f_template_261` + + Returns the number of sorted elements + + + + + +.. c:function:: sorted_i2number + + .. code:: text + + subroutine sorted_i2number(x,isize,n) + + File: :file:`sort.irp.f_template_261` + + Returns the number of sorted elements + + + + + +.. c:function:: sorted_i8number + + .. code:: text + + subroutine sorted_i8number(x,isize,n) + + File: :file:`sort.irp.f_template_261` + + Returns the number of sorted elements + + + + + +.. c:function:: sorted_inumber + + .. code:: text + + subroutine sorted_inumber(x,isize,n) + + File: :file:`sort.irp.f_template_261` + + Returns the number of sorted elements + + + + + +.. c:function:: sorted_number + + .. code:: text + + subroutine sorted_number(x,isize,n) + + File: :file:`sort.irp.f_template_261` + + Returns the number of sorted elements + + + + + +.. c:function:: start_progress + + .. code:: text + + subroutine start_progress(max,title,progress_init) + + File: :file:`progress.irp.f` + + Starts the progress bar + + + + + +.. c:function:: stop_progress + + .. code:: text + + subroutine stop_progress + + File: :file:`progress.irp.f` + + Stop the progress bar + + + + + +.. c:function:: svd + + .. code:: text + + subroutine svd(A,LDA,U,LDU,D,Vt,LDVt,m,n) + + File: :file:`LinearAlgebra.irp.f` + + Compute A = U.D.Vt + LDx : leftmost dimension of x + Dimsneion of A is m x n + + + + + + +.. c:function:: u_dot_u + + .. code:: text + + double precision function u_dot_u(u,sze) + + File: :file:`util.irp.f` + + Compute + + + + + +.. c:function:: u_dot_v + + .. code:: text + + double precision function u_dot_v(u,v,sze) + + File: :file:`util.irp.f` + + Compute + + + + + +.. c:function:: wall_time + + .. code:: text + + subroutine wall_time(t) + + File: :file:`util.irp.f` + + The equivalent of cpu_time, but for the wall time. + + + + + +.. c:function:: write_git_log + + .. code:: text + + subroutine write_git_log(iunit) + + File: :file:`util.irp.f` + + Write the last git commit in file iunit. + + diff --git a/docs/source/modules/zmq.rst b/docs/source/modules/zmq.rst index d1ad1eda..cc86c378 100644 --- a/docs/source/modules/zmq.rst +++ b/docs/source/modules/zmq.rst @@ -12,3 +12,874 @@ Definition of |ZeroMQ| sockets and messages. + + +Providers +--------- + + +.. c:var:: qp_run_address + + .. code:: text + + character*(128) :: qp_run_address + integer :: zmq_port_start + + File: :file:`utils.irp.f` + + Address of the qp_run socket Example : tcp://130.120.229.139:12345 + + + + +.. c:var:: zmq_context + + .. code:: text + + integer(ZMQ_PTR) :: zmq_context + integer(omp_lock_kind) :: zmq_lock + + File: :file:`utils.irp.f` + + Context for the ZeroMQ library + + + + +.. c:var:: zmq_lock + + .. code:: text + + integer(ZMQ_PTR) :: zmq_context + integer(omp_lock_kind) :: zmq_lock + + File: :file:`utils.irp.f` + + Context for the ZeroMQ library + + + + +.. c:var:: zmq_port_start + + .. code:: text + + character*(128) :: qp_run_address + integer :: zmq_port_start + + File: :file:`utils.irp.f` + + Address of the qp_run socket Example : tcp://130.120.229.139:12345 + + + + +.. c:var:: zmq_socket_pair_inproc_address + + .. code:: text + + character*(128) :: zmq_socket_pull_tcp_address + character*(128) :: zmq_socket_pair_inproc_address + character*(128) :: zmq_socket_push_tcp_address + character*(128) :: zmq_socket_pull_inproc_address + character*(128) :: zmq_socket_push_inproc_address + character*(128) :: zmq_socket_sub_tcp_address + + File: :file:`utils.irp.f` + + Socket which pulls the results (2) + + + + +.. c:var:: zmq_socket_pull_inproc_address + + .. code:: text + + character*(128) :: zmq_socket_pull_tcp_address + character*(128) :: zmq_socket_pair_inproc_address + character*(128) :: zmq_socket_push_tcp_address + character*(128) :: zmq_socket_pull_inproc_address + character*(128) :: zmq_socket_push_inproc_address + character*(128) :: zmq_socket_sub_tcp_address + + File: :file:`utils.irp.f` + + Socket which pulls the results (2) + + + + +.. c:var:: zmq_socket_pull_tcp_address + + .. code:: text + + character*(128) :: zmq_socket_pull_tcp_address + character*(128) :: zmq_socket_pair_inproc_address + character*(128) :: zmq_socket_push_tcp_address + character*(128) :: zmq_socket_pull_inproc_address + character*(128) :: zmq_socket_push_inproc_address + character*(128) :: zmq_socket_sub_tcp_address + + File: :file:`utils.irp.f` + + Socket which pulls the results (2) + + + + +.. c:var:: zmq_socket_push_inproc_address + + .. code:: text + + character*(128) :: zmq_socket_pull_tcp_address + character*(128) :: zmq_socket_pair_inproc_address + character*(128) :: zmq_socket_push_tcp_address + character*(128) :: zmq_socket_pull_inproc_address + character*(128) :: zmq_socket_push_inproc_address + character*(128) :: zmq_socket_sub_tcp_address + + File: :file:`utils.irp.f` + + Socket which pulls the results (2) + + + + +.. c:var:: zmq_socket_push_tcp_address + + .. code:: text + + character*(128) :: zmq_socket_pull_tcp_address + character*(128) :: zmq_socket_pair_inproc_address + character*(128) :: zmq_socket_push_tcp_address + character*(128) :: zmq_socket_pull_inproc_address + character*(128) :: zmq_socket_push_inproc_address + character*(128) :: zmq_socket_sub_tcp_address + + File: :file:`utils.irp.f` + + Socket which pulls the results (2) + + + + +.. c:var:: zmq_socket_sub_tcp_address + + .. code:: text + + character*(128) :: zmq_socket_pull_tcp_address + character*(128) :: zmq_socket_pair_inproc_address + character*(128) :: zmq_socket_push_tcp_address + character*(128) :: zmq_socket_pull_inproc_address + character*(128) :: zmq_socket_push_inproc_address + character*(128) :: zmq_socket_sub_tcp_address + + File: :file:`utils.irp.f` + + Socket which pulls the results (2) + + + + +.. c:var:: zmq_state + + .. code:: text + + character*(128) :: zmq_state + + File: :file:`utils.irp.f` + + Threads executing work through the ZeroMQ interface + + + + +Subroutines / functions +----------------------- + + + +.. c:function:: add_task_to_taskserver + + .. code:: text + + integer function add_task_to_taskserver(zmq_to_qp_run_socket,task) + + File: :file:`utils.irp.f` + + Get a task from the task server + + + + + +.. c:function:: connect_to_taskserver + + .. code:: text + + integer function connect_to_taskserver(zmq_to_qp_run_socket,worker_id,thread) + + File: :file:`utils.irp.f` + + Connect to the task server and obtain the worker ID + + + + + +.. c:function:: disconnect_from_taskserver + + .. code:: text + + integer function disconnect_from_taskserver(zmq_to_qp_run_socket, worker_id) + + File: :file:`utils.irp.f` + + Disconnect from the task server + + + + + +.. c:function:: disconnect_from_taskserver_state + + .. code:: text + + integer function disconnect_from_taskserver_state(zmq_to_qp_run_socket, worker_id, state) + + File: :file:`utils.irp.f` + + Disconnect from the task server + + + + + +.. c:function:: end_parallel_job + + .. code:: text + + subroutine end_parallel_job(zmq_to_qp_run_socket,zmq_socket_pull,name_in) + + File: :file:`utils.irp.f` + + End a new parallel job with name 'name'. The slave tasks execute subroutine 'slave' + + + + + +.. c:function:: end_zmq_pair_socket + + .. code:: text + + subroutine end_zmq_pair_socket(zmq_socket_pair) + + File: :file:`utils.irp.f` + + Terminate socket on which the results are sent. + + + + + +.. c:function:: end_zmq_pull_socket + + .. code:: text + + subroutine end_zmq_pull_socket(zmq_socket_pull) + + File: :file:`utils.irp.f` + + Terminate socket on which the results are sent. + + + + + +.. c:function:: end_zmq_push_socket + + .. code:: text + + subroutine end_zmq_push_socket(zmq_socket_push,thread) + + File: :file:`utils.irp.f` + + Terminate socket on which the results are sent. + + + + + +.. c:function:: end_zmq_sub_socket + + .. code:: text + + subroutine end_zmq_sub_socket(zmq_socket_sub) + + File: :file:`utils.irp.f` + + Terminate socket on which the results are sent. + + + + + +.. c:function:: end_zmq_to_qp_run_socket + + .. code:: text + + subroutine end_zmq_to_qp_run_socket(zmq_to_qp_run_socket) + + File: :file:`utils.irp.f` + + Terminate the socket from the application to qp_run + + + + + +.. c:function:: get_task_from_taskserver + + .. code:: text + + integer function get_task_from_taskserver(zmq_to_qp_run_socket,worker_id,task_id,task) + + File: :file:`utils.irp.f` + + Get a task from the task server + + + + + +.. c:function:: get_tasks_from_taskserver + + .. code:: text + + integer function get_tasks_from_taskserver(zmq_to_qp_run_socket,worker_id,task_id,task,n_tasks) + + File: :file:`utils.irp.f` + + Get multiple tasks from the task server + + + + + +.. c:function:: new_parallel_job + + .. code:: text + + subroutine new_parallel_job(zmq_to_qp_run_socket,zmq_socket_pull,name_in) + + File: :file:`utils.irp.f` + + Start a new parallel job with name 'name'. The slave tasks execute subroutine 'slave' + + + + + +.. c:function:: new_zmq_pair_socket + + .. code:: text + + function new_zmq_pair_socket(bind) + + File: :file:`utils.irp.f` + + Socket on which the collector and the main communicate + + + + + +.. c:function:: new_zmq_pull_socket + + .. code:: text + + function new_zmq_pull_socket() + + File: :file:`utils.irp.f` + + Socket on which the results are sent. If thread is 1, use inproc + + + + + +.. c:function:: new_zmq_push_socket + + .. code:: text + + function new_zmq_push_socket(thread) + + File: :file:`utils.irp.f` + + Socket on which the results are sent. If thread is 1, use inproc + + + + + +.. c:function:: new_zmq_sub_socket + + .. code:: text + + function new_zmq_sub_socket() + + File: :file:`utils.irp.f` + + Socket to read the state published by the Task server + + + + + +.. c:function:: new_zmq_to_qp_run_socket + + .. code:: text + + function new_zmq_to_qp_run_socket() + + File: :file:`utils.irp.f` + + Socket on which the qp_run process replies + + + + + +.. c:function:: reset_zmq_addresses + + .. code:: text + + subroutine reset_zmq_addresses + + File: :file:`utils.irp.f` + + Socket which pulls the results (2) + + + + + +.. c:function:: switch_qp_run_to_master + + .. code:: text + + subroutine switch_qp_run_to_master + + File: :file:`utils.irp.f` + + Address of the master qp_run socket Example : tcp://130.120.229.139:12345 + + + + + +.. c:function:: task_done_to_taskserver + + .. code:: text + + integer function task_done_to_taskserver(zmq_to_qp_run_socket, worker_id, task_id) + + File: :file:`utils.irp.f` + + Get a task from the task server + + + + + +.. c:function:: tasks_done_to_taskserver + + .. code:: text + + integer function tasks_done_to_taskserver(zmq_to_qp_run_socket, worker_id, task_id, n_tasks) + + File: :file:`utils.irp.f` + + Get a task from the task server + + + + + +.. c:function:: wait_for_next_state + + .. code:: text + + subroutine wait_for_next_state(state) + + File: :file:`utils.irp.f` + + + + + + + +.. c:function:: wait_for_state + + .. code:: text + + subroutine wait_for_state(state_wait,state) + + File: :file:`utils.irp.f` + + Wait for the ZMQ state to be ready + + + + + +.. c:function:: wait_for_states + + .. code:: text + + subroutine wait_for_states(state_wait,state,n) + + File: :file:`utils.irp.f` + + Wait for the ZMQ state to be ready + + + + + +.. c:function:: zmq_abort + + .. code:: text + + integer function zmq_abort(zmq_to_qp_run_socket) + + File: :file:`utils.irp.f` + + Aborts a running parallel computation + + + + + +.. c:function:: zmq_delete_task + + .. code:: text + + integer function zmq_delete_task(zmq_to_qp_run_socket,zmq_socket_pull,task_id,more) + + File: :file:`utils.irp.f` + + 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. + + + + + +.. c:function:: zmq_delete_tasks + + .. code:: text + + integer function zmq_delete_tasks(zmq_to_qp_run_socket,zmq_socket_pull,task_id,n_tasks,more) + + File: :file:`utils.irp.f` + + 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. + + + + + +.. c:function:: zmq_delete_tasks_async_recv + + .. code:: text + + integer function zmq_delete_tasks_async_recv(zmq_to_qp_run_socket,zmq_socket_pull,task_id,n_tasks,more) + + File: :file:`utils.irp.f` + + 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. + + + + + +.. c:function:: zmq_delete_tasks_async_send + + .. code:: text + + integer function zmq_delete_tasks_async_send(zmq_to_qp_run_socket,zmq_socket_pull,task_id,n_tasks,more) + + File: :file:`utils.irp.f` + + 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. + + + + + +.. c:function:: zmq_get8_dvector + + .. code:: text + + integer function zmq_get8_dvector(zmq_to_qp_run_socket, worker_id, name, x, size_x) + + File: :file:`put_get.irp.f` + + Get a float vector from the qp_run scheduler + + + + + +.. c:function:: zmq_get8_ivector + + .. code:: text + + integer function zmq_get8_ivector(zmq_to_qp_run_socket, worker_id, name, x, size_x) + + File: :file:`put_get.irp.f` + + Get a vector of integers from the qp_run scheduler + + + + + +.. c:function:: zmq_get_dmatrix + + .. code:: text + + integer function zmq_get_dmatrix(zmq_to_qp_run_socket, worker_id, name, x, size_x1, size_x2, sze) + + File: :file:`put_get.irp.f` + + Get a float vector from the qp_run scheduler + + + + + +.. c:function:: zmq_get_dvector + + .. code:: text + + integer function zmq_get_dvector(zmq_to_qp_run_socket, worker_id, name, x, size_x) + + File: :file:`put_get.irp.f` + + Get a float vector from the qp_run scheduler + + + + + +.. c:function:: zmq_get_i8matrix + + .. code:: text + + integer function zmq_get_i8matrix(zmq_to_qp_run_socket, worker_id, name, x, size_x1, size_x2, sze) + + File: :file:`put_get.irp.f` + + Get a float vector from the qp_run scheduler + + + + + +.. c:function:: zmq_get_imatrix + + .. code:: text + + integer function zmq_get_imatrix(zmq_to_qp_run_socket, worker_id, name, x, size_x1, size_x2, sze) + + File: :file:`put_get.irp.f` + + Get a float vector from the qp_run scheduler + + + + + +.. c:function:: zmq_get_int + + .. code:: text + + integer function zmq_get_int(zmq_to_qp_run_socket, worker_id, name, x) + + File: :file:`put_get.irp.f` + + Get a vector of integers from the qp_run scheduler + + + + + +.. c:function:: zmq_get_int_nompi + + .. code:: text + + integer function zmq_get_int_nompi(zmq_to_qp_run_socket, worker_id, name, x) + + File: :file:`put_get.irp.f` + + Get a vector of integers from the qp_run scheduler + + + + + +.. c:function:: zmq_get_ivector + + .. code:: text + + integer function zmq_get_ivector(zmq_to_qp_run_socket, worker_id, name, x, size_x) + + File: :file:`put_get.irp.f` + + Get a vector of integers from the qp_run scheduler + + + + + +.. c:function:: zmq_port + + .. code:: text + + function zmq_port(ishift) + + File: :file:`utils.irp.f` + + Return the value of the ZMQ port from the corresponding integer + + + + + +.. c:function:: zmq_put8_dvector + + .. code:: text + + integer function zmq_put8_dvector(zmq_to_qp_run_socket, worker_id, name, x, size_x) + + File: :file:`put_get.irp.f` + + Put a float vector on the qp_run scheduler + + + + + +.. c:function:: zmq_put8_ivector + + .. code:: text + + integer function zmq_put8_ivector(zmq_to_qp_run_socket, worker_id, name, x, size_x) + + File: :file:`put_get.irp.f` + + Put a vector of integers on the qp_run scheduler + + + + + +.. c:function:: zmq_put_dmatrix + + .. code:: text + + integer function zmq_put_dmatrix(zmq_to_qp_run_socket, worker_id, name, x, size_x1, size_x2, sze) + + File: :file:`put_get.irp.f` + + Put a float vector on the qp_run scheduler + + + + + +.. c:function:: zmq_put_dvector + + .. code:: text + + integer function zmq_put_dvector(zmq_to_qp_run_socket, worker_id, name, x, size_x) + + File: :file:`put_get.irp.f` + + Put a float vector on the qp_run scheduler + + + + + +.. c:function:: zmq_put_i8matrix + + .. code:: text + + integer function zmq_put_i8matrix(zmq_to_qp_run_socket, worker_id, name, x, size_x1, size_x2, sze) + + File: :file:`put_get.irp.f` + + Put a float vector on the qp_run scheduler + + + + + +.. c:function:: zmq_put_imatrix + + .. code:: text + + integer function zmq_put_imatrix(zmq_to_qp_run_socket, worker_id, name, x, size_x1, size_x2, sze) + + File: :file:`put_get.irp.f` + + Put a float vector on the qp_run scheduler + + + + + +.. c:function:: zmq_put_int + + .. code:: text + + integer function zmq_put_int(zmq_to_qp_run_socket, worker_id, name, x) + + File: :file:`put_get.irp.f` + + Put a vector of integers on the qp_run scheduler + + + + + +.. c:function:: zmq_put_ivector + + .. code:: text + + integer function zmq_put_ivector(zmq_to_qp_run_socket, worker_id, name, x, size_x) + + File: :file:`put_get.irp.f` + + Put a vector of integers on the qp_run scheduler + + + + + +.. c:function:: zmq_set_running + + .. code:: text + + integer function zmq_set_running(zmq_to_qp_run_socket) + + File: :file:`utils.irp.f` + + Set the job to Running in QP-run + + diff --git a/docs/source/programmers_guide/index.rst b/docs/source/programmers_guide/index.rst index 2bb06e7e..b7011b23 100644 --- a/docs/source/programmers_guide/index.rst +++ b/docs/source/programmers_guide/index.rst @@ -12,23 +12,9 @@ Index of Modules /modules/* -Index of Providers ------------------- +.. Auto-generated file -.. toctree:: - :maxdepth: 1 - :glob: - - /providers/* +.. include:: index_providers.rst -Index of Subroutines/Functions ------------------------------- - -.. toctree:: - :maxdepth: 1 - :glob: - - /subroutines/* - diff --git a/docs/source/programmers_guide/index_providers.rst b/docs/source/programmers_guide/index_providers.rst new file mode 100644 index 00000000..caa5d70a --- /dev/null +++ b/docs/source/programmers_guide/index_providers.rst @@ -0,0 +1,1307 @@ +Index of Providers +------------------ + +* :c:data:`abs_psi_coef_max` +* :c:data:`abs_psi_coef_min` +* :c:data:`ao_bi_elec_integral_alpha` +* :c:data:`ao_bi_elec_integral_beta` +* :c:data:`ao_bielec_integral_schwartz` +* :c:data:`ao_bielec_integrals_in_map` +* :c:data:`ao_cart_to_sphe_coef` +* :c:data:`ao_cart_to_sphe_inv` +* :c:data:`ao_cart_to_sphe_num` +* :c:data:`ao_cart_to_sphe_overlap` +* :c:data:`ao_cartesian` +* :c:data:`ao_coef` +* :c:data:`ao_coef_normalization_factor` +* :c:data:`ao_coef_normalization_libint_factor` +* :c:data:`ao_coef_normalized` +* :c:data:`ao_coef_normalized_ordered` +* :c:data:`ao_coef_normalized_ordered_transp` +* :c:data:`ao_deriv2_x` +* :c:data:`ao_deriv2_y` +* :c:data:`ao_deriv2_z` +* :c:data:`ao_deriv_1_x` +* :c:data:`ao_deriv_1_y` +* :c:data:`ao_deriv_1_z` +* :c:data:`ao_dipole_x` +* :c:data:`ao_dipole_y` +* :c:data:`ao_dipole_z` +* :c:data:`ao_expo` +* :c:data:`ao_expo_ordered` +* :c:data:`ao_expo_ordered_transp` +* :c:data:`ao_integrals_cache` +* :c:data:`ao_integrals_cache_max` +* :c:data:`ao_integrals_cache_min` +* :c:data:`ao_integrals_map` +* :c:data:`ao_integrals_threshold` +* :c:data:`ao_kinetic_integral` +* :c:data:`ao_l` +* :c:data:`ao_l_char` +* :c:data:`ao_l_char_space` +* :c:data:`ao_l_max` +* :c:data:`ao_md5` +* :c:data:`ao_mono_elec_integral` +* :c:data:`ao_mono_elec_integral_diag` +* :c:data:`ao_nucl` +* :c:data:`ao_nucl_elec_integral` +* :c:data:`ao_nucl_elec_integral_per_atom` +* :c:data:`ao_num` +* :c:data:`ao_ortho_canonical_coef` +* :c:data:`ao_ortho_canonical_coef_inv` +* :c:data:`ao_ortho_canonical_nucl_elec_integral` +* :c:data:`ao_ortho_canonical_num` +* :c:data:`ao_ortho_canonical_overlap` +* :c:data:`ao_ortho_lowdin_coef` +* :c:data:`ao_ortho_lowdin_nucl_elec_integral` +* :c:data:`ao_ortho_lowdin_overlap` +* :c:data:`ao_overlap` +* :c:data:`ao_overlap_abs` +* :c:data:`ao_overlap_x` +* :c:data:`ao_overlap_y` +* :c:data:`ao_overlap_z` +* :c:data:`ao_power` +* :c:data:`ao_prim_num` +* :c:data:`ao_prim_num_max` +* :c:data:`ao_pseudo_integral` +* :c:data:`ao_pseudo_integral_local` +* :c:data:`ao_pseudo_integral_non_local` +* :c:data:`ao_spread_x` +* :c:data:`ao_spread_y` +* :c:data:`ao_spread_z` +* :c:data:`apply_exc_to_psi` +* :c:data:`barycentric_electronic_energy` +* :c:data:`bi_elec_ref_bitmask_energy` +* :c:data:`big_array_coulomb_integrals` +* :c:data:`big_array_exchange_integrals` +* :c:data:`binom` +* :c:data:`binom_int` +* :c:data:`binom_int_transp` +* :c:data:`binom_transp` +* :c:data:`c0_weight` +* :c:data:`cart_to_sphe_0` +* :c:data:`cart_to_sphe_1` +* :c:data:`cart_to_sphe_2` +* :c:data:`cart_to_sphe_3` +* :c:data:`cart_to_sphe_4` +* :c:data:`cart_to_sphe_5` +* :c:data:`cart_to_sphe_6` +* :c:data:`cart_to_sphe_7` +* :c:data:`cart_to_sphe_8` +* :c:data:`cart_to_sphe_9` +* :c:data:`cas_bitmask` +* :c:data:`center_of_mass` +* :c:data:`ci_dressed_pt2_new_eigenvectors` +* :c:data:`ci_dressed_pt2_new_eigenvectors_s2` +* :c:data:`ci_dressed_pt2_new_energy` +* :c:data:`ci_eigenvectors` +* :c:data:`ci_eigenvectors_s2` +* :c:data:`ci_electronic_dressed_pt2_new_energy` +* :c:data:`ci_electronic_energy` +* :c:data:`ci_energy` +* :c:data:`closed_shell_ref_bitmask` +* :c:data:`coef_hf_selector` +* :c:data:`core_bitmask` +* :c:data:`core_energy` +* :c:data:`core_fock_operator` +* :c:data:`core_inact_act_bitmask_4` +* :c:data:`core_inact_virt_bitmask` +* :c:data:`corr_e_from_1h1p` +* :c:data:`correlation_energy_ratio_max` +* :c:data:`davidson_criterion` +* :c:data:`davidson_sze_max` +* :c:data:`degree_max_generators` +* :c:data:`degree_max_integration_lebedev` +* :c:data:`delta_e_per_selector` +* :c:data:`delta_ij_mrpt` +* :c:data:`det_alpha_norm` +* :c:data:`det_beta_norm` +* :c:data:`det_to_occ_pattern` +* :c:data:`diag_algorithm` +* :c:data:`diagonal_fock_matrix_mo` +* :c:data:`diagonal_fock_matrix_mo_sum` +* :c:data:`diagonal_h_matrix_on_psi_det` +* :c:data:`disk_access_ao_integrals` +* :c:data:`disk_access_ao_one_integrals` +* :c:data:`disk_access_mo_integrals` +* :c:data:`disk_access_mo_one_integrals` +* :c:data:`disk_access_nuclear_repulsion` +* :c:data:`disk_based_davidson` +* :c:data:`distributed_davidson` +* :c:data:`do_direct_integrals` +* :c:data:`do_pseudo` +* :c:data:`do_pt2` +* :c:data:`do_third_order_1h1p` +* :c:data:`double_exc_bitmask` +* :c:data:`double_index_selectors` +* :c:data:`dressed_column_idx` +* :c:data:`dressing_column_h` +* :c:data:`dressing_column_s` +* :c:data:`dtranspose` +* :c:data:`e_corr_double_only` +* :c:data:`e_corr_per_selectors` +* :c:data:`e_corr_second_order` +* :c:data:`eigenvalues_fock_matrix_ao` +* :c:data:`eigenvectors_fock_matrix_ao` +* :c:data:`eigenvectors_fock_matrix_mo` +* :c:data:`elec_alpha_num` +* :c:data:`elec_beta_num` +* :c:data:`elec_num` +* :c:data:`elec_num_tab` +* :c:data:`element_mass` +* :c:data:`element_name` +* :c:data:`energy_cas_dyall` +* :c:data:`energy_cas_dyall_no_exchange` +* :c:data:`energy_iterations` +* :c:data:`exc_degree_per_selectors` +* :c:data:`expected_s2` +* :c:data:`extrapolate_fock_matrix` +* :c:data:`extrapolated_energy` +* :c:data:`ezfio_filename` +* :c:data:`ezfio_work_dir` +* :c:data:`fact_inv` +* :c:data:`fill_h_apply_buffer_selection` +* :c:data:`fock_core_inactive` +* :c:data:`fock_core_inactive_from_act` +* :c:data:`fock_core_inactive_total` +* :c:data:`fock_core_inactive_total_spin_trace` +* :c:data:`fock_matrix_ao` +* :c:data:`fock_matrix_ao_alpha` +* :c:data:`fock_matrix_ao_beta` +* :c:data:`fock_matrix_diag_mo` +* :c:data:`fock_matrix_mo` +* :c:data:`fock_matrix_mo_alpha` +* :c:data:`fock_matrix_mo_beta` +* :c:data:`fock_operator_active_from_core_inact` +* :c:data:`fock_operator_closed_shell_ref_bitmask` +* :c:data:`fock_virt_from_act` +* :c:data:`fock_virt_from_core_inact` +* :c:data:`fock_virt_total` +* :c:data:`fock_virt_total_spin_trace` +* :c:data:`fps_spf_matrix_ao` +* :c:data:`fps_spf_matrix_mo` +* :c:data:`full_ijkl_bitmask` +* :c:data:`full_ijkl_bitmask_4` +* :c:data:`gauleg_t2` +* :c:data:`gauleg_w` +* :c:data:`gen_det_ref_idx` +* :c:data:`gen_det_ref_shortcut` +* :c:data:`gen_det_ref_sorted` +* :c:data:`gen_det_ref_version` +* :c:data:`general_primitive_integral` +* :c:data:`generators_bitmask` +* :c:data:`generators_bitmask_restart` +* :c:data:`give_holes_and_particles_in_active_space` +* :c:data:`h0_type` +* :c:data:`h_apply_buffer_allocated` +* :c:data:`h_apply_buffer_lock` +* :c:data:`h_matrix_all_dets` +* :c:data:`h_matrix_cas` +* :c:data:`h_matrix_ref` +* :c:data:`hf_bitmask` +* :c:data:`hf_density_matrix_ao` +* :c:data:`hf_density_matrix_ao_alpha` +* :c:data:`hf_density_matrix_ao_beta` +* :c:data:`hf_energy` +* :c:data:`hmatrix_dressed_pt2_new` +* :c:data:`hmatrix_dressed_pt2_new_symmetrized` +* :c:data:`holes_operators` +* :c:data:`i2radix_sort` +* :c:data:`i8radix_sort` +* :c:data:`i8radix_sort_big` +* :c:data:`i_bitmask_gen` +* :c:data:`i_h_hf_per_selectors` +* :c:data:`i_x1_new` +* :c:data:`i_x1_pol_mult_a1` +* :c:data:`i_x1_pol_mult_a2` +* :c:data:`i_x1_pol_mult_mono_elec` +* :c:data:`i_x1_pol_mult_recurs` +* :c:data:`i_x2_new` +* :c:data:`i_x2_pol_mult` +* :c:data:`i_x2_pol_mult_mono_elec` +* :c:data:`idx_cas` +* :c:data:`idx_non_cas` +* :c:data:`idx_non_ref` +* :c:data:`idx_non_ref_from_sorted` +* :c:data:`idx_non_ref_rev` +* :c:data:`idx_ref` +* :c:data:`inact_bitmask` +* :c:data:`inact_virt_bitmask` +* :c:data:`index_holes_bitmask` +* :c:data:`index_particl_bitmask` +* :c:data:`inertia_tensor` +* :c:data:`inertia_tensor_eigenvalues` +* :c:data:`inertia_tensor_eigenvectors` +* :c:data:`initialize_pt2_e0_denominator` +* :c:data:`insert_into_mo_integrals_map` +* :c:data:`inv_int` +* :c:data:`inv_norm_psi_ref` +* :c:data:`inv_selectors_coef_hf` +* :c:data:`inv_selectors_coef_hf_squared` +* :c:data:`iradix_sort` +* :c:data:`iradix_sort_big` +* :c:data:`kinetic_ref_bitmask_energy` +* :c:data:`l3_weight` +* :c:data:`l_to_charater` +* :c:data:`level_shift` +* :c:data:`list_act` +* :c:data:`list_act_reverse` +* :c:data:`list_core` +* :c:data:`list_core_inact` +* :c:data:`list_core_inact_act` +* :c:data:`list_core_inact_act_reverse` +* :c:data:`list_core_inact_reverse` +* :c:data:`list_core_reverse` +* :c:data:`list_inact` +* :c:data:`list_inact_reverse` +* :c:data:`list_virt` +* :c:data:`list_virt_reverse` +* :c:data:`max_degree_exc` +* :c:data:`max_dim_diis` +* :c:data:`max_exc_pert` +* :c:data:`mo_bielec_integral_jj` +* :c:data:`mo_bielec_integral_jj_anti` +* :c:data:`mo_bielec_integral_jj_anti_from_ao` +* :c:data:`mo_bielec_integral_jj_exchange` +* :c:data:`mo_bielec_integral_jj_exchange_from_ao` +* :c:data:`mo_bielec_integral_jj_from_ao` +* :c:data:`mo_bielec_integral_vv_anti_from_ao` +* :c:data:`mo_bielec_integral_vv_exchange_from_ao` +* :c:data:`mo_bielec_integral_vv_from_ao` +* :c:data:`mo_bielec_integrals_in_map` +* :c:data:`mo_class` +* :c:data:`mo_coef` +* :c:data:`mo_coef_in_ao_ortho_basis` +* :c:data:`mo_coef_transp` +* :c:data:`mo_dipole_x` +* :c:data:`mo_dipole_y` +* :c:data:`mo_dipole_z` +* :c:data:`mo_energy_expval` +* :c:data:`mo_guess_type` +* :c:data:`mo_integrals_cache` +* :c:data:`mo_integrals_cache_max` +* :c:data:`mo_integrals_cache_max_8` +* :c:data:`mo_integrals_cache_min` +* :c:data:`mo_integrals_cache_min_8` +* :c:data:`mo_integrals_map` +* :c:data:`mo_integrals_threshold` +* :c:data:`mo_kinetic_integral` +* :c:data:`mo_label` +* :c:data:`mo_mono_elec_integral` +* :c:data:`mo_nucl_elec_integral` +* :c:data:`mo_nucl_elec_integral_per_atom` +* :c:data:`mo_num` +* :c:data:`mo_occ` +* :c:data:`mo_overlap` +* :c:data:`mo_pseudo_integral` +* :c:data:`mo_spread_x` +* :c:data:`mo_spread_y` +* :c:data:`mo_spread_z` +* :c:data:`mo_tot_num` +* :c:data:`mono_elec_ref_bitmask_energy` +* :c:data:`mpi_bit_kind` +* :c:data:`mpi_initialized` +* :c:data:`mpi_master` +* :c:data:`mpi_rank` +* :c:data:`mpi_size` +* :c:data:`n_act_orb` +* :c:data:`n_aos_max` +* :c:data:`n_cas_bitmask` +* :c:data:`n_core_inact_act_orb` +* :c:data:`n_core_inact_orb` +* :c:data:`n_core_orb` +* :c:data:`n_core_orb_allocate` +* :c:data:`n_det` +* :c:data:`n_det_alpha_unique` +* :c:data:`n_det_beta_unique` +* :c:data:`n_det_cas` +* :c:data:`n_det_generators` +* :c:data:`n_det_iterations` +* :c:data:`n_det_max` +* :c:data:`n_det_max_full` +* :c:data:`n_det_max_stored` +* :c:data:`n_det_non_cas` +* :c:data:`n_det_non_ref` +* :c:data:`n_det_ref` +* :c:data:`n_det_selectors` +* :c:data:`n_double_exc_bitmasks` +* :c:data:`n_double_selectors` +* :c:data:`n_generators_bitmask` +* :c:data:`n_generators_bitmask_restart` +* :c:data:`n_inact_orb` +* :c:data:`n_inact_orb_allocate` +* :c:data:`n_int` +* :c:data:`n_it_scf_max` +* :c:data:`n_iter` +* :c:data:`n_occ_pattern` +* :c:data:`n_points_integration_angular_lebedev` +* :c:data:`n_pt_max_i_x` +* :c:data:`n_pt_max_integrals` +* :c:data:`n_single_exc_bitmasks` +* :c:data:`n_states` +* :c:data:`n_states_diag` +* :c:data:`n_virt_orb` +* :c:data:`n_virt_orb_allocate` +* :c:data:`no_ivvv_integrals` +* :c:data:`no_oa_or_av_opt` +* :c:data:`no_vvv_integrals` +* :c:data:`no_vvvv_integrals` +* :c:data:`norm_psi_ref` +* :c:data:`nproc` +* :c:data:`nthreads_davidson` +* :c:data:`nucl_aos` +* :c:data:`nucl_charge` +* :c:data:`nucl_charge_remove` +* :c:data:`nucl_coord` +* :c:data:`nucl_coord_transp` +* :c:data:`nucl_dist` +* :c:data:`nucl_dist_2` +* :c:data:`nucl_dist_vec_x` +* :c:data:`nucl_dist_vec_y` +* :c:data:`nucl_dist_vec_z` +* :c:data:`nucl_elec_ref_bitmask_energy` +* :c:data:`nucl_label` +* :c:data:`nucl_list_shell_aos` +* :c:data:`nucl_n_aos` +* :c:data:`nucl_num` +* :c:data:`nucl_num_shell_aos` +* :c:data:`nuclear_repulsion` +* :c:data:`one_anhil` +* :c:data:`one_anhil_inact` +* :c:data:`one_anhil_one_creat` +* :c:data:`one_anhil_one_creat_inact_virt` +* :c:data:`one_anhil_one_creat_inact_virt_bis` +* :c:data:`one_anhil_one_creat_inact_virt_norm` +* :c:data:`one_body_dm_ao_alpha` +* :c:data:`one_body_dm_ao_beta` +* :c:data:`one_body_dm_dagger_mo_spin_index` +* :c:data:`one_body_dm_mo` +* :c:data:`one_body_dm_mo_alpha` +* :c:data:`one_body_dm_mo_alpha_average` +* :c:data:`one_body_dm_mo_alpha_old` +* :c:data:`one_body_dm_mo_beta` +* :c:data:`one_body_dm_mo_beta_average` +* :c:data:`one_body_dm_mo_beta_old` +* :c:data:`one_body_dm_mo_diff` +* :c:data:`one_body_dm_mo_spin_index` +* :c:data:`one_body_single_double_dm_mo_alpha` +* :c:data:`one_body_single_double_dm_mo_beta` +* :c:data:`one_body_spin_density_ao` +* :c:data:`one_body_spin_density_mo` +* :c:data:`one_creat` +* :c:data:`one_creat_virt` +* :c:data:`output_cpu_time_0` +* :c:data:`output_wall_time_0` +* :c:data:`overlap_gaussian_xyz` +* :c:data:`particles_operators` +* :c:data:`phi_angular_integration_lebedev` +* :c:data:`positive_charge_barycentre` +* :c:data:`progress_active` +* :c:data:`progress_bar` +* :c:data:`progress_timeout` +* :c:data:`progress_title` +* :c:data:`progress_value` +* :c:data:`pseudo_dz_k` +* :c:data:`pseudo_dz_k_transp` +* :c:data:`pseudo_dz_kl` +* :c:data:`pseudo_dz_kl_transp` +* :c:data:`pseudo_grid_rmax` +* :c:data:`pseudo_grid_size` +* :c:data:`pseudo_klocmax` +* :c:data:`pseudo_kmax` +* :c:data:`pseudo_lmax` +* :c:data:`pseudo_n_k` +* :c:data:`pseudo_n_k_transp` +* :c:data:`pseudo_n_kl` +* :c:data:`pseudo_n_kl_transp` +* :c:data:`pseudo_v_k` +* :c:data:`pseudo_v_k_transp` +* :c:data:`pseudo_v_kl` +* :c:data:`pseudo_v_kl_transp` +* :c:data:`psi_active` +* :c:data:`psi_average_norm_contrib` +* :c:data:`psi_average_norm_contrib_sorted` +* :c:data:`psi_bilinear_matrix` +* :c:data:`psi_bilinear_matrix_columns` +* :c:data:`psi_bilinear_matrix_columns_loc` +* :c:data:`psi_bilinear_matrix_order` +* :c:data:`psi_bilinear_matrix_order_reverse` +* :c:data:`psi_bilinear_matrix_order_transp_reverse` +* :c:data:`psi_bilinear_matrix_rows` +* :c:data:`psi_bilinear_matrix_transp_columns` +* :c:data:`psi_bilinear_matrix_transp_order` +* :c:data:`psi_bilinear_matrix_transp_rows` +* :c:data:`psi_bilinear_matrix_transp_rows_loc` +* :c:data:`psi_bilinear_matrix_transp_values` +* :c:data:`psi_bilinear_matrix_values` +* :c:data:`psi_cas` +* :c:data:`psi_cas_coef` +* :c:data:`psi_cas_coef_sorted_bit` +* :c:data:`psi_cas_energy` +* :c:data:`psi_cas_energy_diagonalized` +* :c:data:`psi_cas_sorted_bit` +* :c:data:`psi_coef` +* :c:data:`psi_coef_cas_diagonalized` +* :c:data:`psi_coef_generators` +* :c:data:`psi_coef_max` +* :c:data:`psi_coef_min` +* :c:data:`psi_coef_sorted` +* :c:data:`psi_coef_sorted_bit` +* :c:data:`psi_coef_sorted_gen` +* :c:data:`psi_det` +* :c:data:`psi_det_alpha` +* :c:data:`psi_det_alpha_unique` +* :c:data:`psi_det_beta` +* :c:data:`psi_det_beta_unique` +* :c:data:`psi_det_generators` +* :c:data:`psi_det_hii` +* :c:data:`psi_det_size` +* :c:data:`psi_det_sorted` +* :c:data:`psi_det_sorted_bit` +* :c:data:`psi_det_sorted_gen` +* :c:data:`psi_det_sorted_gen_order` +* :c:data:`psi_det_sorted_order` +* :c:data:`psi_energy` +* :c:data:`psi_energy_with_nucl_rep` +* :c:data:`psi_non_cas` +* :c:data:`psi_non_cas_coef` +* :c:data:`psi_non_cas_coef_sorted_bit` +* :c:data:`psi_non_cas_sorted_bit` +* :c:data:`psi_non_ref` +* :c:data:`psi_non_ref_coef` +* :c:data:`psi_non_ref_coef_interm_norm` +* :c:data:`psi_non_ref_coef_restart` +* :c:data:`psi_non_ref_coef_sorted_bit` +* :c:data:`psi_non_ref_coef_transp` +* :c:data:`psi_non_ref_restart` +* :c:data:`psi_non_ref_sorted_bit` +* :c:data:`psi_occ_pattern` +* :c:data:`psi_occ_pattern_hii` +* :c:data:`psi_ref` +* :c:data:`psi_ref_bis_lock` +* :c:data:`psi_ref_coef` +* :c:data:`psi_ref_coef_diagonalized` +* :c:data:`psi_ref_coef_interm_norm` +* :c:data:`psi_ref_coef_inv` +* :c:data:`psi_ref_coef_normalized` +* :c:data:`psi_ref_coef_restart` +* :c:data:`psi_ref_coef_sorted_bit` +* :c:data:`psi_ref_coef_transp` +* :c:data:`psi_ref_energy` +* :c:data:`psi_ref_energy_diagonalized` +* :c:data:`psi_ref_restart` +* :c:data:`psi_ref_sorted_bit` +* :c:data:`psi_selectors` +* :c:data:`psi_selectors_coef` +* :c:data:`psi_selectors_coef_transp` +* :c:data:`psi_selectors_diag_h_mat` +* :c:data:`psi_selectors_size` +* :c:data:`pt2_cw` +* :c:data:`pt2_e0_denominator` +* :c:data:`pt2_f` +* :c:data:`pt2_iterations` +* :c:data:`pt2_j` +* :c:data:`pt2_max` +* :c:data:`pt2_mindetinfirstteeth` +* :c:data:`pt2_n_0` +* :c:data:`pt2_n_tasks` +* :c:data:`pt2_n_tasks_max` +* :c:data:`pt2_n_teeth` +* :c:data:`pt2_r` +* :c:data:`pt2_relative_error` +* :c:data:`pt2_stoch_istate` +* :c:data:`pt2_u` +* :c:data:`pt2_u_0` +* :c:data:`pt2_w` +* :c:data:`pt2_w_t` +* :c:data:`qp_max_mem` +* :c:data:`qp_run_address` +* :c:data:`read_ao_integrals` +* :c:data:`read_ao_one_integrals` +* :c:data:`read_mo_integrals` +* :c:data:`read_mo_one_integrals` +* :c:data:`read_wf` +* :c:data:`rec__quicksort` +* :c:data:`rec_d_quicksort` +* :c:data:`rec_i2_quicksort` +* :c:data:`rec_i8_quicksort` +* :c:data:`rec_i_quicksort` +* :c:data:`ref_bitmask` +* :c:data:`ref_bitmask_energy` +* :c:data:`ref_closed_shell_bitmask` +* :c:data:`ref_hamiltonian_matrix` +* :c:data:`reunion_of_bitmask` +* :c:data:`reunion_of_cas_inact_bitmask` +* :c:data:`reunion_of_core_inact_act_bitmask` +* :c:data:`reunion_of_core_inact_bitmask` +* :c:data:`run_progress` +* :c:data:`s2_eig` +* :c:data:`s2_values` +* :c:data:`s_half` +* :c:data:`s_half_inv` +* :c:data:`s_inv` +* :c:data:`s_mo_coef` +* :c:data:`s_z` +* :c:data:`s_z2_sz` +* :c:data:`scf_algorithm` +* :c:data:`second_order_pt_new` +* :c:data:`second_order_pt_new_1h` +* :c:data:`second_order_pt_new_1h1p` +* :c:data:`second_order_pt_new_1h2p` +* :c:data:`second_order_pt_new_1p` +* :c:data:`second_order_pt_new_2h` +* :c:data:`second_order_pt_new_2h1p` +* :c:data:`second_order_pt_new_2h2p` +* :c:data:`second_order_pt_new_2p` +* :c:data:`select_max` +* :c:data:`selection_criterion` +* :c:data:`selection_criterion_factor` +* :c:data:`selection_criterion_min` +* :c:data:`single_exc_bitmask` +* :c:data:`singles_alpha_csc` +* :c:data:`singles_alpha_csc_idx` +* :c:data:`singles_alpha_csc_size` +* :c:data:`singles_alpha_size` +* :c:data:`size_select_max` +* :c:data:`slater_bragg_radii` +* :c:data:`slater_bragg_radii_per_atom` +* :c:data:`slater_bragg_radii_per_atom_ua` +* :c:data:`slater_bragg_radii_ua` +* :c:data:`slater_bragg_type_inter_distance` +* :c:data:`slater_bragg_type_inter_distance_ua` +* :c:data:`state_average_weight` +* :c:data:`state_following` +* :c:data:`store_full_h_mat` +* :c:data:`target_energy` +* :c:data:`theta_angular_integration_lebedev` +* :c:data:`three_anhil` +* :c:data:`three_creat` +* :c:data:`thresh_scf` +* :c:data:`threshold_davidson` +* :c:data:`threshold_diis` +* :c:data:`threshold_diis_nonzero` +* :c:data:`threshold_generators` +* :c:data:`threshold_selectors` +* :c:data:`transpose` +* :c:data:`two_anhil` +* :c:data:`two_anhil_one_creat` +* :c:data:`two_body_dm_ab_big_array_act` +* :c:data:`two_body_dm_ab_big_array_core_act` +* :c:data:`two_body_dm_ab_diag_act` +* :c:data:`two_body_dm_ab_diag_all` +* :c:data:`two_body_dm_ab_diag_core` +* :c:data:`two_body_dm_ab_diag_inact` +* :c:data:`two_body_dm_ab_map` +* :c:data:`two_body_dm_diag_core_a_act_b` +* :c:data:`two_body_dm_diag_core_act` +* :c:data:`two_body_dm_diag_core_b_act_a` +* :c:data:`two_body_dm_in_map` +* :c:data:`two_creat` +* :c:data:`two_creat_one_anhil` +* :c:data:`unpaired_alpha_electrons` +* :c:data:`used_weight` +* :c:data:`var_pt2_ratio` +* :c:data:`virt_bitmask` +* :c:data:`virt_bitmask_4` +* :c:data:`weight_occ_pattern` +* :c:data:`weights_angular_integration_lebedev` +* :c:data:`write_ao_integrals` +* :c:data:`write_ao_one_integrals` +* :c:data:`write_mo_integrals` +* :c:data:`write_mo_one_integrals` +* :c:data:`zmq_context` +* :c:data:`zmq_lock` +* :c:data:`zmq_port_start` +* :c:data:`zmq_socket_pair_inproc_address` +* :c:data:`zmq_socket_pull_inproc_address` +* :c:data:`zmq_socket_pull_tcp_address` +* :c:data:`zmq_socket_push_inproc_address` +* :c:data:`zmq_socket_push_tcp_address` +* :c:data:`zmq_socket_sub_tcp_address` +* :c:data:`zmq_state` + +Index of Subroutines/Functions +------------------------------ + +* :c:func:`a_coef` +* :c:func:`a_operator` +* :c:func:`ac_operator` +* :c:func:`add_integrals_to_map` +* :c:func:`add_integrals_to_map_no_exit_34` +* :c:func:`add_integrals_to_map_three_indices` +* :c:func:`add_poly` +* :c:func:`add_poly_multiply` +* :c:func:`add_task_to_taskserver` +* :c:func:`add_to_selection_buffer` +* :c:func:`add_values_to_two_body_dm_map` +* :c:func:`ao_bielec_integral` +* :c:func:`ao_bielec_integral_schwartz_accel` +* :c:func:`ao_bielec_integrals_in_map_collector` +* :c:func:`ao_bielec_integrals_in_map_slave` +* :c:func:`ao_bielec_integrals_in_map_slave_inproc` +* :c:func:`ao_bielec_integrals_in_map_slave_tcp` +* :c:func:`ao_l4` +* :c:func:`ao_ortho_cano_to_ao` +* :c:func:`ao_power_index` +* :c:func:`ao_to_mo` +* :c:func:`ao_value` +* :c:func:`apply_excitation` +* :c:func:`apply_hole` +* :c:func:`apply_holes` +* :c:func:`apply_mono` +* :c:func:`apply_particle` +* :c:func:`apply_particles` +* :c:func:`apply_rotation` +* :c:func:`approx_dble` +* :c:func:`au0_h_au0` +* :c:func:`b_coef` +* :c:func:`bielec_integrals_index` +* :c:func:`bielec_integrals_index_reverse` +* :c:func:`binom_func` +* :c:func:`bitstring_to_hexa` +* :c:func:`bitstring_to_list` +* :c:func:`bitstring_to_list_ab` +* :c:func:`bitstring_to_list_ab_old` +* :c:func:`bitstring_to_list_in_selection` +* :c:func:`bitstring_to_str` +* :c:func:`broadcast_chunks_bit_kind` +* :c:func:`broadcast_chunks_double` +* :c:func:`broadcast_chunks_integer` +* :c:func:`broadcast_chunks_integer8` +* :c:func:`build_fock_tmp` +* :c:func:`cis` +* :c:func:`clear_ao_map` +* :c:func:`clear_bit_to_integer` +* :c:func:`clear_mo_map` +* :c:func:`compute_ao_bielec_integrals` +* :c:func:`compute_ao_integrals_jl` +* :c:func:`compute_diag_two_body_dm_ab` +* :c:func:`compute_diag_two_body_dm_ab_act` +* :c:func:`compute_diag_two_body_dm_ab_core` +* :c:func:`compute_diag_two_body_dm_ab_core_act` +* :c:func:`compute_extra_diag_two_body_dm_ab` +* :c:func:`compute_extra_diag_two_body_dm_ab_act` +* :c:func:`compute_extra_diag_two_body_dm_ab_core_act` +* :c:func:`connect_to_taskserver` +* :c:func:`connected_to_ref` +* :c:func:`connected_to_ref_by_mono` +* :c:func:`contrib_1h2p_dm_based` +* :c:func:`contrib_2h1p_dm_based` +* :c:func:`copy_h_apply_buffer_to_wf` +* :c:func:`copy_psi_bilinear_to_psi` +* :c:func:`coulomb_value_no_check` +* :c:func:`create_guess` +* :c:func:`create_microlist` +* :c:func:`create_minilist` +* :c:func:`create_minilist_find_previous` +* :c:func:`create_selection_buffer` +* :c:func:`create_wf_of_psi_bilinear_matrix` +* :c:func:`damping_scf` +* :c:func:`davidson_collector` +* :c:func:`davidson_converged` +* :c:func:`davidson_diag_hjj_sjj` +* :c:func:`davidson_diag_hs2` +* :c:func:`davidson_pull_results` +* :c:func:`davidson_push_results` +* :c:func:`davidson_run_slave` +* :c:func:`davidson_slave_inproc` +* :c:func:`davidson_slave_tcp` +* :c:func:`davidson_slave_work` +* :c:func:`dble_fact` +* :c:func:`dble_fact_even` +* :c:func:`dble_fact_odd` +* :c:func:`dble_logfact` +* :c:func:`ddfact2` +* :c:func:`debug_det` +* :c:func:`debug_spindet` +* :c:func:`decode_exc` +* :c:func:`decode_exc_spin` +* :c:func:`decode_exc_spin_new` +* :c:func:`delete_selection_buffer` +* :c:func:`det_inf` +* :c:func:`det_search_key` +* :c:func:`detcmp` +* :c:func:`deteq` +* :c:func:`diag_h_mat_elem` +* :c:func:`diag_h_mat_elem_au0_h_au0` +* :c:func:`diag_h_mat_elem_fock` +* :c:func:`diag_h_mat_elem_no_elec_check` +* :c:func:`diag_h_mat_elem_no_elec_check_no_exchange` +* :c:func:`diag_s_mat_elem` +* :c:func:`diagonalize_ci` +* :c:func:`diagonalize_s2_betweenstates` +* :c:func:`disconnect_from_taskserver` +* :c:func:`disconnect_from_taskserver_state` +* :c:func:`do_mono_excitation` +* :c:func:`do_spin_flip` +* :c:func:`doubly_occ_empty_in_couple` +* :c:func:`doubly_occ_empty_in_couple_and_no_hund_elsewhere` +* :c:func:`dset_order` +* :c:func:`dset_order_big` +* :c:func:`dsort` +* :c:func:`dump_ao_integrals` +* :c:func:`dump_mo_integrals` +* :c:func:`end_parallel_job` +* :c:func:`end_zmq_pair_socket` +* :c:func:`end_zmq_pull_socket` +* :c:func:`end_zmq_push_socket` +* :c:func:`end_zmq_sub_socket` +* :c:func:`end_zmq_to_qp_run_socket` +* :c:func:`erf0` +* :c:func:`eri` +* :c:func:`extract_ref` +* :c:func:`extrapolate_data` +* :c:func:`f_integral` +* :c:func:`fact` +* :c:func:`fci_zmq` +* :c:func:`fcidump` +* :c:func:`fill_buffer_double` +* :c:func:`fill_h_apply_buffer_no_selection` +* :c:func:`filter_connected` +* :c:func:`filter_connected_i_h_psi0` +* :c:func:`filter_connected_i_h_psi0_sc2` +* :c:func:`filter_not_connected` +* :c:func:`find_connections_previous` +* :c:func:`find_reference` +* :c:func:`find_rotation` +* :c:func:`flip_generators` +* :c:func:`four_idx` +* :c:func:`gammln` +* :c:func:`gammp` +* :c:func:`gauleg` +* :c:func:`gaussian_product` +* :c:func:`gaussian_product_x` +* :c:func:`gcf` +* :c:func:`generate_all_alpha_beta_det_products` +* :c:func:`get_all_spin_doubles` +* :c:func:`get_all_spin_doubles_1` +* :c:func:`get_all_spin_doubles_2` +* :c:func:`get_all_spin_doubles_3` +* :c:func:`get_all_spin_doubles_4` +* :c:func:`get_all_spin_doubles_n_int` +* :c:func:`get_all_spin_singles` +* :c:func:`get_all_spin_singles_1` +* :c:func:`get_all_spin_singles_2` +* :c:func:`get_all_spin_singles_3` +* :c:func:`get_all_spin_singles_4` +* :c:func:`get_all_spin_singles_and_doubles` +* :c:func:`get_all_spin_singles_and_doubles_1` +* :c:func:`get_all_spin_singles_and_doubles_2` +* :c:func:`get_all_spin_singles_and_doubles_3` +* :c:func:`get_all_spin_singles_and_doubles_4` +* :c:func:`get_all_spin_singles_and_doubles_n_int` +* :c:func:`get_all_spin_singles_n_int` +* :c:func:`get_ao_bielec_integral` +* :c:func:`get_ao_bielec_integrals` +* :c:func:`get_ao_bielec_integrals_non_zero` +* :c:func:`get_ao_map_size` +* :c:func:`get_d0` +* :c:func:`get_d1` +* :c:func:`get_d2` +* :c:func:`get_delta_e_dyall` +* :c:func:`get_delta_e_dyall_general_mp` +* :c:func:`get_double_excitation` +* :c:func:`get_double_excitation_phase` +* :c:func:`get_double_excitation_phase_new` +* :c:func:`get_double_excitation_spin` +* :c:func:`get_double_excitation_spin_new` +* :c:func:`get_excitation` +* :c:func:`get_excitation_degree` +* :c:func:`get_excitation_degree_spin` +* :c:func:`get_excitation_degree_spin_new` +* :c:func:`get_excitation_degree_vector` +* :c:func:`get_excitation_degree_vector_double_alpha_beta` +* :c:func:`get_excitation_degree_vector_mono` +* :c:func:`get_excitation_degree_vector_mono_or_exchange` +* :c:func:`get_excitation_degree_vector_mono_or_exchange_verbose` +* :c:func:`get_excitation_spin` +* :c:func:`get_excitation_spin_new` +* :c:func:`get_get_two_body_dm_ab_map_elements` +* :c:func:`get_index_in_psi_det_alpha_unique` +* :c:func:`get_index_in_psi_det_beta_unique` +* :c:func:`get_index_in_psi_det_sorted_bit` +* :c:func:`get_index_in_psi_ref_sorted_bit` +* :c:func:`get_inverse` +* :c:func:`get_m0` +* :c:func:`get_m1` +* :c:func:`get_m2` +* :c:func:`get_mask_phase` +* :c:func:`get_mo_bielec_integral` +* :c:func:`get_mo_bielec_integrals` +* :c:func:`get_mo_bielec_integrals_coulomb_ii` +* :c:func:`get_mo_bielec_integrals_exch_ii` +* :c:func:`get_mo_bielec_integrals_ij` +* :c:func:`get_mo_map_size` +* :c:func:`get_mono_excitation` +* :c:func:`get_mono_excitation_from_fock` +* :c:func:`get_mono_excitation_spin` +* :c:func:`get_mono_excitation_spin_new` +* :c:func:`get_occ_from_key` +* :c:func:`get_phase` +* :c:func:`get_phase_bi` +* :c:func:`get_phasemask_bit` +* :c:func:`get_pseudo_inverse` +* :c:func:`get_s2` +* :c:func:`get_task_from_taskserver` +* :c:func:`get_tasks_from_taskserver` +* :c:func:`get_two_body_dm_ab_map_element` +* :c:func:`get_uj_s2_ui` +* :c:func:`getmobiles` +* :c:func:`getunitandopen` +* :c:func:`give_1h1p_contrib` +* :c:func:`give_1h1p_only_doubles_spin_cross` +* :c:func:`give_1h1p_sec_order_singles_contrib` +* :c:func:`give_1h2p_contrib` +* :c:func:`give_1h2p_contrib_sec_order` +* :c:func:`give_1h2p_new` +* :c:func:`give_1p_sec_order_singles_contrib` +* :c:func:`give_2h1p_contrib` +* :c:func:`give_2h1p_contrib_sec_order` +* :c:func:`give_2h1p_new` +* :c:func:`give_2h2p` +* :c:func:`give_2p_new` +* :c:func:`give_active_part_determinant` +* :c:func:`give_all_aos_at_r` +* :c:func:`give_all_mos_at_r` +* :c:func:`give_core_inactive_part_determinant` +* :c:func:`give_explicit_poly_and_gaussian` +* :c:func:`give_explicit_poly_and_gaussian_double` +* :c:func:`give_explicit_poly_and_gaussian_x` +* :c:func:`give_holes_in_inactive_space` +* :c:func:`give_index_of_doubly_occ_in_active_space` +* :c:func:`give_particles_in_virt_space` +* :c:func:`give_polynom_mult_center_mono_elec` +* :c:func:`give_polynom_mult_center_x` +* :c:func:`give_singles_and_partial_doubles_1h1p_contrib` +* :c:func:`give_specific_mos_at_r` +* :c:func:`give_virt_part_determinant` +* :c:func:`gser` +* :c:func:`h_apply_cis` +* :c:func:`h_apply_cis_diexc` +* :c:func:`h_apply_cis_diexcorg` +* :c:func:`h_apply_cis_diexcp` +* :c:func:`h_apply_cis_monoexc` +* :c:func:`h_apply_cisd` +* :c:func:`h_apply_cisd_diexc` +* :c:func:`h_apply_cisd_diexcorg` +* :c:func:`h_apply_cisd_diexcp` +* :c:func:`h_apply_cisd_monoexc` +* :c:func:`h_apply_mrpt` +* :c:func:`h_apply_mrpt_1h` +* :c:func:`h_apply_mrpt_1h1p` +* :c:func:`h_apply_mrpt_1h1p_diexc` +* :c:func:`h_apply_mrpt_1h1p_diexcorg` +* :c:func:`h_apply_mrpt_1h1p_diexcp` +* :c:func:`h_apply_mrpt_1h1p_monoexc` +* :c:func:`h_apply_mrpt_1h2p` +* :c:func:`h_apply_mrpt_1h2p_diexc` +* :c:func:`h_apply_mrpt_1h2p_diexcorg` +* :c:func:`h_apply_mrpt_1h2p_diexcp` +* :c:func:`h_apply_mrpt_1h2p_monoexc` +* :c:func:`h_apply_mrpt_1h_diexc` +* :c:func:`h_apply_mrpt_1h_diexcorg` +* :c:func:`h_apply_mrpt_1h_diexcp` +* :c:func:`h_apply_mrpt_1h_monoexc` +* :c:func:`h_apply_mrpt_1p` +* :c:func:`h_apply_mrpt_1p_diexc` +* :c:func:`h_apply_mrpt_1p_diexcorg` +* :c:func:`h_apply_mrpt_1p_diexcp` +* :c:func:`h_apply_mrpt_1p_monoexc` +* :c:func:`h_apply_mrpt_2h` +* :c:func:`h_apply_mrpt_2h1p` +* :c:func:`h_apply_mrpt_2h1p_diexc` +* :c:func:`h_apply_mrpt_2h1p_diexcorg` +* :c:func:`h_apply_mrpt_2h1p_diexcp` +* :c:func:`h_apply_mrpt_2h1p_monoexc` +* :c:func:`h_apply_mrpt_2h2p` +* :c:func:`h_apply_mrpt_2h2p_diexc` +* :c:func:`h_apply_mrpt_2h2p_diexcorg` +* :c:func:`h_apply_mrpt_2h2p_diexcp` +* :c:func:`h_apply_mrpt_2h2p_monoexc` +* :c:func:`h_apply_mrpt_2h_diexc` +* :c:func:`h_apply_mrpt_2h_diexcorg` +* :c:func:`h_apply_mrpt_2h_diexcp` +* :c:func:`h_apply_mrpt_2h_monoexc` +* :c:func:`h_apply_mrpt_2p` +* :c:func:`h_apply_mrpt_2p_diexc` +* :c:func:`h_apply_mrpt_2p_diexcorg` +* :c:func:`h_apply_mrpt_2p_diexcp` +* :c:func:`h_apply_mrpt_2p_monoexc` +* :c:func:`h_apply_mrpt_diexc` +* :c:func:`h_apply_mrpt_diexcorg` +* :c:func:`h_apply_mrpt_diexcp` +* :c:func:`h_apply_mrpt_monoexc` +* :c:func:`h_s2_u_0_nstates_openmp` +* :c:func:`h_s2_u_0_nstates_openmp_work` +* :c:func:`h_s2_u_0_nstates_openmp_work_1` +* :c:func:`h_s2_u_0_nstates_openmp_work_2` +* :c:func:`h_s2_u_0_nstates_openmp_work_3` +* :c:func:`h_s2_u_0_nstates_openmp_work_4` +* :c:func:`h_s2_u_0_nstates_openmp_work_n_int` +* :c:func:`h_s2_u_0_nstates_zmq` +* :c:func:`h_u_0_stored` +* :c:func:`hcore_guess` +* :c:func:`heap_dsort` +* :c:func:`heap_dsort_big` +* :c:func:`heap_i2sort` +* :c:func:`heap_i2sort_big` +* :c:func:`heap_i8sort` +* :c:func:`heap_i8sort_big` +* :c:func:`heap_isort` +* :c:func:`heap_isort_big` +* :c:func:`heap_sort` +* :c:func:`heap_sort_big` +* :c:func:`hermite` +* :c:func:`huckel_guess` +* :c:func:`i2set_order` +* :c:func:`i2set_order_big` +* :c:func:`i2sort` +* :c:func:`i8set_order` +* :c:func:`i8set_order_big` +* :c:func:`i8sort` +* :c:func:`i_h_j` +* :c:func:`i_h_j_double_alpha_beta` +* :c:func:`i_h_j_double_spin` +* :c:func:`i_h_j_dyall` +* :c:func:`i_h_j_dyall_no_exchange` +* :c:func:`i_h_j_mono_spin` +* :c:func:`i_h_j_phase_out` +* :c:func:`i_h_j_s2` +* :c:func:`i_h_j_verbose` +* :c:func:`i_h_psi` +* :c:func:`i_h_psi_minilist` +* :c:func:`i_h_psi_pert_new_minilist` +* :c:func:`i_h_psi_sc2` +* :c:func:`i_h_psi_sc2_verbose` +* :c:func:`i_h_psi_sec_ord` +* :c:func:`i_s2_psi_minilist` +* :c:func:`i_x1_pol_mult` +* :c:func:`initialize_bitmask_to_restart_ones` +* :c:func:`insert_into_ao_integrals_map` +* :c:func:`insert_into_two_body_dm_ab_map` +* :c:func:`insert_into_two_body_dm_big_array` +* :c:func:`insertion_dsort` +* :c:func:`insertion_dsort_big` +* :c:func:`insertion_i2sort` +* :c:func:`insertion_i2sort_big` +* :c:func:`insertion_i8sort` +* :c:func:`insertion_i8sort_big` +* :c:func:`insertion_isort` +* :c:func:`insertion_isort_big` +* :c:func:`insertion_sort` +* :c:func:`insertion_sort_big` +* :c:func:`int_gaus_pol` +* :c:func:`integrale_new` +* :c:func:`is_a_1h` +* :c:func:`is_a_1h1p` +* :c:func:`is_a_1h2p` +* :c:func:`is_a_1p` +* :c:func:`is_a_2h` +* :c:func:`is_a_2h1p` +* :c:func:`is_a_2p` +* :c:func:`is_a_two_holes_two_particles` +* :c:func:`is_connected_to` +* :c:func:`is_connected_to_by_mono` +* :c:func:`is_generable_cassd` +* :c:func:`is_i_in_virtual` +* :c:func:`is_in_psi_ref` +* :c:func:`is_in_wavefunction` +* :c:func:`is_spin_flip_possible` +* :c:func:`is_the_hole_in_det` +* :c:func:`is_the_particl_in_det` +* :c:func:`iset_order` +* :c:func:`iset_order_big` +* :c:func:`isort` +* :c:func:`lapack_diag` +* :c:func:`lapack_diag_s2` +* :c:func:`lapack_diagd` +* :c:func:`lapack_partial_diag` +* :c:func:`list_to_bitstring` +* :c:func:`load_ao_integrals` +* :c:func:`load_mo_integrals` +* :c:func:`logfact` +* :c:func:`lowercase` +* :c:func:`make_s2_eigenfunction` +* :c:func:`make_selection_buffer_s2` +* :c:func:`map_load_from_disk` +* :c:func:`map_save_to_disk` +* :c:func:`matrix_vector_product` +* :c:func:`merge_selection_buffers` +* :c:func:`mix_mo_jk` +* :c:func:`mo_as_eigvectors_of_mo_matrix` +* :c:func:`mo_as_eigvectors_of_mo_matrix_sort_by_observable` +* :c:func:`mo_as_svd_vectors_of_mo_matrix` +* :c:func:`mo_as_svd_vectors_of_mo_matrix_eig` +* :c:func:`mo_bielec_integral` +* :c:func:`mo_bielec_integrals_index` +* :c:func:`mo_sort_by_observable` +* :c:func:`mo_to_ao` +* :c:func:`mo_to_ao_no_overlap` +* :c:func:`modify_bitmasks_for_hole` +* :c:func:`modify_bitmasks_for_hole_in_out` +* :c:func:`modify_bitmasks_for_particl` +* :c:func:`mrpt_dress` +* :c:func:`multiply_poly` +* :c:func:`n_closed_shell` +* :c:func:`n_closed_shell_cas` +* :c:func:`n_open_shell` +* :c:func:`n_pt_sup` +* :c:func:`nai_pol_mult` +* :c:func:`neutral_no_hund_in_couple` +* :c:func:`new_parallel_job` +* :c:func:`new_zmq_pair_socket` +* :c:func:`new_zmq_pull_socket` +* :c:func:`new_zmq_push_socket` +* :c:func:`new_zmq_sub_socket` +* :c:func:`new_zmq_to_qp_run_socket` +* :c:func:`normalize` +* :c:func:`number_of_holes` +* :c:func:`number_of_holes_verbose` +* :c:func:`number_of_particles` +* :c:func:`number_of_particles_verbose` +* :c:func:`occ_pattern_of_det` +* :c:func:`occ_pattern_search_key` +* :c:func:`occ_pattern_to_dets` +* :c:func:`occ_pattern_to_dets_size` +* :c:func:`ortho_canonical` +* :c:func:`ortho_lowdin` +* :c:func:`ortho_qr` +* :c:func:`ortho_qr_unblocked` +* :c:func:`orthonormalize_mos` +* :c:func:`overlap_a_b_c` +* :c:func:`overlap_bourrin_deriv_x` +* :c:func:`overlap_bourrin_dipole` +* :c:func:`overlap_bourrin_spread` +* :c:func:`overlap_bourrin_x` +* :c:func:`overlap_bourrin_x_abs` +* :c:func:`overlap_gaussian_x` +* :c:func:`overlap_x_abs` +* :c:func:`past_d1` +* :c:func:`past_d2` +* :c:func:`perturb_buffer_by_mono_decontracted` +* :c:func:`perturb_buffer_by_mono_dummy` +* :c:func:`perturb_buffer_by_mono_epstein_nesbet` +* :c:func:`perturb_buffer_by_mono_epstein_nesbet_2x2` +* :c:func:`perturb_buffer_by_mono_epstein_nesbet_2x2_no_ci_diag` +* :c:func:`perturb_buffer_by_mono_epstein_nesbet_sc2` +* :c:func:`perturb_buffer_by_mono_epstein_nesbet_sc2_no_projected` +* :c:func:`perturb_buffer_by_mono_epstein_nesbet_sc2_projected` +* :c:func:`perturb_buffer_by_mono_h_core` +* :c:func:`perturb_buffer_by_mono_moller_plesset` +* :c:func:`perturb_buffer_by_mono_moller_plesset_general` +* :c:func:`perturb_buffer_by_mono_qdpt` +* :c:func:`perturb_buffer_decontracted` +* :c:func:`perturb_buffer_dummy` +* :c:func:`perturb_buffer_epstein_nesbet` +* :c:func:`perturb_buffer_epstein_nesbet_2x2` +* :c:func:`perturb_buffer_epstein_nesbet_2x2_no_ci_diag` +* :c:func:`perturb_buffer_epstein_nesbet_sc2` +* :c:func:`perturb_buffer_epstein_nesbet_sc2_no_projected` +* :c:func:`perturb_buffer_epstein_nesbet_sc2_projected` +* :c:func:`perturb_buffer_h_core` +* :c:func:`perturb_buffer_moller_plesset` +* :c:func:`perturb_buffer_moller_plesset_general` +* :c:func:`perturb_buffer_qdpt` +* :c:func:`power` +* :c:func:`print_det` +* :c:func:`print_extrapolated_energy` +* :c:func:`print_generators_bitmasks_holes` +* :c:func:`print_generators_bitmasks_holes_for_one_generator` +* :c:func:`print_generators_bitmasks_particles` +* :c:func:`print_generators_bitmasks_particles_for_one_generator` +* :c:func:`print_mos` +* :c:func:`print_spindet` +* :c:func:`print_summary` +* :c:func:`provide_all_mo_integrals` +* :c:func:`provide_everything` +* :c:func:`pt2_collector` +* :c:func:`pt2_decontracted` +* :c:func:`pt2_dummy` +* :c:func:`pt2_epstein_nesbet` +* :c:func:`pt2_epstein_nesbet_2x2` +* :c:func:`pt2_epstein_nesbet_2x2_no_ci_diag` +* :c:func:`pt2_epstein_nesbet_sc2` +* :c:func:`pt2_epstein_nesbet_sc2_no_projected` +* :c:func:`pt2_epstein_nesbet_sc2_projected` +* :c:func:`pt2_find_sample` +* :c:func:`pt2_find_sample_lr` +* :c:func:`pt2_h_core` +* :c:func:`pt2_moller_plesset` +* :c:func:`pt2_moller_plesset_general` +* :c:func:`pt2_qdpt` +* :c:func:`pt2_slave_inproc` +* :c:func:`pt2_stoch` +* :c:func:`pull_pt2` +* :c:func:`pull_pt2_results` +* :c:func:`pull_selection_results` +* :c:func:`push_integrals` +* :c:func:`push_pt2` +* :c:func:`push_pt2_results` +* :c:func:`push_selection_results` +* :c:func:`qp_ao_ints` +* :c:func:`quick_dsort` +* :c:func:`quick_i2sort` +* :c:func:`quick_i8sort` +* :c:func:`quick_isort` +* :c:func:`quick_sort` +* :c:func:`read_dets` +* :c:func:`recentered_poly2` +* :c:func:`remove_duplicates_in_psi_det` +* :c:func:`remove_small_contributions` +* :c:func:`repeat_all_e_corr` +* :c:func:`reset_zmq_addresses` +* :c:func:`resize_h_apply_buffer` +* :c:func:`rint` +* :c:func:`rint1` +* :c:func:`rint_large_n` +* :c:func:`rint_sum` +* :c:func:`rinteg` +* :c:func:`rintgauss` +* :c:func:`roothaan_hall_scf` +* :c:func:`run` +* :c:func:`run_pt2_slave` +* :c:func:`run_selection_slave` +* :c:func:`run_wf` +* :c:func:`s2_u_0` +* :c:func:`s2_u_0_nstates` +* :c:func:`sabpartial` +* :c:func:`save_iterations` +* :c:func:`save_mos` +* :c:func:`save_mos_truncated` +* :c:func:`save_natorb` +* :c:func:`save_natural_mos` +* :c:func:`save_ortho_mos` +* :c:func:`save_ref_determinant` +* :c:func:`save_wavefunction` +* :c:func:`save_wavefunction_general` +* :c:func:`save_wavefunction_specified` +* :c:func:`save_wavefunction_truncated` +* :c:func:`save_wavefunction_unsorted` +* :c:func:`scf` +* :c:func:`select_connected` +* :c:func:`select_singles_and_doubles` +* :c:func:`selection_collector` +* :c:func:`selection_slave_inproc` +* :c:func:`set_bit_to_integer` +* :c:func:`set_bitmask_hole_as_input` +* :c:func:`set_bitmask_particl_as_input` +* :c:func:`set_generators_bitmasks_as_holes_and_particles` +* :c:func:`set_integrals_exchange_jj_into_map` +* :c:func:`set_integrals_jj_into_map` +* :c:func:`set_natural_mos` +* :c:func:`set_order` +* :c:func:`set_order_big` +* :c:func:`set_zero_extra_diag` +* :c:func:`slave` +* :c:func:`sort` +* :c:func:`sort_dets_ab` +* :c:func:`sort_dets_ab_v` +* :c:func:`sort_dets_ba_v` +* :c:func:`sort_dets_by_det_search_key` +* :c:func:`sort_selection_buffer` +* :c:func:`sorted_dnumber` +* :c:func:`sorted_i2number` +* :c:func:`sorted_i8number` +* :c:func:`sorted_inumber` +* :c:func:`sorted_number` +* :c:func:`spin_det_search_key` +* :c:func:`splash_pq` +* :c:func:`spot_isinwf` +* :c:func:`start_progress` +* :c:func:`stop_progress` +* :c:func:`svd` +* :c:func:`switch_qp_run_to_master` +* :c:func:`tamiser` +* :c:func:`task_done_to_taskserver` +* :c:func:`tasks_done_to_taskserver` +* :c:func:`testteethbuilding` +* :c:func:`u0_h_dyall_u0` +* :c:func:`u0_h_dyall_u0_no_exchange` +* :c:func:`u_0_h_u_0` +* :c:func:`u_0_h_u_0_stored` +* :c:func:`u_0_s2_u_0` +* :c:func:`u_dot_u` +* :c:func:`u_dot_v` +* :c:func:`v_e_n` +* :c:func:`v_phi` +* :c:func:`v_r` +* :c:func:`v_theta` +* :c:func:`wait_for_next_state` +* :c:func:`wait_for_state` +* :c:func:`wait_for_states` +* :c:func:`wall_time` +* :c:func:`wallis` +* :c:func:`wf_of_psi_bilinear_matrix` +* :c:func:`write_ao_basis` +* :c:func:`write_bool` +* :c:func:`write_double` +* :c:func:`write_geometry` +* :c:func:`write_git_log` +* :c:func:`write_int` +* :c:func:`write_intro_gamess` +* :c:func:`write_mo_basis` +* :c:func:`write_spindeterminants` +* :c:func:`write_time` +* :c:func:`zmq_abort` +* :c:func:`zmq_delete_task` +* :c:func:`zmq_delete_tasks` +* :c:func:`zmq_delete_tasks_async_recv` +* :c:func:`zmq_delete_tasks_async_send` +* :c:func:`zmq_get8_dvector` +* :c:func:`zmq_get8_ivector` +* :c:func:`zmq_get_dmatrix` +* :c:func:`zmq_get_dvector` +* :c:func:`zmq_get_i8matrix` +* :c:func:`zmq_get_imatrix` +* :c:func:`zmq_get_int` +* :c:func:`zmq_get_int_nompi` +* :c:func:`zmq_get_ivector` +* :c:func:`zmq_get_n_det` +* :c:func:`zmq_get_n_det_alpha_unique` +* :c:func:`zmq_get_n_det_beta_unique` +* :c:func:`zmq_get_n_det_generators` +* :c:func:`zmq_get_n_det_selectors` +* :c:func:`zmq_get_n_states` +* :c:func:`zmq_get_n_states_diag` +* :c:func:`zmq_get_psi` +* :c:func:`zmq_get_psi_bilinear` +* :c:func:`zmq_get_psi_bilinear_matrix_columns` +* :c:func:`zmq_get_psi_bilinear_matrix_order` +* :c:func:`zmq_get_psi_bilinear_matrix_rows` +* :c:func:`zmq_get_psi_bilinear_matrix_values` +* :c:func:`zmq_get_psi_coef` +* :c:func:`zmq_get_psi_det` +* :c:func:`zmq_get_psi_det_alpha_unique` +* :c:func:`zmq_get_psi_det_beta_unique` +* :c:func:`zmq_get_psi_det_size` +* :c:func:`zmq_get_psi_notouch` +* :c:func:`zmq_port` +* :c:func:`zmq_pt2` +* :c:func:`zmq_put8_dvector` +* :c:func:`zmq_put8_ivector` +* :c:func:`zmq_put_dmatrix` +* :c:func:`zmq_put_dvector` +* :c:func:`zmq_put_i8matrix` +* :c:func:`zmq_put_imatrix` +* :c:func:`zmq_put_int` +* :c:func:`zmq_put_ivector` +* :c:func:`zmq_put_n_det` +* :c:func:`zmq_put_n_det_alpha_unique` +* :c:func:`zmq_put_n_det_beta_unique` +* :c:func:`zmq_put_n_det_generators` +* :c:func:`zmq_put_n_det_selectors` +* :c:func:`zmq_put_n_states` +* :c:func:`zmq_put_n_states_diag` +* :c:func:`zmq_put_psi` +* :c:func:`zmq_put_psi_bilinear` +* :c:func:`zmq_put_psi_bilinear_matrix_columns` +* :c:func:`zmq_put_psi_bilinear_matrix_order` +* :c:func:`zmq_put_psi_bilinear_matrix_rows` +* :c:func:`zmq_put_psi_bilinear_matrix_values` +* :c:func:`zmq_put_psi_coef` +* :c:func:`zmq_put_psi_det` +* :c:func:`zmq_put_psi_det_alpha_unique` +* :c:func:`zmq_put_psi_det_beta_unique` +* :c:func:`zmq_put_psi_det_size` +* :c:func:`zmq_selection` +* :c:func:`zmq_set_running` \ No newline at end of file diff --git a/include/.gitignore b/include/.gitignore index 13449549..a3bc38a3 100644 --- a/include/.gitignore +++ b/include/.gitignore @@ -1,2 +1,3 @@ zmq.h zmq_utils.h +f77_zmq_free.h diff --git a/src/AO_Basis/aos.irp.f b/src/AO_Basis/aos.irp.f index bb8bf5bd..130fd24d 100644 --- a/src/AO_Basis/aos.irp.f +++ b/src/AO_Basis/aos.irp.f @@ -1,7 +1,7 @@ BEGIN_PROVIDER [ integer, ao_prim_num_max ] implicit none BEGIN_DOC - ! max number of primitives + ! Max number of primitives. END_DOC ao_prim_num_max = maxval(ao_prim_num) END_PROVIDER @@ -10,7 +10,7 @@ END_PROVIDER &BEGIN_PROVIDER [ double precision, ao_coef_normalization_factor, (ao_num) ] implicit none BEGIN_DOC - ! Coefficients including the AO normalization + ! Coefficients including the |AO| normalization END_DOC double precision :: norm,overlap_x,overlap_y,overlap_z,C_A(3), c integer :: l, powA(3), nz @@ -46,7 +46,7 @@ END_PROVIDER BEGIN_PROVIDER [ double precision, ao_coef_normalization_libint_factor, (ao_num) ] implicit none BEGIN_DOC - ! Coefficients including the AO normalization + ! |AO| normalization for interfacing with libint END_DOC double precision :: norm,overlap_x,overlap_y,overlap_z,C_A(3), c integer :: l, powA(3), nz @@ -78,34 +78,34 @@ END_PROVIDER BEGIN_PROVIDER [ double precision, ao_coef_normalized_ordered, (ao_num,ao_prim_num_max) ] &BEGIN_PROVIDER [ double precision, ao_expo_ordered, (ao_num,ao_prim_num_max) ] - implicit none - BEGIN_DOC - ! Sorted primitives to accelerate 4 index MO transformation - END_DOC - - integer :: iorder(ao_prim_num_max) - double precision :: d(ao_prim_num_max,2) - integer :: i,j - do i=1,ao_num - do j=1,ao_prim_num(i) - iorder(j) = j - d(j,1) = ao_expo(i,j) - d(j,2) = ao_coef_normalized(i,j) - enddo - call dsort(d(1,1),iorder,ao_prim_num(i)) - call dset_order(d(1,2),iorder,ao_prim_num(i)) - do j=1,ao_prim_num(i) - ao_expo_ordered(i,j) = d(j,1) - ao_coef_normalized_ordered(i,j) = d(j,2) - enddo - enddo + implicit none + BEGIN_DOC + ! Sorted primitives to accelerate 4 index |MO| transformation + END_DOC + + integer :: iorder(ao_prim_num_max) + double precision :: d(ao_prim_num_max,2) + integer :: i,j + do i=1,ao_num + do j=1,ao_prim_num(i) + iorder(j) = j + d(j,1) = ao_expo(i,j) + d(j,2) = ao_coef_normalized(i,j) + enddo + call dsort(d(1,1),iorder,ao_prim_num(i)) + call dset_order(d(1,2),iorder,ao_prim_num(i)) + do j=1,ao_prim_num(i) + ao_expo_ordered(i,j) = d(j,1) + ao_coef_normalized_ordered(i,j) = d(j,2) + enddo + enddo END_PROVIDER BEGIN_PROVIDER [ double precision, ao_coef_normalized_ordered_transp, (ao_prim_num_max,ao_num) ] implicit none BEGIN_DOC - ! Transposed ao_coef_normalized_ordered + ! Transposed :c:var:`ao_coef_normalized_ordered` END_DOC integer :: i,j do j=1, ao_num @@ -119,7 +119,7 @@ END_PROVIDER BEGIN_PROVIDER [ double precision, ao_expo_ordered_transp, (ao_prim_num_max,ao_num) ] implicit none BEGIN_DOC - ! Transposed ao_expo_ordered + ! Transposed :c:var:`ao_expo_ordered` END_DOC integer :: i,j do j=1, ao_num @@ -135,7 +135,7 @@ END_PROVIDER &BEGIN_PROVIDER [ character*(128), ao_l_char, (ao_num) ] implicit none BEGIN_DOC -! ao_l = l value of the AO: a+b+c in x^a y^b z^c +! :math:`l` value of the |AO|: :math`a+b+c` in :math:`x^a y^b z^c` END_DOC integer :: i do i=1,ao_num @@ -151,7 +151,7 @@ integer function ao_power_index(nx,ny,nz) BEGIN_DOC ! Unique index given to a triplet of powers: ! - ! 1/2 (l-n_x)*(l-n_x+1) + n_z + 1 + ! :math:`\frac{1}{2} (l-n_x) (l-n_x+1) + n_z + 1` END_DOC integer :: l l = nx + ny + nz @@ -161,7 +161,7 @@ end BEGIN_PROVIDER [ character*(128), l_to_charater, (0:7)] BEGIN_DOC - ! character corresponding to the "L" value of an AO orbital + ! Character corresponding to the "l" value of an |AO| END_DOC implicit none l_to_charater(0)='S' @@ -178,10 +178,10 @@ END_PROVIDER BEGIN_PROVIDER [ integer, Nucl_N_Aos, (nucl_num)] &BEGIN_PROVIDER [ integer, N_AOs_max ] implicit none - integer :: i BEGIN_DOC - ! Number of AOs per atom + ! Number of |AOs| per atom END_DOC + integer :: i Nucl_N_Aos = 0 do i = 1, ao_num Nucl_N_Aos(ao_nucl(i)) +=1 @@ -192,7 +192,7 @@ END_PROVIDER BEGIN_PROVIDER [ integer, Nucl_Aos, (nucl_num,N_AOs_max)] implicit none BEGIN_DOC - ! List of AOs attached on each atom + ! List of |AOs| centered on each atom END_DOC integer :: i integer, allocatable :: nucl_tmp(:) @@ -212,9 +212,9 @@ END_PROVIDER implicit none integer :: i,j,k BEGIN_DOC - ! 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 + ! Index of the shell type |AOs| and of the corresponding |AOs| + ! By convention, for p,d,f and g |AOs|, we take the index + ! of the |AO| with the the corresponding power in the x axis END_DOC do i = 1, nucl_num Nucl_num_shell_Aos(i) = 0 @@ -258,6 +258,9 @@ END_PROVIDER BEGIN_PROVIDER [ character*(4), ao_l_char_space, (ao_num) ] implicit none + BEGIN_DOC +! Converts an l value to a string + END_DOC integer :: i character*(4) :: give_ao_character_space do i=1,ao_num diff --git a/src/AO_Basis/aos_value.irp.f b/src/AO_Basis/aos_value.irp.f index a531ce50..631065b9 100644 --- a/src/AO_Basis/aos_value.irp.f +++ b/src/AO_Basis/aos_value.irp.f @@ -1,7 +1,7 @@ double precision function ao_value(i,r) implicit none BEGIN_DOC -! return the value of the ith ao at point r +! Returns the value of the i-th |AO| at point r END_DOC double precision, intent(in) :: r(3) integer, intent(in) :: i @@ -34,7 +34,7 @@ end subroutine give_all_aos_at_r(r,aos_array) implicit none BEGIN_dOC -! gives the values of aos at a given point r +! Gives the values of |AOs| at a given point r END_DOC double precision, intent(in) :: r(3) double precision, intent(out) :: aos_array(ao_num) @@ -44,5 +44,4 @@ subroutine give_all_aos_at_r(r,aos_array) aos_array(i) = ao_value(i,r) enddo - end diff --git a/src/AO_Basis/dimensions_integrals.irp.f b/src/AO_Basis/dimensions_integrals.irp.f index 19241819..9bfd41b7 100644 --- a/src/AO_Basis/dimensions_integrals.irp.f +++ b/src/AO_Basis/dimensions_integrals.irp.f @@ -1,6 +1,9 @@ BEGIN_PROVIDER [ integer, n_pt_max_integrals ] &BEGIN_PROVIDER [ integer, n_pt_max_i_x] implicit none + BEGIN_DOC +! Number of points used in the numerical integrations. + END_DOC integer :: n_pt_sup integer :: prim_power_l_max include 'Utils/constants.include.F' diff --git a/src/AO_one_e_integrals/NEED b/src/AO_one_e_integrals/NEED index 4ed799d7..a651e6bf 100644 --- a/src/AO_one_e_integrals/NEED +++ b/src/AO_one_e_integrals/NEED @@ -1 +1,2 @@ -AO_Basis Pseudo +AO_Basis +Pseudo diff --git a/src/AO_one_e_integrals/ao_mono_ints.irp.f b/src/AO_one_e_integrals/ao_mono_ints.irp.f index 87d03ac4..3e671941 100644 --- a/src/AO_one_e_integrals/ao_mono_ints.irp.f +++ b/src/AO_one_e_integrals/ao_mono_ints.irp.f @@ -3,8 +3,7 @@ implicit none integer :: i,j,n,l BEGIN_DOC - ! array of the mono electronic hamiltonian on the AOs basis - ! : sum of the kinetic and nuclear electronic potential + ! Array of the one-electron Hamiltonian on the |AO| basis. END_DOC do j = 1, ao_num do i = 1, ao_num diff --git a/src/AO_one_e_integrals/ao_ortho_canonical.irp.f b/src/AO_one_e_integrals/ao_ortho_canonical.irp.f index 1cc3444e..963b041c 100644 --- a/src/AO_one_e_integrals/ao_ortho_canonical.irp.f +++ b/src/AO_one_e_integrals/ao_ortho_canonical.irp.f @@ -2,7 +2,8 @@ &BEGIN_PROVIDER [ integer, ao_cart_to_sphe_num ] implicit none BEGIN_DOC -! ao_cart_to_sphe coefficients of the current basis set +! Coefficients to go from cartesian to spherical coordinates in the current +! basis set END_DOC integer :: i integer, external :: ao_power_index @@ -49,7 +50,7 @@ END_PROVIDER BEGIN_PROVIDER [ double precision, ao_cart_to_sphe_overlap, (ao_cart_to_sphe_num,ao_cart_to_sphe_num) ] implicit none BEGIN_DOC - ! AO overlap matrix in the spherical basis set + ! |AO| overlap matrix in the spherical basis set END_DOC double precision, allocatable :: S(:,:) allocate (S(ao_cart_to_sphe_num,ao_num)) @@ -71,7 +72,7 @@ END_PROVIDER BEGIN_PROVIDER [ double precision, ao_cart_to_sphe_inv, (ao_cart_to_sphe_num,ao_num) ] implicit none BEGIN_DOC - ! AO_cart_to_sphe_coef^(-1) + ! Inverse of :c:var:`ao_cart_to_sphe_coef` END_DOC call get_pseudo_inverse(ao_cart_to_sphe_coef,size(ao_cart_to_sphe_coef,1),& diff --git a/src/AO_one_e_integrals/ao_overlap.irp.f b/src/AO_one_e_integrals/ao_overlap.irp.f index b92429bc..a9b6ab53 100644 --- a/src/AO_one_e_integrals/ao_overlap.irp.f +++ b/src/AO_one_e_integrals/ao_overlap.irp.f @@ -5,7 +5,8 @@ implicit none BEGIN_DOC ! Overlap between atomic basis functions: -! :math:`\int \chi_i(r) \chi_j(r) dr)` +! +! :math:`\int \chi_i(r) \chi_j(r) dr` END_DOC integer :: i,j,n,l double precision :: f @@ -73,8 +74,9 @@ END_PROVIDER BEGIN_PROVIDER [ double precision, ao_overlap_abs,(ao_num,ao_num) ] implicit none BEGIN_DOC -! Overlap between absolute value of atomic basis functions: -! :math:`\int |\chi_i(r)| |\chi_j(r)| dr)` +! Overlap between absolute values of atomic basis functions: +! +! :math:`\int |\chi_i(r)| |\chi_j(r)| dr` END_DOC integer :: i,j,n,l double precision :: f @@ -127,7 +129,7 @@ END_PROVIDER BEGIN_PROVIDER [ double precision, S_inv,(ao_num,ao_num) ] implicit none BEGIN_DOC -! S^-1 +! Inverse of the overlap matrix END_DOC call get_pseudo_inverse(ao_overlap,size(ao_overlap,1),ao_num,ao_num,S_inv,size(S_inv,1)) END_PROVIDER @@ -135,7 +137,7 @@ END_PROVIDER BEGIN_PROVIDER [ double precision, S_half_inv, (AO_num,AO_num) ] BEGIN_DOC -! Matrix X = S^{-1/2} obtained by SVD +! :math:`X = S^{-1/2}` obtained by SVD END_DOC implicit none @@ -194,7 +196,7 @@ END_PROVIDER BEGIN_PROVIDER [ double precision, S_half, (ao_num,ao_num) ] implicit none BEGIN_DOC - ! S^{1/2} + ! :math:`S^{1/2}` END_DOC integer :: i,j,k diff --git a/src/AO_one_e_integrals/kin_ao_ints.irp.f b/src/AO_one_e_integrals/kin_ao_ints.irp.f index 019531be..994b1ab4 100644 --- a/src/AO_one_e_integrals/kin_ao_ints.irp.f +++ b/src/AO_one_e_integrals/kin_ao_ints.irp.f @@ -2,6 +2,13 @@ &BEGIN_PROVIDER [ double precision, ao_deriv2_y,(ao_num,ao_num) ] &BEGIN_PROVIDER [ double precision, ao_deriv2_z,(ao_num,ao_num) ] implicit none + BEGIN_DOC + ! Second derivative matrix elements in the |AO| basis. + ! + ! :math:`{\tt ao_deriv2_x} = + ! \langle \chi_i(x,y,z) | \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle` + ! + END_DOC integer :: i,j,n,l double precision :: f integer :: dim1 @@ -12,12 +19,6 @@ integer :: power_A(3), power_B(3) double precision :: d_a_2,d_2 dim1=100 - BEGIN_DOC - ! second derivatives matrix elements in the ao basis - ! .. math:: - ! - ! {\tt ao_deriv2_x} = \langle \chi_i(x,y,z) \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle - END_DOC ! -- Dummy call to provide everything A_center(:) = 0.d0 @@ -61,9 +62,6 @@ beta = ao_expo_ordered_transp(l,i) call overlap_gaussian_xyz(A_center,B_center,alpha,beta,power_A,power_B,overlap_x0,overlap_y0,overlap_z0,overlap,dim1) c = ao_coef_normalized_ordered_transp(n,j) * ao_coef_normalized_ordered_transp(l,i) -! if (abs(c) < 1.d-8) then -! cycle -! endif power_A(1) = power_A(1)-2 if (power_A(1)>-1) then @@ -122,8 +120,9 @@ END_PROVIDER BEGIN_PROVIDER [double precision, ao_kinetic_integral, (ao_num,ao_num)] implicit none BEGIN_DOC - ! array of the priminitve basis kinetic integrals - ! \langle \chi_i |\hat{T}| \chi_j \rangle + ! Kinetic energy integrals in the |AO| basis. + ! + ! :math:`\langle \chi_i |\hat{T}| \chi_j \rangle` END_DOC integer :: i,j,k,l diff --git a/src/AO_one_e_integrals/pot_ao_ints.irp.f b/src/AO_one_e_integrals/pot_ao_ints.irp.f index 8130442f..3c99aec0 100644 --- a/src/AO_one_e_integrals/pot_ao_ints.irp.f +++ b/src/AO_one_e_integrals/pot_ao_ints.irp.f @@ -1,590 +1,604 @@ BEGIN_PROVIDER [ double precision, ao_nucl_elec_integral, (ao_num,ao_num)] - BEGIN_DOC - ! interaction nuclear electron - END_DOC - implicit none - double precision :: alpha, beta, gama, delta - integer :: num_A,num_B - double precision :: A_center(3),B_center(3),C_center(3) - integer :: power_A(3),power_B(3) - integer :: i,j,k,l,n_pt_in,m - double precision :: overlap_x,overlap_y,overlap_z,overlap,dx,NAI_pol_mult - - if (read_ao_one_integrals) then - call ezfio_get_ao_one_e_integrals_integral_nuclear(ao_nucl_elec_integral) - print *, 'AO N-e integrals read from disk' - else - - ao_nucl_elec_integral = 0.d0 - - ! _ - ! /| / |_) - ! | / | \ - ! - - !$OMP PARALLEL & - !$OMP DEFAULT (NONE) & - !$OMP PRIVATE (i,j,k,l,m,alpha,beta,A_center,B_center,C_center,power_A,power_B,& - !$OMP num_A,num_B,Z,c,n_pt_in) & - !$OMP SHARED (ao_num,ao_prim_num,ao_expo_ordered_transp,ao_power,ao_nucl,nucl_coord,ao_coef_normalized_ordered_transp,& - !$OMP n_pt_max_integrals,ao_nucl_elec_integral,nucl_num,nucl_charge) - - n_pt_in = n_pt_max_integrals - - !$OMP DO SCHEDULE (dynamic) - - do j = 1, ao_num - num_A = ao_nucl(j) - power_A(1:3)= ao_power(j,1:3) - A_center(1:3) = nucl_coord(num_A,1:3) - - do i = 1, ao_num - - num_B = ao_nucl(i) - power_B(1:3)= ao_power(i,1:3) - B_center(1:3) = nucl_coord(num_B,1:3) - - do l=1,ao_prim_num(j) - alpha = ao_expo_ordered_transp(l,j) - - do m=1,ao_prim_num(i) - beta = ao_expo_ordered_transp(m,i) - - double precision :: c - c = 0.d0 - - do k = 1, nucl_num - double precision :: Z - Z = nucl_charge(k) - - C_center(1:3) = nucl_coord(k,1:3) - - c = c - Z*NAI_pol_mult(A_center,B_center,power_A,power_B,alpha,beta,C_center,n_pt_in) - - enddo - ao_nucl_elec_integral(i,j) = ao_nucl_elec_integral(i,j) +& - ao_coef_normalized_ordered_transp(l,j)*ao_coef_normalized_ordered_transp(m,i)*c - enddo - enddo - enddo - enddo - - !$OMP END DO - !$OMP END PARALLEL - endif - if (write_ao_one_integrals) then - call ezfio_set_ao_one_e_integrals_integral_nuclear(ao_nucl_elec_integral) - print *, 'AO N-e integrals written to disk' - endif - - + BEGIN_DOC + ! Nucleus-electron interaction, in the |AO| basis set. + ! + ! :math:`\langle \chi_i | -\sum_A \frac{1}{|r-R_A|} | \chi_j \rangle` + END_DOC + implicit none + double precision :: alpha, beta, gama, delta + integer :: num_A,num_B + double precision :: A_center(3),B_center(3),C_center(3) + integer :: power_A(3),power_B(3) + integer :: i,j,k,l,n_pt_in,m + double precision :: overlap_x,overlap_y,overlap_z,overlap,dx,NAI_pol_mult + + if (read_ao_one_integrals) then + call ezfio_get_ao_one_e_integrals_integral_nuclear(ao_nucl_elec_integral) + print *, 'AO N-e integrals read from disk' + else + + ao_nucl_elec_integral = 0.d0 + + ! _ + ! /| / |_) + ! | / | \ + ! + + !$OMP PARALLEL & + !$OMP DEFAULT (NONE) & + !$OMP PRIVATE (i,j,k,l,m,alpha,beta,A_center,B_center,C_center,power_A,power_B,& + !$OMP num_A,num_B,Z,c,n_pt_in) & + !$OMP SHARED (ao_num,ao_prim_num,ao_expo_ordered_transp,ao_power,ao_nucl,nucl_coord,ao_coef_normalized_ordered_transp,& + !$OMP n_pt_max_integrals,ao_nucl_elec_integral,nucl_num,nucl_charge) + + n_pt_in = n_pt_max_integrals + + !$OMP DO SCHEDULE (dynamic) + + do j = 1, ao_num + num_A = ao_nucl(j) + power_A(1:3)= ao_power(j,1:3) + A_center(1:3) = nucl_coord(num_A,1:3) + + do i = 1, ao_num + + num_B = ao_nucl(i) + power_B(1:3)= ao_power(i,1:3) + B_center(1:3) = nucl_coord(num_B,1:3) + + do l=1,ao_prim_num(j) + alpha = ao_expo_ordered_transp(l,j) + + do m=1,ao_prim_num(i) + beta = ao_expo_ordered_transp(m,i) + + double precision :: c + c = 0.d0 + + do k = 1, nucl_num + double precision :: Z + Z = nucl_charge(k) + + C_center(1:3) = nucl_coord(k,1:3) + + c = c - Z * NAI_pol_mult(A_center,B_center, & + power_A,power_B,alpha,beta,C_center,n_pt_in) + + enddo + ao_nucl_elec_integral(i,j) = ao_nucl_elec_integral(i,j) & + + ao_coef_normalized_ordered_transp(l,j) & + * ao_coef_normalized_ordered_transp(m,i) * c + enddo + enddo + enddo + enddo + + !$OMP END DO + !$OMP END PARALLEL + endif + if (write_ao_one_integrals) then + call ezfio_set_ao_one_e_integrals_integral_nuclear(ao_nucl_elec_integral) + print *, 'AO N-e integrals written to disk' + endif + END_PROVIDER - BEGIN_PROVIDER [ double precision, ao_nucl_elec_integral_per_atom, (ao_num,ao_num,nucl_num)] - BEGIN_DOC -! ao_nucl_elec_integral_per_atom(i,j,k) = - -! where Rk is the geometry of the kth atom - END_DOC - implicit none - double precision :: alpha, beta, gama, delta - integer :: i_c,num_A,num_B - double precision :: A_center(3),B_center(3),C_center(3) - integer :: power_A(3),power_B(3) - integer :: i,j,k,l,n_pt_in,m - double precision ::overlap_x,overlap_y,overlap_z,overlap,dx,NAI_pol_mult - - ao_nucl_elec_integral_per_atom = 0.d0 - - !$OMP PARALLEL & - !$OMP DEFAULT (NONE) & - !$OMP PRIVATE (i,j,k,l,m,alpha,beta,A_center,B_center,power_A,power_B, & - !$OMP num_A,num_B,c,n_pt_in,C_center) & - !$OMP SHARED (ao_num,ao_prim_num,ao_expo_ordered_transp,ao_power,ao_nucl,nucl_coord,ao_coef_normalized_ordered_transp, & - !$OMP n_pt_max_integrals,ao_nucl_elec_integral_per_atom,nucl_num) - n_pt_in = n_pt_max_integrals - !$OMP DO SCHEDULE (dynamic) - - double precision :: c +BEGIN_PROVIDER [ double precision, ao_nucl_elec_integral_per_atom, (ao_num,ao_num,nucl_num)] + BEGIN_DOC +! Nucleus-electron interaction in the |AO| basis set, per atom A. +! +! :math:`\langle \chi_i | -\frac{1}{|r-R_A|} | \chi_j \rangle` + END_DOC + implicit none + double precision :: alpha, beta, gama, delta + integer :: i_c,num_A,num_B + double precision :: A_center(3),B_center(3),C_center(3) + integer :: power_A(3),power_B(3) + integer :: i,j,k,l,n_pt_in,m + double precision :: overlap_x,overlap_y,overlap_z,overlap,dx,NAI_pol_mult + + ao_nucl_elec_integral_per_atom = 0.d0 + + !$OMP PARALLEL & + !$OMP DEFAULT (NONE) & + !$OMP PRIVATE (i,j,k,l,m,alpha,beta,A_center,B_center,power_A,power_B,& + !$OMP num_A,num_B,c,n_pt_in,C_center) & + !$OMP SHARED (ao_num,ao_prim_num,ao_expo_ordered_transp,ao_power,ao_nucl,nucl_coord,ao_coef_normalized_ordered_transp,& + !$OMP n_pt_max_integrals,ao_nucl_elec_integral_per_atom,nucl_num) + n_pt_in = n_pt_max_integrals + !$OMP DO SCHEDULE (dynamic) + + double precision :: c do j = 1, ao_num - power_A(1)= ao_power(j,1) - power_A(2)= ao_power(j,2) - power_A(3)= ao_power(j,3) - num_A = ao_nucl(j) - A_center(1) = nucl_coord(num_A,1) - A_center(2) = nucl_coord(num_A,2) - A_center(3) = nucl_coord(num_A,3) - do k = 1, nucl_num - C_center(1) = nucl_coord(k,1) - C_center(2) = nucl_coord(k,2) - C_center(3) = nucl_coord(k,3) - do i = 1, ao_num - power_B(1)= ao_power(i,1) - power_B(2)= ao_power(i,2) - power_B(3)= ao_power(i,3) - num_B = ao_nucl(i) - B_center(1) = nucl_coord(num_B,1) - B_center(2) = nucl_coord(num_B,2) - B_center(3) = nucl_coord(num_B,3) - c = 0.d0 - do l=1,ao_prim_num(j) - alpha = ao_expo_ordered_transp(l,j) - do m=1,ao_prim_num(i) - beta = ao_expo_ordered_transp(m,i) - c = c + NAI_pol_mult(A_center,B_center,power_A,power_B,alpha,beta,C_center,n_pt_in) & - * ao_coef_normalized_ordered_transp(l,j)*ao_coef_normalized_ordered_transp(m,i) + power_A(1)= ao_power(j,1) + power_A(2)= ao_power(j,2) + power_A(3)= ao_power(j,3) + num_A = ao_nucl(j) + A_center(1) = nucl_coord(num_A,1) + A_center(2) = nucl_coord(num_A,2) + A_center(3) = nucl_coord(num_A,3) + do k = 1, nucl_num + C_center(1) = nucl_coord(k,1) + C_center(2) = nucl_coord(k,2) + C_center(3) = nucl_coord(k,3) + do i = 1, ao_num + power_B(1)= ao_power(i,1) + power_B(2)= ao_power(i,2) + power_B(3)= ao_power(i,3) + num_B = ao_nucl(i) + B_center(1) = nucl_coord(num_B,1) + B_center(2) = nucl_coord(num_B,2) + B_center(3) = nucl_coord(num_B,3) + c = 0.d0 + do l=1,ao_prim_num(j) + alpha = ao_expo_ordered_transp(l,j) + do m=1,ao_prim_num(i) + beta = ao_expo_ordered_transp(m,i) + c = c + NAI_pol_mult(A_center,B_center,power_A,power_B, & + alpha,beta,C_center,n_pt_in) & + * ao_coef_normalized_ordered_transp(l,j) & + * ao_coef_normalized_ordered_transp(m,i) + enddo + enddo + ao_nucl_elec_integral_per_atom(i,j,k) = -c enddo - enddo - ao_nucl_elec_integral_per_atom(i,j,k) = -c enddo - enddo enddo - !$OMP END DO - !$OMP END PARALLEL - + !$OMP END DO + !$OMP END PARALLEL + END_PROVIDER double precision function NAI_pol_mult(A_center,B_center,power_A,power_B,alpha,beta,C_center,n_pt_in) -! function that calculate the folowing integral : -! int{dr} of (x-A_x)^ax (x-B_X)^bx exp(-alpha (x-A_x)^2 - beta (x-B_x)^2 ) 1/(r-R_c) - -implicit none -integer, intent(in) :: n_pt_in -double precision,intent(in) :: C_center(3),A_center(3),B_center(3),alpha,beta -integer :: power_A(3),power_B(3) -integer :: i,j,k,l,n_pt -double precision :: P_center(3) -double precision :: d(0:n_pt_in),pouet,coeff,rho,dist,const,pouet_2,p,p_inv,factor -double precision :: I_n_special_exact,integrate_bourrin,I_n_bibi -double precision :: V_e_n,const_factor,dist_integral,tmp -double precision :: accu,epsilo,rint -integer :: n_pt_out,lmax -include 'Utils/constants.include.F' - if ( (A_center(1)/=B_center(1)).or. & - (A_center(2)/=B_center(2)).or. & - (A_center(3)/=B_center(3)).or. & - (A_center(1)/=C_center(1)).or. & - (A_center(2)/=C_center(2)).or. & - (A_center(3)/=C_center(3))) then - continue + BEGIN_DOC +! Computes the electron-nucleus attraction with two primitves. +! +! :math:`\langle g_i | \frac{1}{|r-R_c|} | g_j \rangle` + END_DOC + + implicit none + integer, intent(in) :: n_pt_in + double precision,intent(in) :: C_center(3),A_center(3),B_center(3),alpha,beta + integer :: power_A(3),power_B(3) + integer :: i,j,k,l,n_pt + double precision :: P_center(3) + double precision :: d(0:n_pt_in),pouet,coeff,rho,dist,const,pouet_2,p,p_inv,factor + double precision :: I_n_special_exact,integrate_bourrin,I_n_bibi + double precision :: V_e_n,const_factor,dist_integral,tmp + double precision :: accu,epsilo,rint + integer :: n_pt_out,lmax + include 'Utils/constants.include.F' + if ( (A_center(1)/=B_center(1)).or. & + (A_center(2)/=B_center(2)).or. & + (A_center(3)/=B_center(3)).or. & + (A_center(1)/=C_center(1)).or. & + (A_center(2)/=C_center(2)).or. & + (A_center(3)/=C_center(3))) then + continue else - NAI_pol_mult = V_e_n(power_A(1),power_A(2),power_A(3),power_B(1),power_B(2),power_B(3),alpha,beta) - return + NAI_pol_mult = V_e_n(power_A(1),power_A(2),power_A(3), & + power_B(1),power_B(2),power_B(3),alpha,beta) + return endif p = alpha + beta -! print*, "a" p_inv = 1.d0/p rho = alpha * beta * p_inv dist = 0.d0 dist_integral = 0.d0 do i = 1, 3 - P_center(i) = (alpha * A_center(i) + beta * B_center(i)) * p_inv - dist += (A_center(i) - B_center(i))*(A_center(i) - B_center(i)) - dist_integral += (P_center(i) - C_center(i))*(P_center(i) - C_center(i)) + P_center(i) = (alpha * A_center(i) + beta * B_center(i)) * p_inv + dist += (A_center(i) - B_center(i))*(A_center(i) - B_center(i)) + dist_integral += (P_center(i) - C_center(i))*(P_center(i) - C_center(i)) enddo const_factor = dist*rho const = p * dist_integral if(const_factor > 80.d0)then - NAI_pol_mult = 0.d0 - return + NAI_pol_mult = 0.d0 + return endif factor = dexp(-const_factor) coeff = dtwo_pi * factor * p_inv lmax = 20 - ! print*, "b" + ! print*, "b" do i = 0, n_pt_in d(i) = 0.d0 enddo n_pt = 2 * ( (power_A(1) + power_B(1)) +(power_A(2) + power_B(2)) +(power_A(3) + power_B(3)) ) if (n_pt == 0) then - epsilo = 1.d0 - pouet = rint(0,const) - NAI_pol_mult = coeff * pouet - return + epsilo = 1.d0 + pouet = rint(0,const) + NAI_pol_mult = coeff * pouet + return endif - + call give_polynom_mult_center_mono_elec(A_center,B_center,alpha,beta,power_A,power_B,C_center,n_pt_in,d,n_pt_out) - + if(n_pt_out<0)then - NAI_pol_mult = 0.d0 - return + NAI_pol_mult = 0.d0 + return endif accu = 0.d0 - -! 1/r1 standard attraction integral + + ! 1/r1 standard attraction integral epsilo = 1.d0 -! sum of integrals of type : int {t,[0,1]} exp-(rho.(P-Q)^2 * t^2) * t^i + ! sum of integrals of type : int {t,[0,1]} exp-(rho.(P-Q)^2 * t^2) * t^i do i =0 ,n_pt_out,2 - accu += d(i) * rint(i/2,const) + accu += d(i) * rint(i/2,const) enddo NAI_pol_mult = accu * coeff - + end subroutine give_polynom_mult_center_mono_elec(A_center,B_center,alpha,beta,power_A,power_B,C_center,n_pt_in,d,n_pt_out) -!!!! 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) -!!!! it is for the nuclear electron atraction -implicit none -integer, intent(in) :: n_pt_in -integer,intent(out) :: n_pt_out -double precision, intent(in) :: A_center(3), B_center(3),C_center(3) -double precision, intent(in) :: alpha,beta -integer, intent(in) :: power_A(3), power_B(3) -integer :: a_x,b_x,a_y,b_y,a_z,b_z -double precision :: d(0:n_pt_in) -double precision :: d1(0:n_pt_in) -double precision :: d2(0:n_pt_in) -double precision :: d3(0:n_pt_in) -double precision :: accu, pq_inv, p10_1, p10_2, p01_1, p01_2 -double precision :: p,P_center(3),rho,p_inv,p_inv_2 -!print*,'n_pt_in = ',n_pt_in - accu = 0.d0 -!COMPTEUR irp_rdtsc1 = irp_rdtsc() - ASSERT (n_pt_in > 1) - p = alpha+beta - p_inv = 1.d0/p - p_inv_2 = 0.5d0/p - do i =1, 3 - P_center(i) = (alpha * A_center(i) + beta * B_center(i)) * p_inv - enddo -! print*,'passed the P_center' - - double precision :: R1x(0:2), B01(0:2), R1xp(0:2),R2x(0:2) - R1x(0) = (P_center(1) - A_center(1)) - R1x(1) = 0.d0 - R1x(2) = -(P_center(1) - C_center(1)) - ! R1x = (P_x - A_x) - (P_x - C_x) t^2 - R1xp(0) = (P_center(1) - B_center(1)) - R1xp(1) = 0.d0 - R1xp(2) =-(P_center(1) - C_center(1)) - !R1xp = (P_x - B_x) - (P_x - C_x) t^2 - R2x(0) = p_inv_2 - R2x(1) = 0.d0 - R2x(2) = -p_inv_2 - !R2x = 0.5 / p - 0.5/p t^2 - do i = 0,n_pt_in - d(i) = 0.d0 - enddo - do i = 0,n_pt_in - d1(i) = 0.d0 - enddo - do i = 0,n_pt_in - d2(i) = 0.d0 - enddo - do i = 0,n_pt_in - d3(i) = 0.d0 - enddo - integer :: n_pt1,n_pt2,n_pt3,dim,i - n_pt1 = n_pt_in - n_pt2 = n_pt_in - n_pt3 = n_pt_in - a_x = power_A(1) - b_x = power_B(1) - call I_x1_pol_mult_mono_elec(a_x,b_x,R1x,R1xp,R2x,d1,n_pt1,n_pt_in) -! print*,'passed the first I_x1' + implicit none + BEGIN_DOC +! Returns the explicit polynomial in terms of the "t" variable of the following +! +! :math:`I_x1(a_x, d_x,p,q) * I_x1(a_y, d_y,p,q) * I_x1(a_z, d_z,p,q)` + END_DOC + integer, intent(in) :: n_pt_in + integer,intent(out) :: n_pt_out + double precision, intent(in) :: A_center(3), B_center(3),C_center(3) + double precision, intent(in) :: alpha,beta + integer, intent(in) :: power_A(3), power_B(3) + integer :: a_x,b_x,a_y,b_y,a_z,b_z + double precision :: d(0:n_pt_in) + double precision :: d1(0:n_pt_in) + double precision :: d2(0:n_pt_in) + double precision :: d3(0:n_pt_in) + double precision :: accu, pq_inv, p10_1, p10_2, p01_1, p01_2 + double precision :: p,P_center(3),rho,p_inv,p_inv_2 + + accu = 0.d0 + + ASSERT (n_pt_in > 1) + p = alpha+beta + p_inv = 1.d0/p + p_inv_2 = 0.5d0/p + do i =1, 3 + P_center(i) = (alpha * A_center(i) + beta * B_center(i)) * p_inv + enddo + + double precision :: R1x(0:2), B01(0:2), R1xp(0:2),R2x(0:2) + R1x(0) = (P_center(1) - A_center(1)) + R1x(1) = 0.d0 + R1x(2) = -(P_center(1) - C_center(1)) + + R1xp(0) = (P_center(1) - B_center(1)) + R1xp(1) = 0.d0 + R1xp(2) =-(P_center(1) - C_center(1)) + + R2x(0) = p_inv_2 + R2x(1) = 0.d0 + R2x(2) = -p_inv_2 + + do i = 0,n_pt_in + d(i) = 0.d0 + enddo + do i = 0,n_pt_in + d1(i) = 0.d0 + enddo + do i = 0,n_pt_in + d2(i) = 0.d0 + enddo + do i = 0,n_pt_in + d3(i) = 0.d0 + enddo + integer :: n_pt1,n_pt2,n_pt3,dim,i + n_pt1 = n_pt_in + n_pt2 = n_pt_in + n_pt3 = n_pt_in + a_x = power_A(1) + b_x = power_B(1) + call I_x1_pol_mult_mono_elec(a_x,b_x,R1x,R1xp,R2x,d1,n_pt1,n_pt_in) + if(n_pt1<0)then - n_pt_out = -1 - do i = 0,n_pt_in - d(i) = 0.d0 - enddo - return - endif - - R1x(0) = (P_center(2) - A_center(2)) - R1x(1) = 0.d0 - R1x(2) = -(P_center(2) - C_center(2)) - ! R1x = (P_x - A_x) - (P_x - C_x) t^2 - R1xp(0) = (P_center(2) - B_center(2)) - R1xp(1) = 0.d0 - R1xp(2) =-(P_center(2) - C_center(2)) - !R1xp = (P_x - B_x) - (P_x - C_x) t^2 - a_y = power_A(2) - b_y = power_B(2) - call I_x1_pol_mult_mono_elec(a_y,b_y,R1x,R1xp,R2x,d2,n_pt2,n_pt_in) -! print*,'passed the second I_x1' - if(n_pt2<0)then - n_pt_out = -1 - do i = 0,n_pt_in - d(i) = 0.d0 - enddo - return - endif - - - R1x(0) = (P_center(3) - A_center(3)) - R1x(1) = 0.d0 - R1x(2) = -(P_center(3) - C_center(3)) - ! R1x = (P_x - A_x) - (P_x - C_x) t^2 - R1xp(0) = (P_center(3) - B_center(3)) - R1xp(1) = 0.d0 - R1xp(2) =-(P_center(3) - C_center(3)) - !R2x = 0.5 / p - 0.5/p t^2 - a_z = power_A(3) - b_z = power_B(3) - -! print*,'a_z = ',a_z -! print*,'b_z = ',b_z - call I_x1_pol_mult_mono_elec(a_z,b_z,R1x,R1xp,R2x,d3,n_pt3,n_pt_in) -! print*,'passed the third I_x1' - if(n_pt3<0)then - n_pt_out = -1 - do i = 0,n_pt_in - d(i) = 0.d0 - enddo - return - endif - integer :: n_pt_tmp - n_pt_tmp = 0 - call multiply_poly(d1,n_pt1,d2,n_pt2,d,n_pt_tmp) - do i = 0,n_pt_tmp - d1(i) = 0.d0 - enddo - n_pt_out = 0 - call multiply_poly(d ,n_pt_tmp ,d3,n_pt3,d1,n_pt_out) - do i = 0, n_pt_out - d(i) = d1(i) - enddo - -end - - -recursive subroutine I_x1_pol_mult_mono_elec(a,c,R1x,R1xp,R2x,d,nd,n_pt_in) -!!!! recursive function involved in the electron nucleus potential - implicit none - integer , intent(in) :: n_pt_in - double precision,intent(inout) :: d(0:n_pt_in) - integer,intent(inout) :: nd - integer, intent(in):: a,c - double precision, intent(in) :: R1x(0:2),R1xp(0:2),R2x(0:2) - include 'Utils/constants.include.F' - double precision :: X(0:max_dim) - double precision :: Y(0:max_dim) - !DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: X, Y - integer :: nx, ix,dim,iy,ny - dim = n_pt_in -! print*,'a,c = ',a,c -! print*,'nd_in = ',nd - - if( (a==0) .and. (c==0))then - nd = 0 - d(0) = 1.d0 - return - elseif( (c<0).or.(nd<0) )then - nd = -1 - return - else if ((a==0).and.(c.ne.0)) then - call I_x2_pol_mult_mono_elec(c,R1x,R1xp,R2x,d,nd,n_pt_in) -! print*,'nd 0,c',nd - else if (a==1) then - nx = nd - do ix=0,n_pt_in - X(ix) = 0.d0 - Y(ix) = 0.d0 - enddo - call I_x2_pol_mult_mono_elec(c-1,R1x,R1xp,R2x,X,nx,n_pt_in) - do ix=0,nx - X(ix) *= dble(c) - enddo - call multiply_poly(X,nx,R2x,2,d,nd) - ny=0 - call I_x2_pol_mult_mono_elec(c,R1x,R1xp,R2x,Y,ny,n_pt_in) - call multiply_poly(Y,ny,R1x,2,d,nd) - else - do ix=0,n_pt_in - X(ix) = 0.d0 - Y(ix) = 0.d0 - enddo - nx = 0 - call I_x1_pol_mult_mono_elec(a-2,c,R1x,R1xp,R2x,X,nx,n_pt_in) -! print*,'nx a-2,c= ',nx - do ix=0,nx - X(ix) *= dble(a-1) - enddo - call multiply_poly(X,nx,R2x,2,d,nd) -! print*,'nd out = ',nd - - nx = nd - do ix=0,n_pt_in - X(ix) = 0.d0 - enddo - call I_x1_pol_mult_mono_elec(a-1,c-1,R1x,R1xp,R2x,X,nx,n_pt_in) -! print*,'nx a-1,c-1 = ',nx - do ix=0,nx - X(ix) *= dble(c) - enddo - call multiply_poly(X,nx,R2x,2,d,nd) - ny=0 - call I_x1_pol_mult_mono_elec(a-1,c,R1x,R1xp,R2x,Y,ny,n_pt_in) - call multiply_poly(Y,ny,R1x,2,d,nd) - endif -end - -recursive subroutine I_x2_pol_mult_mono_elec(c,R1x,R1xp,R2x,d,nd,dim) - implicit none - integer , intent(in) :: dim - include 'Utils/constants.include.F' - double precision :: d(0:max_dim) - integer,intent(inout) :: nd - integer, intent(in):: c - double precision, intent(in) :: R1x(0:2),R1xp(0:2),R2x(0:2) - integer :: i -!print*,'X2,c = ',c -!print*,'nd_in = ',nd - - if(c==0) then - nd = 0 - d(0) = 1.d0 -! print*,'nd IX2 = ',nd - return - elseif ((nd<0).or.(c<0))then - nd = -1 + n_pt_out = -1 + do i = 0,n_pt_in + d(i) = 0.d0 + enddo return - else - integer :: nx, ix,ny - double precision :: X(0:max_dim),Y(0:max_dim) - !DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: X, Y - do ix=0,dim - X(ix) = 0.d0 - Y(ix) = 0.d0 - enddo - nx = 0 - call I_x1_pol_mult_mono_elec(0,c-2,R1x,R1xp,R2x,X,nx,dim) -! print*,'nx 0,c-2 = ',nx - do ix=0,nx - X(ix) *= dble(c-1) - enddo - call multiply_poly(X,nx,R2x,2,d,nd) -! print*,'nd = ',nd - ny = 0 - do ix=0,dim - Y(ix) = 0.d0 - enddo - - call I_x1_pol_mult_mono_elec(0,c-1,R1x,R1xp,R2x,Y,ny,dim) -! print*,'ny = ',ny -! do ix=0,ny -! print*,'Y(ix) = ',Y(ix) -! enddo - if(ny.ge.0)then - call multiply_poly(Y,ny,R1xp,2,d,nd) - endif - endif + endif + + R1x(0) = (P_center(2) - A_center(2)) + R1x(1) = 0.d0 + R1x(2) = -(P_center(2) - C_center(2)) + + R1xp(0) = (P_center(2) - B_center(2)) + R1xp(1) = 0.d0 + R1xp(2) =-(P_center(2) - C_center(2)) + + a_y = power_A(2) + b_y = power_B(2) + call I_x1_pol_mult_mono_elec(a_y,b_y,R1x,R1xp,R2x,d2,n_pt2,n_pt_in) + + if(n_pt2<0)then + n_pt_out = -1 + do i = 0,n_pt_in + d(i) = 0.d0 + enddo + return + endif + + + R1x(0) = (P_center(3) - A_center(3)) + R1x(1) = 0.d0 + R1x(2) = -(P_center(3) - C_center(3)) + + R1xp(0) = (P_center(3) - B_center(3)) + R1xp(1) = 0.d0 + R1xp(2) =-(P_center(3) - C_center(3)) + + a_z = power_A(3) + b_z = power_B(3) + + call I_x1_pol_mult_mono_elec(a_z,b_z,R1x,R1xp,R2x,d3,n_pt3,n_pt_in) + + if(n_pt3<0)then + n_pt_out = -1 + do i = 0,n_pt_in + d(i) = 0.d0 + enddo + return + endif + integer :: n_pt_tmp + n_pt_tmp = 0 + call multiply_poly(d1,n_pt1,d2,n_pt2,d,n_pt_tmp) + do i = 0,n_pt_tmp + d1(i) = 0.d0 + enddo + n_pt_out = 0 + call multiply_poly(d ,n_pt_tmp ,d3,n_pt3,d1,n_pt_out) + do i = 0, n_pt_out + d(i) = d1(i) + enddo + +end + + +recursive subroutine I_x1_pol_mult_mono_elec(a,c,R1x,R1xp,R2x,d,nd,n_pt_in) + implicit none + BEGIN_DOC +! Recursive routine involved in the electron-nucleus potential + END_DOC + integer , intent(in) :: n_pt_in + double precision,intent(inout) :: d(0:n_pt_in) + integer,intent(inout) :: nd + integer, intent(in) :: a,c + double precision, intent(in) :: R1x(0:2),R1xp(0:2),R2x(0:2) + include 'Utils/constants.include.F' + double precision :: X(0:max_dim) + double precision :: Y(0:max_dim) + !DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: X, Y + integer :: nx, ix,dim,iy,ny + dim = n_pt_in + ! print*,'a,c = ',a,c + ! print*,'nd_in = ',nd + + if( (a==0) .and. (c==0))then + nd = 0 + d(0) = 1.d0 + return + elseif( (c<0).or.(nd<0) )then + nd = -1 + return + else if ((a==0).and.(c.ne.0)) then + call I_x2_pol_mult_mono_elec(c,R1x,R1xp,R2x,d,nd,n_pt_in) + else if (a==1) then + nx = nd + do ix=0,n_pt_in + X(ix) = 0.d0 + Y(ix) = 0.d0 + enddo + call I_x2_pol_mult_mono_elec(c-1,R1x,R1xp,R2x,X,nx,n_pt_in) + do ix=0,nx + X(ix) *= dble(c) + enddo + call multiply_poly(X,nx,R2x,2,d,nd) + ny=0 + call I_x2_pol_mult_mono_elec(c,R1x,R1xp,R2x,Y,ny,n_pt_in) + call multiply_poly(Y,ny,R1x,2,d,nd) + else + do ix=0,n_pt_in + X(ix) = 0.d0 + Y(ix) = 0.d0 + enddo + nx = 0 + call I_x1_pol_mult_mono_elec(a-2,c,R1x,R1xp,R2x,X,nx,n_pt_in) + do ix=0,nx + X(ix) *= dble(a-1) + enddo + call multiply_poly(X,nx,R2x,2,d,nd) + + nx = nd + do ix=0,n_pt_in + X(ix) = 0.d0 + enddo + call I_x1_pol_mult_mono_elec(a-1,c-1,R1x,R1xp,R2x,X,nx,n_pt_in) + do ix=0,nx + X(ix) *= dble(c) + enddo + call multiply_poly(X,nx,R2x,2,d,nd) + ny=0 + call I_x1_pol_mult_mono_elec(a-1,c,R1x,R1xp,R2x,Y,ny,n_pt_in) + call multiply_poly(Y,ny,R1x,2,d,nd) + endif +end + +recursive subroutine I_x2_pol_mult_mono_elec(c,R1x,R1xp,R2x,d,nd,dim) + implicit none + BEGIN_DOC +! Recursive routine involved in the electron-nucleus potential + END_DOC + integer , intent(in) :: dim + include 'Utils/constants.include.F' + double precision :: d(0:max_dim) + integer,intent(inout) :: nd + integer, intent(in) :: c + double precision, intent(in) :: R1x(0:2),R1xp(0:2),R2x(0:2) + integer :: i + + if(c==0) then + nd = 0 + d(0) = 1.d0 + return + elseif ((nd<0).or.(c<0))then + nd = -1 + return + else + integer :: nx, ix,ny + double precision :: X(0:max_dim),Y(0:max_dim) + !DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: X, Y + do ix=0,dim + X(ix) = 0.d0 + Y(ix) = 0.d0 + enddo + nx = 0 + call I_x1_pol_mult_mono_elec(0,c-2,R1x,R1xp,R2x,X,nx,dim) + do ix=0,nx + X(ix) *= dble(c-1) + enddo + call multiply_poly(X,nx,R2x,2,d,nd) + ny = 0 + do ix=0,dim + Y(ix) = 0.d0 + enddo + + call I_x1_pol_mult_mono_elec(0,c-1,R1x,R1xp,R2x,Y,ny,dim) + if(ny.ge.0)then + call multiply_poly(Y,ny,R1xp,2,d,nd) + endif + endif end double precision function V_e_n(a_x,a_y,a_z,b_x,b_y,b_z,alpha,beta) -implicit none -!!! primitve nuclear attraction between the two primitves centered on the same atom :: -!!!! primitive_1 = x**(a_x) y**(a_y) z**(a_z) exp(-alpha * r**2) -!!!! primitive_2 = x**(b_x) y**(b_y) z**(b_z) exp(- beta * r**2) -integer :: a_x,a_y,a_z,b_x,b_y,b_z -double precision :: alpha,beta -double precision :: V_r, V_phi, V_theta -if(iand((a_x+b_x),1)==1.or.iand(a_y+b_y,1)==1.or.iand((a_z+b_z),1)==1)then - V_e_n = 0.d0 -else - V_e_n = V_r(a_x+b_x+a_y+b_y+a_z+b_z+1,alpha+beta) & -& * V_phi(a_x+b_x,a_y+b_y) & -& * V_theta(a_z+b_z,a_x+b_x+a_y+b_y+1) -endif - + implicit none + BEGIN_DOC +! Primitve nuclear attraction between the two primitves centered on the same atom. +! +! primitive_1 = x**(a_x) y**(a_y) z**(a_z) exp(-alpha * r**2) +! +! primitive_2 = x**(b_x) y**(b_y) z**(b_z) exp(- beta * r**2) + END_DOC + integer :: a_x,a_y,a_z,b_x,b_y,b_z + double precision :: alpha,beta + double precision :: V_r, V_phi, V_theta + if(iand((a_x+b_x),1)==1.or.iand(a_y+b_y,1)==1.or.iand((a_z+b_z),1)==1)then + V_e_n = 0.d0 + else + V_e_n = V_r(a_x+b_x+a_y+b_y+a_z+b_z+1,alpha+beta) & + * V_phi(a_x+b_x,a_y+b_y) & + * V_theta(a_z+b_z,a_x+b_x+a_y+b_y+1) + endif + end double precision function int_gaus_pol(alpha,n) -!!!! calculate the integral of -!! integral on "x" with boundaries (- infinity; + infinity) of [ x**n exp(-alpha * x**2) ] -implicit none -double precision :: alpha -integer :: n -double precision :: dble_fact -include 'Utils/constants.include.F' - -!if(iand(n,1).eq.1)then -! int_gaus_pol= 0.d0 -!else -! int_gaus_pol = dsqrt(pi/alpha) * dble_fact(n -1)/(alpha+alpha)**(n/2) -!endif - - int_gaus_pol = 0.d0 - if(iand(n,1).eq.0)then - int_gaus_pol = dsqrt(alpha/pi) - double precision :: two_alpha - two_alpha = alpha+alpha - integer :: i - do i=1,n,2 - int_gaus_pol = int_gaus_pol * two_alpha - enddo - int_gaus_pol = dble_fact(n -1) / int_gaus_pol - endif - + implicit none + BEGIN_DOC +! Computes the integral: +! +! :math:`\int_{-\infty}^{\infty} x^n \exp(-\alpha x^2) dx` + END_DOC + double precision :: alpha + integer :: n + double precision :: dble_fact + include 'Utils/constants.include.F' + + int_gaus_pol = 0.d0 + if(iand(n,1).eq.0)then + int_gaus_pol = dsqrt(alpha/pi) + double precision :: two_alpha + two_alpha = alpha+alpha + integer :: i + do i=1,n,2 + int_gaus_pol = int_gaus_pol * two_alpha + enddo + int_gaus_pol = dble_fact(n -1) / int_gaus_pol + endif + end double precision function V_r(n,alpha) -!!!! calculate the radial part of the nuclear attraction integral which is the following integral : -!! integral on "r" with boundaries ( 0 ; + infinity) of [ r**n exp(-alpha * r**2) ] -!!! CAUTION :: this function requires the constant sqpi = dsqrt(pi) -implicit none -double precision :: alpha, fact -integer :: n -include 'Utils/constants.include.F' -if(iand(n,1).eq.1)then - V_r = 0.5d0 * fact(shiftr(n,1)) / (alpha ** (shiftr(n,1) + 1)) -else - V_r = sqpi * fact(n) / fact(shiftr(n,1)) * (0.5d0/sqrt(alpha)) ** (n+1) -endif + implicit none + BEGIN_DOC + ! Computes the radial part of the nuclear attraction integral: + ! + ! :math:`\int_{0}^{\infty} r^n \exp(-\alpha r^2) dr` + ! + END_DOC + double precision :: alpha, fact + integer :: n + include 'Utils/constants.include.F' + if(iand(n,1).eq.1)then + V_r = 0.5d0 * fact(shiftr(n,1)) / (alpha ** (shiftr(n,1) + 1)) + else + V_r = sqpi * fact(n) / fact(shiftr(n,1)) * (0.5d0/sqrt(alpha)) ** (n+1) + endif end double precision function V_phi(n,m) -implicit none -!!!! calculate the angular "phi" part of the nuclear attraction integral wich is the following integral : -!! integral on "phi" with boundaries ( 0 ; 2 pi) of [ cos(phi) **n sin(phi) **m ] -integer :: n,m, i -double precision :: prod, Wallis + implicit none + BEGIN_DOC + ! Computes the angular "phi" part of the nuclear attraction integral: + ! + ! :math:`\int_{0}^{2 \pi} \cos(\phi)^n \sin(\phi)^m d\phi` + END_DOC + integer :: n,m, i + double precision :: prod, Wallis prod = 1.d0 do i = 0,shiftr(n,1)-1 - prod = prod/ (1.d0 + dfloat(m+1)/dfloat(n-i-i-1)) + prod = prod/ (1.d0 + dfloat(m+1)/dfloat(n-i-i-1)) enddo V_phi = 4.d0 * prod * Wallis(m) end + double precision function V_theta(n,m) -implicit none -!!!! calculate the angular "theta" part of the nuclear attraction integral wich is the following integral : -!! integral on "theta" with boundaries ( 0 ; pi) of [ cos(theta) **n sin(theta) **m ] -integer :: n,m,i -double precision :: Wallis, prod -include 'Utils/constants.include.F' + implicit none + BEGIN_DOC + ! Computes the angular "theta" part of the nuclear attraction integral: + ! + ! :math:`\int_{0}^{\pi} \cos(\theta)^n \sin(\theta)^m d\theta` + END_DOC + integer :: n,m,i + double precision :: Wallis, prod + include 'Utils/constants.include.F' V_theta = 0.d0 prod = 1.d0 do i = 0,shiftr(n,1)-1 - prod = prod / (1.d0 + dfloat(m+1)/dfloat(n-i-i-1)) + prod = prod / (1.d0 + dfloat(m+1)/dfloat(n-i-i-1)) enddo V_theta = (prod+prod) * Wallis(m) end double precision function Wallis(n) -!!!! calculate the Wallis integral : -!! integral on "theta" with boundaries ( 0 ; pi/2) of [ cos(theta) **n ] -implicit none -double precision :: fact -integer :: n,p -include 'Utils/constants.include.F' -if(iand(n,1).eq.0)then - Wallis = fact(shiftr(n,1)) - Wallis = pi * fact(n) / (dble(ibset(0_8,n)) * (Wallis+Wallis)*Wallis) -else - p = shiftr(n,1) - Wallis = fact(p) - Wallis = dble(ibset(0_8,p+p)) * Wallis*Wallis / fact(p+p+1) -endif - + implicit none + BEGIN_DOC + ! Wallis integral: + ! + ! :math:`\int_{0}^{\pi} \cos(\theta)^n d\theta` + END_DOC + double precision :: fact + integer :: n,p + include 'Utils/constants.include.F' + if(iand(n,1).eq.0)then + Wallis = fact(shiftr(n,1)) + Wallis = pi * fact(n) / (dble(ibset(0_8,n)) * (Wallis+Wallis)*Wallis) + else + p = shiftr(n,1) + Wallis = fact(p) + Wallis = dble(ibset(0_8,p+p)) * Wallis*Wallis / fact(p+p+1) + endif + end diff --git a/src/AO_one_e_integrals/pot_ao_pseudo_ints.irp.f b/src/AO_one_e_integrals/pot_ao_pseudo_ints.irp.f index 97b3353a..807716d8 100644 --- a/src/AO_one_e_integrals/pot_ao_pseudo_ints.irp.f +++ b/src/AO_one_e_integrals/pot_ao_pseudo_ints.irp.f @@ -1,7 +1,7 @@ BEGIN_PROVIDER [ double precision, ao_pseudo_integral, (ao_num,ao_num)] implicit none BEGIN_DOC - ! Pseudo-potential integrals + ! Pseudo-potential integrals in the |AO| basis set. END_DOC if (read_ao_one_integrals) then @@ -137,7 +137,7 @@ BEGIN_PROVIDER [ double precision, ao_pseudo_integral_local, (ao_num,ao_num)] BEGIN_PROVIDER [ double precision, ao_pseudo_integral_non_local, (ao_num,ao_num)] implicit none BEGIN_DOC - ! Local pseudo-potential + ! Non-local pseudo-potential END_DOC include 'Utils/constants.include.F' double precision :: alpha, beta, gama, delta diff --git a/src/AO_one_e_integrals/read_write.irp.f b/src/AO_one_e_integrals/read_write.irp.f index e0fb75ce..190a40e4 100644 --- a/src/AO_one_e_integrals/read_write.irp.f +++ b/src/AO_one_e_integrals/read_write.irp.f @@ -2,7 +2,7 @@ &BEGIN_PROVIDER [ logical, write_ao_one_integrals ] BEGIN_DOC - ! One level of abstraction for disk_access_ao_integrals and disk_access_mo_integrals + ! If |true|, read/write one-electrons from/to disk. END_DOC implicit none diff --git a/src/AO_one_e_integrals/spread_dipole_ao.irp.f b/src/AO_one_e_integrals/spread_dipole_ao.irp.f index 2ff1494f..5c3da801 100644 --- a/src/AO_one_e_integrals/spread_dipole_ao.irp.f +++ b/src/AO_one_e_integrals/spread_dipole_ao.irp.f @@ -2,9 +2,11 @@ &BEGIN_PROVIDER [ double precision, ao_spread_y, (ao_num,ao_num)] &BEGIN_PROVIDER [ double precision, ao_spread_z, (ao_num,ao_num)] BEGIN_DOC - ! array of the integrals of AO_i * x^2 AO_j - ! array of the integrals of AO_i * y^2 AO_j - ! array of the integrals of AO_i * z^2 AO_j + ! * array of the integrals of AO_i * x^2 AO_j + ! + ! * array of the integrals of AO_i * y^2 AO_j + ! + ! * array of the integrals of AO_i * z^2 AO_j END_DOC implicit none integer :: i,j,n,l @@ -73,9 +75,11 @@ &BEGIN_PROVIDER [ double precision, ao_dipole_y, (ao_num,ao_num)] &BEGIN_PROVIDER [ double precision, ao_dipole_z, (ao_num,ao_num)] BEGIN_DOC - ! array of the integrals of AO_i * x AO_j - ! array of the integrals of AO_i * y AO_j - ! array of the integrals of AO_i * z AO_j + ! * array of the integrals of AO_i * x AO_j + ! + ! * array of the integrals of AO_i * y AO_j + ! + ! * array of the integrals of AO_i * z AO_j END_DOC implicit none integer :: i,j,n,l @@ -143,9 +147,11 @@ &BEGIN_PROVIDER [ double precision, ao_deriv_1_y, (ao_num,ao_num)] &BEGIN_PROVIDER [ double precision, ao_deriv_1_z, (ao_num,ao_num)] BEGIN_DOC - ! array of the integrals of AO_i * d/dx AO_j - ! array of the integrals of AO_i * d/dy AO_j - ! array of the integrals of AO_i * d/dz AO_j + ! * array of the integrals of AO_i * d/dx AO_j + ! + ! * array of the integrals of AO_i * d/dy AO_j + ! + ! * array of the integrals of AO_i * d/dz AO_j END_DOC implicit none integer :: i,j,n,l @@ -214,47 +220,9 @@ - subroutine overlap_bourrin_x_abs(A_center,B_center,alpha,beta,power_A,power_B,overlap_x,lower_exp_val,dx,nx) - implicit none -! compute the following integral : -! int [-infty ; +infty] of [(x-A_center)^(power_A) * (x-B_center)^power_B * exp(-alpha(x-A_center)^2) * exp(-beta(x-B_center)^2) ] - integer :: i,j,k,l - integer,intent(in) :: power_A,power_B - double precision, intent(in) :: lower_exp_val - double precision,intent(in) :: A_center, B_center,alpha,beta - double precision, intent(out) :: overlap_x,dx - integer, intent(in) :: nx - double precision :: x_min,x_max,domain,x,power,factor,dist,p,p_inv,rho - double precision :: P_center,pouet_timy - if(power_A.lt.0.or.power_B.lt.0)then - overlap_x = 0.d0 - dx = 0.d0 - return - endif - p = alpha + beta - p_inv= 1.d0/p - rho = alpha * beta * p_inv - dist = (A_center - B_center)*(A_center - B_center) - P_center = (alpha * A_center + beta * B_center) * p_inv - factor = dexp(-rho * dist) - pouet_timy = dsqrt(lower_exp_val/p) - x_min = P_center - pouet_timy - x_max = P_center + pouet_timy -!print*,'xmin = ',x_min -!print*,'xmax = ',x_max - domain = x_max-x_min - dx = domain/dble(nx) - overlap_x = 0.d0 - x = x_min - do i = 1, nx - x += dx - overlap_x += (power(power_A,x-A_center) * power(power_B,x-B_center)) * dexp(-p * (x-P_center)*(x-P_center)) - enddo - overlap_x *= factor * dx -end subroutine overlap_bourrin_spread(A_center,B_center,alpha,beta,power_A,power_B,overlap_x,lower_exp_val,dx,nx) -! compute the following integral : +! Computes the following integral : ! int [-infty ; +infty] of [(x-A_center)^(power_A) * (x-B_center)^power_B * exp(-alpha(x-A_center)^2) * exp(-beta(x-B_center)^2) * x ] ! needed for the dipole and those things implicit none @@ -264,7 +232,7 @@ end double precision,intent(in) :: A_center, B_center,alpha,beta double precision, intent(out) :: overlap_x,dx integer, intent(in) :: nx - double precision :: x_min,x_max,domain,x,power,factor,dist,p,p_inv,rho + double precision :: x_min,x_max,domain,x,factor,dist,p,p_inv,rho double precision :: P_center,pouet_timy if(power_A.lt.0.or.power_B.lt.0)then overlap_x = 0.d0 @@ -292,19 +260,12 @@ end x = x_min do i = 1, nx x += dx - overlap_x += power(power_A,x-A_center) * power(power_B,x-B_center) * dexp(-p * (x-P_center)*(x-P_center)) * x * x + overlap_x += (x-A_center)**(power_A) * (x-B_center)**(power_B) * dexp(-p * (x-P_center)*(x-P_center)) * x * x enddo overlap_x *= factor * dx end - double precision function power(n,x) - implicit none - integer :: i,n - double precision :: x,accu - power = x**n - return - end subroutine overlap_bourrin_dipole(A_center,B_center,alpha,beta,power_A,power_B,overlap_x,lower_exp_val,dx,nx) ! compute the following integral : @@ -317,7 +278,7 @@ end double precision,intent(in) :: A_center, B_center,alpha,beta double precision, intent(out) :: overlap_x,dx integer, intent(in) :: nx - double precision :: x_min,x_max,domain,x,power,factor,dist,p,p_inv,rho + double precision :: x_min,x_max,domain,x,factor,dist,p,p_inv,rho double precision :: P_center if(power_A.lt.0.or.power_B.lt.0)then overlap_x = 0.d0 @@ -347,7 +308,7 @@ end x = x_min do i = 1, nx x += dx - overlap_x += power(power_A,x-A_center) * power(power_B,x-B_center) * dexp(-p * (x-P_center)*(x-P_center)) * x + overlap_x += (x-A_center)**(power_A) * (x-B_center)**(power_B) * dexp(-p * (x-P_center)*(x-P_center)) * x enddo overlap_x *= factor * dx @@ -378,7 +339,7 @@ end double precision,intent(in) :: A_center, B_center,alpha,beta double precision, intent(out) :: overlap_x,dx integer, intent(in) :: nx - double precision :: x_min,x_max,domain,x,power,factor,dist,p,p_inv,rho + double precision :: x_min,x_max,domain,x,factor,dist,p,p_inv,rho double precision :: P_center,pouet_timy if(power_A.lt.0.or.power_B.lt.0)then overlap_x = 0.d0 @@ -406,7 +367,7 @@ end x = x_min do i = 1, nx x += dx - overlap_x += power(power_A,x-A_center) * power(power_B,x-B_center) * dexp(-p * (x-P_center)*(x-P_center)) + overlap_x += (x-A_center)**(power_A) * (x-B_center)**(power_B) * dexp(-p * (x-P_center)*(x-P_center)) enddo overlap_x *= factor * dx end diff --git a/src/CIS/NEED b/src/CIS/NEED index 3272abe5..40a80900 100644 --- a/src/CIS/NEED +++ b/src/CIS/NEED @@ -1 +1,3 @@ -Selectors_full SingleRefMethod DavidsonUndressed +Selectors_full +SingleRefMethod +DavidsonUndressed diff --git a/src/CISD/NEED b/src/CISD/NEED index 3272abe5..40a80900 100644 --- a/src/CISD/NEED +++ b/src/CISD/NEED @@ -1 +1,3 @@ -Selectors_full SingleRefMethod DavidsonUndressed +Selectors_full +SingleRefMethod +DavidsonUndressed diff --git a/src/Determinants/NEED b/src/Determinants/NEED index 49c21b08..2bd6aefc 100644 --- a/src/Determinants/NEED +++ b/src/Determinants/NEED @@ -1 +1,3 @@ -MO_Basis MO_one_e_integrals Integrals_Bielec +MO_Basis +MO_one_e_integrals +Integrals_Bielec diff --git a/src/FCI/NEED b/src/FCI/NEED index 5a2d6dcd..7d6f619f 100644 --- a/src/FCI/NEED +++ b/src/FCI/NEED @@ -1 +1,7 @@ -Perturbation Selectors_full Generators_full ZMQ MPI DavidsonUndressed Iterations +Perturbation +Selectors_full +Generators_full +ZMQ +MPI +DavidsonUndressed +Iterations diff --git a/src/Generators_full/NEED b/src/Generators_full/NEED index 54f54203..3f254349 100644 --- a/src/Generators_full/NEED +++ b/src/Generators_full/NEED @@ -1 +1,2 @@ -Determinants Hartree_Fock +Determinants +Hartree_Fock diff --git a/src/Hartree_Fock/NEED b/src/Hartree_Fock/NEED index f0ef5d67..413dd1ec 100644 --- a/src/Hartree_Fock/NEED +++ b/src/Hartree_Fock/NEED @@ -1 +1,4 @@ -Integrals_Bielec AO_one_e_integrals MOGuess Bitmask +Integrals_Bielec +AO_one_e_integrals +MOGuess +Bitmask diff --git a/src/Integrals_Bielec/NEED b/src/Integrals_Bielec/NEED index ec64d210..371b92e1 100644 --- a/src/Integrals_Bielec/NEED +++ b/src/Integrals_Bielec/NEED @@ -1 +1,7 @@ -AO_one_e_integrals MO_one_e_integrals Pseudo Bitmask ZMQ AO_Basis MO_Basis +AO_one_e_integrals +MO_one_e_integrals +Pseudo +Bitmask +ZMQ +AO_Basis +MO_Basis diff --git a/src/MOGuess/NEED b/src/MOGuess/NEED index f4f641c2..55b6e6a3 100644 --- a/src/MOGuess/NEED +++ b/src/MOGuess/NEED @@ -1 +1,2 @@ -MO_Basis MO_one_e_integrals +MO_Basis +MO_one_e_integrals diff --git a/src/MO_Basis/NEED b/src/MO_Basis/NEED index 039ecf1a..91c38a84 100644 --- a/src/MO_Basis/NEED +++ b/src/MO_Basis/NEED @@ -1 +1,3 @@ -AO_Basis AO_one_e_integrals Electrons +AO_Basis +AO_one_e_integrals +Electrons diff --git a/src/MO_one_e_integrals/NEED b/src/MO_one_e_integrals/NEED index 8b1b814e..210af07c 100644 --- a/src/MO_one_e_integrals/NEED +++ b/src/MO_one_e_integrals/NEED @@ -1 +1,3 @@ -AO_one_e_integrals MO_Basis Pseudo +AO_one_e_integrals +MO_Basis +Pseudo diff --git a/src/MRPT_Utils/NEED b/src/MRPT_Utils/NEED index a41f499b..6c0a759a 100644 --- a/src/MRPT_Utils/NEED +++ b/src/MRPT_Utils/NEED @@ -1 +1,3 @@ -Determinants Davidson Psiref_CAS +Determinants +Davidson +Psiref_CAS diff --git a/src/Nuclei/NEED b/src/Nuclei/NEED index dcdb5f86..549b10c2 100644 --- a/src/Nuclei/NEED +++ b/src/Nuclei/NEED @@ -1 +1,2 @@ -Ezfio_files Utils +Ezfio_files +Utils diff --git a/src/Perturbation/NEED b/src/Perturbation/NEED index 92a5408e..ecc4ea70 100644 --- a/src/Perturbation/NEED +++ b/src/Perturbation/NEED @@ -1 +1,4 @@ -Determinants Hartree_Fock Davidson MRPT_Utils +Determinants +Hartree_Fock +Davidson +MRPT_Utils diff --git a/src/Psiref_Utils/NEED b/src/Psiref_Utils/NEED index 065099eb..da86d413 100644 --- a/src/Psiref_Utils/NEED +++ b/src/Psiref_Utils/NEED @@ -1 +1,2 @@ -Bitmask Determinants +Bitmask +Determinants diff --git a/src/Selectors_full/NEED b/src/Selectors_full/NEED index d2716281..cf13c6bc 100644 --- a/src/Selectors_full/NEED +++ b/src/Selectors_full/NEED @@ -1 +1,3 @@ -Determinants Hartree_Fock Selectors_Utils +Determinants +Hartree_Fock +Selectors_Utils diff --git a/src/Slave/NEED b/src/Slave/NEED index 05f7bca8..863fb58e 100644 --- a/src/Slave/NEED +++ b/src/Slave/NEED @@ -1 +1,2 @@ -FCI MPI +FCI +MPI diff --git a/src/dummy/NEED b/src/dummy/NEED index 51f01e6c..2dcc6c08 100644 --- a/src/dummy/NEED +++ b/src/dummy/NEED @@ -1 +1,34 @@ -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_Utils SingleRefMethod Utils ZMQ MRPT_Utils +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_Utils +SingleRefMethod +Utils +ZMQ +MRPT_Utils