mirror of
https://github.com/LCPQ/quantum_package
synced 2024-06-02 11:25:26 +02:00
Fixed tests
This commit is contained in:
parent
536ac314b1
commit
4b21b8cd0e
3
TODO
3
TODO
|
@ -1,3 +1,4 @@
|
|||
* Molden format
|
||||
* Virer tous les modules qui sont dans plugins
|
||||
* Permettre aux utilisateurs de facilement deposer des plugins dans plugins via une commande
|
||||
* Permettre de descendre plus bas dans l'arborescence de plugins pour permettre des `git clone` dans le repertoire plugins
|
||||
|
@ -43,6 +44,4 @@
|
|||
* Config file for Cray
|
||||
* Implicit none obligatoire
|
||||
|
||||
* Doc des executables
|
||||
* Il faut que le programme ait le meme nom que la subroutine
|
||||
* EZFIO sans fork
|
||||
|
|
|
@ -104,7 +104,7 @@ Providers
|
|||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Coefficients including the AO normalization
|
||||
Coefficients including the |AO| normalization
|
||||
|
||||
|
||||
|
||||
|
@ -117,7 +117,7 @@ Providers
|
|||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Coefficients including the AO normalization
|
||||
|AO| normalization for interfacing with libint
|
||||
|
||||
|
||||
|
||||
|
@ -131,7 +131,7 @@ Providers
|
|||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Coefficients including the AO normalization
|
||||
Coefficients including the |AO| normalization
|
||||
|
||||
|
||||
|
||||
|
@ -145,7 +145,7 @@ Providers
|
|||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Sorted primitives to accelerate 4 index MO transformation
|
||||
Sorted primitives to accelerate 4 index |MO| transformation
|
||||
|
||||
|
||||
|
||||
|
@ -158,7 +158,7 @@ Providers
|
|||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Transposed ao_coef_normalized_ordered
|
||||
Transposed :c:var:`ao_coef_normalized_ordered`
|
||||
|
||||
|
||||
|
||||
|
@ -172,7 +172,7 @@ Providers
|
|||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Sorted primitives to accelerate 4 index MO transformation
|
||||
Sorted primitives to accelerate 4 index |MO| transformation
|
||||
|
||||
|
||||
|
||||
|
@ -185,7 +185,7 @@ Providers
|
|||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Transposed ao_expo_ordered
|
||||
Transposed :c:var:`ao_expo_ordered`
|
||||
|
||||
|
||||
|
||||
|
@ -200,7 +200,7 @@ Providers
|
|||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
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`
|
||||
|
||||
|
||||
|
||||
|
@ -215,7 +215,7 @@ Providers
|
|||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
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`
|
||||
|
||||
|
||||
|
||||
|
@ -228,7 +228,7 @@ Providers
|
|||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
|
||||
Converts an l value to a string
|
||||
|
||||
|
||||
|
||||
|
@ -243,7 +243,7 @@ Providers
|
|||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
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`
|
||||
|
||||
|
||||
|
||||
|
@ -256,7 +256,7 @@ Providers
|
|||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
max number of primitives
|
||||
Max number of primitives.
|
||||
|
||||
|
||||
|
||||
|
@ -399,7 +399,7 @@ Providers
|
|||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
character corresponding to the "L" value of an AO orbital
|
||||
Character corresponding to the "l" value of an |AO|
|
||||
|
||||
|
||||
|
||||
|
@ -413,7 +413,7 @@ Providers
|
|||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Number of AOs per atom
|
||||
Number of |AOs| per atom
|
||||
|
||||
|
||||
|
||||
|
@ -427,7 +427,7 @@ Providers
|
|||
|
||||
File: :file:`dimensions_integrals.irp.f`
|
||||
|
||||
|
||||
Number of points used in the numerical integrations.
|
||||
|
||||
|
||||
|
||||
|
@ -441,7 +441,7 @@ Providers
|
|||
|
||||
File: :file:`dimensions_integrals.irp.f`
|
||||
|
||||
|
||||
Number of points used in the numerical integrations.
|
||||
|
||||
|
||||
|
||||
|
@ -454,7 +454,7 @@ Providers
|
|||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
List of AOs attached on each atom
|
||||
List of |AOs| centered on each atom
|
||||
|
||||
|
||||
|
||||
|
@ -468,7 +468,7 @@ Providers
|
|||
|
||||
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
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
@ -482,7 +482,7 @@ Providers
|
|||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Number of AOs per atom
|
||||
Number of |AOs| per atom
|
||||
|
||||
|
||||
|
||||
|
@ -496,7 +496,7 @@ Providers
|
|||
|
||||
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
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
@ -515,7 +515,7 @@ Subroutines / functions
|
|||
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
|
||||
:math:`\frac{1}{2} (l-n_x) (l-n_x+1) + n_z + 1`
|
||||
|
||||
|
||||
|
||||
|
@ -529,7 +529,7 @@ Subroutines / functions
|
|||
|
||||
File: :file:`aos_value.irp.f`
|
||||
|
||||
return the value of the ith ao at point r
|
||||
Returns the value of the i-th |AO| at point r
|
||||
|
||||
|
||||
|
||||
|
@ -543,6 +543,6 @@ Subroutines / functions
|
|||
|
||||
File: :file:`aos_value.irp.f`
|
||||
|
||||
gives the values of aos at a given point r
|
||||
Gives the values of |AOs| at a given point r
|
||||
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ Providers
|
|||
|
||||
File: :file:`ao_ortho_canonical.irp.f`
|
||||
|
||||
ao_cart_to_sphe coefficients of the current basis set
|
||||
Coefficients to go from cartesian to spherical coordinates in the current basis set
|
||||
|
||||
|
||||
|
||||
|
@ -69,7 +69,7 @@ Providers
|
|||
|
||||
File: :file:`ao_ortho_canonical.irp.f`
|
||||
|
||||
AO_cart_to_sphe_coef^(-1)
|
||||
Inverse of :c:var:`ao_cart_to_sphe_coef`
|
||||
|
||||
|
||||
|
||||
|
@ -83,7 +83,7 @@ Providers
|
|||
|
||||
File: :file:`ao_ortho_canonical.irp.f`
|
||||
|
||||
ao_cart_to_sphe coefficients of the current basis set
|
||||
Coefficients to go from cartesian to spherical coordinates in the current basis set
|
||||
|
||||
|
||||
|
||||
|
@ -96,7 +96,7 @@ Providers
|
|||
|
||||
File: :file:`ao_ortho_canonical.irp.f`
|
||||
|
||||
AO overlap matrix in the spherical basis set
|
||||
|AO| overlap matrix in the spherical basis set
|
||||
|
||||
|
||||
|
||||
|
@ -111,8 +111,8 @@ Providers
|
|||
|
||||
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`
|
||||
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`
|
||||
|
||||
|
||||
|
||||
|
@ -128,8 +128,8 @@ Providers
|
|||
|
||||
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`
|
||||
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`
|
||||
|
||||
|
||||
|
||||
|
@ -145,8 +145,8 @@ Providers
|
|||
|
||||
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`
|
||||
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`
|
||||
|
||||
|
||||
|
||||
|
@ -162,7 +162,9 @@ Providers
|
|||
|
||||
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
|
||||
* 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
|
||||
|
||||
|
||||
|
||||
|
@ -177,7 +179,9 @@ Providers
|
|||
|
||||
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
|
||||
* 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
|
||||
|
||||
|
||||
|
||||
|
@ -192,7 +196,9 @@ Providers
|
|||
|
||||
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
|
||||
* 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
|
||||
|
||||
|
||||
|
||||
|
@ -207,7 +213,9 @@ Providers
|
|||
|
||||
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
|
||||
* 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
|
||||
|
||||
|
||||
|
||||
|
@ -222,7 +230,9 @@ Providers
|
|||
|
||||
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
|
||||
* 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
|
||||
|
||||
|
||||
|
||||
|
@ -237,7 +247,9 @@ Providers
|
|||
|
||||
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
|
||||
* 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
|
||||
|
||||
|
||||
|
||||
|
@ -250,7 +262,7 @@ Providers
|
|||
|
||||
File: :file:`kin_ao_ints.irp.f`
|
||||
|
||||
Array of the priminitve basis kinetic integrals.
|
||||
Kinetic energy integrals in the |AO| basis.
|
||||
:math:`\langle \chi_i |\hat{T}| \chi_j \rangle`
|
||||
|
||||
|
||||
|
@ -265,7 +277,7 @@ Providers
|
|||
|
||||
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
|
||||
Array of the one-electron Hamiltonian on the |AO| basis.
|
||||
|
||||
|
||||
|
||||
|
@ -279,7 +291,7 @@ Providers
|
|||
|
||||
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
|
||||
Array of the one-electron Hamiltonian on the |AO| basis.
|
||||
|
||||
|
||||
|
||||
|
@ -377,7 +389,8 @@ Providers
|
|||
|
||||
File: :file:`ao_overlap.irp.f`
|
||||
|
||||
Overlap between atomic basis functions: :math:`\int \chi_i(r) \chi_j(r) dr)`
|
||||
Overlap between atomic basis functions:
|
||||
:math:`\int \chi_i(r) \chi_j(r) dr`
|
||||
|
||||
|
||||
|
||||
|
@ -390,7 +403,8 @@ Providers
|
|||
|
||||
File: :file:`ao_overlap.irp.f`
|
||||
|
||||
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`
|
||||
|
||||
|
||||
|
||||
|
@ -406,7 +420,8 @@ Providers
|
|||
|
||||
File: :file:`ao_overlap.irp.f`
|
||||
|
||||
Overlap between atomic basis functions: :math:`\int \chi_i(r) \chi_j(r) dr)`
|
||||
Overlap between atomic basis functions:
|
||||
:math:`\int \chi_i(r) \chi_j(r) dr`
|
||||
|
||||
|
||||
|
||||
|
@ -422,7 +437,8 @@ Providers
|
|||
|
||||
File: :file:`ao_overlap.irp.f`
|
||||
|
||||
Overlap between atomic basis functions: :math:`\int \chi_i(r) \chi_j(r) dr)`
|
||||
Overlap between atomic basis functions:
|
||||
:math:`\int \chi_i(r) \chi_j(r) dr`
|
||||
|
||||
|
||||
|
||||
|
@ -438,7 +454,8 @@ Providers
|
|||
|
||||
File: :file:`ao_overlap.irp.f`
|
||||
|
||||
Overlap between atomic basis functions: :math:`\int \chi_i(r) \chi_j(r) dr)`
|
||||
Overlap between atomic basis functions:
|
||||
:math:`\int \chi_i(r) \chi_j(r) dr`
|
||||
|
||||
|
||||
|
||||
|
@ -451,7 +468,7 @@ Providers
|
|||
|
||||
File: :file:`pot_ao_pseudo_ints.irp.f`
|
||||
|
||||
Pseudo-potential integrals
|
||||
Pseudo-potential integrals in the |AO| basis set.
|
||||
|
||||
|
||||
|
||||
|
@ -477,7 +494,7 @@ Providers
|
|||
|
||||
File: :file:`pot_ao_pseudo_ints.irp.f`
|
||||
|
||||
Local pseudo-potential
|
||||
Non-local pseudo-potential
|
||||
|
||||
|
||||
|
||||
|
@ -492,7 +509,9 @@ Providers
|
|||
|
||||
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
|
||||
* 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
|
||||
|
||||
|
||||
|
||||
|
@ -507,7 +526,9 @@ Providers
|
|||
|
||||
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
|
||||
* 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
|
||||
|
||||
|
||||
|
||||
|
@ -522,7 +543,9 @@ Providers
|
|||
|
||||
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
|
||||
* 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
|
||||
|
||||
|
||||
|
||||
|
@ -652,7 +675,7 @@ Providers
|
|||
|
||||
File: :file:`read_write.irp.f`
|
||||
|
||||
One level of abstraction for disk_access_ao_integrals and disk_access_mo_integrals
|
||||
If |true|, read/write one-electrons from/to disk.
|
||||
|
||||
|
||||
|
||||
|
@ -665,7 +688,7 @@ Providers
|
|||
|
||||
File: :file:`ao_overlap.irp.f`
|
||||
|
||||
S^{1/2}
|
||||
:math:`S^{1/2}`
|
||||
|
||||
|
||||
|
||||
|
@ -678,7 +701,7 @@ Providers
|
|||
|
||||
File: :file:`ao_overlap.irp.f`
|
||||
|
||||
Matrix X = S^{-1/2} obtained by SVD
|
||||
:math:`X = S^{-1/2}` obtained by SVD
|
||||
|
||||
|
||||
|
||||
|
@ -691,7 +714,7 @@ Providers
|
|||
|
||||
File: :file:`ao_overlap.irp.f`
|
||||
|
||||
S^-1
|
||||
Inverse of the overlap matrix
|
||||
|
||||
|
||||
|
||||
|
@ -705,7 +728,7 @@ Providers
|
|||
|
||||
File: :file:`read_write.irp.f`
|
||||
|
||||
One level of abstraction for disk_access_ao_integrals and disk_access_mo_integrals
|
||||
If |true|, read/write one-electrons from/to disk.
|
||||
|
||||
|
||||
|
||||
|
@ -816,34 +839,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
|
|
@ -34,27 +34,13 @@ 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`
|
||||
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.
|
||||
|
||||
|
@ -68,7 +54,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f_shell_8`
|
||||
|
||||
|
||||
|
||||
|
@ -82,7 +68,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
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.
|
||||
|
||||
|
@ -96,7 +82,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f_shell_8`
|
||||
|
||||
|
||||
|
||||
|
@ -110,7 +96,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
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.
|
||||
|
||||
|
|
|
@ -34,13 +34,27 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. c:function:: cis
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine cis
|
||||
|
||||
File: :file:`cisd.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_apply_cisd
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_cisd()
|
||||
|
||||
File: :file:`H_apply.irp.f_shell_8`
|
||||
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.
|
||||
|
||||
|
@ -54,7 +68,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f_shell_8`
|
||||
|
||||
|
||||
|
||||
|
@ -68,7 +82,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
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.
|
||||
|
||||
|
@ -82,7 +96,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f_shell_8`
|
||||
|
||||
|
||||
|
||||
|
@ -96,7 +110,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
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.
|
||||
|
||||
|
|
|
@ -57,6 +57,12 @@ EZFIO parameters
|
|||
|
||||
Default: True
|
||||
|
||||
.. option:: only_expected_s2
|
||||
|
||||
If |true|, use filter out all vectors with bad |S^2| values
|
||||
|
||||
Default: True
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
@ -70,7 +76,7 @@ Providers
|
|||
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`
|
||||
File: :file:`diagonalize_ci.irp.f`
|
||||
|
||||
Eigenvectors/values of the CI matrix
|
||||
|
||||
|
@ -85,7 +91,7 @@ Providers
|
|||
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`
|
||||
File: :file:`diagonalize_ci.irp.f`
|
||||
|
||||
Eigenvectors/values of the CI matrix
|
||||
|
||||
|
@ -100,7 +106,7 @@ Providers
|
|||
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`
|
||||
File: :file:`diagonalize_ci.irp.f`
|
||||
|
||||
Eigenvectors/values of the CI matrix
|
||||
|
||||
|
@ -113,7 +119,7 @@ Providers
|
|||
|
||||
double precision, allocatable :: ci_energy (N_states_diag)
|
||||
|
||||
File: :file:`diagonalize_CI.irp.f`
|
||||
File: :file:`diagonalize_ci.irp.f`
|
||||
|
||||
N_states lowest eigenvalues of the CI matrix
|
||||
|
||||
|
@ -178,7 +184,7 @@ Providers
|
|||
|
||||
double precision, allocatable :: psi_energy (N_states)
|
||||
|
||||
File: :file:`u0Hu0.irp.f`
|
||||
File: :file:`u0_h_u0.irp.f`
|
||||
|
||||
Energy of the current wave function
|
||||
|
||||
|
@ -191,7 +197,7 @@ Providers
|
|||
|
||||
double precision, allocatable :: psi_energy_with_nucl_rep (N_states)
|
||||
|
||||
File: :file:`u0Hu0.irp.f`
|
||||
File: :file:`u0_h_u0.irp.f`
|
||||
|
||||
Energy of the wave function with the nuclear repulsion energy.
|
||||
|
||||
|
@ -258,7 +264,7 @@ Subroutines / functions
|
|||
|
||||
.. code:: text
|
||||
|
||||
subroutine davidson_diag_hs2(dets_in,u_in,s2_out,dim_in,energies,sze,N_st,N_st_diag,Nint,dressing_state)
|
||||
subroutine davidson_diag_hs2(dets_in,u_in,s2_out,dim_in,energies,sze,N_st,N_st_diag,Nint,dressing_state,converged)
|
||||
|
||||
File: :file:`diagonalization_hs2_dressed.irp.f`
|
||||
|
||||
|
@ -364,7 +370,7 @@ Subroutines / functions
|
|||
|
||||
subroutine diagonalize_CI
|
||||
|
||||
File: :file:`diagonalize_CI.irp.f`
|
||||
File: :file:`diagonalize_ci.irp.f`
|
||||
|
||||
Replace the coefficients of the CI states by the coefficients of the eigenstates of the CI matrix
|
||||
|
||||
|
@ -372,27 +378,13 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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`
|
||||
File: :file:`u0_h_u0.irp.f`
|
||||
|
||||
Computes v_0 = H|u_0> and s_0 = S^2 |u_0>
|
||||
Assumes that the determinants are in psi_det
|
||||
|
@ -408,7 +400,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`u0_h_u0.irp.f`
|
||||
|
||||
Computes v_t = H|u_t> and s_t = S^2 |u_t>
|
||||
Default should be 1,N_det,0,1
|
||||
|
@ -423,7 +415,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`u0_h_u0.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
|
||||
|
@ -438,7 +430,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`u0_h_u0.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
|
||||
|
@ -453,7 +445,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`u0_h_u0.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
|
||||
|
@ -468,7 +460,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`u0_h_u0.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
|
||||
|
@ -483,7 +475,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`u0_h_u0.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
|
||||
|
@ -515,7 +507,7 @@ Subroutines / functions
|
|||
|
||||
subroutine u_0_H_u_0(e_0,u_0,n,keys_tmp,Nint,N_st,sze)
|
||||
|
||||
File: :file:`u0Hu0.irp.f`
|
||||
File: :file:`u0_h_u0.irp.f`
|
||||
|
||||
Computes e_0 = <u_0|H|u_0>/<u_0|u_0>
|
||||
n : number of determinants
|
||||
|
|
|
@ -104,18 +104,6 @@ EZFIO parameters
|
|||
|
||||
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
|
||||
|
||||
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.
|
||||
|
||||
Default: 90000
|
||||
|
||||
.. option:: state_average_weight
|
||||
|
||||
Weight of the states in state-average calculations.
|
||||
|
@ -316,7 +304,7 @@ Providers
|
|||
logical :: h_apply_buffer_allocated
|
||||
integer(omp_lock_kind), allocatable :: h_apply_buffer_lock (64,0:nproc-1)
|
||||
|
||||
File: :file:`H_apply.irp.f`
|
||||
File: :file:`h_apply.irp.f`
|
||||
|
||||
Buffer of determinants/coefficients/perturbative energy for H_apply. Uninitialized. Filled by H_apply subroutines.
|
||||
|
||||
|
@ -330,7 +318,7 @@ Providers
|
|||
logical :: h_apply_buffer_allocated
|
||||
integer(omp_lock_kind), allocatable :: h_apply_buffer_lock (64,0:nproc-1)
|
||||
|
||||
File: :file:`H_apply.irp.f`
|
||||
File: :file:`h_apply.irp.f`
|
||||
|
||||
Buffer of determinants/coefficients/perturbative energy for H_apply. Uninitialized. Filled by H_apply subroutines.
|
||||
|
||||
|
@ -1609,195 +1597,6 @@ Providers
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -1844,20 +1643,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -1970,27 +1755,13 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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`
|
||||
File: :file:`fock_diag.irp.f`
|
||||
|
||||
Build the diagonal of the Fock matrix corresponding to a generator determinant. F_00 is <i|H|i> = E0.
|
||||
|
||||
|
@ -2012,104 +1783,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -2144,7 +1817,7 @@ Subroutines / functions
|
|||
|
||||
subroutine copy_H_apply_buffer_to_wf
|
||||
|
||||
File: :file:`H_apply.irp.f`
|
||||
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
|
||||
|
||||
|
@ -2250,20 +1923,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -2376,20 +2035,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -2404,55 +2049,13 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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`
|
||||
File: :file:`h_apply.irp.f`
|
||||
|
||||
Fill the H_apply buffer with determiants for CISD
|
||||
|
||||
|
@ -2495,24 +2098,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -2530,20 +2115,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. c:function:: flip_generators
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine flip_generators()
|
||||
|
||||
File: :file:`determinants.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: generate_all_alpha_beta_det_products
|
||||
|
||||
.. code:: text
|
||||
|
@ -2866,34 +2437,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -2908,20 +2451,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -2964,20 +2493,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -3062,34 +2577,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -3174,34 +2661,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -3244,20 +2703,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -3286,36 +2731,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -3372,20 +2787,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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 <i|H|j> where i and j are determinants
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: i_h_j_s2
|
||||
|
||||
.. code:: text
|
||||
|
@ -3404,11 +2805,11 @@ Subroutines / functions
|
|||
|
||||
.. code:: text
|
||||
|
||||
subroutine i_H_j_verbose(key_i,key_j,Nint,hij,hmono,hdouble)
|
||||
subroutine i_H_j_verbose(key_i,key_j,Nint,hij,hmono,hdouble,phase)
|
||||
|
||||
File: :file:`slater_rules.irp.f`
|
||||
|
||||
Returns <i|H|j> where i and j are determinants
|
||||
Returns <i|H|j> where i and j are determinants with
|
||||
|
||||
|
||||
|
||||
|
@ -3422,7 +2823,7 @@ Subroutines / functions
|
|||
|
||||
File: :file:`slater_rules.irp.f`
|
||||
|
||||
Computes <i|H|Psi> = \sum_J c_J <i|H|J>.
|
||||
Computes <i|H|Psi> = :math:`\sum_J c_J \langle i | H | J \rangle`.
|
||||
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
|
||||
|
||||
|
||||
|
@ -3444,58 +2845,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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`
|
||||
|
||||
<key|H|psi> 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`
|
||||
|
||||
<key|H|psi> 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`
|
||||
|
||||
<key|H|psi> for the various Nstates
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: i_s2_psi_minilist
|
||||
|
||||
.. code:: text
|
||||
|
@ -3511,34 +2860,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -3623,62 +2944,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -3744,7 +3009,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f`
|
||||
|
||||
Pull PT2 calculation in the collector
|
||||
|
||||
|
@ -3758,7 +3023,7 @@ Subroutines / functions
|
|||
|
||||
subroutine push_pt2(zmq_socket_push,pt2,norm_pert,H_pert_diag,i_generator,N_st,task_id)
|
||||
|
||||
File: :file:`H_apply.irp.f`
|
||||
File: :file:`h_apply.irp.f`
|
||||
|
||||
Push PT2 calculation to the collector
|
||||
|
||||
|
@ -3786,7 +3051,7 @@ Subroutines / functions
|
|||
|
||||
subroutine remove_duplicates_in_psi_det(found_duplicates)
|
||||
|
||||
File: :file:`H_apply.irp.f`
|
||||
File: :file:`h_apply.irp.f`
|
||||
|
||||
Removes duplicate determinants in the wave function.
|
||||
|
||||
|
@ -3800,7 +3065,7 @@ Subroutines / functions
|
|||
|
||||
subroutine resize_H_apply_buffer(new_size,iproc)
|
||||
|
||||
File: :file:`H_apply.irp.f`
|
||||
File: :file:`h_apply.irp.f`
|
||||
|
||||
Resizes the H_apply buffer of proc iproc. The buffer lock should be set before calling this function.
|
||||
|
||||
|
@ -4052,22 +3317,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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 = <u_0|H|u_0>
|
||||
n : number of determinants
|
||||
uses the big_matrix_stored array
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: u_0_s2_u_0
|
||||
|
||||
.. code:: text
|
||||
|
|
|
@ -34,3 +34,890 @@ EZFIO parameters
|
|||
Stop stochastic dressing when the relative error is smaller than :option:`perturbation PT2_relative_error`
|
||||
|
||||
Default: 0.001
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: delta_ij
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: delta_ij (N_states,N_det,2)
|
||||
|
||||
File: :file:`dressing.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: delta_ij_tmp
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: delta_ij_tmp (N_states,N_det_delta_ij,2)
|
||||
|
||||
File: :file:`dressing.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: dress_dot_f
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: dress_dot_f (dress_N_cp)
|
||||
integer, allocatable :: dress_p (N_det_generators)
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: dress_dot_n_0
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: dress_e (N_det_generators,dress_N_cp)
|
||||
integer, allocatable :: dress_dot_t (0:dress_N_cp)
|
||||
integer, allocatable :: dress_dot_n_0 (0:dress_N_cp)
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: dress_dot_t
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: dress_e (N_det_generators,dress_N_cp)
|
||||
integer, allocatable :: dress_dot_t (0:dress_N_cp)
|
||||
integer, allocatable :: dress_dot_n_0 (0:dress_N_cp)
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: dress_e
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: dress_e (N_det_generators,dress_N_cp)
|
||||
integer, allocatable :: dress_dot_t (0:dress_N_cp)
|
||||
integer, allocatable :: dress_dot_n_0 (0:dress_N_cp)
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: dress_e0_denominator
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: dress_e0_denominator (N_states)
|
||||
|
||||
File: :file:`energy.irp.f`
|
||||
|
||||
E0 in the denominator of the dress
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: dress_m_m
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: dress_m_m (dress_N_cp_max)
|
||||
integer, allocatable :: pt2_j_ (N_det_generators)
|
||||
double precision, allocatable :: pt2_u (N_det_generators)
|
||||
integer, allocatable :: dress_r1_ (0:N_det_generators)
|
||||
double precision, allocatable :: dress_m_mi (dress_N_cp_max,N_det_generators+1)
|
||||
integer, allocatable :: dress_t (N_det_generators)
|
||||
integer :: dress_n_cp
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: dress_m_mi
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: dress_m_m (dress_N_cp_max)
|
||||
integer, allocatable :: pt2_j_ (N_det_generators)
|
||||
double precision, allocatable :: pt2_u (N_det_generators)
|
||||
integer, allocatable :: dress_r1_ (0:N_det_generators)
|
||||
double precision, allocatable :: dress_m_mi (dress_N_cp_max,N_det_generators+1)
|
||||
integer, allocatable :: dress_t (N_det_generators)
|
||||
integer :: dress_n_cp
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: dress_n_cp
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: dress_m_m (dress_N_cp_max)
|
||||
integer, allocatable :: pt2_j_ (N_det_generators)
|
||||
double precision, allocatable :: pt2_u (N_det_generators)
|
||||
integer, allocatable :: dress_r1_ (0:N_det_generators)
|
||||
double precision, allocatable :: dress_m_mi (dress_N_cp_max,N_det_generators+1)
|
||||
integer, allocatable :: dress_t (N_det_generators)
|
||||
integer :: dress_n_cp
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: dress_n_cp_max
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: dress_n_cp_max
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: dress_p
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: dress_dot_f (dress_N_cp)
|
||||
integer, allocatable :: dress_p (N_det_generators)
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: dress_r1
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: pt2_j (N_det_generators)
|
||||
integer, allocatable :: dress_r1 (0:N_det_generators)
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: dress_r1_
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: dress_m_m (dress_N_cp_max)
|
||||
integer, allocatable :: pt2_j_ (N_det_generators)
|
||||
double precision, allocatable :: pt2_u (N_det_generators)
|
||||
integer, allocatable :: dress_r1_ (0:N_det_generators)
|
||||
double precision, allocatable :: dress_m_mi (dress_N_cp_max,N_det_generators+1)
|
||||
integer, allocatable :: dress_t (N_det_generators)
|
||||
integer :: dress_n_cp
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: dress_stoch_istate
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: dress_stoch_istate
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
State for stochatsic dressing
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: dress_t
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: dress_m_m (dress_N_cp_max)
|
||||
integer, allocatable :: pt2_j_ (N_det_generators)
|
||||
double precision, allocatable :: pt2_u (N_det_generators)
|
||||
integer, allocatable :: dress_r1_ (0:N_det_generators)
|
||||
double precision, allocatable :: dress_m_mi (dress_N_cp_max,N_det_generators+1)
|
||||
integer, allocatable :: dress_t (N_det_generators)
|
||||
integer :: dress_n_cp
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: initialize_dress_e0_denominator
|
||||
|
||||
.. code:: text
|
||||
|
||||
logical :: initialize_dress_e0_denominator
|
||||
|
||||
File: :file:`energy.irp.f`
|
||||
|
||||
If true, initialize dress_E0_denominator
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: n_det_delta_ij
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: n_det_delta_ij
|
||||
|
||||
File: :file:`dressing.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: psi_from_sorted_gen
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: psi_from_sorted_gen (N_det)
|
||||
|
||||
File: :file:`alpha_factory.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: 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: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_f
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: pt2_n_teeth
|
||||
integer :: pt2_mindetinfirstteeth
|
||||
integer :: pt2_n_tasks_max
|
||||
integer, allocatable :: pt2_f (N_det_generators)
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_j
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: pt2_j (N_det_generators)
|
||||
integer, allocatable :: dress_r1 (0:N_det_generators)
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_j_
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: dress_m_m (dress_N_cp_max)
|
||||
integer, allocatable :: pt2_j_ (N_det_generators)
|
||||
double precision, allocatable :: pt2_u (N_det_generators)
|
||||
integer, allocatable :: dress_r1_ (0:N_det_generators)
|
||||
double precision, allocatable :: dress_m_mi (dress_N_cp_max,N_det_generators+1)
|
||||
integer, allocatable :: dress_t (N_det_generators)
|
||||
integer :: dress_n_cp
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_mindetinfirstteeth
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: pt2_n_teeth
|
||||
integer :: pt2_mindetinfirstteeth
|
||||
integer :: pt2_n_tasks_max
|
||||
integer, allocatable :: pt2_f (N_det_generators)
|
||||
|
||||
File: :file:`dress_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:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_n_tasks_max
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: pt2_n_teeth
|
||||
integer :: pt2_mindetinfirstteeth
|
||||
integer :: pt2_n_tasks_max
|
||||
integer, allocatable :: pt2_f (N_det_generators)
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_n_teeth
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: pt2_n_teeth
|
||||
integer :: pt2_mindetinfirstteeth
|
||||
integer :: pt2_n_tasks_max
|
||||
integer, allocatable :: pt2_f (N_det_generators)
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_u
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: dress_m_m (dress_N_cp_max)
|
||||
integer, allocatable :: pt2_j_ (N_det_generators)
|
||||
double precision, allocatable :: pt2_u (N_det_generators)
|
||||
integer, allocatable :: dress_r1_ (0:N_det_generators)
|
||||
double precision, allocatable :: dress_m_mi (dress_N_cp_max,N_det_generators+1)
|
||||
integer, allocatable :: dress_t (N_det_generators)
|
||||
integer :: dress_n_cp
|
||||
|
||||
File: :file:`dress_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:`dress_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:`dress_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:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: alpha_callback
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine alpha_callback(delta_ij_loc, i_generator, subset, csubset, iproc)
|
||||
|
||||
File: :file:`alpha_factory.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: alpha_callback_mask
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine alpha_callback_mask(delta_ij_loc, i_gen, sp, mask, bannedOrb, banned, indexes, indexes_end, rabuf, siz, iproc)
|
||||
|
||||
File: :file:`alpha_factory.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: bitstring_to_list_in_selection
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine bitstring_to_list_in_selection( string, list, n_elements, Nint)
|
||||
|
||||
File: :file:`alpha_factory.irp.f`
|
||||
|
||||
Gives the inidices(+1) of the bits set to 1 in the bit string
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: count_d1
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine count_d1(countedOrb, p)
|
||||
|
||||
File: :file:`alpha_factory.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: count_d2
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine count_d2(counted, p, sp)
|
||||
|
||||
File: :file:`alpha_factory.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: count_pq
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine count_pq(mask, sp, det, i_gen, N_sel, bannedOrb, banned, countedGlob, countedOrb, counted, interesting)
|
||||
|
||||
File: :file:`alpha_factory.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: create_indexes
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine create_indexes(countedGlob, countedOrb, counted, indexes, siz)
|
||||
|
||||
File: :file:`alpha_factory.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: dress_collector
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine dress_collector(zmq_socket_pull, E, relative_error, delta, delta_s2, dress, istate)
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: dress_find_sample
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function dress_find_sample(v, w)
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: dress_slave
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine dress_slave
|
||||
|
||||
File: :file:`dress_slave.irp.f`
|
||||
|
||||
Helper subroutine to compute the dress in distributed mode.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: dress_slave_inproc
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine dress_slave_inproc(i)
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: dress_slave_tcp
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine dress_slave_tcp(i,energy)
|
||||
|
||||
File: :file:`dress_slave.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: dress_zmq
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine dress_zmq()
|
||||
|
||||
File: :file:`dress_zmq_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: generate_singles_and_doubles
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine generate_singles_and_doubles(delta_ij_loc, i_generator, bitmask_index, subset, csubset, iproc)
|
||||
|
||||
File: :file:`alpha_factory.irp.f`
|
||||
|
||||
TODO
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_d1
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine get_d1(i_gen, gen, banned, bannedOrb, indexes, abuf, mask, h, p, sp)
|
||||
|
||||
File: :file:`alpha_factory.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_d2
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine get_d2(i_gen, gen, banned, bannedOrb, indexes, abuf, mask, h, p, sp)
|
||||
|
||||
File: :file:`alpha_factory.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: past_d1
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine past_d1(bannedOrb, p)
|
||||
|
||||
File: :file:`alpha_factory.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: past_d2
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine past_d2(banned, p, sp)
|
||||
|
||||
File: :file:`alpha_factory.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: provide_everything
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine provide_everything
|
||||
|
||||
File: :file:`dress_slave.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: pull_dress_results
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine pull_dress_results(zmq_socket_pull, m_task, f, edI_task, edI_index, breve_delta_m, task_id, n_tasks)
|
||||
|
||||
File: :file:`run_dress_slave.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: push_dress_results
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine push_dress_results(zmq_socket_push, m_task, f, edI_task, edI_index, breve_delta_m, task_id, n_tasks)
|
||||
|
||||
File: :file:`run_dress_slave.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: run_dress_slave
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine run_dress_slave(thread,iproce,energy)
|
||||
|
||||
File: :file:`run_dress_slave.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: run_dressing
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine run_dressing(N_st,energy)
|
||||
|
||||
File: :file:`dress_general.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: run_wf
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine run_wf
|
||||
|
||||
File: :file:`dress_slave.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: splash_pq
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine splash_pq(mask, sp, det, i_gen, N_sel, bannedOrb, banned, indexes, abuf, interesting)
|
||||
|
||||
File: :file:`alpha_factory.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: spot_isinwf
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine spot_isinwf(mask, det, i_gen, N, banned, fullMatch, interesting)
|
||||
|
||||
File: :file:`alpha_factory.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: testteethbuilding
|
||||
|
||||
.. code:: text
|
||||
|
||||
logical function testTeethBuilding(minF, N)
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_dress
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine ZMQ_dress(E, dress, delta_out, delta_s2_out, relative_error)
|
||||
|
||||
File: :file:`dress_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -150,23 +150,6 @@ Providers
|
|||
|
||||
|
||||
|
||||
.. c:var:: 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: :file:`pt2_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_e0_denominator
|
||||
|
||||
.. code:: text
|
||||
|
@ -180,65 +163,6 @@ Providers
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -252,34 +176,6 @@ Providers
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -307,70 +203,6 @@ Providers
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
-----------------------
|
||||
|
||||
|
@ -390,20 +222,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -438,7 +256,7 @@ Subroutines / functions
|
|||
|
||||
subroutine fci_zmq
|
||||
|
||||
File: :file:`FCI.irp.f`
|
||||
File: :file:`fci.irp.f`
|
||||
|
||||
|
||||
|
||||
|
@ -474,34 +292,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -600,34 +390,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -690,7 +452,7 @@ Subroutines / functions
|
|||
|
||||
subroutine pt2_stoch
|
||||
|
||||
File: :file:`PT2.irp.f`
|
||||
File: :file:`pt2.irp.f`
|
||||
|
||||
|
||||
|
||||
|
@ -852,48 +614,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
|
|
@ -33,33 +33,6 @@ Providers
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -75,20 +48,6 @@ Providers
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -117,29 +76,3 @@ Providers
|
|||
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
|
||||
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ Providers
|
|||
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`
|
||||
File: :file:`fock_matrix.irp.f`
|
||||
|
||||
Alpha Fock matrix in AO basis set
|
||||
|
||||
|
@ -122,40 +122,13 @@ Providers
|
|||
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`
|
||||
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
|
||||
|
@ -163,7 +136,7 @@ Providers
|
|||
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`
|
||||
File: :file:`diis.irp.f`
|
||||
|
||||
Eigenvalues and eigenvectors of the Fock matrix over the AO basis
|
||||
|
||||
|
@ -177,7 +150,7 @@ Providers
|
|||
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`
|
||||
File: :file:`diis.irp.f`
|
||||
|
||||
Eigenvalues and eigenvectors of the Fock matrix over the AO basis
|
||||
|
||||
|
@ -188,12 +161,11 @@ Providers
|
|||
|
||||
.. 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
|
||||
Eigenvector of the Fock matrix in the MO basis obtained with level shift.
|
||||
|
||||
|
||||
|
||||
|
@ -208,7 +180,7 @@ Providers
|
|||
iteration_SCF,dim_DIIS &
|
||||
)
|
||||
|
||||
File: :file:`Roothaan_Hall_SCF.irp.f`
|
||||
File: :file:`roothaan_hall_scf.irp.f`
|
||||
|
||||
Compute the extrapolated Fock matrix using the DIIS procedure
|
||||
|
||||
|
@ -221,7 +193,7 @@ Providers
|
|||
|
||||
double precision, allocatable :: fock_matrix_ao (ao_num,ao_num)
|
||||
|
||||
File: :file:`Fock_matrix.irp.f`
|
||||
File: :file:`fock_matrix.irp.f`
|
||||
|
||||
Fock matrix in AO basis set
|
||||
|
||||
|
@ -235,7 +207,7 @@ Providers
|
|||
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`
|
||||
File: :file:`fock_matrix.irp.f`
|
||||
|
||||
Alpha Fock matrix in AO basis set
|
||||
|
||||
|
@ -249,7 +221,7 @@ Providers
|
|||
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`
|
||||
File: :file:`fock_matrix.irp.f`
|
||||
|
||||
Alpha Fock matrix in AO basis set
|
||||
|
||||
|
@ -263,7 +235,7 @@ Providers
|
|||
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`
|
||||
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 |
|
||||
|
@ -281,7 +253,7 @@ Providers
|
|||
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`
|
||||
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 |
|
||||
|
@ -298,7 +270,7 @@ Providers
|
|||
|
||||
double precision, allocatable :: fock_matrix_mo_alpha (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`Fock_matrix.irp.f`
|
||||
File: :file:`fock_matrix.irp.f`
|
||||
|
||||
Fock matrix on the MO basis
|
||||
|
||||
|
@ -311,7 +283,7 @@ Providers
|
|||
|
||||
double precision, allocatable :: fock_matrix_mo_beta (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`Fock_matrix.irp.f`
|
||||
File: :file:`fock_matrix.irp.f`
|
||||
|
||||
Fock matrix on the MO basis
|
||||
|
||||
|
@ -324,7 +296,7 @@ Providers
|
|||
|
||||
double precision, allocatable :: fps_spf_matrix_ao (AO_num,AO_num)
|
||||
|
||||
File: :file:`DIIS.irp.f`
|
||||
File: :file:`diis.irp.f`
|
||||
|
||||
Commutator FPS - SPF
|
||||
|
||||
|
@ -337,7 +309,7 @@ Providers
|
|||
|
||||
double precision, allocatable :: fps_spf_matrix_mo (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`DIIS.irp.f`
|
||||
File: :file:`diis.irp.f`
|
||||
|
||||
Commutator FPS - SPF in MO basis
|
||||
|
||||
|
@ -350,7 +322,7 @@ Providers
|
|||
|
||||
double precision, allocatable :: hf_density_matrix_ao (ao_num,ao_num)
|
||||
|
||||
File: :file:`HF_density_matrix_ao.irp.f`
|
||||
File: :file:`hf_density_matrix_ao.irp.f`
|
||||
|
||||
S^{-1}.P.S^{-1} where P = C.C^t
|
||||
|
||||
|
@ -363,7 +335,7 @@ Providers
|
|||
|
||||
double precision, allocatable :: hf_density_matrix_ao_alpha (ao_num,ao_num)
|
||||
|
||||
File: :file:`HF_density_matrix_ao.irp.f`
|
||||
File: :file:`hf_density_matrix_ao.irp.f`
|
||||
|
||||
S^{-1}.P_alpha.S^{-1}
|
||||
|
||||
|
@ -376,7 +348,7 @@ Providers
|
|||
|
||||
double precision, allocatable :: hf_density_matrix_ao_beta (ao_num,ao_num)
|
||||
|
||||
File: :file:`HF_density_matrix_ao.irp.f`
|
||||
File: :file:`hf_density_matrix_ao.irp.f`
|
||||
|
||||
S^{-1}.P_beta.S^{-1}
|
||||
|
||||
|
@ -389,7 +361,7 @@ Providers
|
|||
|
||||
double precision :: hf_energy
|
||||
|
||||
File: :file:`Fock_matrix.irp.f`
|
||||
File: :file:`fock_matrix.irp.f`
|
||||
|
||||
Hartree-Fock energy
|
||||
|
||||
|
@ -402,7 +374,7 @@ Providers
|
|||
|
||||
double precision :: threshold_diis_nonzero
|
||||
|
||||
File: :file:`DIIS.irp.f`
|
||||
File: :file:`diis.irp.f`
|
||||
|
||||
If threshold_DIIS is zero, choose sqrt(thresh_scf)
|
||||
|
||||
|
@ -420,7 +392,7 @@ Subroutines / functions
|
|||
|
||||
subroutine create_guess
|
||||
|
||||
File: :file:`SCF.irp.f`
|
||||
File: :file:`scf.irp.f`
|
||||
|
||||
Create a MO guess if no MOs are present in the EZFIO directory
|
||||
|
||||
|
@ -428,20 +400,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. c:function:: damping_scf
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine damping_SCF
|
||||
|
||||
File: :file:`damping_SCF.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: huckel_guess
|
||||
|
||||
.. code:: text
|
||||
|
@ -462,7 +420,7 @@ Subroutines / functions
|
|||
|
||||
subroutine Roothaan_Hall_SCF
|
||||
|
||||
File: :file:`Roothaan_Hall_SCF.irp.f`
|
||||
File: :file:`roothaan_hall_scf.irp.f`
|
||||
|
||||
Roothaan-Hall algorithm for SCF Hartree-Fock calculation
|
||||
|
||||
|
@ -476,7 +434,7 @@ Subroutines / functions
|
|||
|
||||
subroutine run
|
||||
|
||||
File: :file:`SCF.irp.f`
|
||||
File: :file:`scf.irp.f`
|
||||
|
||||
Run SCF calculation
|
||||
|
||||
|
@ -490,7 +448,7 @@ Subroutines / functions
|
|||
|
||||
subroutine scf
|
||||
|
||||
File: :file:`SCF.irp.f`
|
||||
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
|
||||
|
||||
|
|
|
@ -890,7 +890,7 @@ Subroutines / functions
|
|||
|
||||
subroutine dump_ao_integrals(filename)
|
||||
|
||||
File: :file:`map_integrals.irp.f_template_750`
|
||||
File: :file:`map_integrals.irp.f_template_694`
|
||||
|
||||
Save to disk the $ao integrals
|
||||
|
||||
|
@ -904,7 +904,7 @@ Subroutines / functions
|
|||
|
||||
subroutine dump_mo_integrals(filename)
|
||||
|
||||
File: :file:`map_integrals.irp.f_template_750`
|
||||
File: :file:`map_integrals.irp.f_template_694`
|
||||
|
||||
Save to disk the $ao integrals
|
||||
|
||||
|
@ -1142,7 +1142,7 @@ Subroutines / functions
|
|||
|
||||
integer function load_ao_integrals(filename)
|
||||
|
||||
File: :file:`map_integrals.irp.f_template_750`
|
||||
File: :file:`map_integrals.irp.f_template_694`
|
||||
|
||||
Read from disk the $ao integrals
|
||||
|
||||
|
@ -1156,7 +1156,7 @@ Subroutines / functions
|
|||
|
||||
integer function load_mo_integrals(filename)
|
||||
|
||||
File: :file:`map_integrals.irp.f_template_750`
|
||||
File: :file:`map_integrals.irp.f_template_694`
|
||||
|
||||
Read from disk the $ao integrals
|
||||
|
||||
|
@ -1206,20 +1206,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -1231,31 +1217,3 @@ Subroutines / functions
|
|||
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`
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -196,34 +196,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -232,7 +204,10 @@ Subroutines / functions
|
|||
|
||||
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))
|
||||
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 larger index (max(j,k))
|
||||
|
||||
|
||||
|
||||
|
@ -252,20 +227,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -294,34 +255,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
|
|
@ -114,3 +114,17 @@ Subroutines / functions
|
|||
Broadcast with chunks of ~2GB
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: mpi_print
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine mpi_print(string)
|
||||
|
||||
File: :file:`mpi.irp.f`
|
||||
|
||||
Print string to stdout if the MPI rank is zero.
|
||||
|
||||
|
||||
|
|
|
@ -28,22 +28,330 @@ EZFIO parameters
|
|||
|
||||
.. option:: lambda_type
|
||||
|
||||
Type of amplitudes used. lambda=0 is defined in ref 2, lambda=1 is defined in ref 1
|
||||
Type of amplitudes used. 0 is defined in ref 2, 1 is defined in ref 1.
|
||||
|
||||
Default: 0
|
||||
Default: 0
|
||||
|
||||
.. option:: energy
|
||||
|
||||
|MRCC| energy
|
||||
|MRCC| energy
|
||||
|
||||
|
||||
.. option:: energy_pt2
|
||||
|
||||
Selected |MRCC| energy, with |PT2| contribution to estimate the complete |MRCC| energy
|
||||
Selected |MRCC| energy, with |PT2| contribution to estimate the complete |MRCC| energy
|
||||
|
||||
|
||||
.. option:: perturbative_triples
|
||||
|
||||
If `True`, compute the perturbative contribution of the Triples
|
||||
If `True`, compute the perturbative contribution of the Triples
|
||||
|
||||
Default: true
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: dia_hla_
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: hij_cache_ (N_det,Nproc)
|
||||
double precision, allocatable :: sij_cache_ (N_det,Nproc)
|
||||
double precision, allocatable :: dia_hla_ (N_states,N_det,Nproc)
|
||||
double precision, allocatable :: dia_sla_ (N_states,N_det,Nproc)
|
||||
integer(bit_kind), allocatable :: sorted_mini (N_int,2,N_det,Nproc)
|
||||
integer, allocatable :: excs_ (0:2,2,2,N_det,Nproc)
|
||||
integer, allocatable :: idx_buf (N_det,Nproc)
|
||||
double precision, allocatable :: phases_ (N_det,Nproc)
|
||||
|
||||
File: :file:`mrcc_routines.irp.f`
|
||||
|
||||
temporay arrays for dress_with_alpha_buffer. Avoids reallocation.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: dia_sla_
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: hij_cache_ (N_det,Nproc)
|
||||
double precision, allocatable :: sij_cache_ (N_det,Nproc)
|
||||
double precision, allocatable :: dia_hla_ (N_states,N_det,Nproc)
|
||||
double precision, allocatable :: dia_sla_ (N_states,N_det,Nproc)
|
||||
integer(bit_kind), allocatable :: sorted_mini (N_int,2,N_det,Nproc)
|
||||
integer, allocatable :: excs_ (0:2,2,2,N_det,Nproc)
|
||||
integer, allocatable :: idx_buf (N_det,Nproc)
|
||||
double precision, allocatable :: phases_ (N_det,Nproc)
|
||||
|
||||
File: :file:`mrcc_routines.irp.f`
|
||||
|
||||
temporay arrays for dress_with_alpha_buffer. Avoids reallocation.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: excs_
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: hij_cache_ (N_det,Nproc)
|
||||
double precision, allocatable :: sij_cache_ (N_det,Nproc)
|
||||
double precision, allocatable :: dia_hla_ (N_states,N_det,Nproc)
|
||||
double precision, allocatable :: dia_sla_ (N_states,N_det,Nproc)
|
||||
integer(bit_kind), allocatable :: sorted_mini (N_int,2,N_det,Nproc)
|
||||
integer, allocatable :: excs_ (0:2,2,2,N_det,Nproc)
|
||||
integer, allocatable :: idx_buf (N_det,Nproc)
|
||||
double precision, allocatable :: phases_ (N_det,Nproc)
|
||||
|
||||
File: :file:`mrcc_routines.irp.f`
|
||||
|
||||
temporay arrays for dress_with_alpha_buffer. Avoids reallocation.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: hij_cache_
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: hij_cache_ (N_det,Nproc)
|
||||
double precision, allocatable :: sij_cache_ (N_det,Nproc)
|
||||
double precision, allocatable :: dia_hla_ (N_states,N_det,Nproc)
|
||||
double precision, allocatable :: dia_sla_ (N_states,N_det,Nproc)
|
||||
integer(bit_kind), allocatable :: sorted_mini (N_int,2,N_det,Nproc)
|
||||
integer, allocatable :: excs_ (0:2,2,2,N_det,Nproc)
|
||||
integer, allocatable :: idx_buf (N_det,Nproc)
|
||||
double precision, allocatable :: phases_ (N_det,Nproc)
|
||||
|
||||
File: :file:`mrcc_routines.irp.f`
|
||||
|
||||
temporay arrays for dress_with_alpha_buffer. Avoids reallocation.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: idx_buf
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: hij_cache_ (N_det,Nproc)
|
||||
double precision, allocatable :: sij_cache_ (N_det,Nproc)
|
||||
double precision, allocatable :: dia_hla_ (N_states,N_det,Nproc)
|
||||
double precision, allocatable :: dia_sla_ (N_states,N_det,Nproc)
|
||||
integer(bit_kind), allocatable :: sorted_mini (N_int,2,N_det,Nproc)
|
||||
integer, allocatable :: excs_ (0:2,2,2,N_det,Nproc)
|
||||
integer, allocatable :: idx_buf (N_det,Nproc)
|
||||
double precision, allocatable :: phases_ (N_det,Nproc)
|
||||
|
||||
File: :file:`mrcc_routines.irp.f`
|
||||
|
||||
temporay arrays for dress_with_alpha_buffer. Avoids reallocation.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: phases_
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: hij_cache_ (N_det,Nproc)
|
||||
double precision, allocatable :: sij_cache_ (N_det,Nproc)
|
||||
double precision, allocatable :: dia_hla_ (N_states,N_det,Nproc)
|
||||
double precision, allocatable :: dia_sla_ (N_states,N_det,Nproc)
|
||||
integer(bit_kind), allocatable :: sorted_mini (N_int,2,N_det,Nproc)
|
||||
integer, allocatable :: excs_ (0:2,2,2,N_det,Nproc)
|
||||
integer, allocatable :: idx_buf (N_det,Nproc)
|
||||
double precision, allocatable :: phases_ (N_det,Nproc)
|
||||
|
||||
File: :file:`mrcc_routines.irp.f`
|
||||
|
||||
temporay arrays for dress_with_alpha_buffer. Avoids reallocation.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: psi_ref_detsorted
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer(bit_kind), allocatable :: psi_ref_detsorted (N_int,2,N_det_ref)
|
||||
integer, allocatable :: psi_ref_detsorted_idx (N_det_ref)
|
||||
|
||||
File: :file:`mrcc_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: psi_ref_detsorted_idx
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer(bit_kind), allocatable :: psi_ref_detsorted (N_int,2,N_det_ref)
|
||||
integer, allocatable :: psi_ref_detsorted_idx (N_det_ref)
|
||||
|
||||
File: :file:`mrcc_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: sij_cache_
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: hij_cache_ (N_det,Nproc)
|
||||
double precision, allocatable :: sij_cache_ (N_det,Nproc)
|
||||
double precision, allocatable :: dia_hla_ (N_states,N_det,Nproc)
|
||||
double precision, allocatable :: dia_sla_ (N_states,N_det,Nproc)
|
||||
integer(bit_kind), allocatable :: sorted_mini (N_int,2,N_det,Nproc)
|
||||
integer, allocatable :: excs_ (0:2,2,2,N_det,Nproc)
|
||||
integer, allocatable :: idx_buf (N_det,Nproc)
|
||||
double precision, allocatable :: phases_ (N_det,Nproc)
|
||||
|
||||
File: :file:`mrcc_routines.irp.f`
|
||||
|
||||
temporay arrays for dress_with_alpha_buffer. Avoids reallocation.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: sorted_mini
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: hij_cache_ (N_det,Nproc)
|
||||
double precision, allocatable :: sij_cache_ (N_det,Nproc)
|
||||
double precision, allocatable :: dia_hla_ (N_states,N_det,Nproc)
|
||||
double precision, allocatable :: dia_sla_ (N_states,N_det,Nproc)
|
||||
integer(bit_kind), allocatable :: sorted_mini (N_int,2,N_det,Nproc)
|
||||
integer, allocatable :: excs_ (0:2,2,2,N_det,Nproc)
|
||||
integer, allocatable :: idx_buf (N_det,Nproc)
|
||||
double precision, allocatable :: phases_ (N_det,Nproc)
|
||||
|
||||
File: :file:`mrcc_routines.irp.f`
|
||||
|
||||
temporay arrays for dress_with_alpha_buffer. Avoids reallocation.
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: dress_with_alpha_buffer
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine dress_with_alpha_buffer(Nstates, Ndet,Nint,delta_ij_loc, i_gen, minilist, det_minilist, n_minilist, alpha, iproc)
|
||||
|
||||
File: :file:`mrcc_routines.irp.f`
|
||||
|
||||
delta_ij_loc(:,:,1) : dressing column for H delta_ij_loc(:,:,2) : dressing column for S2 i_gen : generator index in psi_det_generators minilist : indices of determinants connected to alpha ( in psi_det ) n_minilist : size of minilist alpha : alpha determinant
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: dress_with_alpha_buffer_neu
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine dress_with_alpha_buffer_neu(Nstates,Ndet,Nint,delta_ij_loc, i_gen, minilist, det_minilist, n_minilist, alpha, iproc)
|
||||
|
||||
File: :file:`mrcc_routines.irp.f`
|
||||
|
||||
delta_ij_loc(:,:,1) : dressing column for H delta_ij_loc(:,:,2) : dressing column for S2 i_gen : generator index in psi_det_generators minilist : indices of determinants connected to alpha ( in psi_det ) n_minilist : size of minilist alpha : alpha determinant
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: generator_start
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine generator_start(i_gen, iproc, interesting)
|
||||
|
||||
File: :file:`mrcc_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: provide_all
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine provide_all
|
||||
|
||||
File: :file:`mrcc_slave.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: run_pt2
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine run_pt2(N_st,energy)
|
||||
|
||||
File: :file:`mrcc.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: run_w
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine run_w
|
||||
|
||||
File: :file:`mrcc_slave.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: shifted_bk
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine shifted_bk
|
||||
|
||||
File: :file:`mrcc.irp.f`
|
||||
|
||||
TODO
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: shifted_bk_slave
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine shifted_bk_slave
|
||||
|
||||
File: :file:`mrcc_slave.irp.f`
|
||||
|
||||
Helper program to compute the dress in distributed mode.
|
||||
|
||||
|
||||
Default: true
|
||||
|
|
|
@ -12,3 +12,949 @@ Subroutines and providers required for |MRCC|.
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: active_excitation_to_determinants_idx
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: active_excitation_to_determinants_idx (0:N_det_ref+1,n_exc_active_sze)
|
||||
double precision, allocatable :: active_excitation_to_determinants_val (N_states,N_det_ref+1,n_exc_active_sze)
|
||||
|
||||
File: :file:`amplitudes.irp.f`
|
||||
|
||||
Sparse matrix A containing the matrix to transform the active excitations to determinants : A | \Psi_0 > = | \Psi_SD >
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: active_excitation_to_determinants_val
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: active_excitation_to_determinants_idx (0:N_det_ref+1,n_exc_active_sze)
|
||||
double precision, allocatable :: active_excitation_to_determinants_val (N_states,N_det_ref+1,n_exc_active_sze)
|
||||
|
||||
File: :file:`amplitudes.irp.f`
|
||||
|
||||
Sparse matrix A containing the matrix to transform the active excitations to determinants : A | \Psi_0 > = | \Psi_SD >
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: active_hh_idx
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: n_exc_active
|
||||
integer, allocatable :: active_pp_idx (hh_nex)
|
||||
integer, allocatable :: active_hh_idx (hh_nex)
|
||||
logical, allocatable :: is_active_exc (hh_nex)
|
||||
|
||||
File: :file:`amplitudes.irp.f`
|
||||
|
||||
is_active_exc : True if the excitation involves at least one active MO
|
||||
n_exc_active : Number of active excitations : Number of excitations without the inactive ones.
|
||||
active_hh_idx :
|
||||
active_pp_idx :
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: active_pp_idx
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: n_exc_active
|
||||
integer, allocatable :: active_pp_idx (hh_nex)
|
||||
integer, allocatable :: active_hh_idx (hh_nex)
|
||||
logical, allocatable :: is_active_exc (hh_nex)
|
||||
|
||||
File: :file:`amplitudes.irp.f`
|
||||
|
||||
is_active_exc : True if the excitation involves at least one active MO
|
||||
n_exc_active : Number of active excitations : Number of excitations without the inactive ones.
|
||||
active_hh_idx :
|
||||
active_pp_idx :
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: dij
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: dij (N_det_ref,N_det_non_ref,N_states)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: dij_unique
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: dij_unique (hh_nex,N_states)
|
||||
double precision, allocatable :: rho_mrcc (N_det_non_ref,N_states)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: has_a_unique_parent
|
||||
|
||||
.. code:: text
|
||||
|
||||
logical, allocatable :: has_a_unique_parent (N_det_non_ref)
|
||||
|
||||
File: :file:`amplitudes.irp.f`
|
||||
|
||||
True if the determinant in the non-reference has a unique parent
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: hh_exists
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: hh_exists (4,N_hh_exists)
|
||||
integer, allocatable :: pp_exists (4,N_pp_exists)
|
||||
integer, allocatable :: hh_shortcut (0:N_hh_exists + 1)
|
||||
integer :: hh_nex
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
hh_exists :
|
||||
pp_exists :
|
||||
hh_shortcut :
|
||||
hh_nex : Total number of excitation operators
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: hh_nex
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: hh_exists (4,N_hh_exists)
|
||||
integer, allocatable :: pp_exists (4,N_pp_exists)
|
||||
integer, allocatable :: hh_shortcut (0:N_hh_exists + 1)
|
||||
integer :: hh_nex
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
hh_exists :
|
||||
pp_exists :
|
||||
hh_shortcut :
|
||||
hh_nex : Total number of excitation operators
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: hh_shortcut
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: hh_exists (4,N_hh_exists)
|
||||
integer, allocatable :: pp_exists (4,N_pp_exists)
|
||||
integer, allocatable :: hh_shortcut (0:N_hh_exists + 1)
|
||||
integer :: hh_nex
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
hh_exists :
|
||||
pp_exists :
|
||||
hh_shortcut :
|
||||
hh_nex : Total number of excitation operators
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: hij_mrcc
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: hij_mrcc (N_det_non_ref,N_det_ref)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
< ref | H | Non-ref > matrix
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: is_active_exc
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: n_exc_active
|
||||
integer, allocatable :: active_pp_idx (hh_nex)
|
||||
integer, allocatable :: active_hh_idx (hh_nex)
|
||||
logical, allocatable :: is_active_exc (hh_nex)
|
||||
|
||||
File: :file:`amplitudes.irp.f`
|
||||
|
||||
is_active_exc : True if the excitation involves at least one active MO
|
||||
n_exc_active : Number of active excitations : Number of excitations without the inactive ones.
|
||||
active_hh_idx :
|
||||
active_pp_idx :
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: lambda_mrcc
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: lambda_mrcc (N_states,N_det_non_ref)
|
||||
integer, allocatable :: lambda_mrcc_pt2 (0:psi_det_size)
|
||||
integer, allocatable :: lambda_mrcc_kept (0:psi_det_size)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
cm/<Psi_0|H|D_m> or perturbative 1/Delta_E(m)
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: lambda_mrcc_kept
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: lambda_mrcc (N_states,N_det_non_ref)
|
||||
integer, allocatable :: lambda_mrcc_pt2 (0:psi_det_size)
|
||||
integer, allocatable :: lambda_mrcc_kept (0:psi_det_size)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
cm/<Psi_0|H|D_m> or perturbative 1/Delta_E(m)
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: lambda_mrcc_pt2
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: lambda_mrcc (N_states,N_det_non_ref)
|
||||
integer, allocatable :: lambda_mrcc_pt2 (0:psi_det_size)
|
||||
integer, allocatable :: lambda_mrcc_kept (0:psi_det_size)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
cm/<Psi_0|H|D_m> or perturbative 1/Delta_E(m)
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mrcc_ata_ind
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: mrcc_ata_ind (N_det_ref * n_exc_active_sze)
|
||||
double precision, allocatable :: mrcc_ata_val (N_states,N_det_ref * n_exc_active_sze)
|
||||
integer, allocatable :: mrcc_col_shortcut (n_exc_active_sze)
|
||||
integer, allocatable :: mrcc_n_col (n_exc_active_sze)
|
||||
|
||||
File: :file:`amplitudes.irp.f`
|
||||
|
||||
A is active_excitation_to_determinants in At.A
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mrcc_ata_val
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: mrcc_ata_ind (N_det_ref * n_exc_active_sze)
|
||||
double precision, allocatable :: mrcc_ata_val (N_states,N_det_ref * n_exc_active_sze)
|
||||
integer, allocatable :: mrcc_col_shortcut (n_exc_active_sze)
|
||||
integer, allocatable :: mrcc_n_col (n_exc_active_sze)
|
||||
|
||||
File: :file:`amplitudes.irp.f`
|
||||
|
||||
A is active_excitation_to_determinants in At.A
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mrcc_col_shortcut
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: mrcc_ata_ind (N_det_ref * n_exc_active_sze)
|
||||
double precision, allocatable :: mrcc_ata_val (N_states,N_det_ref * n_exc_active_sze)
|
||||
integer, allocatable :: mrcc_col_shortcut (n_exc_active_sze)
|
||||
integer, allocatable :: mrcc_n_col (n_exc_active_sze)
|
||||
|
||||
File: :file:`amplitudes.irp.f`
|
||||
|
||||
A is active_excitation_to_determinants in At.A
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mrcc_n_col
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: mrcc_ata_ind (N_det_ref * n_exc_active_sze)
|
||||
double precision, allocatable :: mrcc_ata_val (N_states,N_det_ref * n_exc_active_sze)
|
||||
integer, allocatable :: mrcc_col_shortcut (n_exc_active_sze)
|
||||
integer, allocatable :: mrcc_n_col (n_exc_active_sze)
|
||||
|
||||
File: :file:`amplitudes.irp.f`
|
||||
|
||||
A is active_excitation_to_determinants in At.A
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mrmode
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: mrmode
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: n_ex_exists
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: n_hh_exists
|
||||
integer :: n_pp_exists
|
||||
integer :: n_ex_exists
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: n_exc_active
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: n_exc_active
|
||||
integer, allocatable :: active_pp_idx (hh_nex)
|
||||
integer, allocatable :: active_hh_idx (hh_nex)
|
||||
logical, allocatable :: is_active_exc (hh_nex)
|
||||
|
||||
File: :file:`amplitudes.irp.f`
|
||||
|
||||
is_active_exc : True if the excitation involves at least one active MO
|
||||
n_exc_active : Number of active excitations : Number of excitations without the inactive ones.
|
||||
active_hh_idx :
|
||||
active_pp_idx :
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: n_exc_active_sze
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: n_exc_active_sze
|
||||
|
||||
File: :file:`amplitudes.irp.f`
|
||||
|
||||
Dimension of arrays to avoid zero-sized arrays
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: n_hh_exists
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: n_hh_exists
|
||||
integer :: n_pp_exists
|
||||
integer :: n_ex_exists
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: n_pp_exists
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: n_hh_exists
|
||||
integer :: n_pp_exists
|
||||
integer :: n_ex_exists
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pp_exists
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: hh_exists (4,N_hh_exists)
|
||||
integer, allocatable :: pp_exists (4,N_pp_exists)
|
||||
integer, allocatable :: hh_shortcut (0:N_hh_exists + 1)
|
||||
integer :: hh_nex
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
hh_exists :
|
||||
pp_exists :
|
||||
hh_shortcut :
|
||||
hh_nex : Total number of excitation operators
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: psi_non_ref_sorted
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer(bit_kind), allocatable :: psi_non_ref_sorted (N_int,2,N_det_non_ref)
|
||||
integer, allocatable :: psi_non_ref_sorted_idx (N_det_non_ref)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: psi_non_ref_sorted_idx
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer(bit_kind), allocatable :: psi_non_ref_sorted (N_int,2,N_det_non_ref)
|
||||
integer, allocatable :: psi_non_ref_sorted_idx (N_det_non_ref)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: psi_ref_lock
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer(omp_lock_kind), allocatable :: psi_ref_lock (psi_det_size)
|
||||
|
||||
File: :file:`mrcc_dress.irp.f`
|
||||
|
||||
Locks on ref determinants to fill delta_ij
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: rho_mrcc
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: dij_unique (hh_nex,N_states)
|
||||
double precision, allocatable :: rho_mrcc (N_det_non_ref,N_states)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: apply_hole_local
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine apply_hole_local(det, exc, res, ok, Nint)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: apply_particle_local
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine apply_particle_local(det, exc, res, ok, Nint)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: dec_exc
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine dec_exc(exc, h1, h2, p1, p2)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: exc_inf
|
||||
|
||||
.. code:: text
|
||||
|
||||
logical function exc_inf(exc1, exc2)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: exccmp
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function excCmp(exc1, exc2)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: exceq
|
||||
|
||||
.. code:: text
|
||||
|
||||
logical function excEq(exc1, exc2)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: find_triples_and_quadruples
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine find_triples_and_quadruples(i_generator,n_selected,det_buffer,Nint,tq,N_tq,miniList,N_miniList)
|
||||
|
||||
File: :file:`mrcc_dress.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: find_triples_and_quadruples_micro
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine find_triples_and_quadruples_micro(i_generator,n_selected,det_buffer,Nint,tq,N_tq,microlist,ptr_microlist,N_microlist,key_mask)
|
||||
|
||||
File: :file:`mrcc_dress.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_dij
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision function get_dij(det1, det2, s, Nint)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_dij_index
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision function get_dij_index(II, i, s, Nint)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_apply_mrcc
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_mrcc(delta_ij_, Nstates, Ndet_non_ref, Ndet_ref)
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_38`
|
||||
|
||||
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_mrcc_diexc
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_mrcc_diexc(key_in, key_prev, hole_1,particl_1, hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Nstates, Ndet_non_ref, Ndet_ref )
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_38`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_apply_mrcc_diexcorg
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_mrcc_diexcOrg(key_in,key_mask,hole_1,particl_1,hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Nstates, Ndet_non_ref, Ndet_ref )
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_38`
|
||||
|
||||
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_mrcc_diexcp
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_mrcc_diexcP(key_in, fs1, fh1, particl_1, fs2, fh2, particl_2, fock_diag_tmp, i_generator, iproc_in , delta_ij_, Nstates, Ndet_non_ref, Ndet_ref )
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_38`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_apply_mrcc_monoexc
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_mrcc_monoexc(key_in, hole_1,particl_1,fock_diag_tmp,i_generator,iproc_in , delta_ij_, Nstates, Ndet_non_ref, Ndet_ref )
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_38`
|
||||
|
||||
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_mrcc_pt2
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_mrcc_PT2(pt2, norm_pert, H_pert_diag, N_st)
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_38`
|
||||
|
||||
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_mrcc_pt2_diexc
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_mrcc_PT2_diexc(key_in, key_prev, hole_1,particl_1, hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in ,sum_e_2_pert_in,sum_norm_pert_in,sum_H_pert_diag_in,N_st,Nint )
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_38`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_apply_mrcc_pt2_diexcorg
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_mrcc_PT2_diexcOrg(key_in,key_mask,hole_1,particl_1,hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in ,sum_e_2_pert_in,sum_norm_pert_in,sum_H_pert_diag_in,N_st,Nint )
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_38`
|
||||
|
||||
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_mrcc_pt2_diexcp
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_mrcc_PT2_diexcP(key_in, fs1, fh1, particl_1, fs2, fh2, particl_2, fock_diag_tmp, i_generator, iproc_in ,sum_e_2_pert_in,sum_norm_pert_in,sum_H_pert_diag_in,N_st,Nint )
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_38`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_apply_mrcc_pt2_monoexc
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_mrcc_PT2_monoexc(key_in, hole_1,particl_1,fock_diag_tmp,i_generator,iproc_in ,sum_e_2_pert_in,sum_norm_pert_in,sum_H_pert_diag_in,N_st,Nint )
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_38`
|
||||
|
||||
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_mrcepa_pt2
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_mrcepa_PT2(pt2, norm_pert, H_pert_diag, N_st)
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_38`
|
||||
|
||||
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_mrcepa_pt2_diexc
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_mrcepa_PT2_diexc(key_in, key_prev, hole_1,particl_1, hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in ,sum_e_2_pert_in,sum_norm_pert_in,sum_H_pert_diag_in,N_st,Nint )
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_38`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_apply_mrcepa_pt2_diexcorg
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_mrcepa_PT2_diexcOrg(key_in,key_mask,hole_1,particl_1,hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in ,sum_e_2_pert_in,sum_norm_pert_in,sum_H_pert_diag_in,N_st,Nint )
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_38`
|
||||
|
||||
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_mrcepa_pt2_diexcp
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_mrcepa_PT2_diexcP(key_in, fs1, fh1, particl_1, fs2, fh2, particl_2, fock_diag_tmp, i_generator, iproc_in ,sum_e_2_pert_in,sum_norm_pert_in,sum_H_pert_diag_in,N_st,Nint )
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_38`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_apply_mrcepa_pt2_monoexc
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_mrcepa_PT2_monoexc(key_in, hole_1,particl_1,fock_diag_tmp,i_generator,iproc_in ,sum_e_2_pert_in,sum_norm_pert_in,sum_H_pert_diag_in,N_st,Nint )
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_38`
|
||||
|
||||
Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: is_generable
|
||||
|
||||
.. code:: text
|
||||
|
||||
logical function is_generable(det1, det2, Nint)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: mrcc_dress
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine mrcc_dress(delta_ij_, Nstates, Ndet_non_ref, Ndet_ref,i_generator,n_selected,det_buffer,Nint,iproc,key_mask)
|
||||
|
||||
File: :file:`mrcc_dress.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: searchdet
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function searchDet(dets, det, n, Nint)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: searchexc
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function searchExc(excs, exc, n)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: sort_det
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine sort_det(key, idx, N_key, Nint)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: sort_exc
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine sort_exc(key, N_key)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: tamise_exc
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine tamise_exc(key, no, n, N_key)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
Uncodumented : TODO
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: unsortedsearchdet
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function unsortedSearchDet(dets, det, n, Nint)
|
||||
|
||||
File: :file:`mrcc_utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1183,7 +1183,7 @@ Subroutines / functions
|
|||
|
||||
subroutine H_apply_mrpt(delta_ij_, Ndet)
|
||||
|
||||
File: :file:`H_apply.irp.f_shell_186`
|
||||
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.
|
||||
|
||||
|
@ -1197,7 +1197,7 @@ Subroutines / functions
|
|||
|
||||
subroutine H_apply_mrpt_1h(delta_ij_, Ndet)
|
||||
|
||||
File: :file:`H_apply.irp.f_shell_186`
|
||||
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.
|
||||
|
||||
|
@ -1211,7 +1211,7 @@ Subroutines / functions
|
|||
|
||||
subroutine H_apply_mrpt_1h1p(delta_ij_, Ndet)
|
||||
|
||||
File: :file:`H_apply.irp.f_shell_186`
|
||||
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.
|
||||
|
||||
|
@ -1225,7 +1225,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f_shell_186`
|
||||
|
||||
|
||||
|
||||
|
@ -1239,7 +1239,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
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.
|
||||
|
||||
|
@ -1253,7 +1253,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f_shell_186`
|
||||
|
||||
|
||||
|
||||
|
@ -1267,7 +1267,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
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.
|
||||
|
||||
|
@ -1281,7 +1281,7 @@ Subroutines / functions
|
|||
|
||||
subroutine H_apply_mrpt_1h2p(delta_ij_, Ndet)
|
||||
|
||||
File: :file:`H_apply.irp.f_shell_186`
|
||||
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.
|
||||
|
||||
|
@ -1295,7 +1295,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f_shell_186`
|
||||
|
||||
|
||||
|
||||
|
@ -1309,7 +1309,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
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.
|
||||
|
||||
|
@ -1323,7 +1323,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f_shell_186`
|
||||
|
||||
|
||||
|
||||
|
@ -1337,7 +1337,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
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.
|
||||
|
||||
|
@ -1351,7 +1351,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f_shell_186`
|
||||
|
||||
|
||||
|
||||
|
@ -1365,7 +1365,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
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.
|
||||
|
||||
|
@ -1379,7 +1379,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f_shell_186`
|
||||
|
||||
|
||||
|
||||
|
@ -1393,7 +1393,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
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.
|
||||
|
||||
|
@ -1407,7 +1407,7 @@ Subroutines / functions
|
|||
|
||||
subroutine H_apply_mrpt_1p(delta_ij_, Ndet)
|
||||
|
||||
File: :file:`H_apply.irp.f_shell_186`
|
||||
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.
|
||||
|
||||
|
@ -1421,7 +1421,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f_shell_186`
|
||||
|
||||
|
||||
|
||||
|
@ -1435,7 +1435,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
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.
|
||||
|
||||
|
@ -1449,7 +1449,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f_shell_186`
|
||||
|
||||
|
||||
|
||||
|
@ -1463,7 +1463,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
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.
|
||||
|
||||
|
@ -1477,7 +1477,7 @@ Subroutines / functions
|
|||
|
||||
subroutine H_apply_mrpt_2h(delta_ij_, Ndet)
|
||||
|
||||
File: :file:`H_apply.irp.f_shell_186`
|
||||
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.
|
||||
|
||||
|
@ -1491,7 +1491,7 @@ Subroutines / functions
|
|||
|
||||
subroutine H_apply_mrpt_2h1p(delta_ij_, Ndet)
|
||||
|
||||
File: :file:`H_apply.irp.f_shell_186`
|
||||
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.
|
||||
|
||||
|
@ -1505,7 +1505,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f_shell_186`
|
||||
|
||||
|
||||
|
||||
|
@ -1519,7 +1519,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
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.
|
||||
|
||||
|
@ -1533,7 +1533,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f_shell_186`
|
||||
|
||||
|
||||
|
||||
|
@ -1547,7 +1547,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
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.
|
||||
|
||||
|
@ -1561,7 +1561,7 @@ Subroutines / functions
|
|||
|
||||
subroutine H_apply_mrpt_2h2p(delta_ij_, Ndet)
|
||||
|
||||
File: :file:`H_apply.irp.f_shell_186`
|
||||
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.
|
||||
|
||||
|
@ -1575,7 +1575,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f_shell_186`
|
||||
|
||||
|
||||
|
||||
|
@ -1589,7 +1589,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
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.
|
||||
|
||||
|
@ -1603,7 +1603,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f_shell_186`
|
||||
|
||||
|
||||
|
||||
|
@ -1617,7 +1617,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
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.
|
||||
|
||||
|
@ -1631,7 +1631,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f_shell_186`
|
||||
|
||||
|
||||
|
||||
|
@ -1645,7 +1645,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
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.
|
||||
|
||||
|
@ -1659,7 +1659,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f_shell_186`
|
||||
|
||||
|
||||
|
||||
|
@ -1673,7 +1673,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
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.
|
||||
|
||||
|
@ -1687,7 +1687,7 @@ Subroutines / functions
|
|||
|
||||
subroutine H_apply_mrpt_2p(delta_ij_, Ndet)
|
||||
|
||||
File: :file:`H_apply.irp.f_shell_186`
|
||||
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.
|
||||
|
||||
|
@ -1701,7 +1701,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f_shell_186`
|
||||
|
||||
|
||||
|
||||
|
@ -1715,7 +1715,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
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.
|
||||
|
||||
|
@ -1729,7 +1729,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f_shell_186`
|
||||
|
||||
|
||||
|
||||
|
@ -1743,7 +1743,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
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.
|
||||
|
||||
|
@ -1757,7 +1757,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f_shell_186`
|
||||
|
||||
|
||||
|
||||
|
@ -1771,7 +1771,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
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.
|
||||
|
||||
|
@ -1785,7 +1785,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`h_apply.irp.f_shell_186`
|
||||
|
||||
|
||||
|
||||
|
@ -1799,7 +1799,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
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.
|
||||
|
||||
|
|
|
@ -288,48 +288,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -456,48 +414,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -560,7 +476,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`pt2_equations.irp.f_template_413`
|
||||
|
||||
|
||||
|
||||
|
@ -574,7 +490,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`pt2_equations.irp.f_template_413`
|
||||
|
||||
Dummy perturbation to add all connected determinants.
|
||||
|
||||
|
@ -588,7 +504,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`pt2_equations.irp.f_template_413`
|
||||
|
||||
compute the standard Epstein-Nesbet perturbative first order coefficient and second order energetic contribution
|
||||
for the various N_st states.
|
||||
|
@ -606,7 +522,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`pt2_equations.irp.f_template_413`
|
||||
|
||||
compute the Epstein-Nesbet 2x2 diagonalization coefficient and energetic contribution
|
||||
for the various N_st states.
|
||||
|
@ -624,7 +540,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`pt2_equations.irp.f_template_413`
|
||||
|
||||
compute the Epstein-Nesbet 2x2 diagonalization coefficient and energetic contribution
|
||||
for the various N_st states.
|
||||
|
@ -636,72 +552,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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) = <psi(i)|H|det_pert>/( E(i) - <det_pert|H|det_pert> )
|
||||
e_2_pert(i) = <psi(i)|H|det_pert>^2/( E(i) - <det_pert|H|det_pert> )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. 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 = <psi_i|H|det_pert>^2/(Delta_E)
|
||||
and also the purely projected contribution
|
||||
H_pert_diag = <HF|H|det_pert> 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 = <psi_i|H|det_pert>^2/(Delta_E)
|
||||
and also the purely projected contribution
|
||||
H_pert_diag = <HF|H|det_pert> c_pert
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: pt2_h_core
|
||||
|
||||
.. code:: text
|
||||
|
@ -726,7 +576,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`pt2_equations.irp.f_template_413`
|
||||
|
||||
compute the standard Moller-Plesset perturbative first order coefficient and second order energetic contribution
|
||||
for the various n_st states.
|
||||
|
@ -744,7 +594,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`pt2_equations.irp.f_template_413`
|
||||
|
||||
compute the general Moller-Plesset perturbative first order coefficient and second order energetic contribution
|
||||
for the various n_st states.
|
||||
|
@ -762,7 +612,7 @@ Subroutines / functions
|
|||
|
||||
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`
|
||||
File: :file:`pt2_equations.irp.f_template_413`
|
||||
|
||||
compute the QDPT first order coefficient and second order energetic contribution
|
||||
for the various N_st states.
|
||||
|
|
|
@ -18,20 +18,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. c:function:: provide_everything
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine provide_everything
|
||||
|
||||
File: :file:`slave_cipsi.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: qp_ao_ints
|
||||
|
||||
.. code:: text
|
||||
|
@ -46,20 +32,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. c:function:: run_wf
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine run_wf
|
||||
|
||||
File: :file:`slave_cipsi.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: slave
|
||||
|
||||
.. code:: text
|
||||
|
|
|
@ -247,98 +247,13 @@ Providers
|
|||
|
||||
|
||||
|
||||
.. c:var:: progress_active
|
||||
|
||||
.. code:: text
|
||||
|
||||
real, allocatable :: progress_bar (2)
|
||||
integer :: progress_timeout
|
||||
logical :: progress_active
|
||||
double precision :: progress_value
|
||||
character*(20) :: progress_title
|
||||
|
||||
File: :file:`progress.irp.f`
|
||||
|
||||
Current status for displaying progress bars. Global variable.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: progress_bar
|
||||
|
||||
.. code:: text
|
||||
|
||||
real, allocatable :: progress_bar (2)
|
||||
integer :: progress_timeout
|
||||
logical :: progress_active
|
||||
double precision :: progress_value
|
||||
character*(20) :: progress_title
|
||||
|
||||
File: :file:`progress.irp.f`
|
||||
|
||||
Current status for displaying progress bars. Global variable.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: progress_timeout
|
||||
|
||||
.. code:: text
|
||||
|
||||
real, allocatable :: progress_bar (2)
|
||||
integer :: progress_timeout
|
||||
logical :: progress_active
|
||||
double precision :: progress_value
|
||||
character*(20) :: progress_title
|
||||
|
||||
File: :file:`progress.irp.f`
|
||||
|
||||
Current status for displaying progress bars. Global variable.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: progress_title
|
||||
|
||||
.. code:: text
|
||||
|
||||
real, allocatable :: progress_bar (2)
|
||||
integer :: progress_timeout
|
||||
logical :: progress_active
|
||||
double precision :: progress_value
|
||||
character*(20) :: progress_title
|
||||
|
||||
File: :file:`progress.irp.f`
|
||||
|
||||
Current status for displaying progress bars. Global variable.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: progress_value
|
||||
|
||||
.. code:: text
|
||||
|
||||
real, allocatable :: progress_bar (2)
|
||||
integer :: progress_timeout
|
||||
logical :: progress_active
|
||||
double precision :: progress_value
|
||||
character*(20) :: progress_title
|
||||
|
||||
File: :file:`progress.irp.f`
|
||||
|
||||
Current status for displaying progress bars. Global variable.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: qp_max_mem
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: qp_max_mem
|
||||
|
||||
File: :file:`util.irp.f`
|
||||
File: :file:`memory.irp.f`
|
||||
|
||||
Maximum memory in Gb
|
||||
|
||||
|
@ -410,19 +325,6 @@ Providers
|
|||
|
||||
|
||||
|
||||
.. c:var:: run_progress
|
||||
|
||||
.. code:: text
|
||||
|
||||
recursive subroutine run_progress
|
||||
|
||||
File: :file:`progress.irp.f`
|
||||
|
||||
Display a progress bar with documentation of what is happening
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: theta_angular_integration_lebedev
|
||||
|
||||
.. code:: text
|
||||
|
@ -519,7 +421,7 @@ Subroutines / functions
|
|||
|
||||
subroutine apply_rotation(A,LDA,R,LDR,B,LDB,m,n)
|
||||
|
||||
File: :file:`LinearAlgebra.irp.f`
|
||||
File: :file:`linear_algebra.irp.f`
|
||||
|
||||
Apply the rotation found by find_rotation
|
||||
|
||||
|
@ -571,6 +473,20 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. c:function:: check_mem
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine check_mem(rss_in,routine)
|
||||
|
||||
File: :file:`memory.irp.f`
|
||||
|
||||
Checks if n gigabytes can be allocated. If not, exit the run.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: dble_fact
|
||||
|
||||
.. code:: text
|
||||
|
@ -745,7 +661,7 @@ Subroutines / functions
|
|||
|
||||
subroutine find_rotation(A,LDA,B,m,C,n)
|
||||
|
||||
File: :file:`LinearAlgebra.irp.f`
|
||||
File: :file:`linear_algebra.irp.f`
|
||||
|
||||
Find A.C = B
|
||||
|
||||
|
@ -829,7 +745,7 @@ Subroutines / functions
|
|||
|
||||
subroutine get_inverse(A,LDA,m,C,LDC)
|
||||
|
||||
File: :file:`LinearAlgebra.irp.f`
|
||||
File: :file:`linear_algebra.irp.f`
|
||||
|
||||
Returns the inverse of the square matrix A
|
||||
|
||||
|
@ -843,7 +759,7 @@ Subroutines / functions
|
|||
|
||||
subroutine get_pseudo_inverse(A,LDA,m,n,C,LDC)
|
||||
|
||||
File: :file:`LinearAlgebra.irp.f`
|
||||
File: :file:`linear_algebra.irp.f`
|
||||
|
||||
Find C = A^-1
|
||||
|
||||
|
@ -1334,25 +1250,7 @@ Subroutines / functions
|
|||
|
||||
subroutine lapack_diag(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) = <i|psi_j> 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`
|
||||
File: :file:`linear_algebra.irp.f`
|
||||
|
||||
Diagonalize matrix H
|
||||
H is untouched between input and ouptut
|
||||
|
@ -1370,25 +1268,7 @@ Subroutines / functions
|
|||
|
||||
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) = <i|psi_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`
|
||||
File: :file:`linear_algebra.irp.f`
|
||||
|
||||
Diagonalize matrix H
|
||||
H is untouched between input and ouptut
|
||||
|
@ -1456,15 +1336,29 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. c:function:: matrix_vector_product
|
||||
.. c:function:: memory_of_double
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine matrix_vector_product(u0,u1,matrix,sze,lda)
|
||||
double precision function memory_of_double(n)
|
||||
|
||||
File: :file:`LinearAlgebra.irp.f`
|
||||
File: :file:`memory.irp.f`
|
||||
|
||||
performs u1 =! performs u1 +( u0 * matrix)
|
||||
Computes the memory required for n double precision elements in gigabytes.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: memory_of_int
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision function memory_of_int(n)
|
||||
|
||||
File: :file:`memory.irp.f`
|
||||
|
||||
Computes the memory required for n double precision elements in gigabytes.
|
||||
|
||||
|
||||
|
||||
|
@ -1504,7 +1398,7 @@ Subroutines / functions
|
|||
|
||||
subroutine ortho_canonical(overlap,LDA,N,C,LDC,m)
|
||||
|
||||
File: :file:`LinearAlgebra.irp.f`
|
||||
File: :file:`linear_algebra.irp.f`
|
||||
|
||||
Compute C_new=C_old.U.s^-1/2 canonical orthogonalization.
|
||||
overlap : overlap matrix
|
||||
|
@ -1525,7 +1419,7 @@ Subroutines / functions
|
|||
|
||||
subroutine ortho_lowdin(overlap,LDA,N,C,LDC,m)
|
||||
|
||||
File: :file:`LinearAlgebra.irp.f`
|
||||
File: :file:`linear_algebra.irp.f`
|
||||
|
||||
Compute C_new=C_old.S^-1/2 orthogonalization.
|
||||
overlap : overlap matrix
|
||||
|
@ -1546,7 +1440,7 @@ Subroutines / functions
|
|||
|
||||
subroutine ortho_qr(A,LDA,m,n)
|
||||
|
||||
File: :file:`LinearAlgebra.irp.f`
|
||||
File: :file:`linear_algebra.irp.f`
|
||||
|
||||
Orthogonalization using Q.R factorization
|
||||
A : matrix to orthogonalize
|
||||
|
@ -1565,7 +1459,7 @@ Subroutines / functions
|
|||
|
||||
subroutine ortho_qr_unblocked(A,LDA,m,n)
|
||||
|
||||
File: :file:`LinearAlgebra.irp.f`
|
||||
File: :file:`linear_algebra.irp.f`
|
||||
|
||||
Orthogonalization using Q.R factorization
|
||||
A : matrix to orthogonalize
|
||||
|
@ -1578,20 +1472,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -1624,6 +1504,20 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. c:function:: print_memory_usage
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine print_memory_usage()
|
||||
|
||||
File: :file:`memory.irp.f`
|
||||
|
||||
Prints the memory usage in the output
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: quick_dsort
|
||||
|
||||
.. code:: text
|
||||
|
@ -1708,6 +1602,20 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. c:function:: resident_memory
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine resident_memory(value)
|
||||
|
||||
File: :file:`memory.irp.f`
|
||||
|
||||
Returns the current used memory in gigabytes used by the current process.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: rint
|
||||
|
||||
.. code:: text
|
||||
|
@ -1836,20 +1744,6 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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
|
||||
|
@ -1934,41 +1828,13 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. 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`
|
||||
File: :file:`linear_algebra.irp.f`
|
||||
|
||||
Compute A = U.D.Vt
|
||||
LDx : leftmost dimension of x
|
||||
|
@ -1979,6 +1845,20 @@ Subroutines / functions
|
|||
|
||||
|
||||
|
||||
.. c:function:: total_memory
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine total_memory(value)
|
||||
|
||||
File: :file:`memory.irp.f`
|
||||
|
||||
Returns the current used memory in gigabytes used by the current process.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: u_dot_u
|
||||
|
||||
.. code:: text
|
||||
|
|
|
@ -3,6 +3,10 @@ Index of Providers
|
|||
|
||||
* :c:data:`abs_psi_coef_max`
|
||||
* :c:data:`abs_psi_coef_min`
|
||||
* :c:data:`active_excitation_to_determinants_idx`
|
||||
* :c:data:`active_excitation_to_determinants_val`
|
||||
* :c:data:`active_hh_idx`
|
||||
* :c:data:`active_pp_idx`
|
||||
* :c:data:`ao_bi_elec_integral_alpha`
|
||||
* :c:data:`ao_bi_elec_integral_beta`
|
||||
* :c:data:`ao_bielec_integral_schwartz`
|
||||
|
@ -95,10 +99,14 @@ Index of Providers
|
|||
* :c:data:`ci_dressed_pt2_new_eigenvectors_s2`
|
||||
* :c:data:`ci_dressed_pt2_new_energy`
|
||||
* :c:data:`ci_eigenvectors`
|
||||
* :c:data:`ci_eigenvectors_dressed`
|
||||
* :c:data:`ci_eigenvectors_s2`
|
||||
* :c:data:`ci_eigenvectors_s2_dressed`
|
||||
* :c:data:`ci_electronic_dressed_pt2_new_energy`
|
||||
* :c:data:`ci_electronic_energy`
|
||||
* :c:data:`ci_electronic_energy_dressed`
|
||||
* :c:data:`ci_energy`
|
||||
* :c:data:`ci_energy_dressed`
|
||||
* :c:data:`closed_shell_ref_bitmask`
|
||||
* :c:data:`coef_hf_selector`
|
||||
* :c:data:`core_bitmask`
|
||||
|
@ -113,14 +121,18 @@ Index of Providers
|
|||
* :c:data:`degree_max_generators`
|
||||
* :c:data:`degree_max_integration_lebedev`
|
||||
* :c:data:`delta_e_per_selector`
|
||||
* :c:data:`delta_ij`
|
||||
* :c:data:`delta_ij_mrpt`
|
||||
* :c:data:`delta_ij_tmp`
|
||||
* :c:data:`det_alpha_norm`
|
||||
* :c:data:`det_beta_norm`
|
||||
* :c:data:`det_to_occ_pattern`
|
||||
* :c:data:`dia_hla_`
|
||||
* :c:data:`dia_sla_`
|
||||
* :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:`dij`
|
||||
* :c:data:`dij_unique`
|
||||
* :c:data:`disk_access_ao_integrals`
|
||||
* :c:data:`disk_access_ao_one_integrals`
|
||||
* :c:data:`disk_access_mo_integrals`
|
||||
|
@ -134,6 +146,21 @@ Index of Providers
|
|||
* :c:data:`do_third_order_1h1p`
|
||||
* :c:data:`double_exc_bitmask`
|
||||
* :c:data:`double_index_selectors`
|
||||
* :c:data:`dress_dot_f`
|
||||
* :c:data:`dress_dot_n_0`
|
||||
* :c:data:`dress_dot_t`
|
||||
* :c:data:`dress_e`
|
||||
* :c:data:`dress_e0_denominator`
|
||||
* :c:data:`dress_m_m`
|
||||
* :c:data:`dress_m_mi`
|
||||
* :c:data:`dress_n_cp`
|
||||
* :c:data:`dress_n_cp_max`
|
||||
* :c:data:`dress_p`
|
||||
* :c:data:`dress_r1`
|
||||
* :c:data:`dress_r1_`
|
||||
* :c:data:`dress_relative_error`
|
||||
* :c:data:`dress_stoch_istate`
|
||||
* :c:data:`dress_t`
|
||||
* :c:data:`dressed_column_idx`
|
||||
* :c:data:`dressing_column_h`
|
||||
* :c:data:`dressing_column_s`
|
||||
|
@ -154,6 +181,7 @@ Index of Providers
|
|||
* :c:data:`energy_cas_dyall_no_exchange`
|
||||
* :c:data:`energy_iterations`
|
||||
* :c:data:`exc_degree_per_selectors`
|
||||
* :c:data:`excs_`
|
||||
* :c:data:`expected_s2`
|
||||
* :c:data:`extrapolate_fock_matrix`
|
||||
* :c:data:`extrapolated_energy`
|
||||
|
@ -197,12 +225,19 @@ Index of Providers
|
|||
* :c:data:`h_apply_buffer_lock`
|
||||
* :c:data:`h_matrix_all_dets`
|
||||
* :c:data:`h_matrix_cas`
|
||||
* :c:data:`h_matrix_dressed`
|
||||
* :c:data:`h_matrix_ref`
|
||||
* :c:data:`has_a_unique_parent`
|
||||
* :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:`hh_exists`
|
||||
* :c:data:`hh_nex`
|
||||
* :c:data:`hh_shortcut`
|
||||
* :c:data:`hij_cache_`
|
||||
* :c:data:`hij_mrcc`
|
||||
* :c:data:`hmatrix_dressed_pt2_new`
|
||||
* :c:data:`hmatrix_dressed_pt2_new_symmetrized`
|
||||
* :c:data:`holes_operators`
|
||||
|
@ -219,6 +254,7 @@ Index of Providers
|
|||
* :c:data:`i_x2_new`
|
||||
* :c:data:`i_x2_pol_mult`
|
||||
* :c:data:`i_x2_pol_mult_mono_elec`
|
||||
* :c:data:`idx_buf`
|
||||
* :c:data:`idx_cas`
|
||||
* :c:data:`idx_non_cas`
|
||||
* :c:data:`idx_non_ref`
|
||||
|
@ -232,6 +268,7 @@ Index of Providers
|
|||
* :c:data:`inertia_tensor`
|
||||
* :c:data:`inertia_tensor_eigenvalues`
|
||||
* :c:data:`inertia_tensor_eigenvectors`
|
||||
* :c:data:`initialize_dress_e0_denominator`
|
||||
* :c:data:`initialize_pt2_e0_denominator`
|
||||
* :c:data:`insert_into_mo_integrals_map`
|
||||
* :c:data:`inv_int`
|
||||
|
@ -240,9 +277,14 @@ Index of Providers
|
|||
* :c:data:`inv_selectors_coef_hf_squared`
|
||||
* :c:data:`iradix_sort`
|
||||
* :c:data:`iradix_sort_big`
|
||||
* :c:data:`is_active_exc`
|
||||
* :c:data:`kinetic_ref_bitmask_energy`
|
||||
* :c:data:`l3_weight`
|
||||
* :c:data:`l_to_charater`
|
||||
* :c:data:`lambda_mrcc`
|
||||
* :c:data:`lambda_mrcc_kept`
|
||||
* :c:data:`lambda_mrcc_pt2`
|
||||
* :c:data:`lambda_type`
|
||||
* :c:data:`level_shift`
|
||||
* :c:data:`list_act`
|
||||
* :c:data:`list_act_reverse`
|
||||
|
@ -304,6 +346,11 @@ Index of Providers
|
|||
* :c:data:`mpi_master`
|
||||
* :c:data:`mpi_rank`
|
||||
* :c:data:`mpi_size`
|
||||
* :c:data:`mrcc_ata_ind`
|
||||
* :c:data:`mrcc_ata_val`
|
||||
* :c:data:`mrcc_col_shortcut`
|
||||
* :c:data:`mrcc_n_col`
|
||||
* :c:data:`mrmode`
|
||||
* :c:data:`n_act_orb`
|
||||
* :c:data:`n_aos_max`
|
||||
* :c:data:`n_cas_bitmask`
|
||||
|
@ -315,26 +362,32 @@ Index of Providers
|
|||
* :c:data:`n_det_alpha_unique`
|
||||
* :c:data:`n_det_beta_unique`
|
||||
* :c:data:`n_det_cas`
|
||||
* :c:data:`n_det_delta_ij`
|
||||
* :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_ex_exists`
|
||||
* :c:data:`n_exc_active`
|
||||
* :c:data:`n_exc_active_sze`
|
||||
* :c:data:`n_generators_bitmask`
|
||||
* :c:data:`n_generators_bitmask_restart`
|
||||
* :c:data:`n_hh_exists`
|
||||
* :c:data:`n_inact_orb`
|
||||
* :c:data:`n_inact_orb_allocate`
|
||||
* :c:data:`n_int`
|
||||
* :c:data:`n_it_max_dressed_ci`
|
||||
* :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_pp_exists`
|
||||
* :c:data:`n_pt_max_i_x`
|
||||
* :c:data:`n_pt_max_integrals`
|
||||
* :c:data:`n_single_exc_bitmasks`
|
||||
|
@ -390,17 +443,16 @@ Index of Providers
|
|||
* :c:data:`one_body_spin_density_mo`
|
||||
* :c:data:`one_creat`
|
||||
* :c:data:`one_creat_virt`
|
||||
* :c:data:`only_expected_s2`
|
||||
* :c:data:`output_cpu_time_0`
|
||||
* :c:data:`output_wall_time_0`
|
||||
* :c:data:`overlap_gaussian_xyz`
|
||||
* :c:data:`particles_operators`
|
||||
* :c:data:`perturbative_triples`
|
||||
* :c:data:`phases_`
|
||||
* :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:`pp_exists`
|
||||
* :c:data:`pseudo_dz_k`
|
||||
* :c:data:`pseudo_dz_k_transp`
|
||||
* :c:data:`pseudo_dz_kl`
|
||||
|
@ -463,6 +515,7 @@ Index of Providers
|
|||
* :c:data:`psi_det_sorted_order`
|
||||
* :c:data:`psi_energy`
|
||||
* :c:data:`psi_energy_with_nucl_rep`
|
||||
* :c:data:`psi_from_sorted_gen`
|
||||
* :c:data:`psi_non_cas`
|
||||
* :c:data:`psi_non_cas_coef`
|
||||
* :c:data:`psi_non_cas_coef_sorted_bit`
|
||||
|
@ -474,7 +527,9 @@ Index of Providers
|
|||
* :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`
|
||||
* :c:data:`psi_non_ref_sorted_bit`
|
||||
* :c:data:`psi_non_ref_sorted_idx`
|
||||
* :c:data:`psi_occ_pattern`
|
||||
* :c:data:`psi_occ_pattern_hii`
|
||||
* :c:data:`psi_ref`
|
||||
|
@ -487,8 +542,11 @@ Index of Providers
|
|||
* :c:data:`psi_ref_coef_restart`
|
||||
* :c:data:`psi_ref_coef_sorted_bit`
|
||||
* :c:data:`psi_ref_coef_transp`
|
||||
* :c:data:`psi_ref_detsorted`
|
||||
* :c:data:`psi_ref_detsorted_idx`
|
||||
* :c:data:`psi_ref_energy`
|
||||
* :c:data:`psi_ref_energy_diagonalized`
|
||||
* :c:data:`psi_ref_lock`
|
||||
* :c:data:`psi_ref_restart`
|
||||
* :c:data:`psi_ref_sorted_bit`
|
||||
* :c:data:`psi_selectors`
|
||||
|
@ -501,6 +559,7 @@ Index of Providers
|
|||
* :c:data:`pt2_f`
|
||||
* :c:data:`pt2_iterations`
|
||||
* :c:data:`pt2_j`
|
||||
* :c:data:`pt2_j_`
|
||||
* :c:data:`pt2_max`
|
||||
* :c:data:`pt2_mindetinfirstteeth`
|
||||
* :c:data:`pt2_n_0`
|
||||
|
@ -534,7 +593,7 @@ Index of Providers
|
|||
* :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:`rho_mrcc`
|
||||
* :c:data:`s2_eig`
|
||||
* :c:data:`s2_values`
|
||||
* :c:data:`s_half`
|
||||
|
@ -557,6 +616,7 @@ Index of Providers
|
|||
* :c:data:`selection_criterion`
|
||||
* :c:data:`selection_criterion_factor`
|
||||
* :c:data:`selection_criterion_min`
|
||||
* :c:data:`sij_cache_`
|
||||
* :c:data:`single_exc_bitmask`
|
||||
* :c:data:`singles_alpha_csc`
|
||||
* :c:data:`singles_alpha_csc_idx`
|
||||
|
@ -569,13 +629,14 @@ Index of Providers
|
|||
* :c:data:`slater_bragg_radii_ua`
|
||||
* :c:data:`slater_bragg_type_inter_distance`
|
||||
* :c:data:`slater_bragg_type_inter_distance_ua`
|
||||
* :c:data:`sorted_mini`
|
||||
* :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_dressed_ci`
|
||||
* :c:data:`thresh_scf`
|
||||
* :c:data:`threshold_davidson`
|
||||
* :c:data:`threshold_diis`
|
||||
|
@ -585,17 +646,6 @@ Index of Providers
|
|||
* :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`
|
||||
|
@ -633,7 +683,8 @@ Index of Subroutines/Functions
|
|||
* :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:`alpha_callback`
|
||||
* :c:func:`alpha_callback_mask`
|
||||
* :c:func:`ao_bielec_integral`
|
||||
* :c:func:`ao_bielec_integral_schwartz_accel`
|
||||
* :c:func:`ao_bielec_integrals_in_map_collector`
|
||||
|
@ -647,9 +698,11 @@ Index of Subroutines/Functions
|
|||
* :c:func:`ao_value`
|
||||
* :c:func:`apply_excitation`
|
||||
* :c:func:`apply_hole`
|
||||
* :c:func:`apply_hole_local`
|
||||
* :c:func:`apply_holes`
|
||||
* :c:func:`apply_mono`
|
||||
* :c:func:`apply_particle`
|
||||
* :c:func:`apply_particle_local`
|
||||
* :c:func:`apply_particles`
|
||||
* :c:func:`apply_rotation`
|
||||
* :c:func:`approx_dble`
|
||||
|
@ -661,7 +714,6 @@ Index of Subroutines/Functions
|
|||
* :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`
|
||||
|
@ -669,19 +721,13 @@ Index of Subroutines/Functions
|
|||
* :c:func:`broadcast_chunks_integer`
|
||||
* :c:func:`broadcast_chunks_integer8`
|
||||
* :c:func:`build_fock_tmp`
|
||||
* :c:func:`check_mem`
|
||||
* :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`
|
||||
|
@ -690,13 +736,16 @@ Index of Subroutines/Functions
|
|||
* :c:func:`copy_h_apply_buffer_to_wf`
|
||||
* :c:func:`copy_psi_bilinear_to_psi`
|
||||
* :c:func:`coulomb_value_no_check`
|
||||
* :c:func:`count_d1`
|
||||
* :c:func:`count_d2`
|
||||
* :c:func:`count_pq`
|
||||
* :c:func:`create_guess`
|
||||
* :c:func:`create_indexes`
|
||||
* :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`
|
||||
|
@ -714,9 +763,9 @@ Index of Subroutines/Functions
|
|||
* :c:func:`ddfact2`
|
||||
* :c:func:`debug_det`
|
||||
* :c:func:`debug_spindet`
|
||||
* :c:func:`dec_exc`
|
||||
* :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`
|
||||
|
@ -729,13 +778,18 @@ Index of Subroutines/Functions
|
|||
* :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:`diagonalize_ci_dressed`
|
||||
* :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:`dress_collector`
|
||||
* :c:func:`dress_find_sample`
|
||||
* :c:func:`dress_slave`
|
||||
* :c:func:`dress_slave_inproc`
|
||||
* :c:func:`dress_slave_tcp`
|
||||
* :c:func:`dress_with_alpha_buffer`
|
||||
* :c:func:`dress_with_alpha_buffer_neu`
|
||||
* :c:func:`dress_zmq`
|
||||
* :c:func:`dset_order`
|
||||
* :c:func:`dset_order_big`
|
||||
* :c:func:`dsort`
|
||||
|
@ -749,6 +803,9 @@ Index of Subroutines/Functions
|
|||
* :c:func:`end_zmq_to_qp_run_socket`
|
||||
* :c:func:`erf0`
|
||||
* :c:func:`eri`
|
||||
* :c:func:`exc_inf`
|
||||
* :c:func:`exccmp`
|
||||
* :c:func:`exceq`
|
||||
* :c:func:`extract_ref`
|
||||
* :c:func:`extrapolate_data`
|
||||
* :c:func:`f_integral`
|
||||
|
@ -759,12 +816,11 @@ Index of Subroutines/Functions
|
|||
* :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:`find_triples_and_quadruples`
|
||||
* :c:func:`find_triples_and_quadruples_micro`
|
||||
* :c:func:`four_idx`
|
||||
* :c:func:`gammln`
|
||||
* :c:func:`gammp`
|
||||
|
@ -773,6 +829,8 @@ Index of Subroutines/Functions
|
|||
* :c:func:`gaussian_product_x`
|
||||
* :c:func:`gcf`
|
||||
* :c:func:`generate_all_alpha_beta_det_products`
|
||||
* :c:func:`generate_singles_and_doubles`
|
||||
* :c:func:`generator_start`
|
||||
* :c:func:`get_all_spin_doubles`
|
||||
* :c:func:`get_all_spin_doubles_1`
|
||||
* :c:func:`get_all_spin_doubles_2`
|
||||
|
@ -800,23 +858,19 @@ Index of Subroutines/Functions
|
|||
* :c:func:`get_d2`
|
||||
* :c:func:`get_delta_e_dyall`
|
||||
* :c:func:`get_delta_e_dyall_general_mp`
|
||||
* :c:func:`get_dij`
|
||||
* :c:func:`get_dij_index`
|
||||
* :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`
|
||||
|
@ -835,8 +889,6 @@ Index of Subroutines/Functions
|
|||
* :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`
|
||||
|
@ -844,7 +896,6 @@ Index of Subroutines/Functions
|
|||
* :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`
|
||||
|
@ -862,18 +913,15 @@ Index of Subroutines/Functions
|
|||
* :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`
|
||||
|
@ -886,6 +934,21 @@ Index of Subroutines/Functions
|
|||
* :c:func:`h_apply_cisd_diexcorg`
|
||||
* :c:func:`h_apply_cisd_diexcp`
|
||||
* :c:func:`h_apply_cisd_monoexc`
|
||||
* :c:func:`h_apply_mrcc`
|
||||
* :c:func:`h_apply_mrcc_diexc`
|
||||
* :c:func:`h_apply_mrcc_diexcorg`
|
||||
* :c:func:`h_apply_mrcc_diexcp`
|
||||
* :c:func:`h_apply_mrcc_monoexc`
|
||||
* :c:func:`h_apply_mrcc_pt2`
|
||||
* :c:func:`h_apply_mrcc_pt2_diexc`
|
||||
* :c:func:`h_apply_mrcc_pt2_diexcorg`
|
||||
* :c:func:`h_apply_mrcc_pt2_diexcp`
|
||||
* :c:func:`h_apply_mrcc_pt2_monoexc`
|
||||
* :c:func:`h_apply_mrcepa_pt2`
|
||||
* :c:func:`h_apply_mrcepa_pt2_diexc`
|
||||
* :c:func:`h_apply_mrcepa_pt2_diexcorg`
|
||||
* :c:func:`h_apply_mrcepa_pt2_diexcp`
|
||||
* :c:func:`h_apply_mrcepa_pt2_monoexc`
|
||||
* :c:func:`h_apply_mrpt`
|
||||
* :c:func:`h_apply_mrpt_1h`
|
||||
* :c:func:`h_apply_mrpt_1h1p`
|
||||
|
@ -939,7 +1002,6 @@ Index of Subroutines/Functions
|
|||
* :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`
|
||||
|
@ -965,21 +1027,15 @@ Index of Subroutines/Functions
|
|||
* :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`
|
||||
|
@ -1002,6 +1058,7 @@ Index of Subroutines/Functions
|
|||
* :c:func:`is_a_two_holes_two_particles`
|
||||
* :c:func:`is_connected_to`
|
||||
* :c:func:`is_connected_to_by_mono`
|
||||
* :c:func:`is_generable`
|
||||
* :c:func:`is_generable_cassd`
|
||||
* :c:func:`is_i_in_virtual`
|
||||
* :c:func:`is_in_psi_ref`
|
||||
|
@ -1013,9 +1070,7 @@ Index of Subroutines/Functions
|
|||
* :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`
|
||||
|
@ -1025,29 +1080,25 @@ Index of Subroutines/Functions
|
|||
* :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:`memory_of_double`
|
||||
* :c:func:`memory_of_int`
|
||||
* :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:`mpi_print`
|
||||
* :c:func:`mrcc_dress`
|
||||
* :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`
|
||||
|
@ -1068,12 +1119,10 @@ Index of Subroutines/Functions
|
|||
* :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`
|
||||
|
@ -1083,9 +1132,6 @@ Index of Subroutines/Functions
|
|||
* :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`
|
||||
|
@ -1095,24 +1141,21 @@ Index of Subroutines/Functions
|
|||
* :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_memory_usage`
|
||||
* :c:func:`print_mos`
|
||||
* :c:func:`print_spindet`
|
||||
* :c:func:`print_summary`
|
||||
* :c:func:`provide_all_mo_integrals`
|
||||
* :c:func:`provide_all`
|
||||
* :c:func:`provide_everything`
|
||||
* :c:func:`pt2_collector`
|
||||
* :c:func:`pt2_decontracted`
|
||||
|
@ -1120,9 +1163,6 @@ Index of Subroutines/Functions
|
|||
* :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`
|
||||
|
@ -1131,9 +1171,11 @@ Index of Subroutines/Functions
|
|||
* :c:func:`pt2_qdpt`
|
||||
* :c:func:`pt2_slave_inproc`
|
||||
* :c:func:`pt2_stoch`
|
||||
* :c:func:`pull_dress_results`
|
||||
* :c:func:`pull_pt2`
|
||||
* :c:func:`pull_pt2_results`
|
||||
* :c:func:`pull_selection_results`
|
||||
* :c:func:`push_dress_results`
|
||||
* :c:func:`push_integrals`
|
||||
* :c:func:`push_pt2`
|
||||
* :c:func:`push_pt2_results`
|
||||
|
@ -1150,6 +1192,7 @@ Index of Subroutines/Functions
|
|||
* :c:func:`remove_small_contributions`
|
||||
* :c:func:`repeat_all_e_corr`
|
||||
* :c:func:`reset_zmq_addresses`
|
||||
* :c:func:`resident_memory`
|
||||
* :c:func:`resize_h_apply_buffer`
|
||||
* :c:func:`rint`
|
||||
* :c:func:`rint1`
|
||||
|
@ -1159,8 +1202,12 @@ Index of Subroutines/Functions
|
|||
* :c:func:`rintgauss`
|
||||
* :c:func:`roothaan_hall_scf`
|
||||
* :c:func:`run`
|
||||
* :c:func:`run_dress_slave`
|
||||
* :c:func:`run_dressing`
|
||||
* :c:func:`run_pt2`
|
||||
* :c:func:`run_pt2_slave`
|
||||
* :c:func:`run_selection_slave`
|
||||
* :c:func:`run_w`
|
||||
* :c:func:`run_wf`
|
||||
* :c:func:`s2_u_0`
|
||||
* :c:func:`s2_u_0_nstates`
|
||||
|
@ -1178,6 +1225,8 @@ Index of Subroutines/Functions
|
|||
* :c:func:`save_wavefunction_truncated`
|
||||
* :c:func:`save_wavefunction_unsorted`
|
||||
* :c:func:`scf`
|
||||
* :c:func:`searchdet`
|
||||
* :c:func:`searchexc`
|
||||
* :c:func:`select_connected`
|
||||
* :c:func:`select_singles_and_doubles`
|
||||
* :c:func:`selection_collector`
|
||||
|
@ -1186,18 +1235,19 @@ Index of Subroutines/Functions
|
|||
* :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:`shifted_bk`
|
||||
* :c:func:`shifted_bk_slave`
|
||||
* :c:func:`slave`
|
||||
* :c:func:`sort`
|
||||
* :c:func:`sort_det`
|
||||
* :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_exc`
|
||||
* :c:func:`sort_selection_buffer`
|
||||
* :c:func:`sorted_dnumber`
|
||||
* :c:func:`sorted_i2number`
|
||||
|
@ -1207,21 +1257,21 @@ Index of Subroutines/Functions
|
|||
* :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:`tamise_exc`
|
||||
* :c:func:`tamiser`
|
||||
* :c:func:`task_done_to_taskserver`
|
||||
* :c:func:`tasks_done_to_taskserver`
|
||||
* :c:func:`testteethbuilding`
|
||||
* :c:func:`total_memory`
|
||||
* :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:`unsortedsearchdet`
|
||||
* :c:func:`v_e_n`
|
||||
* :c:func:`v_phi`
|
||||
* :c:func:`v_r`
|
||||
|
@ -1247,6 +1297,7 @@ Index of Subroutines/Functions
|
|||
* :c:func:`zmq_delete_tasks`
|
||||
* :c:func:`zmq_delete_tasks_async_recv`
|
||||
* :c:func:`zmq_delete_tasks_async_send`
|
||||
* :c:func:`zmq_dress`
|
||||
* :c:func:`zmq_get8_dvector`
|
||||
* :c:func:`zmq_get8_ivector`
|
||||
* :c:func:`zmq_get_dmatrix`
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[energy]
|
||||
type: double precision
|
||||
doc: Calculated Selected all_singles or all_1h_1p energy
|
||||
interface: ezfio
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
use bitmasks
|
||||
BEGIN_SHELL [ /usr/bin/env python2 ]
|
||||
from generate_h_apply import *
|
||||
|
||||
s = H_apply("just_1h_1p")
|
||||
s.set_selection_pt2("epstein_nesbet_2x2")
|
||||
s.filter_only_1h1p()
|
||||
print s
|
||||
|
||||
|
||||
s = H_apply("just_2p")
|
||||
s.set_selection_pt2("epstein_nesbet_2x2")
|
||||
s.filter_only_2p()
|
||||
print s
|
||||
|
||||
|
||||
s = H_apply("just_1p")
|
||||
s.set_selection_pt2("epstein_nesbet_2x2")
|
||||
s.filter_only_1p()
|
||||
print s
|
||||
|
||||
|
||||
|
||||
s = H_apply("just_1h_1p_singles",do_double_exc=False)
|
||||
s.set_selection_pt2("epstein_nesbet_2x2")
|
||||
s.filter_only_1h1p()
|
||||
print s
|
||||
|
||||
|
||||
s = H_apply("just_mono",do_double_exc=False)
|
||||
s.set_selection_pt2("epstein_nesbet_2x2")
|
||||
print s
|
||||
|
||||
END_SHELL
|
||||
|
|
@ -1 +0,0 @@
|
|||
Generators_restart Perturbation Properties Selectors_no_sorted Utils DavidsonUndressed
|
|
@ -1,83 +0,0 @@
|
|||
===========
|
||||
All_singles
|
||||
===========
|
||||
|
||||
Needed Modules
|
||||
==============
|
||||
.. Do not edit this section It was auto-generated
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
|
||||
.. image:: tree_dependency.png
|
||||
|
||||
* `Generators_restart <http://github.com/LCPQ/quantum_package/tree/master/plugins/Generators_restart>`_
|
||||
* `Perturbation <http://github.com/LCPQ/quantum_package/tree/master/plugins/Perturbation>`_
|
||||
* `Properties <http://github.com/LCPQ/quantum_package/tree/master/plugins/Properties>`_
|
||||
* `Selectors_no_sorted <http://github.com/LCPQ/quantum_package/tree/master/plugins/Selectors_no_sorted>`_
|
||||
* `Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Utils>`_
|
||||
* `Davidson <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson>`_
|
||||
|
||||
Documentation
|
||||
=============
|
||||
.. Do not edit this section It was auto-generated
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
|
||||
h_apply_just_1h_1p
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
h_apply_just_1h_1p_diexc
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_just_1h_1p_diexcorg
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_just_1h_1p_diexcp
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_just_1h_1p_monoexc
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_just_mono
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
h_apply_just_mono_diexc
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_just_mono_diexcorg
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_just_mono_diexcp
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_just_mono_monoexc
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`restart_more_singles <http://github.com/LCPQ/quantum_package/tree/master/plugins/All_singles/all_singles.irp.f#L1>`_
|
||||
Generates and select single excitations
|
||||
on the top of a given restart wave function
|
||||
|
||||
|
||||
`routine <http://github.com/LCPQ/quantum_package/tree/master/plugins/All_singles/all_singles.irp.f#L11>`_
|
||||
Undocumented
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
program restart_more_singles
|
||||
BEGIN_DOC
|
||||
! Generates and select single and double excitations of type 1h-1p
|
||||
! on the top of a given restart wave function of type CAS
|
||||
END_DOC
|
||||
read_wf = .true.
|
||||
touch read_wf
|
||||
print*,'ref_bitmask_energy = ',ref_bitmask_energy
|
||||
call routine
|
||||
|
||||
end
|
||||
subroutine routine
|
||||
implicit none
|
||||
integer :: i,k
|
||||
double precision, allocatable :: pt2(:), norm_pert(:), H_pert_diag(:),E_before(:)
|
||||
integer :: N_st, degree
|
||||
integer :: n_det_before
|
||||
N_st = N_states
|
||||
allocate (pt2(N_st), norm_pert(N_st),H_pert_diag(N_st),E_before(N_st))
|
||||
i = 0
|
||||
print*,'N_det = ',N_det
|
||||
print*,'n_det_max = ',n_det_max
|
||||
print*,'pt2_max = ',pt2_max
|
||||
pt2=-1.d0
|
||||
E_before = ref_bitmask_energy
|
||||
do while (N_det < n_det_max.and.maxval(abs(pt2(1:N_st))) > pt2_max)
|
||||
n_det_before = N_det
|
||||
i += 1
|
||||
print*,'-----------------------'
|
||||
print*,'i = ',i
|
||||
call H_apply_just_1h_1p(pt2, norm_pert, H_pert_diag, N_st)
|
||||
call diagonalize_CI
|
||||
print*,'N_det = ',N_det
|
||||
print*,'E = ',CI_energy(1)
|
||||
print*,'pt2 = ',pt2(1)
|
||||
print*,'E+PT2 = ',E_before + pt2(1)
|
||||
E_before = CI_energy
|
||||
if(N_states_diag.gt.1)then
|
||||
print*,'Variational Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',CI_energy(i) - CI_energy(1)
|
||||
enddo
|
||||
endif
|
||||
if(N_states.gt.1)then
|
||||
print*,'Variational + perturbative Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',E_before(i)+ pt2(i) - (E_before(1) + pt2(1))
|
||||
enddo
|
||||
endif
|
||||
call save_wavefunction
|
||||
if(n_det_before == N_det)then
|
||||
selection_criterion_factor = selection_criterion_factor * 0.5d0
|
||||
endif
|
||||
|
||||
enddo
|
||||
|
||||
threshold_davidson = 1.d-10
|
||||
soft_touch threshold_davidson davidson_criterion
|
||||
call diagonalize_CI
|
||||
if(N_states_diag.gt.1)then
|
||||
print*,'Variational Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',CI_energy(i) - CI_energy(1)
|
||||
enddo
|
||||
endif
|
||||
if(N_states.gt.1)then
|
||||
print*,'Variational + perturbative Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',CI_energy(i)+ pt2(i) - (CI_energy(1) + pt2(1))
|
||||
enddo
|
||||
endif
|
||||
call ezfio_set_all_singles_energy(CI_energy)
|
||||
|
||||
call save_wavefunction
|
||||
deallocate(pt2,norm_pert)
|
||||
end
|
|
@ -1,76 +0,0 @@
|
|||
program restart_more_singles
|
||||
BEGIN_DOC
|
||||
! Generates and select single and double excitations of type 1h-1p
|
||||
! on the top of a given restart wave function of type CAS
|
||||
END_DOC
|
||||
read_wf = .true.
|
||||
touch read_wf
|
||||
print*,'ref_bitmask_energy = ',ref_bitmask_energy
|
||||
call routine
|
||||
|
||||
end
|
||||
subroutine routine
|
||||
implicit none
|
||||
integer :: i,k
|
||||
double precision, allocatable :: pt2(:), norm_pert(:), H_pert_diag(:),E_before(:)
|
||||
integer :: N_st, degree
|
||||
integer :: n_det_before
|
||||
N_st = N_states
|
||||
allocate (pt2(N_st), norm_pert(N_st),H_pert_diag(N_st),E_before(N_st))
|
||||
i = 0
|
||||
print*,'N_det = ',N_det
|
||||
print*,'n_det_max = ',n_det_max
|
||||
print*,'pt2_max = ',pt2_max
|
||||
pt2=-1.d0
|
||||
E_before = ref_bitmask_energy
|
||||
do while (N_det < n_det_max.and.maxval(abs(pt2(1:N_st))) > pt2_max)
|
||||
n_det_before = N_det
|
||||
i += 1
|
||||
print*,'-----------------------'
|
||||
print*,'i = ',i
|
||||
call H_apply_just_1h_1p_singles(pt2, norm_pert, H_pert_diag, N_st)
|
||||
call diagonalize_CI
|
||||
print*,'N_det = ',N_det
|
||||
print*,'E = ',CI_energy(1)
|
||||
print*,'pt2 = ',pt2(1)
|
||||
print*,'E+PT2 = ',E_before + pt2(1)
|
||||
E_before = CI_energy
|
||||
if(N_states_diag.gt.1)then
|
||||
print*,'Variational Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',CI_energy(i) - CI_energy(1)
|
||||
enddo
|
||||
endif
|
||||
if(N_states.gt.1)then
|
||||
print*,'Variational + perturbative Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',E_before(i)+ pt2(i) - (E_before(1) + pt2(1))
|
||||
enddo
|
||||
endif
|
||||
call save_wavefunction
|
||||
if(n_det_before == N_det)then
|
||||
selection_criterion_factor = selection_criterion_factor * 0.5d0
|
||||
endif
|
||||
|
||||
enddo
|
||||
|
||||
threshold_davidson = 1.d-10
|
||||
soft_touch threshold_davidson davidson_criterion
|
||||
call diagonalize_CI
|
||||
if(N_states_diag.gt.1)then
|
||||
print*,'Variational Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',CI_energy(i) - CI_energy(1)
|
||||
enddo
|
||||
endif
|
||||
if(N_states.gt.1)then
|
||||
print*,'Variational + perturbative Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',CI_energy(i)+ pt2(i) - (CI_energy(1) + pt2(1))
|
||||
enddo
|
||||
endif
|
||||
call ezfio_set_all_singles_energy(CI_energy)
|
||||
|
||||
call save_wavefunction
|
||||
deallocate(pt2,norm_pert)
|
||||
end
|
|
@ -1,76 +0,0 @@
|
|||
program restart_more_singles
|
||||
BEGIN_DOC
|
||||
! Generates and select single excitations
|
||||
! on the top of a given restart wave function
|
||||
END_DOC
|
||||
read_wf = .true.
|
||||
touch read_wf
|
||||
call routine
|
||||
|
||||
end
|
||||
subroutine routine
|
||||
implicit none
|
||||
integer :: i,k
|
||||
double precision, allocatable :: pt2(:), norm_pert(:), H_pert_diag(:)
|
||||
integer :: N_st, degree
|
||||
double precision,allocatable :: E_before(:)
|
||||
integer :: n_det_before
|
||||
N_st = N_states
|
||||
allocate (pt2(N_st), norm_pert(N_st),H_pert_diag(N_st),E_before(N_st))
|
||||
i = 0
|
||||
print*,'N_det = ',N_det
|
||||
print*,'n_det_max = ',n_det_max
|
||||
print*,'pt2_max = ',pt2_max
|
||||
pt2=-1.d0
|
||||
E_before = ref_bitmask_energy
|
||||
pt2_max = 1.d-10
|
||||
n_det_max = 200000
|
||||
do while (N_det < n_det_max.and.maxval(abs(pt2(1:N_st))) > pt2_max)
|
||||
n_det_before = N_det
|
||||
i += 1
|
||||
print*,'-----------------------'
|
||||
print*,'i = ',i
|
||||
call H_apply_just_mono(pt2, norm_pert, H_pert_diag, N_st)
|
||||
call diagonalize_CI
|
||||
print*,'N_det = ',N_det
|
||||
print*,'E = ',CI_energy
|
||||
print*,'pt2 = ',pt2
|
||||
print*,'E+PT2 = ',E_before + pt2
|
||||
if(N_states_diag.gt.1)then
|
||||
print*,'Variational Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',CI_energy(i) - CI_energy(1)
|
||||
enddo
|
||||
endif
|
||||
if(N_states.gt.1)then
|
||||
print*,'Variational + perturbative Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',E_before(i)+ pt2(i) - (E_before(1) + pt2(1))
|
||||
enddo
|
||||
endif
|
||||
E_before = CI_energy
|
||||
call save_wavefunction
|
||||
|
||||
if(n_det_before == N_det)then
|
||||
selection_criterion = selection_criterion * 0.5d0
|
||||
endif
|
||||
enddo
|
||||
|
||||
threshold_davidson = 1.d-10
|
||||
soft_touch threshold_davidson davidson_criterion
|
||||
call diagonalize_CI
|
||||
if(N_states_diag.gt.1)then
|
||||
print*,'Variational Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',CI_energy(i) - CI_energy(1)
|
||||
enddo
|
||||
endif
|
||||
if(N_states.gt.1)then
|
||||
print*,'Variational + perturbative Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',CI_energy(i)+ pt2(i) - (CI_energy(1) + pt2(1))
|
||||
enddo
|
||||
endif
|
||||
call save_wavefunction
|
||||
deallocate(pt2,norm_pert,E_before)
|
||||
end
|
|
@ -1,10 +0,0 @@
|
|||
[energy]
|
||||
type: double precision
|
||||
doc: Variational CISD energy
|
||||
interface: ezfio
|
||||
|
||||
[energy_pt2]
|
||||
type: double precision
|
||||
doc: Estimated CISD energy (including PT2)
|
||||
interface: ezfio
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
! Generates subroutine H_apply_cisd
|
||||
! ----------------------------------
|
||||
|
||||
BEGIN_SHELL [ /usr/bin/env python2 ]
|
||||
from generate_h_apply import H_apply
|
||||
H = H_apply("cisd",do_double_exc=True)
|
||||
print H
|
||||
H = H_apply("cis",do_double_exc=False)
|
||||
print H
|
||||
END_SHELL
|
||||
|
|
@ -1 +0,0 @@
|
|||
Generators_CAS DavidsonUndressed
|
|
@ -1,85 +0,0 @@
|
|||
CISD
|
||||
====
|
||||
|
||||
This is a test directory which builds a CISD by setting the follwoing rules:
|
||||
|
||||
* The only generator determinant is the Hartee-Fock (single-reference method)
|
||||
* All generated determinants are included in the wave function (no perturbative
|
||||
selection)
|
||||
|
||||
These rules are set in the ``H_apply.irp.f`` file.
|
||||
|
||||
Needed Modules
|
||||
==============
|
||||
|
||||
.. Do not edit this section. It was auto-generated from the
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
.. image:: tree_dependency.png
|
||||
|
||||
* `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Selectors_full>`_
|
||||
* `SingleRefMethod <http://github.com/LCPQ/quantum_package/tree/master/src/SingleRefMethod>`_
|
||||
|
||||
Documentation
|
||||
=============
|
||||
|
||||
.. Do not edit this section. It was auto-generated from the
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
`h_apply_cisd <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_8#L414>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_8#L1>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_8#L269>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
Needed Modules
|
||||
==============
|
||||
.. Do not edit this section It was auto-generated
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
|
||||
.. image:: tree_dependency.png
|
||||
|
||||
* `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/plugins/Selectors_full>`_
|
||||
* `SingleRefMethod <http://github.com/LCPQ/quantum_package/tree/master/plugins/SingleRefMethod>`_
|
||||
|
||||
Documentation
|
||||
=============
|
||||
.. Do not edit this section It was auto-generated
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
|
||||
h_apply_cisd
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
h_apply_cisd_diexc
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_diexcorg
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_cisd_diexcp
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_monoexc
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
program cis
|
||||
implicit none
|
||||
read_wf = .False.
|
||||
SOFT_TOUCH read_wf
|
||||
call run
|
||||
end
|
||||
|
||||
subroutine run
|
||||
implicit none
|
||||
integer :: i
|
||||
|
||||
call H_apply_cisd
|
||||
print *, 'N_det = ', N_det
|
||||
do i = 1,N_states
|
||||
print *, 'energy = ',CI_energy(i)
|
||||
print *, 'E_corr = ',CI_electronic_energy(i) - ref_bitmask_energy
|
||||
enddo
|
||||
psi_coef = ci_eigenvectors
|
||||
SOFT_TOUCH psi_coef
|
||||
call save_wavefunction
|
||||
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
! Generates subroutine H_apply_cid
|
||||
! ----------------------------------
|
||||
|
||||
BEGIN_SHELL [ /usr/bin/env python2 ]
|
||||
from generate_h_apply import H_apply
|
||||
H = H_apply("cid",do_double_exc=True,do_mono_exc=False)
|
||||
print H
|
||||
END_SHELL
|
||||
|
|
@ -1 +0,0 @@
|
|||
Selectors_full SingleRefMethod DavidsonUndressed
|
|
@ -1,250 +0,0 @@
|
|||
CID
|
||||
====
|
||||
|
||||
This is a test directory which builds a CID by setting the follwoing rules:
|
||||
|
||||
* The only generator determinant is the Hartee-Fock (single-reference method)
|
||||
* All generated determinants are included in the wave function (no perturbative
|
||||
selection)
|
||||
|
||||
These rules are set in the ``H_apply.irp.f`` file.
|
||||
|
||||
Needed Modules
|
||||
==============
|
||||
|
||||
.. Do not edit this section. It was auto-generated from the
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
.. image:: tree_dependency.png
|
||||
|
||||
* `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Selectors_full>`_
|
||||
* `SingleRefMethod <http://github.com/LCPQ/quantum_package/tree/master/src/SingleRefMethod>`_
|
||||
|
||||
Documentation
|
||||
=============
|
||||
|
||||
.. Do not edit this section. It was auto-generated from the
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
`cid <http://github.com/LCPQ/quantum_package/tree/master/src/CID/cid_lapack.irp.f#L1>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`h_apply_cid <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_8#L408>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cid_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_8#L1>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cid_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_8#L264>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f#L13>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`h_apply_cisd_selection_delta_rho_one_point <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L1287>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_delta_rho_one_point_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L767>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_delta_rho_one_point_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L1091>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_dipole_moment_z <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L6649>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_dipole_moment_z_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L6129>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_dipole_moment_z_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L6453>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L5117>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_2x2 <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L5883>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_2x2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L5363>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_2x2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L5687>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L4597>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L4921>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L4351>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L3831>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L4155>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L3585>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L3065>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L3389>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_projected <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L2819>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_projected_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L2299>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_projected_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L2623>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_h_core <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L2053>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_h_core_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L1533>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_h_core_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L1857>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_moller_plesset <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L521>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_moller_plesset_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L1>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_moller_plesset_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID/H_apply.irp.f_shell_10#L325>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
Needed Modules
|
||||
==============
|
||||
.. Do not edit this section It was auto-generated
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
|
||||
.. image:: tree_dependency.png
|
||||
|
||||
* `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/plugins/Selectors_full>`_
|
||||
* `SingleRefMethod <http://github.com/LCPQ/quantum_package/tree/master/plugins/SingleRefMethod>`_
|
||||
|
||||
Documentation
|
||||
=============
|
||||
.. Do not edit this section It was auto-generated
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
|
||||
`cid <http://github.com/LCPQ/quantum_package/tree/master/plugins/CID/cid_lapack.irp.f#L1>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cid
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
h_apply_cid_diexc
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cid_diexcorg
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_cid_diexcp
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cid_monoexc
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
program cid
|
||||
implicit none
|
||||
integer :: i
|
||||
|
||||
print *, 'HF = ', HF_energy
|
||||
print *, 'N_states = ', N_states
|
||||
N_det = 1
|
||||
touch psi_det psi_coef N_det
|
||||
call H_apply_cid
|
||||
print *, 'N_det = ', N_det
|
||||
do i = 1,N_states
|
||||
print *, 'energy = ',CI_energy(i)
|
||||
print *, 'E_corr = ',CI_electronic_energy(i) - ref_bitmask_energy
|
||||
enddo
|
||||
|
||||
! call CISD_SC2(psi_det,psi_coef,eigvalues,size(psi_coef,1),N_det,N_states,N_int)
|
||||
! do i = 1, N_states
|
||||
! print*,'eigvalues(i) = ',eigvalues(i)
|
||||
! enddo
|
||||
end
|
|
@ -1,16 +0,0 @@
|
|||
program cid
|
||||
implicit none
|
||||
integer :: i
|
||||
|
||||
diag_algorithm = "Lapack"
|
||||
touch diag_algorithm
|
||||
print *, 'HF = ', HF_energy
|
||||
print *, 'N_states = ', N_states
|
||||
call H_apply_cid
|
||||
print *, 'N_det = ', N_det
|
||||
do i = 1,N_states
|
||||
print *, 'energy = ',CI_energy(i)
|
||||
print *, 'E_corr = ',CI_electronic_energy(i) - ref_bitmask_energy
|
||||
enddo
|
||||
|
||||
end
|
|
@ -1,10 +0,0 @@
|
|||
use bitmasks
|
||||
BEGIN_SHELL [ /usr/bin/env python ]
|
||||
from generate_h_apply import *
|
||||
from perturbation import perturbations
|
||||
|
||||
s = H_apply("PT2",SingleRef=True,do_mono_exc=False,do_double_exc=True)
|
||||
s.set_perturbation("epstein_nesbet_sc2_projected")
|
||||
print s
|
||||
END_SHELL
|
||||
|
|
@ -1 +0,0 @@
|
|||
CID_selected
|
|
@ -1,40 +0,0 @@
|
|||
========================
|
||||
CISD_SC2_selected Module
|
||||
========================
|
||||
|
||||
Documentation
|
||||
=============
|
||||
|
||||
.. Do not edit this section. It was auto-generated from the
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
`cisd_sc2_selected <http://github.com/LCPQ/quantum_package/tree/master/src/CID_SC2_selected/cid_sc2_selection.irp.f#L1>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`h_apply_pt2 <http://github.com/LCPQ/quantum_package/tree/master/src/CID_SC2_selected/H_apply.irp.f_shell_9#L489>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_pt2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID_SC2_selected/H_apply.irp.f_shell_9#L1>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_pt2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID_SC2_selected/H_apply.irp.f_shell_9#L307>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
Needed Modules
|
||||
==============
|
||||
|
||||
.. Do not edit this section. It was auto-generated from the
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
.. image:: tree_dependency.png
|
||||
|
||||
* `CID_selected <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected>`_
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
program cisd_sc2_selected
|
||||
implicit none
|
||||
integer :: i,k
|
||||
use bitmasks
|
||||
|
||||
|
||||
double precision, allocatable :: pt2(:), norm_pert(:), H_pert_diag(:),E_old(:)
|
||||
integer :: N_st, iter,degree
|
||||
character*(64) :: perturbation
|
||||
N_st = N_states
|
||||
allocate (pt2(N_st), norm_pert(N_st), H_pert_diag(N_st),E_old(N_st))
|
||||
|
||||
pt2 = 1.d0
|
||||
perturbation = "epstein_nesbet_sc2_projected"
|
||||
E_old(1) = HF_energy
|
||||
threshold_davidson = 1.d-6
|
||||
|
||||
do while (maxval(abs(pt2(1:N_st))) > 1.d-4)
|
||||
print*,'----'
|
||||
print*,''
|
||||
call H_apply_cisd_selection(perturbation,pt2, norm_pert, H_pert_diag, N_st)
|
||||
! soft_touch det_connections
|
||||
call diagonalize_CI_SC2
|
||||
print *, 'N_det = ', N_det
|
||||
do i = 1, N_st
|
||||
print*,'state ',i
|
||||
print *, 'PT2(SC2) = ', pt2(i)
|
||||
print *, 'E(SC2) = ', CI_SC2_energy(i)
|
||||
print *, 'E_before(SC2)+PT2(SC2) = ', (E_old(i)+pt2(i))
|
||||
if(i==1)then
|
||||
print *, 'E(SC2)+PT2(projctd)SC2 = ', (E_old(i)+H_pert_diag(i))
|
||||
endif
|
||||
E_old(i) = CI_SC2_energy(i)
|
||||
enddo
|
||||
! print *, 'E corr = ', (E_old(1)) - HF_energy
|
||||
enddo
|
||||
pt2 = 0.d0
|
||||
call H_apply_PT2(pt2, norm_pert, H_pert_diag, N_st)
|
||||
threshold_davidson = 1.d-10
|
||||
touch threshold_davidson davidson_criterion
|
||||
do i = 1, N_st
|
||||
max = 0.d0
|
||||
|
||||
print*,''
|
||||
print*,'-------------'
|
||||
print*,'for state ',i
|
||||
print*,''
|
||||
do k = 1, N_det
|
||||
if(dabs(psi_coef(k,i)).gt.max)then
|
||||
max = dabs(psi_coef(k,i))
|
||||
imax = k
|
||||
endif
|
||||
enddo
|
||||
double precision :: max
|
||||
integer :: imax
|
||||
print *, 'PT2(SC2) = ', pt2(i)
|
||||
print *, 'E(SC2) = ', CI_SC2_energy(i)
|
||||
print *, 'E_before(SC2)+PT2(SC2) = ', (CI_SC2_energy(i)+pt2(i))
|
||||
if(i==1)then
|
||||
print *, 'E(SC2)+PT2(projctd)SC2 = ', (CI_SC2_energy(i)+H_pert_diag(i))
|
||||
endif
|
||||
|
||||
print*,'greater coeficient of the state : ',dabs(psi_coef(imax,i))
|
||||
call get_excitation_degree(ref_bitmask,psi_det(1,1,imax),degree,N_int)
|
||||
print*,'degree of excitation of such determinant : ',degree
|
||||
|
||||
enddo
|
||||
deallocate(pt2,norm_pert,H_pert_diag)
|
||||
end
|
|
@ -1,31 +0,0 @@
|
|||
use bitmasks
|
||||
BEGIN_SHELL [ /usr/bin/env python2 ]
|
||||
from generate_h_apply import *
|
||||
from perturbation import perturbations
|
||||
|
||||
for perturbation in perturbations:
|
||||
s = H_apply("cisd_selection_"+perturbation,do_mono_exc=False)
|
||||
s.set_selection_pt2(perturbation)
|
||||
print s
|
||||
END_SHELL
|
||||
|
||||
|
||||
subroutine H_apply_cisd_selection(perturbation,pt2, norm_pert, H_pert_diag, N_st)
|
||||
implicit none
|
||||
character*(64), intent(in) :: perturbation
|
||||
integer, intent(in) :: N_st
|
||||
double precision, intent(inout):: pt2(N_st), norm_pert(N_st), H_pert_diag(N_st)
|
||||
|
||||
BEGIN_SHELL [ /usr/bin/env python2 ]
|
||||
from perturbation import perturbations
|
||||
|
||||
for perturbation in perturbations:
|
||||
print """
|
||||
if (perturbation == '%s') then
|
||||
call H_apply_cisd_selection_%s(pt2, norm_pert, H_pert_diag, N_st)
|
||||
endif
|
||||
"""%(perturbation,perturbation)
|
||||
END_SHELL
|
||||
|
||||
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
Perturbation CID DavidsonUndressed
|
|
@ -1,177 +0,0 @@
|
|||
====================
|
||||
CISD_selected Module
|
||||
====================
|
||||
|
||||
Documentation
|
||||
=============
|
||||
|
||||
.. Do not edit this section. It was auto-generated from the
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
`h_apply_cisd_selection <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f#L13>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`h_apply_cisd_selection_delta_rho_one_point <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L1287>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_delta_rho_one_point_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L767>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_delta_rho_one_point_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L1091>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_dipole_moment_z <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L6649>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_dipole_moment_z_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L6129>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_dipole_moment_z_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L6453>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L5117>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_2x2 <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L5883>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_2x2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L5363>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_2x2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L5687>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L4597>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L4921>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L4351>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L3831>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L4155>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L3585>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L3065>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L3389>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_projected <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L2819>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_projected_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L2299>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_projected_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L2623>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_h_core <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L2053>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_h_core_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L1533>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_h_core_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L1857>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_moller_plesset <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L521>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_moller_plesset_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L1>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_moller_plesset_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected/H_apply.irp.f_shell_10#L325>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
Needed Modules
|
||||
==============
|
||||
|
||||
.. Do not edit this section. It was auto-generated from the
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
.. image:: tree_dependency.png
|
||||
|
||||
* `Perturbation <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation>`_
|
||||
* `CID <http://github.com/LCPQ/quantum_package/tree/master/src/CID>`_
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
program cisd
|
||||
implicit none
|
||||
integer :: i,k
|
||||
|
||||
|
||||
double precision, allocatable :: pt2(:), norm_pert(:), H_pert_diag(:),E_old(:)
|
||||
integer :: N_st, iter
|
||||
character*(64) :: perturbation
|
||||
N_st = N_states
|
||||
allocate (pt2(N_st), norm_pert(N_st), H_pert_diag(N_st),E_old(N_st))
|
||||
|
||||
pt2 = 1.d0
|
||||
perturbation = "epstein_nesbet"
|
||||
E_old(1) = HF_energy
|
||||
do while (maxval(abs(pt2(1:N_st))) > 1.d-6)
|
||||
print*,'----'
|
||||
print*,''
|
||||
call H_apply_cisd_selection(perturbation,pt2, norm_pert, H_pert_diag, N_st)
|
||||
call diagonalize_CI
|
||||
print*,'N_det = ',N_det
|
||||
do i = 1, N_st
|
||||
print*,'state ',i
|
||||
print *, 'PT2 = ', pt2(i)
|
||||
print *, 'E = ', CI_energy(i)
|
||||
print *, 'E_before +PT2 = ', (E_old(i)+pt2(i))
|
||||
! print *, 'E+PT2_new= ', (E_old(1)+1.d0*pt2(1)+H_pert_diag(1))/(1.d0 +norm_pert(1))
|
||||
enddo
|
||||
E_old = CI_energy
|
||||
enddo
|
||||
deallocate(pt2,norm_pert,H_pert_diag)
|
||||
end
|
33
plugins/eginer/CISD_SC2/.gitignore
vendored
33
plugins/eginer/CISD_SC2/.gitignore
vendored
|
@ -1,33 +0,0 @@
|
|||
# Automatically created by $QP_ROOT/scripts/module/module_handler.py
|
||||
.ninja_deps
|
||||
.ninja_log
|
||||
AO_Basis
|
||||
Bitmask
|
||||
Davidson
|
||||
Determinants
|
||||
Electrons
|
||||
Ezfio_files
|
||||
FourIdx
|
||||
Hartree_Fock
|
||||
IRPF90_man
|
||||
IRPF90_temp
|
||||
Integrals_Bielec
|
||||
Integrals_Monoelec
|
||||
MOGuess
|
||||
MO_Basis
|
||||
MPI
|
||||
Makefile
|
||||
Makefile.depend
|
||||
Nuclei
|
||||
Pseudo
|
||||
Selectors_Utils
|
||||
Selectors_full
|
||||
SingleRefMethod
|
||||
Utils
|
||||
ZMQ
|
||||
cisd
|
||||
cisd_lapack
|
||||
ezfio_interface.irp.f
|
||||
irpf90.make
|
||||
irpf90_entities
|
||||
tags
|
|
@ -1,10 +0,0 @@
|
|||
[energy]
|
||||
type: double precision
|
||||
doc: Variational CISD energy
|
||||
interface: ezfio
|
||||
|
||||
[energy_pt2]
|
||||
type: double precision
|
||||
doc: Estimated CISD energy (including PT2)
|
||||
interface: ezfio
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
! Generates subroutine H_apply_cisd
|
||||
! ----------------------------------
|
||||
|
||||
BEGIN_SHELL [ /usr/bin/env python2 ]
|
||||
from generate_h_apply import H_apply
|
||||
H = H_apply("cisd",do_double_exc=True)
|
||||
print H
|
||||
H = H_apply("cis",do_double_exc=False)
|
||||
print H
|
||||
END_SHELL
|
||||
|
|
@ -1 +0,0 @@
|
|||
Selectors_full SingleRefMethod DavidsonUndressed
|
|
@ -1,85 +0,0 @@
|
|||
CISD
|
||||
====
|
||||
|
||||
This is a test directory which builds a CISD by setting the follwoing rules:
|
||||
|
||||
* The only generator determinant is the Hartee-Fock (single-reference method)
|
||||
* All generated determinants are included in the wave function (no perturbative
|
||||
selection)
|
||||
|
||||
These rules are set in the ``H_apply.irp.f`` file.
|
||||
|
||||
Needed Modules
|
||||
==============
|
||||
|
||||
.. Do not edit this section. It was auto-generated from the
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
.. image:: tree_dependency.png
|
||||
|
||||
* `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Selectors_full>`_
|
||||
* `SingleRefMethod <http://github.com/LCPQ/quantum_package/tree/master/src/SingleRefMethod>`_
|
||||
|
||||
Documentation
|
||||
=============
|
||||
|
||||
.. Do not edit this section. It was auto-generated from the
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
`h_apply_cisd <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_8#L414>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_8#L1>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_8#L269>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
Needed Modules
|
||||
==============
|
||||
.. Do not edit this section It was auto-generated
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
|
||||
.. image:: tree_dependency.png
|
||||
|
||||
* `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/plugins/Selectors_full>`_
|
||||
* `SingleRefMethod <http://github.com/LCPQ/quantum_package/tree/master/plugins/SingleRefMethod>`_
|
||||
|
||||
Documentation
|
||||
=============
|
||||
.. Do not edit this section It was auto-generated
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
|
||||
h_apply_cisd
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
h_apply_cisd_diexc
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_diexcorg
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_cisd_diexcp
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_monoexc
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
|
@ -1,216 +0,0 @@
|
|||
subroutine CISD_SC2(dets_in,u_in,energies,diag_H_elements,dim_in,sze,N_st,Nint,convergence)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! CISD+SC2 method :: take off all the disconnected terms of a CISD (selected or not)
|
||||
!
|
||||
! 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
|
||||
END_DOC
|
||||
integer, intent(in) :: dim_in, sze, N_st, Nint
|
||||
integer(bit_kind), intent(in) :: dets_in(Nint,2,sze)
|
||||
double precision, intent(inout) :: u_in(dim_in,N_st)
|
||||
double precision, intent(out) :: energies(N_st)
|
||||
double precision, intent(out) :: diag_H_elements(dim_in)
|
||||
double precision, intent(in) :: convergence
|
||||
ASSERT (N_st > 0)
|
||||
ASSERT (sze > 0)
|
||||
ASSERT (Nint > 0)
|
||||
ASSERT (Nint == N_int)
|
||||
integer :: iter
|
||||
integer :: i,j,k,l,m
|
||||
logical :: converged
|
||||
double precision :: overlap(N_st,N_st)
|
||||
double precision :: u_dot_v, u_dot_u
|
||||
|
||||
integer :: degree,N_double,index_hf
|
||||
double precision :: hij_elec, e_corr_double,e_corr,diag_h_mat_elem,inv_c0
|
||||
double precision :: e_corr_double_before,accu,cpu_2,cpu_1
|
||||
integer,allocatable :: degree_exc(:), index_double(:)
|
||||
integer :: i_ok
|
||||
double precision,allocatable :: e_corr_array(:),H_jj_ref(:),H_jj_dressed(:),hij_double(:)
|
||||
integer(bit_kind), allocatable :: doubles(:,:,:)
|
||||
|
||||
|
||||
allocate (doubles(Nint,2,sze),e_corr_array(sze),H_jj_ref(sze),H_jj_dressed(sze),&
|
||||
index_double(sze), degree_exc(sze), hij_double(sze))
|
||||
call write_time(6)
|
||||
write(6,'(A)') ''
|
||||
write(6,'(A)') 'CISD SC2'
|
||||
write(6,'(A)') '========'
|
||||
!$OMP PARALLEL DEFAULT(NONE) &
|
||||
!$OMP SHARED(sze,N_st, &
|
||||
!$OMP H_jj_ref,Nint,dets_in,u_in) &
|
||||
!$OMP PRIVATE(i)
|
||||
|
||||
!$OMP DO SCHEDULE(guided)
|
||||
do i=1,sze
|
||||
H_jj_ref(i) = diag_h_mat_elem(dets_in(1,1,i),Nint)
|
||||
enddo
|
||||
!$OMP END DO NOWAIT
|
||||
!$OMP END PARALLEL
|
||||
|
||||
N_double = 0
|
||||
e_corr = 0.d0
|
||||
e_corr_double = 0.d0
|
||||
do i = 1, sze
|
||||
call get_excitation_degree(ref_bitmask,dets_in(1,1,i),degree,Nint)
|
||||
degree_exc(i) = degree+1
|
||||
if(degree==0)then
|
||||
index_hf=i
|
||||
else if (degree == 2)then
|
||||
N_double += 1
|
||||
index_double(N_double) = i
|
||||
doubles(:,:,N_double) = dets_in(:,:,i)
|
||||
call i_H_j(ref_bitmask,dets_in(1,1,i),Nint,hij_elec)
|
||||
hij_double(N_double) = hij_elec
|
||||
e_corr_array(N_double) = u_in(i,1)* hij_elec
|
||||
e_corr_double += e_corr_array(N_double)
|
||||
e_corr += e_corr_array(N_double)
|
||||
else if (degree == 1)then
|
||||
call i_H_j(ref_bitmask,dets_in(1,1,i),Nint,hij_elec)
|
||||
e_corr += u_in(i,1)* hij_elec
|
||||
endif
|
||||
enddo
|
||||
inv_c0 = 1.d0/u_in(index_hf,1)
|
||||
do i = 1, N_double
|
||||
e_corr_array(i) = e_corr_array(i) * inv_c0
|
||||
enddo
|
||||
e_corr = e_corr * inv_c0
|
||||
e_corr_double = e_corr_double * inv_c0
|
||||
converged = .False.
|
||||
e_corr_double_before = e_corr_double
|
||||
iter = 0
|
||||
do while (.not.converged)
|
||||
iter +=1
|
||||
!$OMP PARALLEL DEFAULT(NONE) &
|
||||
!$OMP PRIVATE(i,j,degree,accu) &
|
||||
!$OMP SHARED(H_jj_dressed,sze,H_jj_ref,index_hf,N_int,N_double,&
|
||||
!$OMP dets_in,doubles,degree_exc,e_corr_array,e_corr_double)
|
||||
!$OMP DO SCHEDULE(STATIC)
|
||||
do i=1,sze
|
||||
H_jj_dressed(i) = H_jj_ref(i)
|
||||
if (i==index_hf)cycle
|
||||
accu = -e_corr_double
|
||||
select case (N_int)
|
||||
case (1)
|
||||
do j=1,N_double
|
||||
degree = &
|
||||
popcnt(xor( dets_in(1,1,i),doubles(1,1,j))) + &
|
||||
popcnt(xor( dets_in(1,2,i),doubles(1,2,j)))
|
||||
|
||||
if (degree<=ishft(degree_exc(i),1)) then
|
||||
accu += e_corr_array(j)
|
||||
endif
|
||||
enddo
|
||||
case (2)
|
||||
do j=1,N_double
|
||||
degree = &
|
||||
popcnt(xor( dets_in(1,1,i),doubles(1,1,j))) + &
|
||||
popcnt(xor( dets_in(1,2,i),doubles(1,2,j))) + &
|
||||
popcnt(xor( dets_in(2,1,i),doubles(2,1,j))) + &
|
||||
popcnt(xor( dets_in(2,2,i),doubles(2,2,j)))
|
||||
|
||||
if (degree<=ishft(degree_exc(i),1)) then
|
||||
accu += e_corr_array(j)
|
||||
endif
|
||||
enddo
|
||||
case (3)
|
||||
do j=1,N_double
|
||||
degree = &
|
||||
popcnt(xor( dets_in(1,1,i),doubles(1,1,j))) + &
|
||||
popcnt(xor( dets_in(1,2,i),doubles(1,2,j))) + &
|
||||
popcnt(xor( dets_in(2,1,i),doubles(2,1,j))) + &
|
||||
popcnt(xor( dets_in(2,2,i),doubles(2,2,j))) + &
|
||||
popcnt(xor( dets_in(3,1,i),doubles(3,1,j))) + &
|
||||
popcnt(xor( dets_in(3,2,i),doubles(3,2,j)))
|
||||
|
||||
if (degree<=ishft(degree_exc(i),1)) then
|
||||
accu += e_corr_array(j)
|
||||
endif
|
||||
enddo
|
||||
case default
|
||||
do j=1,N_double
|
||||
call get_excitation_degree(dets_in(1,1,i),doubles(1,1,j),degree,N_int)
|
||||
if (degree<=degree_exc(i)) then
|
||||
accu += e_corr_array(j)
|
||||
endif
|
||||
enddo
|
||||
end select
|
||||
H_jj_dressed(i) -= accu
|
||||
enddo
|
||||
!$OMP END DO
|
||||
!$OMP END PARALLEL
|
||||
|
||||
if(sze<=N_det_max_jacobi)then
|
||||
double precision, allocatable :: eigenvectors(:,:), eigenvalues(:),H_matrix_tmp(:,:)
|
||||
allocate (H_matrix_tmp(size(H_matrix_all_dets,1),sze),eigenvalues(sze),eigenvectors(size(H_matrix_all_dets,1),sze))
|
||||
do j=1,sze
|
||||
do i=1,sze
|
||||
H_matrix_tmp(i,j) = H_matrix_all_dets(i,j)
|
||||
enddo
|
||||
enddo
|
||||
do i = 1,sze
|
||||
H_matrix_tmp(i,i) = H_jj_dressed(i)
|
||||
enddo
|
||||
call lapack_diag(eigenvalues,eigenvectors, &
|
||||
H_matrix_tmp,size(H_matrix_all_dets,1),sze)
|
||||
do j=1,min(N_states_diag,sze)
|
||||
do i=1,sze
|
||||
u_in(i,j) = eigenvectors(i,j)
|
||||
enddo
|
||||
energies(j) = eigenvalues(j)
|
||||
enddo
|
||||
deallocate (H_matrix_tmp, eigenvalues, eigenvectors)
|
||||
else
|
||||
call davidson_diag_hjj(dets_in,u_in,H_jj_dressed,energies,dim_in,sze,N_st,N_states_diag,Nint,6)
|
||||
endif
|
||||
|
||||
e_corr_double = 0.d0
|
||||
inv_c0 = 1.d0/u_in(index_hf,1)
|
||||
do i = 1, N_double
|
||||
e_corr_array(i) = u_in(index_double(i),1)*inv_c0 * hij_double(i)
|
||||
e_corr_double += e_corr_array(i)
|
||||
enddo
|
||||
write(6,'(A,I3)') 'SC2 Iteration ', iter
|
||||
write(6,'(A)') '------------------'
|
||||
write(6,'(A)') ''
|
||||
write(6,'(A)') '===== ================'
|
||||
write(6,'(A)') 'State Energy '
|
||||
write(6,'(A)') '===== ================'
|
||||
do i=1,N_st
|
||||
write(6,'(I5,1X,F16.10)') i, energies(i)+nuclear_repulsion
|
||||
enddo
|
||||
write(6,'(A)') '===== ================'
|
||||
write(6,'(A)') ''
|
||||
call write_double(6,(e_corr_double - e_corr_double_before),&
|
||||
'Delta(E_corr)')
|
||||
converged = dabs(e_corr_double - e_corr_double_before) < convergence
|
||||
converged = converged
|
||||
if (converged) then
|
||||
do i = 1, dim_in
|
||||
diag_H_elements(i) = H_jj_dressed(i) - H_jj_ref(i)
|
||||
enddo
|
||||
exit
|
||||
endif
|
||||
e_corr_double_before = e_corr_double
|
||||
|
||||
enddo
|
||||
|
||||
call write_time(6)
|
||||
deallocate (doubles,e_corr_array,H_jj_ref,H_jj_dressed, &
|
||||
index_double, degree_exc, hij_double)
|
||||
|
||||
end
|
||||
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
[energy]
|
||||
type: double precision
|
||||
doc: Calculated CISD_SC2 energy of ground_state
|
||||
interface: ezfio
|
||||
|
||||
[energy_pt2]
|
||||
type: double precision
|
||||
doc: Calculated CISD_SC2 energy+pt2 of ground_state
|
||||
interface: ezfio
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
use bitmasks
|
||||
BEGIN_SHELL [ /usr/bin/env python2 ]
|
||||
from generate_h_apply import *
|
||||
from perturbation import perturbations
|
||||
|
||||
s = H_apply("SC2_selected",SingleRef=True)
|
||||
s.set_selection_pt2("epstein_nesbet_sc2_no_projected")
|
||||
print s
|
||||
|
||||
s = H_apply("PT2",SingleRef=True)
|
||||
s.set_perturbation("epstein_nesbet_sc2_no_projected")
|
||||
print s
|
||||
|
||||
s = H_apply("PT2_en_sc2",SingleRef=True)
|
||||
s.set_perturbation("epstein_nesbet_sc2")
|
||||
print s
|
||||
END_SHELL
|
||||
|
|
@ -1 +0,0 @@
|
|||
CISD_selected
|
|
@ -1,193 +0,0 @@
|
|||
========================
|
||||
CISD_SC2_selected Module
|
||||
========================
|
||||
|
||||
Documentation
|
||||
=============
|
||||
|
||||
.. Do not edit this section. It was auto-generated from the
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
`cisd_sc2_selected <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_SC2_selected/cisd_sc2_selection.irp.f#L1>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`h_apply_pt2 <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_SC2_selected/H_apply.irp.f_shell_17#L1257>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_pt2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_SC2_selected/H_apply.irp.f_shell_17#L769>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_pt2_en_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_SC2_selected/H_apply.irp.f_shell_17#L1952>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_pt2_en_sc2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_SC2_selected/H_apply.irp.f_shell_17#L1464>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_pt2_en_sc2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_SC2_selected/H_apply.irp.f_shell_17#L1770>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_pt2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_SC2_selected/H_apply.irp.f_shell_17#L1075>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_sc2_selected <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_SC2_selected/H_apply.irp.f_shell_17#L523>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_sc2_selected_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_SC2_selected/H_apply.irp.f_shell_17#L1>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_sc2_selected_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_SC2_selected/H_apply.irp.f_shell_17#L327>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
Needed Modules
|
||||
==============
|
||||
|
||||
.. Do not edit this section. It was auto-generated from the
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
.. image:: tree_dependency.png
|
||||
|
||||
* `CISD_selected <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected>`_
|
||||
|
||||
Needed Modules
|
||||
==============
|
||||
.. Do not edit this section It was auto-generated
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
|
||||
.. image:: tree_dependency.png
|
||||
|
||||
* `CISD_selected <http://github.com/LCPQ/quantum_package/tree/master/plugins/CISD_selected>`_
|
||||
|
||||
Documentation
|
||||
=============
|
||||
.. Do not edit this section It was auto-generated
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
|
||||
`cisd_sc2_selected <http://github.com/LCPQ/quantum_package/tree/master/plugins/CISD_SC2_selected/cisd_sc2_selection.irp.f#L1>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
h_apply_cisd_diexc
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_diexcorg
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_cisd_diexcp
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_monoexc
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_pt2
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
h_apply_pt2_diexc
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_pt2_diexcorg
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_pt2_diexcp
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_pt2_en_sc2
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
h_apply_pt2_en_sc2_diexc
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_pt2_en_sc2_diexcorg
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_pt2_en_sc2_diexcp
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_pt2_en_sc2_monoexc
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_pt2_monoexc
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_sc2_selected
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
h_apply_sc2_selected_diexc
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_sc2_selected_diexcorg
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_sc2_selected_diexcp
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_sc2_selected_monoexc
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
|
@ -1,114 +0,0 @@
|
|||
program cisd_sc2_selected
|
||||
implicit none
|
||||
integer :: i,k
|
||||
use bitmasks
|
||||
|
||||
|
||||
double precision, allocatable :: pt2(:), norm_pert(:), H_pert_diag(:),E_old(:)
|
||||
integer :: N_st, iter,degree
|
||||
character*(64) :: perturbation
|
||||
N_st = N_states
|
||||
allocate (pt2(N_st), norm_pert(N_st), H_pert_diag(N_st),E_old(N_st))
|
||||
|
||||
pt2 = 1.d0
|
||||
perturbation = "epstein_nesbet_sc2_projected"
|
||||
|
||||
E_old(1) = HF_energy
|
||||
threshold_davidson = 1.d-10
|
||||
if (N_det > N_det_max) then
|
||||
call diagonalize_CI_SC2
|
||||
call save_wavefunction
|
||||
psi_det = psi_det_sorted
|
||||
psi_coef = psi_coef_sorted
|
||||
N_det = N_det_max
|
||||
soft_touch N_det psi_det psi_coef
|
||||
call diagonalize_CI
|
||||
call save_wavefunction
|
||||
print *, 'N_det = ', N_det
|
||||
print *, 'N_states = ', N_states
|
||||
print *, 'PT2 = ', pt2
|
||||
print *, 'E = ', CI_SC2_energy
|
||||
print *, 'E+PT2 = ', CI_SC2_energy+pt2
|
||||
print *, '-----'
|
||||
endif
|
||||
|
||||
integer :: i_count
|
||||
i_count = 0
|
||||
do while (N_det < N_det_max.and.maxval(abs(pt2(1:N_st))) > pt2_max)
|
||||
print*,'----'
|
||||
print*,''
|
||||
call H_apply_SC2_selected(pt2, norm_pert, H_pert_diag, N_st)
|
||||
call diagonalize_CI_SC2
|
||||
print *, 'N_det = ', N_det
|
||||
do i = 1, N_st
|
||||
print*,'state ',i
|
||||
print *, 'PT2(SC2) = ', pt2(i)
|
||||
print *, 'E(SC2) = ', CI_SC2_energy(i)
|
||||
print *, 'E_before(SC2)+PT2(SC2) = ', (E_old(i)+pt2(i))
|
||||
if(i==1)then
|
||||
print *, 'E(SC2)+PT2(projctd)SC2 = ', (E_old(i)+H_pert_diag(i))
|
||||
endif
|
||||
E_old(i) = CI_SC2_energy(i)
|
||||
enddo
|
||||
if(dabs(E_old(i) - CI_SC2_energy(i) ).le.1.d-12)then
|
||||
i_count += 1
|
||||
selection_criterion_factor = selection_criterion_factor * 0.5d0
|
||||
if(i_count > 5)then
|
||||
exit
|
||||
endif
|
||||
else
|
||||
i_count = 0
|
||||
endif
|
||||
|
||||
! =~=~=~=~=~=~=~=~=~=~=~=~=~!
|
||||
! W r i t e _ o n _ d i s k !
|
||||
! =~=~=~=~=~=~=~=~=~=~=~=~=~!
|
||||
|
||||
call ezfio_set_cisd_sc2_selected_energy(CI_SC2_energy(1))
|
||||
|
||||
enddo
|
||||
N_det = min(N_det_max,N_det)
|
||||
threshold_davidson = 1.d-10
|
||||
touch N_det psi_det psi_coef threshold_davidson davidson_criterion
|
||||
call diagonalize_CI_SC2
|
||||
pt2 = 0.d0
|
||||
|
||||
if(do_pt2_end)then
|
||||
threshold_selectors = 1.d0
|
||||
call H_apply_PT2(pt2, norm_pert, H_pert_diag, N_st)
|
||||
do i = 1, N_st
|
||||
max = 0.d0
|
||||
|
||||
print*,''
|
||||
print*,'-------------'
|
||||
print*,'for state ',i
|
||||
print*,''
|
||||
print*,'N_det = ',N_det
|
||||
do k = 1, N_det
|
||||
if(dabs(psi_coef(k,i)).gt.max)then
|
||||
max = dabs(psi_coef(k,i))
|
||||
imax = k
|
||||
endif
|
||||
enddo
|
||||
double precision :: max
|
||||
integer :: imax
|
||||
print *, 'PT2(SC2) = ', pt2(i)
|
||||
print *, 'E(SC2) = ', CI_SC2_energy(i)
|
||||
print *, 'E_before(SC2)+PT2(SC2) = ', CI_SC2_energy(i)+pt2(i)
|
||||
print *, 'E_before(SC2)+PT2(SC2)_new = ', CI_SC2_energy(i)+pt2(i)* (1.d0 + norm_pert) - H_pert_diag(i)
|
||||
|
||||
print*,'Largest coefficient of the state : ',dabs(psi_coef(imax,i))
|
||||
call get_excitation_degree(ref_bitmask,psi_det(1,1,imax),degree,N_int)
|
||||
print*,'Degree of excitation of this determinant : ',degree
|
||||
|
||||
enddo
|
||||
|
||||
! =~=~=~=~=~=~=~=~=~=~=~=~=~!
|
||||
! W r i t e _ o n _ d i s k !
|
||||
! =~=~=~=~=~=~=~=~=~=~=~=~=~!
|
||||
|
||||
call ezfio_set_cisd_sc2_selected_energy_pt2(CI_SC2_energy(i)+pt2(i)* (1.d0 + norm_pert) - H_pert_diag(i))
|
||||
endif
|
||||
call save_wavefunction
|
||||
deallocate(pt2,norm_pert,H_pert_diag)
|
||||
end
|
|
@ -1,10 +0,0 @@
|
|||
[energy]
|
||||
type: double precision
|
||||
doc: Variational Selected CISD energy
|
||||
interface: ezfio
|
||||
|
||||
[energy_pt2]
|
||||
type: double precision
|
||||
doc: Estimated CISD energy (including PT2)
|
||||
interface: ezfio
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
use bitmasks
|
||||
BEGIN_SHELL [ /usr/bin/env python2 ]
|
||||
from generate_h_apply import *
|
||||
from perturbation import perturbations
|
||||
|
||||
for perturbation in perturbations:
|
||||
s = H_apply("cisd_selection_"+perturbation)
|
||||
s.set_selection_pt2(perturbation)
|
||||
print s
|
||||
END_SHELL
|
||||
|
||||
|
||||
subroutine H_apply_cisd_selection(perturbation,pt2, norm_pert, H_pert_diag, N_st)
|
||||
implicit none
|
||||
character*(64), intent(in) :: perturbation
|
||||
integer, intent(in) :: N_st
|
||||
double precision, intent(inout):: pt2(N_st), norm_pert(N_st), H_pert_diag(N_st)
|
||||
|
||||
BEGIN_SHELL [ /usr/bin/env python2 ]
|
||||
from perturbation import perturbations
|
||||
|
||||
for perturbation in perturbations:
|
||||
print """
|
||||
if (perturbation == '%s') then
|
||||
call H_apply_cisd_selection_%s(pt2, norm_pert, H_pert_diag, N_st)
|
||||
endif
|
||||
"""%(perturbation,perturbation)
|
||||
END_SHELL
|
||||
|
||||
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
Perturbation CISD
|
|
@ -1,455 +0,0 @@
|
|||
====================
|
||||
CISD_selected Module
|
||||
====================
|
||||
|
||||
Documentation
|
||||
=============
|
||||
|
||||
.. Do not edit this section. It was auto-generated from the
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
`cisd <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/cisd_selection.irp.f#L1>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`h_apply_cisd_selection <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f#L13>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`h_apply_cisd_selection_delta_rho_one_point <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L5931>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_delta_rho_one_point_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L5405>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_delta_rho_one_point_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L5734>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_dipole_moment_z <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L5159>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_dipole_moment_z_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L4633>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_dipole_moment_z_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L4962>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L3615>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_2x2 <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L4387>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_2x2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L3861>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_2x2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L4190>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L3089>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L3418>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L2843>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L2317>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L2646>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L2071>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L1545>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L1874>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_projected <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L1299>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_projected_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L773>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_projected_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L1102>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_h_core <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L527>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_h_core_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L1>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_h_core_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L330>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_moller_plesset <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L6703>`_
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_moller_plesset_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L6177>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_moller_plesset_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L6506>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
Needed Modules
|
||||
==============
|
||||
|
||||
.. Do not edit this section. It was auto-generated from the
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
.. image:: tree_dependency.png
|
||||
|
||||
* `Perturbation <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation>`_
|
||||
* `CISD <http://github.com/LCPQ/quantum_package/tree/master/src/CISD>`_
|
||||
|
||||
Needed Modules
|
||||
==============
|
||||
.. Do not edit this section It was auto-generated
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
|
||||
.. image:: tree_dependency.png
|
||||
|
||||
* `Perturbation <http://github.com/LCPQ/quantum_package/tree/master/plugins/Perturbation>`_
|
||||
* `CISD <http://github.com/LCPQ/quantum_package/tree/master/plugins/CISD>`_
|
||||
|
||||
Documentation
|
||||
=============
|
||||
.. Do not edit this section It was auto-generated
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
|
||||
`cisd <http://github.com/LCPQ/quantum_package/tree/master/plugins/CISD_selected/cisd_selection.irp.f#L1>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
h_apply_cisd_diexc
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_diexcorg
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_cisd_diexcp
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_monoexc
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection <http://github.com/LCPQ/quantum_package/tree/master/plugins/CISD_selected/H_apply.irp.f#L13>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_selection_delta_rho_one_point
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
h_apply_cisd_selection_delta_rho_one_point_diexc
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_selection_delta_rho_one_point_diexcorg
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_cisd_selection_delta_rho_one_point_diexcp
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_selection_delta_rho_one_point_monoexc
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_cisd_selection_dipole_moment_z
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
h_apply_cisd_selection_dipole_moment_z_diexc
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_selection_dipole_moment_z_diexcorg
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_cisd_selection_dipole_moment_z_diexcp
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_selection_dipole_moment_z_monoexc
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_2x2
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_2x2_diexc
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_2x2_diexcorg
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_2x2_diexcp
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_2x2_monoexc
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_diexc
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_diexcorg
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_diexcp
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_monoexc
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_sc2
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_sc2_diexc
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_sc2_diexcorg
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_sc2_diexcp
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_sc2_monoexc
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_sc2_no_projected
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_diexc
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_diexcorg
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_diexcp
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_monoexc
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_sc2_projected
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_sc2_projected_diexc
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_sc2_projected_diexcorg
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_sc2_projected_diexcp
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_selection_epstein_nesbet_sc2_projected_monoexc
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_cisd_selection_h_core
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
h_apply_cisd_selection_h_core_diexc
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_selection_h_core_diexcorg
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_cisd_selection_h_core_diexcp
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_selection_h_core_monoexc
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_cisd_selection_moller_plesset
|
||||
Calls H_apply on the HF determinant and selects all connected single and double
|
||||
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
h_apply_cisd_selection_moller_plesset_diexc
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_selection_moller_plesset_diexcorg
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
h_apply_cisd_selection_moller_plesset_diexcp
|
||||
Undocumented
|
||||
|
||||
|
||||
h_apply_cisd_selection_moller_plesset_monoexc
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
program cisd
|
||||
implicit none
|
||||
integer :: i,k
|
||||
|
||||
|
||||
double precision, allocatable :: pt2(:), norm_pert(:), H_pert_diag(:),E_old(:)
|
||||
integer :: N_st, iter
|
||||
character*(64) :: perturbation
|
||||
N_st = N_states
|
||||
allocate (pt2(N_st), norm_pert(N_st), H_pert_diag(N_st),E_old(N_st))
|
||||
|
||||
pt2 = 1.d0
|
||||
perturbation = "epstein_nesbet"
|
||||
E_old(1) = HF_energy
|
||||
call diagonalize_CI
|
||||
do i = 1, N_st
|
||||
print*,'state ',i
|
||||
print *, 'E = ', CI_energy(i)
|
||||
enddo
|
||||
E_old = CI_energy
|
||||
do while (maxval(abs(pt2(1:N_st))) > pt2_max.and.n_det < N_det_max)
|
||||
print*,'----'
|
||||
print*,''
|
||||
call H_apply_cisd_selection(perturbation,pt2, norm_pert, H_pert_diag, N_st)
|
||||
call diagonalize_CI
|
||||
psi_det = psi_det_sorted
|
||||
psi_coef = psi_coef_sorted
|
||||
print*,'N_det = ',N_det
|
||||
do i = 1, N_st
|
||||
print*,'state ',i
|
||||
print *, 'PT2 = ', pt2(i)
|
||||
print *, 'E = ', CI_energy(i)
|
||||
print *, 'E_before +PT2 = ', (E_old(i)+pt2(i))
|
||||
enddo
|
||||
E_old = CI_energy
|
||||
call save_wavefunction
|
||||
enddo
|
||||
N_det = min(N_det,N_det_max)
|
||||
touch N_det psi_det psi_coef
|
||||
call diagonalize_CI
|
||||
call save_wavefunction
|
||||
call ezfio_set_cisd_selected_energy(CI_energy)
|
||||
call ezfio_set_cisd_selected_energy_pt2(CI_energy+pt2)
|
||||
deallocate(pt2,norm_pert,H_pert_diag)
|
||||
end
|
|
@ -1,4 +0,0 @@
|
|||
[energy]
|
||||
type: double precision
|
||||
doc: Calculated energy
|
||||
interface: ezfio
|
|
@ -1 +0,0 @@
|
|||
Determinants
|
|
@ -1,165 +0,0 @@
|
|||
BEGIN_PROVIDER [integer, n_points_angular_grid]
|
||||
implicit none
|
||||
n_points_angular_grid = 50
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [integer, n_points_radial_grid]
|
||||
implicit none
|
||||
n_points_radial_grid = 10000
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [double precision, angular_quadrature_points, (n_points_angular_grid,3) ]
|
||||
&BEGIN_PROVIDER [double precision, weights_angular_points, (n_points_angular_grid)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! weights and grid points for the integration on the angular variables on
|
||||
! the unit sphere centered on (0,0,0)
|
||||
! According to the LEBEDEV scheme
|
||||
END_DOC
|
||||
call cal_quad(n_points_angular_grid, angular_quadrature_points,weights_angular_points)
|
||||
include 'constants.include.F'
|
||||
integer :: i
|
||||
double precision :: accu
|
||||
double precision :: degre_rad
|
||||
!degre_rad = 180.d0/pi
|
||||
!accu = 0.d0
|
||||
!do i = 1, n_points_integration_angular_lebedev
|
||||
! accu += weights_angular_integration_lebedev(i)
|
||||
! weights_angular_points(i) = weights_angular_integration_lebedev(i) * 2.d0 * pi
|
||||
! angular_quadrature_points(i,1) = dcos ( degre_rad * theta_angular_integration_lebedev(i)) &
|
||||
! * dsin ( degre_rad * phi_angular_integration_lebedev(i))
|
||||
! angular_quadrature_points(i,2) = dsin ( degre_rad * theta_angular_integration_lebedev(i)) &
|
||||
! * dsin ( degre_rad * phi_angular_integration_lebedev(i))
|
||||
! angular_quadrature_points(i,3) = dcos ( degre_rad * phi_angular_integration_lebedev(i))
|
||||
!enddo
|
||||
!print*,'ANGULAR'
|
||||
!print*,''
|
||||
!print*,'accu = ',accu
|
||||
!ASSERT( dabs(accu - 1.D0) < 1.d-10)
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [integer , m_knowles]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! value of the "m" parameter in the equation (7) of the paper of Knowles (JCP, 104, 1996)
|
||||
END_DOC
|
||||
m_knowles = 3
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [double precision, grid_points_radial, (n_points_radial_grid)]
|
||||
&BEGIN_PROVIDER [double precision, dr_radial_integral]
|
||||
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! points in [0,1] to map the radial integral [0,\infty]
|
||||
END_DOC
|
||||
dr_radial_integral = 1.d0/dble(n_points_radial_grid-1)
|
||||
integer :: i
|
||||
do i = 1, n_points_radial_grid-1
|
||||
grid_points_radial(i) = (i-1) * dr_radial_integral
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [double precision, grid_points_per_atom, (3,n_points_angular_grid,n_points_radial_grid,nucl_num)]
|
||||
BEGIN_DOC
|
||||
! points for integration over space
|
||||
END_DOC
|
||||
implicit none
|
||||
integer :: i,j,k
|
||||
double precision :: dr,x_ref,y_ref,z_ref
|
||||
double precision :: knowles_function
|
||||
do i = 1, nucl_num
|
||||
x_ref = nucl_coord(i,1)
|
||||
y_ref = nucl_coord(i,2)
|
||||
z_ref = nucl_coord(i,3)
|
||||
do j = 1, n_points_radial_grid-1
|
||||
double precision :: x,r
|
||||
x = grid_points_radial(j) ! x value for the mapping of the [0, +\infty] to [0,1]
|
||||
r = knowles_function(alpha_knowles(int(nucl_charge(i))),m_knowles,x) ! value of the radial coordinate for the integration
|
||||
do k = 1, n_points_angular_grid ! explicit values of the grid points centered around each atom
|
||||
grid_points_per_atom(1,k,j,i) = x_ref + angular_quadrature_points(k,1) * r
|
||||
grid_points_per_atom(2,k,j,i) = y_ref + angular_quadrature_points(k,2) * r
|
||||
grid_points_per_atom(3,k,j,i) = z_ref + angular_quadrature_points(k,3) * r
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [double precision, weight_functions_at_grid_points, (n_points_angular_grid,n_points_radial_grid,nucl_num) ]
|
||||
BEGIN_DOC
|
||||
! Weight function at grid points : w_n(r) according to the equation (22) of Becke original paper (JCP, 88, 1988)
|
||||
! the "n" discrete variable represents the nucleis which in this array is represented by the last dimension
|
||||
! and the points are labelled by the other dimensions
|
||||
END_DOC
|
||||
implicit none
|
||||
integer :: i,j,k,l,m
|
||||
double precision :: r(3)
|
||||
double precision :: accu,cell_function_becke
|
||||
double precision :: tmp_array(nucl_num)
|
||||
! run over all points in space
|
||||
do j = 1, nucl_num ! that are referred to each atom
|
||||
do k = 1, n_points_radial_grid -1 !for each radial grid attached to the "jth" atom
|
||||
do l = 1, n_points_angular_grid ! for each angular point attached to the "jth" atom
|
||||
r(1) = grid_points_per_atom(1,l,k,j)
|
||||
r(2) = grid_points_per_atom(2,l,k,j)
|
||||
r(3) = grid_points_per_atom(3,l,k,j)
|
||||
accu = 0.d0
|
||||
do i = 1, nucl_num ! For each of these points in space, ou need to evaluate the P_n(r)
|
||||
! function defined for each atom "i" by equation (13) and (21) with k == 3
|
||||
tmp_array(i) = cell_function_becke(r,i) ! P_n(r)
|
||||
! Then you compute the summ the P_n(r) function for each of the "r" points
|
||||
accu += tmp_array(i)
|
||||
enddo
|
||||
accu = 1.d0/accu
|
||||
weight_functions_at_grid_points(l,k,j) = tmp_array(j) * accu
|
||||
! print*,weight_functions_at_grid_points(l,k,j)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [double precision, one_body_dm_mo_alpha_at_grid_points, (n_points_angular_grid,n_points_radial_grid,nucl_num) ]
|
||||
&BEGIN_PROVIDER [double precision, one_body_dm_mo_beta_at_grid_points, (n_points_angular_grid,n_points_radial_grid,nucl_num) ]
|
||||
implicit none
|
||||
integer :: i,j,k,l,m
|
||||
double precision :: contrib
|
||||
double precision :: r(3)
|
||||
double precision :: aos_array(ao_num),mos_array(mo_tot_num)
|
||||
do j = 1, nucl_num
|
||||
do k = 1, n_points_radial_grid -1
|
||||
do l = 1, n_points_angular_grid
|
||||
one_body_dm_mo_alpha_at_grid_points(l,k,j) = 0.d0
|
||||
one_body_dm_mo_beta_at_grid_points(l,k,j) = 0.d0
|
||||
r(1) = grid_points_per_atom(1,l,k,j)
|
||||
r(2) = grid_points_per_atom(2,l,k,j)
|
||||
r(3) = grid_points_per_atom(3,l,k,j)
|
||||
|
||||
! call give_all_aos_at_r(r,aos_array)
|
||||
! do i = 1, ao_num
|
||||
! do m = 1, ao_num
|
||||
! contrib = aos_array(i) * aos_array(m)
|
||||
! one_body_dm_mo_alpha_at_grid_points(l,k,j) += one_body_dm_ao_alpha(i,m) * contrib
|
||||
! one_body_dm_mo_beta_at_grid_points(l,k,j) += one_body_dm_ao_beta(i,m) * contrib
|
||||
! enddo
|
||||
! enddo
|
||||
|
||||
call give_all_mos_at_r(r,mos_array)
|
||||
do i = 1, mo_tot_num
|
||||
do m = 1, mo_tot_num
|
||||
contrib = mos_array(i) * mos_array(m)
|
||||
one_body_dm_mo_alpha_at_grid_points(l,k,j) += one_body_dm_mo_alpha(i,m) * contrib
|
||||
one_body_dm_mo_beta_at_grid_points(l,k,j) += one_body_dm_mo_beta(i,m) * contrib
|
||||
enddo
|
||||
enddo
|
||||
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
double precision function step_function_becke(x)
|
||||
implicit none
|
||||
double precision, intent(in) :: x
|
||||
double precision :: f_function_becke
|
||||
integer :: i,n_max_becke
|
||||
|
||||
!if(x.lt.-1.d0)then
|
||||
! step_function_becke = 0.d0
|
||||
!else if (x .gt.1)then
|
||||
! step_function_becke = 0.d0
|
||||
!else
|
||||
step_function_becke = f_function_becke(x)
|
||||
!!n_max_becke = 1
|
||||
do i = 1, 4
|
||||
step_function_becke = f_function_becke(step_function_becke)
|
||||
enddo
|
||||
step_function_becke = 0.5d0*(1.d0 - step_function_becke)
|
||||
!endif
|
||||
end
|
||||
|
||||
double precision function f_function_becke(x)
|
||||
implicit none
|
||||
double precision, intent(in) :: x
|
||||
f_function_becke = 1.5d0 * x - 0.5d0 * x*x*x
|
||||
end
|
||||
|
||||
double precision function cell_function_becke(r,atom_number)
|
||||
implicit none
|
||||
double precision, intent(in) :: r(3)
|
||||
integer, intent(in) :: atom_number
|
||||
BEGIN_DOC
|
||||
! atom_number :: atom on which the cell function of Becke (1988, JCP,88(4))
|
||||
! r(1:3) :: x,y,z coordinantes of the current point
|
||||
END_DOC
|
||||
double precision :: mu_ij,nu_ij
|
||||
double precision :: distance_i,distance_j,step_function_becke
|
||||
integer :: j
|
||||
distance_i = (r(1) - nucl_coord_transp(1,atom_number) ) * (r(1) - nucl_coord_transp(1,atom_number))
|
||||
distance_i += (r(2) - nucl_coord_transp(2,atom_number) ) * (r(2) - nucl_coord_transp(2,atom_number))
|
||||
distance_i += (r(3) - nucl_coord_transp(3,atom_number) ) * (r(3) - nucl_coord_transp(3,atom_number))
|
||||
distance_i = dsqrt(distance_i)
|
||||
cell_function_becke = 1.d0
|
||||
do j = 1, nucl_num
|
||||
if(j==atom_number)cycle
|
||||
distance_j = (r(1) - nucl_coord_transp(1,j) ) * (r(1) - nucl_coord_transp(1,j))
|
||||
distance_j+= (r(2) - nucl_coord_transp(2,j) ) * (r(2) - nucl_coord_transp(2,j))
|
||||
distance_j+= (r(3) - nucl_coord_transp(3,j) ) * (r(3) - nucl_coord_transp(3,j))
|
||||
distance_j = dsqrt(distance_j)
|
||||
mu_ij = (distance_i - distance_j)/nucl_dist(atom_number,j)
|
||||
nu_ij = mu_ij + slater_bragg_type_inter_distance_ua(atom_number,j) * (1.d0 - mu_ij*mu_ij)
|
||||
cell_function_becke *= step_function_becke(nu_ij)
|
||||
enddo
|
||||
end
|
||||
|
|
@ -1,109 +0,0 @@
|
|||
BEGIN_PROVIDER [ double precision, integral_density_alpha_knowles_becke_per_atom, (nucl_num)]
|
||||
&BEGIN_PROVIDER [ double precision, integral_density_beta_knowles_becke_per_atom, (nucl_num)]
|
||||
implicit none
|
||||
double precision :: accu
|
||||
integer :: i,j,k,l
|
||||
double precision :: x
|
||||
double precision :: integrand(n_points_angular_grid), weights(n_points_angular_grid)
|
||||
double precision :: f_average_angular_alpha,f_average_angular_beta
|
||||
double precision :: derivative_knowles_function,knowles_function
|
||||
|
||||
! Run over all nuclei in order to perform the Voronoi partition
|
||||
! according ot equation (6) of the paper of Becke (JCP, (88), 1988)
|
||||
! Here the m index is referred to the w_m(r) weight functions of equation (22)
|
||||
! Run over all points of integrations : there are
|
||||
! n_points_radial_grid (i) * n_points_angular_grid (k)
|
||||
do j = 1, nucl_num
|
||||
integral_density_alpha_knowles_becke_per_atom(j) = 0.d0
|
||||
integral_density_beta_knowles_becke_per_atom(j) = 0.d0
|
||||
do i = 1, n_points_radial_grid-1
|
||||
! Angular integration over the solid angle Omega for a FIXED angular coordinate "r"
|
||||
f_average_angular_alpha = 0.d0
|
||||
f_average_angular_beta = 0.d0
|
||||
do k = 1, n_points_angular_grid
|
||||
f_average_angular_alpha += weights_angular_points(k) * one_body_dm_mo_alpha_at_grid_points(k,i,j) * weight_functions_at_grid_points(k,i,j)
|
||||
f_average_angular_beta += weights_angular_points(k) * one_body_dm_mo_beta_at_grid_points(k,i,j) * weight_functions_at_grid_points(k,i,j)
|
||||
enddo
|
||||
!
|
||||
x = grid_points_radial(i) ! x value for the mapping of the [0, +\infty] to [0,1]
|
||||
double precision :: contrib_integration
|
||||
! print*,m_knowles
|
||||
contrib_integration = derivative_knowles_function(alpha_knowles(int(nucl_charge(j))),m_knowles,x) &
|
||||
*knowles_function(alpha_knowles(int(nucl_charge(j))),m_knowles,x)**2
|
||||
integral_density_alpha_knowles_becke_per_atom(j) += contrib_integration *f_average_angular_alpha
|
||||
integral_density_beta_knowles_becke_per_atom(j) += contrib_integration *f_average_angular_beta
|
||||
enddo
|
||||
integral_density_alpha_knowles_becke_per_atom(j) *= dr_radial_integral
|
||||
integral_density_beta_knowles_becke_per_atom(j) *= dr_radial_integral
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
double precision function knowles_function(alpha,m,x)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! function proposed by Knowles (JCP, 104, 1996) for distributing the radial points :
|
||||
! the Log "m" function ( equation (7) in the paper )
|
||||
END_DOC
|
||||
double precision, intent(in) :: alpha,x
|
||||
integer, intent(in) :: m
|
||||
knowles_function = -alpha * dlog(1.d0-x**m)
|
||||
end
|
||||
|
||||
double precision function derivative_knowles_function(alpha,m,x)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! derivative of the function proposed by Knowles (JCP, 104, 1996) for distributing the radial points
|
||||
END_DOC
|
||||
double precision, intent(in) :: alpha,x
|
||||
integer, intent(in) :: m
|
||||
derivative_knowles_function = alpha * dble(m) * x**(m-1) / (1.d0 - x**m)
|
||||
end
|
||||
|
||||
BEGIN_PROVIDER [double precision, alpha_knowles, (100)]
|
||||
implicit none
|
||||
integer :: i
|
||||
BEGIN_DOC
|
||||
! recommended values for the alpha parameters according to the paper of Knowles (JCP, 104, 1996)
|
||||
! as a function of the nuclear charge
|
||||
END_DOC
|
||||
|
||||
! H-He
|
||||
alpha_knowles(1) = 5.d0
|
||||
alpha_knowles(2) = 5.d0
|
||||
|
||||
! Li-Be
|
||||
alpha_knowles(3) = 7.d0
|
||||
alpha_knowles(4) = 7.d0
|
||||
|
||||
! B-Ne
|
||||
do i = 5, 10
|
||||
alpha_knowles(i) = 5.d0
|
||||
enddo
|
||||
|
||||
! Na-Mg
|
||||
do i = 11, 12
|
||||
alpha_knowles(i) = 7.d0
|
||||
enddo
|
||||
|
||||
! Al-Ar
|
||||
do i = 13, 18
|
||||
alpha_knowles(i) = 5.d0
|
||||
enddo
|
||||
|
||||
! K-Ca
|
||||
do i = 19, 20
|
||||
alpha_knowles(i) = 7.d0
|
||||
enddo
|
||||
|
||||
! Sc-Zn
|
||||
do i = 21, 30
|
||||
alpha_knowles(i) = 5.d0
|
||||
enddo
|
||||
|
||||
! Ga-Kr
|
||||
do i = 31, 36
|
||||
alpha_knowles(i) = 7.d0
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
|
@ -1,219 +0,0 @@
|
|||
|
||||
subroutine cal_quad(n_quad, quad, weight)
|
||||
! --------------------------------------------------------------------------------
|
||||
!
|
||||
! Arguments : subroutine cal_quad
|
||||
! Description: evaluates quadrature points an weights
|
||||
!
|
||||
! Authors : B. Lévy, P. Pernot
|
||||
! Date : 15 Nov 2000
|
||||
! --------------------------------------------------------------------------------
|
||||
implicit none
|
||||
integer, intent(in) :: n_quad
|
||||
double precision, intent(out) :: weight(n_quad)
|
||||
double precision, intent(out) :: quad(n_quad,3)
|
||||
|
||||
! local:
|
||||
double precision, parameter :: zero=0.d0, one= 1.d0
|
||||
|
||||
double precision, parameter :: p=0.707106781186547462d0
|
||||
double precision, parameter :: q=0.577350269189625842d0
|
||||
double precision, parameter :: r=0.301511344577763629d0
|
||||
double precision, parameter :: s=0.904534033733290888d0
|
||||
|
||||
double precision, parameter :: fourpi= 12.5663706143591725d0
|
||||
|
||||
double precision, parameter :: a6=0.166666666666666657d0
|
||||
double precision, parameter :: a18=0.333333333333333329d-01
|
||||
double precision, parameter :: b18=0.666666666666666657d-01
|
||||
double precision, parameter :: a26=0.476190476190476164d-01
|
||||
double precision, parameter :: b26=0.380952380952380987d-01
|
||||
double precision, parameter :: c26=0.321428571428571397d-01
|
||||
double precision, parameter :: a50=0.126984126984126984d-01
|
||||
double precision, parameter :: b50=0.225749559082892431d-01
|
||||
double precision, parameter :: c50=0.210937500000000014d-01
|
||||
double precision, parameter :: d50=0.201733355379188697d-01
|
||||
|
||||
double precision :: apt(3,6),bpt(3,12),cpt(3,8),dpt(3,24)
|
||||
double precision :: awght,bwght,cwght,dwght
|
||||
double precision :: s1, s2, s3
|
||||
integer :: idim, ipt, i1, i2, i3, is1, is2, is3
|
||||
integer :: iquad
|
||||
|
||||
! begin:
|
||||
! l_here ='cal_quad'
|
||||
! call enter (l_here,3)
|
||||
|
||||
! verifications:
|
||||
! message = 'in '//trim(l_here)//', number of dimensions='//&
|
||||
! trim(encode(dimensions_nb))//', must be 3'
|
||||
! call ensure(message, dimensions_nb .eq. 3 )
|
||||
|
||||
! message = 'in '//trim(l_here)//', invalid number of quadrature points ='&
|
||||
! //trim(encode(n_quad))
|
||||
! call ensure(message,(n_quad-2)*(n_quad-6)*(n_quad-18)*(n_quad-26)*(n_quad-50) .eq. 0)
|
||||
|
||||
! initialize weights
|
||||
awght = zero
|
||||
bwght = zero
|
||||
cwght = zero
|
||||
dwght = zero
|
||||
|
||||
! type A points : (+/-1,0,0)
|
||||
awght=a6*fourpi
|
||||
ipt= 1
|
||||
apt=0.
|
||||
do idim = 1, 3
|
||||
apt(idim,ipt)=one
|
||||
ipt=ipt+1
|
||||
apt(idim,ipt)=-one
|
||||
ipt=ipt+1
|
||||
enddo
|
||||
|
||||
! type B points : (+/-p,+/-p,0) with p= 1/sqrt(2)
|
||||
if(n_quad.gt.6) then
|
||||
|
||||
awght=a18*fourpi
|
||||
bwght=b18*fourpi
|
||||
|
||||
s1=p
|
||||
s2=p
|
||||
ipt= 1
|
||||
bpt=0.
|
||||
do idim = 1, 3
|
||||
i1=idim+1
|
||||
if(i1.gt.3) i1=i1-3
|
||||
i2=idim+2
|
||||
if(i2.gt.3) i2=i2-3
|
||||
do is1= 1,2
|
||||
do is2= 1,2
|
||||
bpt(i1,ipt)=s1
|
||||
bpt(i2,ipt)=s2
|
||||
s2=-s2
|
||||
ipt=ipt+1
|
||||
enddo
|
||||
s1=-s1
|
||||
enddo
|
||||
enddo
|
||||
endif
|
||||
|
||||
! type C points : (+/-q,+/-q,+/-q) with q= 1/sqrt(3)
|
||||
if(n_quad.gt.18) then
|
||||
|
||||
awght=a26*fourpi
|
||||
bwght=b26*fourpi
|
||||
cwght=c26*fourpi
|
||||
|
||||
s1=q
|
||||
s2=q
|
||||
s3=q
|
||||
ipt= 1
|
||||
cpt=0.
|
||||
do is1= 1,2
|
||||
do is2= 1,2
|
||||
do is3= 1,2
|
||||
cpt(1,ipt)=s1
|
||||
cpt(2,ipt)=s2
|
||||
cpt(3,ipt)=s3
|
||||
s3=-s3
|
||||
ipt=ipt+1
|
||||
enddo
|
||||
s2=-s2
|
||||
enddo
|
||||
s1=-s1
|
||||
enddo
|
||||
endif
|
||||
|
||||
! type D points : (+/-r,+/-r,+/-s)
|
||||
if(n_quad.gt.26) then
|
||||
|
||||
awght=a50*fourpi
|
||||
bwght=b50*fourpi
|
||||
cwght=c50*fourpi
|
||||
dwght=d50*fourpi
|
||||
|
||||
ipt= 1
|
||||
dpt=0.
|
||||
do i1= 1, 3
|
||||
s1=s
|
||||
s2=r
|
||||
s3=r
|
||||
i2=i1+1
|
||||
if(i2.gt.3) i2=i2-3
|
||||
i3=i1+2
|
||||
if(i3.gt.3) i3=i3-3
|
||||
do is1= 1,2
|
||||
do is2= 1,2
|
||||
do is3= 1,2
|
||||
dpt(i1,ipt)=s1
|
||||
dpt(i2,ipt)=s2
|
||||
dpt(i3,ipt)=s3
|
||||
s3=-s3
|
||||
ipt=ipt+1
|
||||
enddo
|
||||
s2=-s2
|
||||
enddo
|
||||
s1=-s1
|
||||
enddo
|
||||
enddo
|
||||
endif
|
||||
|
||||
! fill the points and weights tables
|
||||
iquad= 1
|
||||
do ipt= 1, 6
|
||||
do idim = 1, 3
|
||||
quad(iquad,idim)=apt(idim,ipt)
|
||||
enddo
|
||||
weight(iquad)=awght
|
||||
iquad=iquad+1
|
||||
enddo
|
||||
|
||||
if(n_quad.gt.6) then
|
||||
do ipt= 1,12
|
||||
do idim = 1, 3
|
||||
quad(iquad,idim)=bpt(idim,ipt)
|
||||
enddo
|
||||
weight(iquad)=bwght
|
||||
iquad=iquad+1
|
||||
enddo
|
||||
endif
|
||||
|
||||
if(n_quad.gt.18) then
|
||||
do ipt= 1,8
|
||||
do idim = 1, 3
|
||||
quad(iquad,idim)=cpt(idim,ipt)
|
||||
enddo
|
||||
weight(iquad)=cwght
|
||||
iquad=iquad+1
|
||||
enddo
|
||||
endif
|
||||
|
||||
if(n_quad.gt.26) then
|
||||
do ipt= 1,24
|
||||
do idim = 1, 3
|
||||
quad(iquad,idim)=dpt(idim,ipt)
|
||||
enddo
|
||||
weight(iquad)=dwght
|
||||
iquad=iquad+1
|
||||
enddo
|
||||
endif
|
||||
|
||||
! if (debug) then
|
||||
! write(6,*)
|
||||
! write(6,'(1X,a)') trim(l_here)//'-d : '//&
|
||||
! '------------------------------------------------------'
|
||||
! write(6,'(1X,a)') trim(l_here)//'-d : '//' I Weight Quad_points'
|
||||
! write(6,'(1X,a)') trim(l_here)//'-d : '//&
|
||||
! '----- ---------- -----------------------------------'
|
||||
! do iquad= 1, n_quad
|
||||
! write(6,'(1X,A,i5,4e12.3)') trim(l_here)//'-d : ',&
|
||||
! iquad,weight(iquad),quad(iquad,1:3)
|
||||
! enddo
|
||||
! write(6,'(1X,a)') trim(l_here)//'-d : '//&
|
||||
! '------------------------------------------------------'
|
||||
! write(6,*)
|
||||
! endif
|
||||
|
||||
! call exit (l_here,3)
|
||||
|
||||
end subroutine cal_quad
|
|
@ -1,24 +0,0 @@
|
|||
program pouet
|
||||
print*,'coucou'
|
||||
read_wf = .True.
|
||||
touch read_wf
|
||||
print*,'m_knowles = ',m_knowles
|
||||
call routine
|
||||
|
||||
end
|
||||
subroutine routine
|
||||
implicit none
|
||||
integer :: i
|
||||
double precision :: accu(2)
|
||||
accu = 0.d0
|
||||
do i = 1, nucl_num
|
||||
accu(1) += integral_density_alpha_knowles_becke_per_atom(i)
|
||||
accu(2) += integral_density_beta_knowles_becke_per_atom(i)
|
||||
enddo
|
||||
print*,'accu(1) = ',accu(1)
|
||||
print*,'Nalpha = ',elec_alpha_num
|
||||
print*,'accu(2) = ',accu(2)
|
||||
print*,'Nalpha = ',elec_beta_num
|
||||
|
||||
|
||||
end
|
5
plugins/eginer/Determinant_tools/.gitignore
vendored
5
plugins/eginer/Determinant_tools/.gitignore
vendored
|
@ -1,5 +0,0 @@
|
|||
IRPF90_temp/
|
||||
IRPF90_man/
|
||||
irpf90.make
|
||||
irpf90_entities
|
||||
tags
|
|
@ -1 +0,0 @@
|
|||
Determinants
|
|
@ -1,12 +0,0 @@
|
|||
=================
|
||||
Determinant_tools
|
||||
=================
|
||||
|
||||
Needed Modules
|
||||
==============
|
||||
.. Do not edit this section It was auto-generated
|
||||
.. by the `update_README.py` script.
|
||||
Documentation
|
||||
=============
|
||||
.. Do not edit this section It was auto-generated
|
||||
.. by the `update_README.py` script.
|
|
@ -1,79 +0,0 @@
|
|||
program put_gess
|
||||
use bitmasks
|
||||
implicit none
|
||||
integer :: i,j,N_det_tmp,N_states_tmp
|
||||
integer :: list(N_int*bit_kind_size,2)
|
||||
integer(bit_kind) :: string(N_int,2)
|
||||
integer(bit_kind) :: psi_det_tmp(N_int,2,3)
|
||||
double precision :: psi_coef_tmp(3,1)
|
||||
|
||||
integer :: iorb,jorb,korb
|
||||
print*,'which open shells ?'
|
||||
read(5,*)iorb,jorb,korb
|
||||
print*,iorb,jorb,korb
|
||||
N_states= 1
|
||||
N_det= 3
|
||||
|
||||
|
||||
list = 0
|
||||
list(1,1) = 1
|
||||
list(1,2) = 1
|
||||
list(2,1) = 2
|
||||
list(2,2) = 2
|
||||
list(3,1) = iorb
|
||||
list(4,1) = jorb
|
||||
list(3,2) = korb
|
||||
print*,'passed'
|
||||
call list_to_bitstring( string(1,1), list(1,1), elec_alpha_num, N_int)
|
||||
print*,'passed'
|
||||
call list_to_bitstring( string(1,2), list(1,2), elec_beta_num, N_int)
|
||||
print*,'passed'
|
||||
call print_det(string,N_int)
|
||||
do j = 1,2
|
||||
do i = 1, N_int
|
||||
psi_det(i,j,1) = string(i,j)
|
||||
enddo
|
||||
enddo
|
||||
psi_coef(1,1) = 1.d0/dsqrt(3.d0)
|
||||
|
||||
print*,'passed 1'
|
||||
list = 0
|
||||
list(1,1) = 1
|
||||
list(1,2) = 1
|
||||
list(2,1) = 2
|
||||
list(2,2) = 2
|
||||
list(3,1) = iorb
|
||||
list(4,1) = korb
|
||||
list(3,2) = jorb
|
||||
call list_to_bitstring( string(1,1), list(1,1), elec_alpha_num, N_int)
|
||||
call list_to_bitstring( string(1,2), list(1,2), elec_beta_num, N_int)
|
||||
call print_det(string,N_int)
|
||||
do j = 1,2
|
||||
do i = 1, N_int
|
||||
psi_det(i,j,2) = string(i,j)
|
||||
enddo
|
||||
enddo
|
||||
psi_coef(2,1) = 1.d0/dsqrt(3.d0)
|
||||
|
||||
print*,'passed 2'
|
||||
list = 0
|
||||
list(1,1) = 1
|
||||
list(1,2) = 1
|
||||
list(2,1) = 2
|
||||
list(2,2) = 2
|
||||
list(3,1) = korb
|
||||
list(4,1) = jorb
|
||||
list(3,2) = iorb
|
||||
call list_to_bitstring( string(1,1), list(1,1), elec_alpha_num, N_int)
|
||||
call list_to_bitstring( string(1,2), list(1,2), elec_beta_num, N_int)
|
||||
call print_det(string,N_int)
|
||||
do j = 1,2
|
||||
do i = 1, N_int
|
||||
psi_det(i,j,3) = string(i,j)
|
||||
enddo
|
||||
enddo
|
||||
psi_coef(3,1) = 1.d0/dsqrt(3.d0)
|
||||
print*,'passed 3'
|
||||
|
||||
call save_wavefunction
|
||||
end
|
|
@ -1,44 +0,0 @@
|
|||
program put_gess
|
||||
use bitmasks
|
||||
implicit none
|
||||
integer :: i,j,N_det_tmp,N_states_tmp
|
||||
integer :: list(N_int*bit_kind_size,2)
|
||||
integer(bit_kind) :: string(N_int,2)
|
||||
integer(bit_kind) :: psi_det_tmp(N_int,2,2)
|
||||
double precision :: psi_coef_tmp(2,1)
|
||||
|
||||
integer :: iorb,jorb
|
||||
print*,'which open shells ?'
|
||||
read(5,*)iorb,jorb
|
||||
N_states= 1
|
||||
N_det= 2
|
||||
|
||||
|
||||
list = 0
|
||||
list(1,1) = iorb
|
||||
list(1,2) = jorb
|
||||
call list_to_bitstring( string(1,1), list(1,1), elec_alpha_num, N_int)
|
||||
call list_to_bitstring( string(1,2), list(1,2), elec_beta_num, N_int)
|
||||
call print_det(string,N_int)
|
||||
do j = 1,2
|
||||
do i = 1, N_int
|
||||
psi_det(i,j,1) = string(i,j)
|
||||
enddo
|
||||
enddo
|
||||
psi_coef(1,1) = 1.d0/dsqrt(2.d0)
|
||||
|
||||
list = 0
|
||||
list(1,1) = jorb
|
||||
list(1,2) = iorb
|
||||
call list_to_bitstring( string(1,1), list(1,1), elec_alpha_num, N_int)
|
||||
call list_to_bitstring( string(1,2), list(1,2), elec_beta_num, N_int)
|
||||
call print_det(string,N_int)
|
||||
do j = 1,2
|
||||
do i = 1, N_int
|
||||
psi_det(i,j,2) = string(i,j)
|
||||
enddo
|
||||
enddo
|
||||
psi_coef(2,1) = 1.d0/dsqrt(2.d0)
|
||||
|
||||
call save_wavefunction
|
||||
end
|
|
@ -1,48 +0,0 @@
|
|||
program put_gess
|
||||
use bitmasks
|
||||
implicit none
|
||||
integer :: i,j,N_det_tmp,N_states_tmp
|
||||
integer :: list(N_int*bit_kind_size,2)
|
||||
integer(bit_kind) :: string(N_int,2)
|
||||
integer(bit_kind) :: psi_det_tmp(N_int,2,2)
|
||||
double precision :: psi_coef_tmp(2,1)
|
||||
|
||||
integer :: iorb,jorb
|
||||
print*,'which open shells ?'
|
||||
read(5,*)iorb,jorb
|
||||
N_states= 1
|
||||
N_det= 2
|
||||
print*,'iorb = ',iorb
|
||||
print*,'jorb = ',jorb
|
||||
|
||||
|
||||
list = 0
|
||||
list(1,1) = iorb
|
||||
list(1,2) = jorb
|
||||
string = 0
|
||||
call list_to_bitstring( string(1,1), list(1,1), elec_alpha_num, N_int)
|
||||
call list_to_bitstring( string(1,2), list(1,2), elec_beta_num, N_int)
|
||||
call print_det(string,N_int)
|
||||
do j = 1,2
|
||||
do i = 1, N_int
|
||||
psi_det(i,j,1) = string(i,j)
|
||||
enddo
|
||||
enddo
|
||||
psi_coef(1,1) = 1.d0/dsqrt(2.d0)
|
||||
|
||||
list = 0
|
||||
list(1,1) = jorb
|
||||
list(1,2) = iorb
|
||||
string = 0
|
||||
call list_to_bitstring( string(1,1), list(1,1), elec_alpha_num, N_int)
|
||||
call list_to_bitstring( string(1,2), list(1,2), elec_beta_num, N_int)
|
||||
call print_det(string,N_int)
|
||||
do j = 1,2
|
||||
do i = 1, N_int
|
||||
psi_det(i,j,2) = string(i,j)
|
||||
enddo
|
||||
enddo
|
||||
psi_coef(2,1) = -1.d0/dsqrt(2.d0)
|
||||
|
||||
call save_wavefunction
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
program print_bitmask
|
||||
implicit none
|
||||
print*,'core'
|
||||
call debug_det(core_bitmask,N_int)
|
||||
print*,'inact'
|
||||
call debug_det(inact_bitmask,N_int)
|
||||
print*,'virt'
|
||||
call debug_det(virt_bitmask,N_int)
|
||||
|
||||
|
||||
end
|
|
@ -1,36 +0,0 @@
|
|||
program pouet
|
||||
implicit none
|
||||
read_wf = .True.
|
||||
touch read_wf
|
||||
call routine
|
||||
end
|
||||
|
||||
subroutine routine
|
||||
implicit none
|
||||
integer :: i,j,number_of_holes,number_of_particles
|
||||
integer :: n_h,n_p
|
||||
do i = 1, N_det
|
||||
n_h = number_of_holes(psi_det(1,1,i))
|
||||
n_p = number_of_particles(psi_det(1,1,i))
|
||||
if(n_h == 0 .and. n_p == 0)then
|
||||
print*,'CAS'
|
||||
else if(n_h == 1 .and. n_p ==0)then
|
||||
print*,'1h'
|
||||
else if(n_h == 0 .and. n_p ==1)then
|
||||
print*,'1p'
|
||||
else if(n_h == 1 .and. n_p ==1)then
|
||||
print*,'1h1p'
|
||||
else if(n_h == 2 .and. n_p ==1)then
|
||||
print*,'2h1p'
|
||||
else if(n_h == 1 .and. n_p ==2)then
|
||||
print*,'1h2p'
|
||||
else
|
||||
print*,'PB !! '
|
||||
call debug_det(psi_det(1,1,i), N_int)
|
||||
stop
|
||||
endif
|
||||
enddo
|
||||
|
||||
|
||||
|
||||
end
|
|
@ -1,100 +0,0 @@
|
|||
program printwf
|
||||
implicit none
|
||||
read_wf = .True.
|
||||
touch read_wf
|
||||
print*,'ref_bitmask_energy = ',ref_bitmask_energy
|
||||
call routine
|
||||
|
||||
end
|
||||
|
||||
subroutine routine
|
||||
implicit none
|
||||
integer :: i
|
||||
integer :: degree
|
||||
double precision :: hij,hii,coef_1,h00
|
||||
integer :: exc(0:2,2,2)
|
||||
double precision :: phase
|
||||
integer :: h1,p1,h2,p2,s1,s2
|
||||
double precision :: get_mo_bielec_integral
|
||||
double precision :: norm_mono_a,norm_mono_b
|
||||
double precision :: norm_mono_a_2,norm_mono_b_2
|
||||
double precision :: norm_mono_a_pert_2,norm_mono_b_pert_2
|
||||
double precision :: norm_mono_a_pert,norm_mono_b_pert
|
||||
norm_mono_a = 0.d0
|
||||
norm_mono_b = 0.d0
|
||||
norm_mono_a_2 = 0.d0
|
||||
norm_mono_b_2 = 0.d0
|
||||
norm_mono_a_pert = 0.d0
|
||||
norm_mono_b_pert = 0.d0
|
||||
norm_mono_a_pert_2 = 0.d0
|
||||
norm_mono_b_pert_2 = 0.d0
|
||||
do i = 1, min(500,N_det)
|
||||
print*,''
|
||||
print*,'i = ',i
|
||||
call debug_det(psi_det(1,1,i),N_int)
|
||||
call get_excitation_degree(psi_det(1,1,i),psi_det(1,1,1),degree,N_int)
|
||||
print*,'degree = ',degree
|
||||
if(degree == 0)then
|
||||
print*,'Reference determinant '
|
||||
call i_H_j(psi_det(1,1,i),psi_det(1,1,i),N_int,h00)
|
||||
else
|
||||
call i_H_j(psi_det(1,1,i),psi_det(1,1,i),N_int,hii)
|
||||
call i_H_j(psi_det(1,1,1),psi_det(1,1,i),N_int,hij)
|
||||
coef_1 = hij/(h00-hii)
|
||||
call get_excitation(psi_det(1,1,1),psi_det(1,1,i),exc,degree,phase,N_int)
|
||||
call decode_exc(exc,degree,h1,p1,h2,p2,s1,s2)
|
||||
print*,'phase = ',phase
|
||||
if(degree == 1)then
|
||||
print*,'s1',s1
|
||||
print*,'h1,p1 = ',h1,p1
|
||||
if(s1 == 1)then
|
||||
norm_mono_a += dabs(psi_coef(i,1)/psi_coef(1,1))
|
||||
norm_mono_a_2 += dabs(psi_coef(i,1)/psi_coef(1,1))**2
|
||||
norm_mono_a_pert += dabs(coef_1)
|
||||
norm_mono_a_pert_2 += dabs(coef_1)**2
|
||||
else
|
||||
norm_mono_b += dabs(psi_coef(i,1)/psi_coef(1,1))
|
||||
norm_mono_b_2 += dabs(psi_coef(i,1)/psi_coef(1,1))**2
|
||||
norm_mono_b_pert += dabs(coef_1)
|
||||
norm_mono_b_pert_2 += dabs(coef_1)**2
|
||||
endif
|
||||
! print*,'< h | Ka| p > = ',get_mo_bielec_integral(h1,list_act(1),list_act(1),p1,mo_integrals_map)
|
||||
double precision :: hmono,hdouble
|
||||
call i_H_j_verbose(psi_det(1,1,1),psi_det(1,1,i),N_int,hij,hmono,hdouble)
|
||||
print*,'hmono = ',hmono
|
||||
print*,'hdouble = ',hdouble
|
||||
print*,'hmono+hdouble = ',hmono+hdouble
|
||||
print*,'hij = ',hij
|
||||
else
|
||||
print*,'s1',s1
|
||||
print*,'h1,p1 = ',h1,p1
|
||||
print*,'s2',s2
|
||||
print*,'h2,p2 = ',h2,p2
|
||||
! print*,'< h | Ka| p > = ',get_mo_bielec_integral(h1,h2,p1,p2,mo_integrals_map)
|
||||
endif
|
||||
|
||||
print*,'<Ref| H |D_I> = ',hij
|
||||
print*,'Delta E = ',h00-hii
|
||||
print*,'coef pert (1) = ',coef_1
|
||||
endif
|
||||
print*,'amplitude = ',psi_coef(i,1)/psi_coef(1,1)
|
||||
|
||||
enddo
|
||||
|
||||
|
||||
print*,''
|
||||
print*,''
|
||||
print*,''
|
||||
print*,'L1 norm of mono alpha = ',norm_mono_a
|
||||
print*,'L1 norm of mono beta = ',norm_mono_b
|
||||
print*, '---'
|
||||
print*,'L2 norm of mono alpha = ',norm_mono_a_2
|
||||
print*,'L2 norm of mono beta = ',norm_mono_b_2
|
||||
print*, '-- perturbative mono'
|
||||
print*,''
|
||||
print*,'L1 norm of pert alpha = ',norm_mono_a_pert
|
||||
print*,'L1 norm of pert beta = ',norm_mono_b_pert
|
||||
print*,'L2 norm of pert alpha = ',norm_mono_a_pert_2
|
||||
print*,'L2 norm of pert beta = ',norm_mono_b_pert_2
|
||||
|
||||
end
|
|
@ -1,50 +0,0 @@
|
|||
program save_only_singles
|
||||
implicit none
|
||||
read_wf = .True.
|
||||
touch read_wf
|
||||
call routine
|
||||
end
|
||||
|
||||
subroutine routine
|
||||
implicit none
|
||||
integer :: i,j,k,l
|
||||
use bitmasks
|
||||
integer :: n_det_restart,degree
|
||||
integer(bit_kind),allocatable :: psi_det_tmp(:,:,:)
|
||||
double precision ,allocatable :: psi_coef_tmp(:,:),accu(:)
|
||||
integer, allocatable :: index_restart(:)
|
||||
allocate(index_restart(N_det))
|
||||
N_det_restart = 0
|
||||
do i = 1, N_det
|
||||
call get_excitation_degree(psi_det(1,1,1),psi_det(1,1,i),degree,N_int)
|
||||
if(degree == 0 .or. degree==1)then
|
||||
N_det_restart +=1
|
||||
index_restart(N_det_restart) = i
|
||||
cycle
|
||||
endif
|
||||
enddo
|
||||
allocate (psi_det_tmp(N_int,2,N_det_restart),psi_coef_tmp(N_det_restart,N_states),accu(N_states))
|
||||
accu = 0.d0
|
||||
do i = 1, N_det_restart
|
||||
do j = 1, N_int
|
||||
psi_det_tmp(j,1,i) = psi_det(j,1,index_restart(i))
|
||||
psi_det_tmp(j,2,i) = psi_det(j,2,index_restart(i))
|
||||
enddo
|
||||
do j = 1,N_states
|
||||
psi_coef_tmp(i,j) = psi_coef(index_restart(i),j)
|
||||
accu(j) += psi_coef_tmp(i,j) * psi_coef_tmp(i,j)
|
||||
enddo
|
||||
enddo
|
||||
do j = 1, N_states
|
||||
accu(j) = 1.d0/dsqrt(accu(j))
|
||||
enddo
|
||||
do j = 1,N_states
|
||||
do i = 1, N_det_restart
|
||||
psi_coef_tmp(i,j) = psi_coef_tmp(i,j) * accu(j)
|
||||
enddo
|
||||
enddo
|
||||
call save_wavefunction_general(N_det_restart,N_states,psi_det_tmp,N_det_restart,psi_coef_tmp)
|
||||
|
||||
deallocate (psi_det_tmp,psi_coef_tmp,accu,index_restart)
|
||||
|
||||
end
|
|
@ -1,37 +0,0 @@
|
|||
program Dressed_Ref_Hamiltonian implicit none
|
||||
BEGIN_DOC
|
||||
! TODO
|
||||
END_DOC
|
||||
print *, ' _/ '
|
||||
print *, ' -:\_?, _Jm####La '
|
||||
print *, 'J"(:" > _]#AZ#Z#UUZ##, '
|
||||
print *, '_,::./ %(|i%12XmX1*1XL _?, '
|
||||
print *, ' \..\ _\(vmWQwodY+ia%lnL _",/ ( '
|
||||
print *, ' .:< ]J=mQD?WXn<uQWmmvd, -.-:=!'
|
||||
print *, ' "{Z jC]QW|=3Zv)Bi3BmXv3 = _7'
|
||||
print *, ' ]h[Z6)WQ;)jZs]C;|$BZv+, : ./ '
|
||||
print *, ' -#sJX%$Wmm#ev]hinW#Xi:` c ; '
|
||||
print *, ' #X#X23###1}vI$WWmX1>|,)nr" '
|
||||
print *, ' 4XZ#Xov1v}=)vnXAX1nnv;1n" '
|
||||
print *, ' ]XX#ZXoovvvivnnnlvvo2*i7 '
|
||||
print *, ' "23Z#1S2oo2XXSnnnoSo2>v" '
|
||||
print *, ' miX#L -~`""!!1}oSoe|i7 '
|
||||
print *, ' 4cn#m, v221=|v[ '
|
||||
print *, ' ]hI3Zma,;..__wXSe=+vo '
|
||||
print *, ' ]Zov*XSUXXZXZXSe||vo2 '
|
||||
print *, ' ]Z#><iiii|i||||==vn2( '
|
||||
print *, ' ]Z#i<ii||+|=||=:{no2[ '
|
||||
print *, ' ]ZUsiiiiivi|=||=vo22[ '
|
||||
print *, ' ]XZvlliiIi|i=|+|vooo '
|
||||
print *, ' =v1llli||||=|||||lii( '
|
||||
print *, ' ]iillii||||||||=>=|< '
|
||||
print *, ' -ziiiii||||||+||==+> '
|
||||
print *, ' -%|+++||=|=+|=|==/ '
|
||||
print *, ' -a>====+|====-:- '
|
||||
print *, ' "~,- -- /- '
|
||||
print *, ' -. )> '
|
||||
print *, ' .~ +- '
|
||||
print *, ' . .... : . '
|
||||
print *, ' -------~ '
|
||||
print *, ''
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
MRCC_Utils
|
|
@ -1,16 +0,0 @@
|
|||
=======================
|
||||
Dressed_Ref_Hamiltonian
|
||||
=======================
|
||||
The following modules proposes to build an effective Hamiltonian
|
||||
spanned on the reference determinants supposed to be the CAS ones.
|
||||
The effective matrix Hamiltonian are built using the multi parentage
|
||||
proposal used in the MR-CCSD formalism of Giner et. al. (JCP, 144, 064101 (2016); doi: 10.1063/1.4940781)
|
||||
|
||||
Needed Modules
|
||||
==============
|
||||
.. Do not edit this section It was auto-generated
|
||||
.. by the `update_README.py` script.
|
||||
Documentation
|
||||
=============
|
||||
.. Do not edit this section It was auto-generated
|
||||
.. by the `update_README.py` script.
|
|
@ -1,41 +0,0 @@
|
|||
BEGIN_PROVIDER [double precision, psi_ref_coef_dressed, (n_det_ref,N_states) ]
|
||||
&BEGIN_PROVIDER [double precision, energies_ref_dressed, (N_states) ]
|
||||
implicit none
|
||||
integer :: i,j,k,l,istate,igoodstate
|
||||
double precision, allocatable :: H_matrix_tmp(:,:)
|
||||
double precision, allocatable :: eigvalues(:),eigvectors(:,:),psi_coef_ref_tmp(:)
|
||||
double precision :: accu, accu1
|
||||
allocate(H_matrix_tmp(n_det_ref,n_det_ref))
|
||||
allocate(eigvalues(n_det_ref))
|
||||
allocate(eigvectors(n_det_ref,n_det_ref))
|
||||
allocate(psi_coef_ref_tmp(n_det_ref))
|
||||
do istate = 1, N_states
|
||||
accu1 = 0.d0
|
||||
do j = 1, n_det_ref
|
||||
accu1 += psi_ref_coef(j,istate)**2 ! norm of the "istate" eigenvector in the projected in the reference space
|
||||
do k = 1, n_det_ref
|
||||
H_matrix_tmp(j,k) = hamiltonian_total_dressed(j,k,istate)
|
||||
enddo
|
||||
enddo
|
||||
accu1 = 1.d0/dsqrt(accu1)
|
||||
do j = 1, n_det_ref
|
||||
psi_coef_ref_tmp(j) = psi_ref_coef(j,istate) * accu1
|
||||
enddo
|
||||
call lapack_diagd(eigvalues,eigvectors,H_matrix_tmp,n_det_ref,n_det_ref)
|
||||
do j = 1, n_det_ref
|
||||
accu = 0.d0
|
||||
do k = 1, n_det_ref
|
||||
accu += eigvectors(k,j) * psi_coef_ref_tmp(k)
|
||||
enddo
|
||||
if(dabs(accu).gt.0.9d0)then
|
||||
igoodstate = j
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
energies_ref_dressed(istate) = eigvalues(igoodstate)
|
||||
do j = 1,n_det_ref
|
||||
psi_ref_coef_dressed(j,istate) = eigvectors(j,igoodstate)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
|
@ -1,46 +0,0 @@
|
|||
BEGIN_PROVIDER [double precision, dressing_ref_hamiltonian, (n_det_ref,n_det_ref,N_states)]
|
||||
implicit none
|
||||
integer :: i,j,k,l
|
||||
integer :: ii,jj,istate
|
||||
double precision :: hij,sec_order,H_ref(N_det_ref),hik,hkl
|
||||
integer :: idx(0:N_det_ref)
|
||||
double precision :: accu_negative,accu_positive,phase
|
||||
integer :: degree_exc_ionic,degree_exc_neutral,exc(0:2,2,2)
|
||||
dressing_ref_hamiltonian = 0.d0
|
||||
accu_negative = 0.d0
|
||||
accu_positive = 0.d0
|
||||
integer :: h1,p1,h2,p2,s1,s2
|
||||
do istate = 1, N_states
|
||||
do i = 1, N_det_non_ref
|
||||
call filter_connected_i_H_psi0(psi_ref,psi_non_ref(1,1,i),N_int,N_det_ref,idx)
|
||||
H_ref = 0.d0
|
||||
do ii=1,idx(0)
|
||||
k = idx(ii)
|
||||
!DEC$ FORCEINLINE
|
||||
call i_H_j(psi_ref(1,1,k),psi_non_ref(1,1,i),N_int,hij)
|
||||
H_ref(k) = hij
|
||||
enddo
|
||||
do ii= 1, idx(0)
|
||||
k = idx(ii)
|
||||
hik = H_ref(k) * lambda_mrcc(istate,i)
|
||||
do jj = 1, idx(0)
|
||||
l = idx(jj)
|
||||
dressing_ref_hamiltonian(k,l,istate) += hik * H_ref(l)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [double precision, hamiltonian_total_dressed, (n_det_ref,n_det_ref,N_states)]
|
||||
implicit none
|
||||
integer :: i,j,k
|
||||
do k = 1, N_states
|
||||
do i = 1, N_det_ref
|
||||
do j = 1, N_det_ref
|
||||
hamiltonian_total_dressed(j,i,k) = dressing_ref_hamiltonian(j,i,k) + ref_hamiltonian_matrix(j,i)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
|
@ -1,108 +0,0 @@
|
|||
program print
|
||||
read_wf = .True.
|
||||
touch read_wf
|
||||
call provide_all_stuffs
|
||||
end
|
||||
subroutine provide_all_stuffs
|
||||
implicit none
|
||||
provide ref_hamiltonian_matrix dressing_ref_hamiltonian
|
||||
integer :: i,j,istate
|
||||
double precision, allocatable :: psi_restart_ref_normalized(:),psi_ref_zeroth_order(:),psi_ref_dressed(:)
|
||||
double precision, allocatable :: eigvalues(:),eigvectors(:,:)
|
||||
double precision, allocatable :: H_dressed(:,:)
|
||||
double precision, allocatable :: H_print(:,:)
|
||||
double precision :: accu_norm
|
||||
allocate (H_dressed(N_det_ref,N_det_ref))
|
||||
allocate (H_print(N_det_ref,N_det_ref))
|
||||
allocate (psi_restart_ref_normalized(N_det_ref))
|
||||
allocate (psi_ref_zeroth_order(N_det_ref))
|
||||
print*,'# nuclear_repulsion = ',nuclear_repulsion
|
||||
allocate (psi_ref_dressed(N_det_ref))
|
||||
allocate (eigvalues(N_det_ref))
|
||||
allocate (eigvectors(N_det_ref,N_det_ref))
|
||||
|
||||
|
||||
|
||||
do istate= 1, N_states
|
||||
do i = 1, N_det_ref
|
||||
do j = 1, N_det_ref
|
||||
H_print(i,j) = ref_hamiltonian_matrix(j,i)
|
||||
enddo
|
||||
enddo
|
||||
do i = 1, N_det_ref
|
||||
H_print(i,i) -= ref_hamiltonian_matrix(1,1)
|
||||
enddo
|
||||
print*,'Ref Hamiltonian matrix emelent = ',ref_hamiltonian_matrix(1,1)
|
||||
print*,'ISTATE = ',istate
|
||||
accu_norm = 0.d0
|
||||
do i = 1, N_det_ref
|
||||
accu_norm += psi_ref_coef(i,1) * psi_ref_coef(i,1)
|
||||
enddo
|
||||
print*,'accu_norm = ',accu_norm
|
||||
accu_norm = 1.d0/dsqrt(accu_norm)
|
||||
do i = 1, N_det_ref
|
||||
psi_restart_ref_normalized(i) = psi_ref_coef(i,istate)* accu_norm
|
||||
enddo
|
||||
print*,'-------------------'
|
||||
print*,'-------------------'
|
||||
print*,'CAS MATRIX '
|
||||
print*,''
|
||||
do i = 1, N_det_ref
|
||||
write(*,'(10(F8.5 ,4X))') H_print(i,:)
|
||||
enddo
|
||||
print*,''
|
||||
print*,'-------------------'
|
||||
print*,'-------------------'
|
||||
print*,'CAS MATRIX DRESSING'
|
||||
print*,''
|
||||
do i = 1, N_det_ref
|
||||
write(*,'(10(F8.5 ,4X))') dressing_ref_hamiltonian(i,:,istate)
|
||||
enddo
|
||||
print*,''
|
||||
print*,'-------------------'
|
||||
print*,'-------------------'
|
||||
do i = 1, N_det_ref
|
||||
do j = 1, N_det_ref
|
||||
H_dressed(j,i) = ref_hamiltonian_matrix(j,i) + dressing_ref_hamiltonian(j,i,istate)
|
||||
H_print(i,j) += dressing_ref_hamiltonian(j,i,istate)
|
||||
enddo
|
||||
enddo
|
||||
print*,''
|
||||
print*,'-------------------'
|
||||
print*,'-------------------'
|
||||
print*,'TOTAL DRESSED H MATRIX '
|
||||
print*,''
|
||||
do i = 1, N_det_ref
|
||||
write(*,'(10(F8.5 ,4X))') H_print(i,:)
|
||||
enddo
|
||||
print*,''
|
||||
print*,''
|
||||
print*,''
|
||||
|
||||
|
||||
call lapack_diagd(eigvalues,eigvectors,ref_hamiltonian_matrix,n_det_ref,n_det_ref)
|
||||
do i = 1, N_det_ref
|
||||
psi_ref_zeroth_order(i) = eigvectors(i,istate)
|
||||
enddo
|
||||
|
||||
|
||||
call lapack_diagd(eigvalues,eigvectors,H_dressed,n_det_ref,n_det_ref)
|
||||
do i = 1, N_det_ref
|
||||
psi_ref_dressed(i) = eigvectors(i,istate)
|
||||
enddo
|
||||
print*,'E+PT2 = ',eigvalues(istate) + nuclear_repulsion
|
||||
do i = 1, N_det_ref
|
||||
write(*,'(10(F10.7 ,4X))') psi_ref_coef(i,istate)/psi_ref_coef(1,istate), psi_ref_dressed(i)/psi_ref_dressed(1),psi_ref_zeroth_order(i)/psi_ref_zeroth_order(1)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
deallocate (H_dressed)
|
||||
deallocate (H_print)
|
||||
deallocate (psi_restart_ref_normalized)
|
||||
deallocate (psi_ref_zeroth_order)
|
||||
deallocate (psi_ref_dressed)
|
||||
|
||||
deallocate (eigvalues)
|
||||
deallocate (eigvectors)
|
||||
|
||||
end
|
|
@ -1,62 +0,0 @@
|
|||
[threshold_lmct]
|
||||
type: double precision
|
||||
doc: threshold to select the pertinent LMCT excitations at second order
|
||||
interface: ezfio,provider,ocaml
|
||||
default: 0.01
|
||||
|
||||
|
||||
[threshold_mlct]
|
||||
type: double precision
|
||||
doc: threshold to select the pertinent MLCT excitations at second order
|
||||
interface: ezfio,provider,ocaml
|
||||
default: 0.01
|
||||
|
||||
[threshold_fobo_dm]
|
||||
type: double precision
|
||||
doc: threshold to eliminate small density matrix elements in the fobo procedure
|
||||
interface: ezfio,provider,ocaml
|
||||
default: 0.00001
|
||||
|
||||
[do_it_perturbative]
|
||||
type: logical
|
||||
doc: if true, when a given 1h or 1p determinant is not selected because of its perturbation estimate, then if its coefficient is lower than threshold_perturbative, it is acounted in the FOBOCI differential density matrices
|
||||
interface: ezfio,provider,ocaml
|
||||
default: .False.
|
||||
|
||||
[threshold_perturbative]
|
||||
type: double precision
|
||||
doc: when do_it_perturbative is True, threshold_perturbative select if a given determinant ia selected or not for beign taken into account in the FOBO-SCF treatment. In practive, if the coefficient is larger then threshold_perturbative it means that it not selected as the perturbation should not be too importan. A value of 0.01 is in general OK.
|
||||
interface: ezfio,provider,ocaml
|
||||
default: 0.001
|
||||
|
||||
[speed_up_convergence_foboscf]
|
||||
type: logical
|
||||
doc: if true, the threshold of the FOBO-SCF algorithms are increased with the iterations
|
||||
interface: ezfio,provider,ocaml
|
||||
default: .True.
|
||||
|
||||
|
||||
[dressing_2h2p]
|
||||
type: logical
|
||||
doc: if true, you do dress with 2h2p excitations each FOBOCI matrix
|
||||
interface: ezfio,provider,ocaml
|
||||
default: .False.
|
||||
|
||||
[second_order_h]
|
||||
type: logical
|
||||
doc: if true, you do the FOBOCI calculation using second order intermediate Hamiltonian
|
||||
interface: ezfio,provider,ocaml
|
||||
default: .False.
|
||||
|
||||
[do_all_2p]
|
||||
type: logical
|
||||
doc: if true, you do all 2p type excitation on the LMCT
|
||||
interface: ezfio,provider,ocaml
|
||||
default: .True.
|
||||
|
||||
[selected_fobo_ci]
|
||||
type: logical
|
||||
doc: if true, for each CI step you will run a CIPSI calculation that stops at pt2_max
|
||||
interface: ezfio,provider,ocaml
|
||||
default: .False.
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
use bitmasks
|
||||
BEGIN_SHELL [ /usr/bin/env python2 ]
|
||||
from generate_h_apply import *
|
||||
|
||||
s = H_apply("just_1h_1p")
|
||||
s.set_selection_pt2("epstein_nesbet_2x2")
|
||||
s.unset_skip()
|
||||
s.filter_only_1h1p()
|
||||
print s
|
||||
|
||||
|
||||
s = H_apply("all_but_1h_and_1p")
|
||||
s.set_selection_pt2("epstein_nesbet_2x2")
|
||||
s.unset_skip()
|
||||
s.filter_1h()
|
||||
s.filter_1p()
|
||||
print s
|
||||
|
||||
|
||||
|
||||
s = H_apply("only_1h2p")
|
||||
s.set_selection_pt2("epstein_nesbet")
|
||||
s.filter_only_1h2p()
|
||||
s.unset_skip()
|
||||
print s
|
||||
|
||||
s = H_apply("only_2h2p")
|
||||
s.set_selection_pt2("epstein_nesbet")
|
||||
s.filter_only_2h2p()
|
||||
s.unset_skip()
|
||||
print s
|
||||
|
||||
|
||||
s = H_apply("only_2p")
|
||||
s.set_selection_pt2("epstein_nesbet")
|
||||
s.filter_only_2p()
|
||||
s.unset_skip()
|
||||
print s
|
||||
|
||||
s = H_apply("just_mono",do_double_exc=False)
|
||||
s.set_selection_pt2("epstein_nesbet_2x2")
|
||||
s.unset_skip()
|
||||
print s
|
||||
|
||||
|
||||
|
||||
s = H_apply("just_mono_no_1h_no_1p",do_double_exc=False)
|
||||
s.set_selection_pt2("epstein_nesbet_2x2")
|
||||
s.unset_skip()
|
||||
s.filter_1h()
|
||||
s.filter_1p()
|
||||
print s
|
||||
|
||||
s = H_apply("just_mono_no_1h_no_1p_no_2p",do_double_exc=False)
|
||||
s.set_selection_pt2("epstein_nesbet_2x2")
|
||||
s.unset_skip()
|
||||
s.filter_1h()
|
||||
s.filter_1p()
|
||||
s.filter_2p()
|
||||
print s
|
||||
|
||||
|
||||
END_SHELL
|
||||
|
|
@ -1,572 +0,0 @@
|
|||
subroutine H_apply_dressed_pert_diexc(key_in, hole_1,particl_1, hole_2, particl_2, i_generator, iproc_in , delta_ij_generators_, Ndet_generators,psi_det_generators_input,E_ref )
|
||||
use omp_lib
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Generate all double excitations of key_in using the bit masks of holes and
|
||||
! particles.
|
||||
! Assume N_int is already provided.
|
||||
END_DOC
|
||||
integer,parameter :: size_max = 3072
|
||||
|
||||
integer, intent(in) :: Ndet_generators
|
||||
double precision, intent(inout) :: delta_ij_generators_(Ndet_generators,Ndet_generators),E_ref
|
||||
integer(bit_kind), intent(in) :: psi_det_generators_input(N_int,2,Ndet_generators)
|
||||
|
||||
integer ,intent(in) :: i_generator
|
||||
integer(bit_kind),intent(in) :: key_in(N_int,2)
|
||||
integer(bit_kind),allocatable :: keys_out(:,:,:)
|
||||
integer(bit_kind), intent(in) :: hole_1(N_int,2), particl_1(N_int,2)
|
||||
integer(bit_kind), intent(in) :: hole_2(N_int,2), particl_2(N_int,2)
|
||||
integer, intent(in) :: iproc_in
|
||||
integer(bit_kind), allocatable :: hole_save(:,:)
|
||||
integer(bit_kind), allocatable :: key(:,:),hole(:,:), particle(:,:)
|
||||
integer(bit_kind), allocatable :: hole_tmp(:,:), particle_tmp(:,:)
|
||||
integer(bit_kind), allocatable :: key_union_hole_part(:)
|
||||
integer :: ii,i,jj,j,k,ispin,l
|
||||
integer, allocatable :: occ_particle(:,:), occ_hole(:,:)
|
||||
integer, allocatable :: occ_particle_tmp(:,:), occ_hole_tmp(:,:)
|
||||
integer :: kk,pp,other_spin,key_idx
|
||||
integer :: N_elec_in_key_hole_1(2),N_elec_in_key_part_1(2)
|
||||
integer :: N_elec_in_key_hole_2(2),N_elec_in_key_part_2(2)
|
||||
|
||||
double precision :: mo_bielec_integral
|
||||
logical :: is_a_two_holes_two_particles
|
||||
integer, allocatable :: ia_ja_pairs(:,:,:)
|
||||
integer, allocatable :: ib_jb_pairs(:,:)
|
||||
double precision :: diag_H_mat_elem
|
||||
integer :: iproc
|
||||
integer :: jtest_vvvv
|
||||
integer(omp_lock_kind), save :: lck, ifirst=0
|
||||
if (ifirst == 0) then
|
||||
!$ call omp_init_lock(lck)
|
||||
ifirst=1
|
||||
endif
|
||||
|
||||
logical :: check_double_excitation
|
||||
logical :: is_a_1h1p
|
||||
logical :: b_cycle
|
||||
check_double_excitation = .True.
|
||||
iproc = iproc_in
|
||||
|
||||
|
||||
|
||||
|
||||
PROVIDE elec_num_tab
|
||||
! !$OMP PARALLEL DEFAULT(SHARED) &
|
||||
! !$OMP PRIVATE(i,j,k,l,keys_out,hole,particle, &
|
||||
! !$OMP occ_particle,occ_hole,j_a,k_a,other_spin, &
|
||||
! !$OMP hole_save,ispin,jj,l_a,ib_jb_pairs,array_pairs, &
|
||||
! !$OMP accu,i_a,hole_tmp,particle_tmp,occ_particle_tmp, &
|
||||
! !$OMP occ_hole_tmp,key_idx,i_b,j_b,key,N_elec_in_key_part_1,&
|
||||
! !$OMP N_elec_in_key_hole_1,N_elec_in_key_part_2, &
|
||||
! !$OMP N_elec_in_key_hole_2,ia_ja_pairs,key_union_hole_part) &
|
||||
! !$OMP SHARED(key_in,N_int,elec_num_tab,mo_tot_num, &
|
||||
! !$OMP hole_1, particl_1, hole_2, particl_2, &
|
||||
! !$OMP elec_alpha_num,i_generator) FIRSTPRIVATE(iproc)
|
||||
!$ iproc = omp_get_thread_num()
|
||||
allocate (keys_out(N_int,2,size_max), hole_save(N_int,2), &
|
||||
key(N_int,2),hole(N_int,2), particle(N_int,2), hole_tmp(N_int,2),&
|
||||
particle_tmp(N_int,2), occ_particle(N_int*bit_kind_size,2), &
|
||||
occ_hole(N_int*bit_kind_size,2), occ_particle_tmp(N_int*bit_kind_size,2),&
|
||||
occ_hole_tmp(N_int*bit_kind_size,2),key_union_hole_part(N_int))
|
||||
|
||||
|
||||
|
||||
|
||||
!!!! First couple hole particle
|
||||
do j = 1, N_int
|
||||
hole(j,1) = iand(hole_1(j,1),key_in(j,1))
|
||||
hole(j,2) = iand(hole_1(j,2),key_in(j,2))
|
||||
particle(j,1) = iand(xor(particl_1(j,1),key_in(j,1)),particl_1(j,1))
|
||||
particle(j,2) = iand(xor(particl_1(j,2),key_in(j,2)),particl_1(j,2))
|
||||
enddo
|
||||
call bitstring_to_list(particle(1,1),occ_particle(1,1),N_elec_in_key_part_1(1),N_int)
|
||||
call bitstring_to_list(particle(1,2),occ_particle(1,2),N_elec_in_key_part_1(2),N_int)
|
||||
call bitstring_to_list(hole(1,1),occ_hole(1,1),N_elec_in_key_hole_1(1),N_int)
|
||||
call bitstring_to_list(hole(1,2),occ_hole(1,2),N_elec_in_key_hole_1(2),N_int)
|
||||
allocate (ia_ja_pairs(2,0:(elec_alpha_num)*mo_tot_num,2), &
|
||||
ib_jb_pairs(2,0:(elec_alpha_num)*mo_tot_num))
|
||||
|
||||
do ispin=1,2
|
||||
i=0
|
||||
do ii=N_elec_in_key_hole_1(ispin),1,-1 ! hole
|
||||
i_a = occ_hole(ii,ispin)
|
||||
ASSERT (i_a > 0)
|
||||
ASSERT (i_a <= mo_tot_num)
|
||||
|
||||
do jj=1,N_elec_in_key_part_1(ispin) !particle
|
||||
j_a = occ_particle(jj,ispin)
|
||||
ASSERT (j_a > 0)
|
||||
ASSERT (j_a <= mo_tot_num)
|
||||
i += 1
|
||||
ia_ja_pairs(1,i,ispin) = i_a
|
||||
ia_ja_pairs(2,i,ispin) = j_a
|
||||
enddo
|
||||
enddo
|
||||
ia_ja_pairs(1,0,ispin) = i
|
||||
enddo
|
||||
|
||||
key_idx = 0
|
||||
|
||||
integer :: i_a,j_a,i_b,j_b,k_a,l_a,k_b,l_b
|
||||
integer(bit_kind) :: test(N_int,2)
|
||||
double precision :: accu
|
||||
logical, allocatable :: array_pairs(:,:)
|
||||
allocate(array_pairs(mo_tot_num,mo_tot_num))
|
||||
accu = 0.d0
|
||||
do ispin=1,2
|
||||
other_spin = iand(ispin,1)+1
|
||||
! !$OMP DO SCHEDULE (static)
|
||||
do ii=1,ia_ja_pairs(1,0,ispin)
|
||||
i_a = ia_ja_pairs(1,ii,ispin)
|
||||
ASSERT (i_a > 0)
|
||||
ASSERT (i_a <= mo_tot_num)
|
||||
j_a = ia_ja_pairs(2,ii,ispin)
|
||||
ASSERT (j_a > 0)
|
||||
ASSERT (j_a <= mo_tot_num)
|
||||
hole = key_in
|
||||
k = ishft(i_a-1,-bit_kind_shift)+1
|
||||
j = i_a-ishft(k-1,bit_kind_shift)-1
|
||||
hole(k,ispin) = ibclr(hole(k,ispin),j)
|
||||
k_a = ishft(j_a-1,-bit_kind_shift)+1
|
||||
l_a = j_a-ishft(k_a-1,bit_kind_shift)-1
|
||||
hole(k_a,ispin) = ibset(hole(k_a,ispin),l_a)
|
||||
|
||||
!!!! Second couple hole particle
|
||||
do j = 1, N_int
|
||||
hole_tmp(j,1) = iand(hole_2(j,1),hole(j,1))
|
||||
hole_tmp(j,2) = iand(hole_2(j,2),hole(j,2))
|
||||
particle_tmp(j,1) = iand(xor(particl_2(j,1),hole(j,1)),particl_2(j,1))
|
||||
particle_tmp(j,2) = iand(xor(particl_2(j,2),hole(j,2)),particl_2(j,2))
|
||||
enddo
|
||||
|
||||
call bitstring_to_list(particle_tmp(1,1),occ_particle_tmp(1,1),N_elec_in_key_part_2(1),N_int)
|
||||
call bitstring_to_list(particle_tmp(1,2),occ_particle_tmp(1,2),N_elec_in_key_part_2(2),N_int)
|
||||
call bitstring_to_list(hole_tmp (1,1),occ_hole_tmp (1,1),N_elec_in_key_hole_2(1),N_int)
|
||||
call bitstring_to_list(hole_tmp (1,2),occ_hole_tmp (1,2),N_elec_in_key_hole_2(2),N_int)
|
||||
|
||||
! hole = a^(+)_j_a(ispin) a_i_a(ispin)|key_in> : mono exc :: orb(i_a,ispin) --> orb(j_a,ispin)
|
||||
hole_save = hole
|
||||
|
||||
! Build array of the non-zero integrals of second excitation
|
||||
array_pairs = .True.
|
||||
if (ispin == 1) then
|
||||
integer :: jjj
|
||||
|
||||
i=0
|
||||
do kk = 1,N_elec_in_key_hole_2(other_spin)
|
||||
i_b = occ_hole_tmp(kk,other_spin)
|
||||
ASSERT (i_b > 0)
|
||||
ASSERT (i_b <= mo_tot_num)
|
||||
do jjj=1,N_elec_in_key_part_2(other_spin) ! particule
|
||||
j_b = occ_particle_tmp(jjj,other_spin)
|
||||
ASSERT (j_b > 0)
|
||||
ASSERT (j_b <= mo_tot_num)
|
||||
if (array_pairs(i_b,j_b)) then
|
||||
|
||||
i+= 1
|
||||
ib_jb_pairs(1,i) = i_b
|
||||
ib_jb_pairs(2,i) = j_b
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
ib_jb_pairs(1,0) = i
|
||||
|
||||
do kk = 1,ib_jb_pairs(1,0)
|
||||
hole = hole_save
|
||||
i_b = ib_jb_pairs(1,kk)
|
||||
j_b = ib_jb_pairs(2,kk)
|
||||
k = ishft(i_b-1,-bit_kind_shift)+1
|
||||
j = i_b-ishft(k-1,bit_kind_shift)-1
|
||||
hole(k,other_spin) = ibclr(hole(k,other_spin),j)
|
||||
key = hole
|
||||
k = ishft(j_b-1,-bit_kind_shift)+1
|
||||
l = j_b-ishft(k-1,bit_kind_shift)-1
|
||||
key(k,other_spin) = ibset(key(k,other_spin),l)
|
||||
|
||||
|
||||
key_idx += 1
|
||||
do k=1,N_int
|
||||
keys_out(k,1,key_idx) = key(k,1)
|
||||
keys_out(k,2,key_idx) = key(k,2)
|
||||
enddo
|
||||
ASSERT (key_idx <= size_max)
|
||||
if (key_idx == size_max) then
|
||||
call standard_dress(delta_ij_generators_,size_max,Ndet_generators,i_generator,key_idx,keys_out,N_int,iproc,psi_det_generators_input,E_ref)
|
||||
key_idx = 0
|
||||
endif
|
||||
enddo
|
||||
endif
|
||||
|
||||
! does all the mono excitations of the same spin
|
||||
i=0
|
||||
do kk = 1,N_elec_in_key_hole_2(ispin)
|
||||
i_b = occ_hole_tmp(kk,ispin)
|
||||
if (i_b <= i_a.or.i_b == j_a) cycle
|
||||
ASSERT (i_b > 0)
|
||||
ASSERT (i_b <= mo_tot_num)
|
||||
do jjj=1,N_elec_in_key_part_2(ispin) ! particule
|
||||
j_b = occ_particle_tmp(jjj,ispin)
|
||||
ASSERT (j_b > 0)
|
||||
ASSERT (j_b <= mo_tot_num)
|
||||
if (j_b <= j_a) cycle
|
||||
if (array_pairs(i_b,j_b)) then
|
||||
|
||||
i+= 1
|
||||
ib_jb_pairs(1,i) = i_b
|
||||
ib_jb_pairs(2,i) = j_b
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
ib_jb_pairs(1,0) = i
|
||||
|
||||
do kk = 1,ib_jb_pairs(1,0)
|
||||
hole = hole_save
|
||||
i_b = ib_jb_pairs(1,kk)
|
||||
j_b = ib_jb_pairs(2,kk)
|
||||
k = ishft(i_b-1,-bit_kind_shift)+1
|
||||
j = i_b-ishft(k-1,bit_kind_shift)-1
|
||||
hole(k,ispin) = ibclr(hole(k,ispin),j)
|
||||
key = hole
|
||||
k = ishft(j_b-1,-bit_kind_shift)+1
|
||||
l = j_b-ishft(k-1,bit_kind_shift)-1
|
||||
key(k,ispin) = ibset(key(k,ispin),l)
|
||||
|
||||
|
||||
key_idx += 1
|
||||
do k=1,N_int
|
||||
keys_out(k,1,key_idx) = key(k,1)
|
||||
keys_out(k,2,key_idx) = key(k,2)
|
||||
enddo
|
||||
ASSERT (key_idx <= size_max)
|
||||
if (key_idx == size_max) then
|
||||
call standard_dress(delta_ij_generators_,size_max,Ndet_generators,i_generator,key_idx,keys_out,N_int,iproc,psi_det_generators_input,E_ref)
|
||||
key_idx = 0
|
||||
endif
|
||||
enddo ! kk
|
||||
|
||||
enddo ! ii
|
||||
! !$OMP ENDDO NOWAIT
|
||||
enddo ! ispin
|
||||
call standard_dress(delta_ij_generators_,size_max,Ndet_generators,i_generator,key_idx,keys_out,N_int,iproc,psi_det_generators_input,E_ref)
|
||||
|
||||
deallocate (ia_ja_pairs, ib_jb_pairs, &
|
||||
keys_out, hole_save, &
|
||||
key,hole, particle, hole_tmp,&
|
||||
particle_tmp, occ_particle, &
|
||||
occ_hole, occ_particle_tmp,&
|
||||
occ_hole_tmp,array_pairs,key_union_hole_part)
|
||||
! !$OMP END PARALLEL
|
||||
|
||||
end
|
||||
|
||||
subroutine H_apply_dressed_pert_monoexc(key_in, hole_1,particl_1,i_generator,iproc_in , delta_ij_generators_, Ndet_generators,psi_det_generators_input,E_ref )
|
||||
use omp_lib
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Generate all single excitations of key_in using the bit masks of holes and
|
||||
! particles.
|
||||
! Assume N_int is already provided.
|
||||
END_DOC
|
||||
integer,parameter :: size_max = 3072
|
||||
|
||||
integer, intent(in) :: Ndet_generators
|
||||
double precision, intent(inout) :: E_ref
|
||||
double precision, intent(inout) :: delta_ij_generators_(Ndet_generators,Ndet_generators)
|
||||
integer(bit_kind), intent(in) :: psi_det_generators_input(N_int,2,Ndet_generators)
|
||||
|
||||
integer ,intent(in) :: i_generator
|
||||
integer(bit_kind),intent(in) :: key_in(N_int,2)
|
||||
integer(bit_kind),intent(in) :: hole_1(N_int,2), particl_1(N_int,2)
|
||||
integer, intent(in) :: iproc_in
|
||||
integer(bit_kind),allocatable :: keys_out(:,:,:)
|
||||
integer(bit_kind),allocatable :: hole_save(:,:)
|
||||
integer(bit_kind),allocatable :: key(:,:),hole(:,:), particle(:,:)
|
||||
integer(bit_kind),allocatable :: hole_tmp(:,:), particle_tmp(:,:)
|
||||
integer(bit_kind),allocatable :: hole_2(:,:), particl_2(:,:)
|
||||
integer :: ii,i,jj,j,k,ispin,l
|
||||
integer,allocatable :: occ_particle(:,:), occ_hole(:,:)
|
||||
integer,allocatable :: occ_particle_tmp(:,:), occ_hole_tmp(:,:)
|
||||
integer,allocatable :: ib_jb_pairs(:,:)
|
||||
integer :: kk,pp,other_spin,key_idx
|
||||
integer :: N_elec_in_key_hole_1(2),N_elec_in_key_part_1(2)
|
||||
integer :: N_elec_in_key_hole_2(2),N_elec_in_key_part_2(2)
|
||||
logical :: is_a_two_holes_two_particles
|
||||
integer(bit_kind), allocatable :: key_union_hole_part(:)
|
||||
|
||||
integer, allocatable :: ia_ja_pairs(:,:,:)
|
||||
logical, allocatable :: array_pairs(:,:)
|
||||
double precision :: diag_H_mat_elem
|
||||
integer(omp_lock_kind), save :: lck, ifirst=0
|
||||
integer :: iproc
|
||||
|
||||
logical :: check_double_excitation
|
||||
logical :: is_a_1h1p
|
||||
logical :: is_a_1h
|
||||
logical :: is_a_1p
|
||||
iproc = iproc_in
|
||||
|
||||
check_double_excitation = .True.
|
||||
|
||||
check_double_excitation = .False.
|
||||
|
||||
|
||||
|
||||
|
||||
if (ifirst == 0) then
|
||||
ifirst=1
|
||||
!!$ call omp_init_lock(lck)
|
||||
endif
|
||||
|
||||
|
||||
|
||||
PROVIDE elec_num_tab
|
||||
! !$OMP PARALLEL DEFAULT(SHARED) &
|
||||
! !$OMP PRIVATE(i,j,k,l,keys_out,hole,particle, &
|
||||
! !$OMP occ_particle,occ_hole,j_a,k_a,other_spin, &
|
||||
! !$OMP hole_save,ispin,jj,l_a,ib_jb_pairs,array_pairs, &
|
||||
! !$OMP accu,i_a,hole_tmp,particle_tmp,occ_particle_tmp, &
|
||||
! !$OMP occ_hole_tmp,key_idx,i_b,j_b,key,N_elec_in_key_part_1,&
|
||||
! !$OMP N_elec_in_key_hole_1,N_elec_in_key_part_2, &
|
||||
! !$OMP N_elec_in_key_hole_2,ia_ja_pairs,key_union_hole_part) &
|
||||
! !$OMP SHARED(key_in,N_int,elec_num_tab,mo_tot_num, &
|
||||
! !$OMP hole_1, particl_1, hole_2, particl_2, &
|
||||
! !$OMP elec_alpha_num,i_generator) FIRSTPRIVATE(iproc)
|
||||
!!$ iproc = omp_get_thread_num()
|
||||
allocate (keys_out(N_int,2,size_max), hole_save(N_int,2), &
|
||||
key(N_int,2),hole(N_int,2), particle(N_int,2), hole_tmp(N_int,2),&
|
||||
particle_tmp(N_int,2), occ_particle(N_int*bit_kind_size,2), &
|
||||
occ_hole(N_int*bit_kind_size,2), occ_particle_tmp(N_int*bit_kind_size,2),&
|
||||
occ_hole_tmp(N_int*bit_kind_size,2),key_union_hole_part(N_int))
|
||||
|
||||
!!!! First couple hole particle
|
||||
do j = 1, N_int
|
||||
hole(j,1) = iand(hole_1(j,1),key_in(j,1))
|
||||
hole(j,2) = iand(hole_1(j,2),key_in(j,2))
|
||||
particle(j,1) = iand(xor(particl_1(j,1),key_in(j,1)),particl_1(j,1))
|
||||
particle(j,2) = iand(xor(particl_1(j,2),key_in(j,2)),particl_1(j,2))
|
||||
enddo
|
||||
|
||||
call bitstring_to_list(particle(1,1),occ_particle(1,1),N_elec_in_key_part_1(1),N_int)
|
||||
call bitstring_to_list(particle(1,2),occ_particle(1,2),N_elec_in_key_part_1(2),N_int)
|
||||
call bitstring_to_list(hole (1,1),occ_hole (1,1),N_elec_in_key_hole_1(1),N_int)
|
||||
call bitstring_to_list(hole (1,2),occ_hole (1,2),N_elec_in_key_hole_1(2),N_int)
|
||||
allocate (ia_ja_pairs(2,0:(elec_alpha_num)*mo_tot_num,2))
|
||||
|
||||
do ispin=1,2
|
||||
i=0
|
||||
do ii=N_elec_in_key_hole_1(ispin),1,-1 ! hole
|
||||
i_a = occ_hole(ii,ispin)
|
||||
do jj=1,N_elec_in_key_part_1(ispin) !particule
|
||||
j_a = occ_particle(jj,ispin)
|
||||
i += 1
|
||||
ia_ja_pairs(1,i,ispin) = i_a
|
||||
ia_ja_pairs(2,i,ispin) = j_a
|
||||
enddo
|
||||
enddo
|
||||
ia_ja_pairs(1,0,ispin) = i
|
||||
enddo
|
||||
|
||||
key_idx = 0
|
||||
|
||||
integer :: i_a,j_a,i_b,j_b,k_a,l_a,k_b,l_b
|
||||
integer(bit_kind) :: test(N_int,2)
|
||||
double precision :: accu
|
||||
accu = 0.d0
|
||||
integer :: jjtest,na,nb
|
||||
do ispin=1,2
|
||||
other_spin = iand(ispin,1)+1
|
||||
! !$OMP DO SCHEDULE (static)
|
||||
do ii=1,ia_ja_pairs(1,0,ispin)
|
||||
i_a = ia_ja_pairs(1,ii,ispin)
|
||||
j_a = ia_ja_pairs(2,ii,ispin)
|
||||
hole = key_in
|
||||
k = ishft(i_a-1,-bit_kind_shift)+1
|
||||
j = i_a-ishft(k-1,bit_kind_shift)-1
|
||||
|
||||
hole(k,ispin) = ibclr(hole(k,ispin),j)
|
||||
k_a = ishft(j_a-1,-bit_kind_shift)+1
|
||||
l_a = j_a-ishft(k_a-1,bit_kind_shift)-1
|
||||
|
||||
hole(k_a,ispin) = ibset(hole(k_a,ispin),l_a)
|
||||
na = 0
|
||||
nb = 0
|
||||
! if (is_a_1h(hole)) then
|
||||
! cycle
|
||||
! endif
|
||||
! if (is_a_1p(hole)) then
|
||||
! cycle
|
||||
! endif
|
||||
|
||||
|
||||
key_idx += 1
|
||||
do k=1,N_int
|
||||
keys_out(k,1,key_idx) = hole(k,1)
|
||||
keys_out(k,2,key_idx) = hole(k,2)
|
||||
enddo
|
||||
if (key_idx == size_max) then
|
||||
call standard_dress(delta_ij_generators_,size_max,Ndet_generators,i_generator,key_idx,keys_out,N_int,iproc,psi_det_generators_input,E_ref)
|
||||
key_idx = 0
|
||||
endif
|
||||
enddo ! ii
|
||||
! !$OMP ENDDO NOWAIT
|
||||
enddo ! ispin
|
||||
call standard_dress(delta_ij_generators_,size_max,Ndet_generators,i_generator,key_idx,keys_out,N_int,iproc,psi_det_generators_input,E_ref)
|
||||
|
||||
deallocate (ia_ja_pairs, &
|
||||
keys_out, hole_save, &
|
||||
key,hole, particle, hole_tmp,&
|
||||
particle_tmp, occ_particle, &
|
||||
occ_hole, occ_particle_tmp,&
|
||||
occ_hole_tmp,key_union_hole_part)
|
||||
! !$OMP END PARALLEL
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
subroutine H_apply_dressed_pert(delta_ij_generators_, Ndet_generators,psi_det_generators_input,E_ref)
|
||||
implicit none
|
||||
use omp_lib
|
||||
use bitmasks
|
||||
BEGIN_DOC
|
||||
! 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.
|
||||
END_DOC
|
||||
|
||||
|
||||
integer, intent(in) :: Ndet_generators
|
||||
double precision, intent(inout) :: E_ref
|
||||
double precision, intent(inout) :: delta_ij_generators_(Ndet_generators,Ndet_generators)
|
||||
integer(bit_kind), intent(in) :: psi_det_generators_input(N_int,2,Ndet_generators)
|
||||
|
||||
|
||||
integer :: i_generator, nmax
|
||||
double precision :: wall_0, wall_1
|
||||
integer(omp_lock_kind) :: lck
|
||||
integer(bit_kind), allocatable :: mask(:,:,:)
|
||||
integer :: ispin, k
|
||||
integer :: iproc
|
||||
|
||||
|
||||
PROVIDE H_apply_buffer_allocated mo_bielec_integrals_in_map
|
||||
|
||||
nmax = mod( Ndet_generators,nproc )
|
||||
|
||||
|
||||
! !$ call omp_init_lock(lck)
|
||||
call wall_time(wall_0)
|
||||
|
||||
iproc = 0
|
||||
allocate( mask(N_int,2,6) )
|
||||
do i_generator=1,nmax
|
||||
|
||||
! ! Create bit masks for holes and particles
|
||||
do ispin=1,2
|
||||
do k=1,N_int
|
||||
mask(k,ispin,s_hole) = &
|
||||
iand(generators_bitmask(k,ispin,s_hole,i_bitmask_gen), &
|
||||
psi_det_generators_input(k,ispin,i_generator) )
|
||||
mask(k,ispin,s_part) = &
|
||||
iand(generators_bitmask(k,ispin,s_part,i_bitmask_gen), &
|
||||
not(psi_det_generators_input(k,ispin,i_generator)) )
|
||||
mask(k,ispin,d_hole1) = &
|
||||
iand(generators_bitmask(k,ispin,d_hole1,i_bitmask_gen), &
|
||||
psi_det_generators_input(k,ispin,i_generator) )
|
||||
mask(k,ispin,d_part1) = &
|
||||
iand(generators_bitmask(k,ispin,d_part1,i_bitmask_gen), &
|
||||
not(psi_det_generators_input(k,ispin,i_generator)) )
|
||||
mask(k,ispin,d_hole2) = &
|
||||
iand(generators_bitmask(k,ispin,d_hole2,i_bitmask_gen), &
|
||||
psi_det_generators_input(k,ispin,i_generator) )
|
||||
mask(k,ispin,d_part2) = &
|
||||
iand(generators_bitmask(k,ispin,d_part2,i_bitmask_gen), &
|
||||
not(psi_det_generators_input(k,ispin,i_generator)) )
|
||||
enddo
|
||||
enddo
|
||||
if(.False.)then
|
||||
call H_apply_dressed_pert_diexc(psi_det_generators_input(1,1,i_generator), &
|
||||
mask(1,1,d_hole1), mask(1,1,d_part1), &
|
||||
mask(1,1,d_hole2), mask(1,1,d_part2), &
|
||||
i_generator, iproc , delta_ij_generators_, Ndet_generators,psi_det_generators_input,E_ref)
|
||||
endif
|
||||
if(.True.)then
|
||||
call H_apply_dressed_pert_monoexc(psi_det_generators_input(1,1,i_generator), &
|
||||
mask(1,1,s_hole ), mask(1,1,s_part ), &
|
||||
i_generator, iproc , delta_ij_generators_, Ndet_generators,psi_det_generators_input,E_ref)
|
||||
endif
|
||||
call wall_time(wall_1)
|
||||
|
||||
if (wall_1 - wall_0 > 2.d0) then
|
||||
write(output_determinants,*) &
|
||||
100.*float(i_generator)/float(Ndet_generators), '% in ', wall_1-wall_0, 's'
|
||||
wall_0 = wall_1
|
||||
endif
|
||||
enddo
|
||||
|
||||
deallocate( mask )
|
||||
|
||||
! !$OMP PARALLEL DEFAULT(SHARED) &
|
||||
! !$OMP PRIVATE(i_generator,wall_1,wall_0,ispin,k,mask,iproc)
|
||||
call wall_time(wall_0)
|
||||
! !$ iproc = omp_get_thread_num()
|
||||
allocate( mask(N_int,2,6) )
|
||||
! !$OMP DO SCHEDULE(dynamic,1)
|
||||
do i_generator=nmax+1,Ndet_generators
|
||||
|
||||
! Create bit masks for holes and particles
|
||||
do ispin=1,2
|
||||
do k=1,N_int
|
||||
mask(k,ispin,s_hole) = &
|
||||
iand(generators_bitmask(k,ispin,s_hole,i_bitmask_gen), &
|
||||
psi_det_generators_input(k,ispin,i_generator) )
|
||||
mask(k,ispin,s_part) = &
|
||||
iand(generators_bitmask(k,ispin,s_part,i_bitmask_gen), &
|
||||
not(psi_det_generators_input(k,ispin,i_generator)) )
|
||||
mask(k,ispin,d_hole1) = &
|
||||
iand(generators_bitmask(k,ispin,d_hole1,i_bitmask_gen), &
|
||||
psi_det_generators_input(k,ispin,i_generator) )
|
||||
mask(k,ispin,d_part1) = &
|
||||
iand(generators_bitmask(k,ispin,d_part1,i_bitmask_gen), &
|
||||
not(psi_det_generators_input(k,ispin,i_generator)) )
|
||||
mask(k,ispin,d_hole2) = &
|
||||
iand(generators_bitmask(k,ispin,d_hole2,i_bitmask_gen), &
|
||||
psi_det_generators_input(k,ispin,i_generator) )
|
||||
mask(k,ispin,d_part2) = &
|
||||
iand(generators_bitmask(k,ispin,d_part2,i_bitmask_gen), &
|
||||
not (psi_det_generators_input(k,ispin,i_generator)) )
|
||||
enddo
|
||||
enddo
|
||||
|
||||
if(.False.)then
|
||||
call H_apply_dressed_pert_diexc(psi_det_generators_input(1,1,i_generator), &
|
||||
mask(1,1,d_hole1), mask(1,1,d_part1), &
|
||||
mask(1,1,d_hole2), mask(1,1,d_part2), &
|
||||
i_generator, iproc , delta_ij_generators_, Ndet_generators,psi_det_generators_input,E_ref)
|
||||
endif
|
||||
if(.True.)then
|
||||
call H_apply_dressed_pert_monoexc(psi_det_generators_input(1,1,i_generator), &
|
||||
mask(1,1,s_hole ), mask(1,1,s_part ), &
|
||||
i_generator, iproc , delta_ij_generators_, Ndet_generators,psi_det_generators_input,E_ref)
|
||||
endif
|
||||
! !$ call omp_set_lock(lck)
|
||||
call wall_time(wall_1)
|
||||
|
||||
if (wall_1 - wall_0 > 2.d0) then
|
||||
write(output_determinants,*) &
|
||||
100.*float(i_generator)/float(Ndet_generators), '% in ', wall_1-wall_0, 's'
|
||||
wall_0 = wall_1
|
||||
endif
|
||||
! !$ call omp_unset_lock(lck)
|
||||
enddo
|
||||
! !$OMP END DO
|
||||
deallocate( mask )
|
||||
! !$OMP END PARALLEL
|
||||
! !$ call omp_destroy_lock(lck)
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
Perturbation Selectors_no_sorted Hartree_Fock Davidson CISD
|
|
@ -1,12 +0,0 @@
|
|||
======
|
||||
FOBOCI
|
||||
======
|
||||
|
||||
Needed Modules
|
||||
==============
|
||||
.. Do not edit this section It was auto-generated
|
||||
.. by the `update_README.py` script.
|
||||
Documentation
|
||||
=============
|
||||
.. Do not edit this section It was auto-generated
|
||||
.. by the `update_README.py` script.
|
|
@ -1,889 +0,0 @@
|
|||
subroutine dressing_1h1p(dets_in,u_in,diag_H_elements,dim_in,sze,N_st,Nint,convergence)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! CISD+SC2 method :: take off all the disconnected terms of a ROHF+1h1p (selected or not)
|
||||
!
|
||||
! 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
|
||||
END_DOC
|
||||
integer, intent(in) :: dim_in, sze, N_st, Nint
|
||||
integer(bit_kind), intent(in) :: dets_in(Nint,2,sze)
|
||||
double precision, intent(inout) :: u_in(dim_in,N_st)
|
||||
double precision, intent(out) :: diag_H_elements(dim_in)
|
||||
double precision, intent(in) :: convergence
|
||||
|
||||
integer :: i,j,k,l
|
||||
integer :: n_singles
|
||||
integer :: index_singles(sze),hole_particles_singles(sze,3)
|
||||
integer :: n_doubles
|
||||
integer :: index_doubles(sze),hole_particles_doubles(sze,2)
|
||||
integer :: index_hf
|
||||
double precision :: e_corr_singles(mo_tot_num,2)
|
||||
double precision :: e_corr_doubles(mo_tot_num)
|
||||
double precision :: e_corr_singles_total(2)
|
||||
double precision :: e_corr_doubles_1h1p
|
||||
|
||||
integer :: exc(0:2,2,2),degree
|
||||
integer :: h1,h2,p1,p2,s1,s2
|
||||
integer :: other_spin(2)
|
||||
double precision :: phase
|
||||
integer(bit_kind) :: key_tmp(N_int,2)
|
||||
integer :: i_ok
|
||||
double precision :: phase_single_double,phase_double_hf,get_mo_bielec_integral
|
||||
double precision :: hij,c_ref,contrib
|
||||
integer :: iorb
|
||||
|
||||
other_spin(1) = 2
|
||||
other_spin(2) = 1
|
||||
|
||||
n_singles = 0
|
||||
n_doubles = 0
|
||||
do i = 1,sze
|
||||
call get_excitation(ref_bitmask,dets_in(1,1,i),exc,degree,phase,N_int)
|
||||
call decode_exc(exc,degree,h1,p1,h2,p2,s1,s2)
|
||||
call i_H_j(dets_in(1,1,i),dets_in(1,1,i),N_int,hij)
|
||||
diag_H_elements(i) = hij
|
||||
if(degree == 0)then
|
||||
index_hf = i
|
||||
else if (degree == 1)then
|
||||
n_singles +=1
|
||||
index_singles(n_singles) = i
|
||||
! h1 = inactive orbital of the hole
|
||||
hole_particles_singles(n_singles,1) = h1
|
||||
! p1 = virtual orbital of the particle
|
||||
hole_particles_singles(n_singles,2) = p1
|
||||
! s1 = spin of the electron excited
|
||||
hole_particles_singles(n_singles,3) = s1
|
||||
else if (degree == 2)then
|
||||
n_doubles +=1
|
||||
index_doubles(n_doubles) = i
|
||||
! h1 = inactive orbital of the hole (beta of course)
|
||||
hole_particles_doubles(n_doubles,1) = h1
|
||||
! p1 = virtual orbital of the particle (alpha of course)
|
||||
hole_particles_doubles(n_doubles,2) = p2
|
||||
else
|
||||
print*,'PB !! found out other thing than a single or double'
|
||||
print*,'stopping ..'
|
||||
stop
|
||||
endif
|
||||
enddo
|
||||
|
||||
e_corr_singles = 0.d0
|
||||
e_corr_doubles = 0.d0
|
||||
e_corr_singles_total = 0.d0
|
||||
e_corr_doubles_1h1p = 0.d0
|
||||
c_ref = 1.d0/u_in(index_hf,1)
|
||||
print*,'c_ref = ',c_ref
|
||||
do i = 1,sze
|
||||
call get_excitation(ref_bitmask,dets_in(1,1,i),exc,degree,phase,N_int)
|
||||
call decode_exc(exc,degree,h1,p1,h2,p2,s1,s2)
|
||||
call i_H_j(ref_bitmask,dets_in(1,1,i),N_int,hij)
|
||||
contrib = hij * u_in(i,1) * c_ref
|
||||
if (degree == 1)then
|
||||
e_corr_singles(h1,s1) += contrib
|
||||
e_corr_singles(p1,s1) += contrib
|
||||
e_corr_singles_total(s1)+= contrib
|
||||
else if (degree == 2)then
|
||||
e_corr_doubles_1h1p += contrib
|
||||
e_corr_doubles(h1) += contrib
|
||||
e_corr_doubles(p2) += contrib
|
||||
endif
|
||||
enddo
|
||||
print*,'e_corr_singles alpha = ',e_corr_singles_total(1)
|
||||
print*,'e_corr_singles beta = ',e_corr_singles_total(2)
|
||||
print*,'e_corr_doubles_1h1p = ',e_corr_doubles_1h1p
|
||||
|
||||
! repeat all the correlation energy on the singles
|
||||
do i = 1,n_singles
|
||||
! you can repeat all the correlation energy of the single excitation of the other spin
|
||||
diag_H_elements(index_singles(i)) += e_corr_singles_total(other_spin(hole_particles_singles(i,3)))
|
||||
|
||||
! you can repeat all the correlation energy of the single excitation of the same spin
|
||||
do j = 1, n_inact_orb
|
||||
iorb = list_inact(j)
|
||||
! except the one of the hole
|
||||
if(iorb == hole_particles_singles(i,1))cycle
|
||||
! ispin = hole_particles_singles(i,3)
|
||||
diag_H_elements(index_singles(i)) += e_corr_singles(iorb,hole_particles_singles(i,3))
|
||||
enddo
|
||||
! also exclude all the energy coming from the virtual orbital
|
||||
diag_H_elements(index_singles(i)) -= e_corr_singles(hole_particles_singles(i,2),hole_particles_singles(i,3))
|
||||
|
||||
! If it is a single excitation alpha, you can repeat :
|
||||
! +) all the double excitation 1h1p, appart the part involving the virtual orbital "r"
|
||||
! If it is a single excitation alpha, you can repeat :
|
||||
! +) all the double excitation 1h1p, appart the part involving the inactive orbital "i"
|
||||
diag_H_elements(index_singles(i)) += e_corr_doubles_1h1p
|
||||
if(hole_particles_singles(i,3) == 1)then ! alpha single excitation
|
||||
diag_H_elements(index_singles(i)) -= e_corr_doubles(hole_particles_singles(i,2))
|
||||
else ! beta single exctitation
|
||||
diag_H_elements(index_singles(i)) -= e_corr_doubles(hole_particles_singles(i,1))
|
||||
endif
|
||||
enddo
|
||||
|
||||
! repeat all the correlation energy on the doubles
|
||||
! as all the doubles involve the active space, you cannot repeat any of them one on another
|
||||
do i = 1, n_doubles
|
||||
! on a given double, you can repeat all the correlation energy of the singles alpha
|
||||
do j = 1, n_inact_orb
|
||||
iorb = list_inact(j)
|
||||
! ispin = hole_particles_singles(i,3)
|
||||
diag_H_elements(index_doubles(i)) += e_corr_singles(iorb,1)
|
||||
enddo
|
||||
! except the part involving the virtual orbital "hole_particles_doubles(i,2)"
|
||||
diag_H_elements(index_doubles(i)) -= e_corr_singles(hole_particles_doubles(i,2),1)
|
||||
! on a given double, you can repeat all the correlation energy of the singles beta
|
||||
do j = 1, n_inact_orb
|
||||
iorb = list_inact(j)
|
||||
! except the one of the hole
|
||||
if(iorb == hole_particles_doubles(i,1))cycle
|
||||
! ispin = hole_particles_singles(i,3)
|
||||
diag_H_elements(index_doubles(i)) += e_corr_singles(iorb,2)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
|
||||
! Taking into account the connected part of the 2h2p on the HF determinant
|
||||
! 1/2 \sum_{ir,js} c_{ir}^{sigma} c_{js}^{sigma}
|
||||
|
||||
! diag_H_elements(index_hf) += total_corr_e_2h2p
|
||||
return
|
||||
c_ref = c_ref * c_ref
|
||||
print*,'diag_H_elements(index_hf) = ',diag_H_elements(index_hf)
|
||||
do i = 1, n_singles
|
||||
! start on the single excitation "|i>"
|
||||
h1 = hole_particles_singles(i,1)
|
||||
p1 = hole_particles_singles(i,2)
|
||||
do j = 1, n_singles
|
||||
do k = 1, N_int
|
||||
key_tmp(k,1) = dets_in(k,1,index_singles(i))
|
||||
key_tmp(k,2) = dets_in(k,2,index_singles(i))
|
||||
enddo
|
||||
h2 = hole_particles_singles(j,1)
|
||||
p2 = hole_particles_singles(j,2)
|
||||
call do_mono_excitation(key_tmp,h2,p2,hole_particles_singles(j,3),i_ok)
|
||||
! apply the excitation operator from the single excitation "|j>"
|
||||
if(i_ok .ne. 1)cycle
|
||||
double precision :: phase_ref_other_single,diag_H_mat_elem,hijj,contrib_e2,coef_1
|
||||
call get_excitation(key_tmp,dets_in(1,1,index_singles(i)),exc,degree,phase_single_double,N_int)
|
||||
call get_excitation(ref_bitmask,dets_in(1,1,index_singles(j)),exc,degree,phase_ref_other_single,N_int)
|
||||
call i_H_j(ref_bitmask,key_tmp,N_int,hij)
|
||||
diag_H_elements(index_hf) += u_in(index_singles(i),1) * u_in(index_singles(j),1) * c_ref * hij &
|
||||
* phase_single_double * phase_ref_other_single
|
||||
enddo
|
||||
enddo
|
||||
print*,'diag_H_elements(index_hf) = ',diag_H_elements(index_hf)
|
||||
|
||||
end
|
||||
|
||||
|
||||
subroutine dressing_1h1p_by_2h2p(dets_in,u_in,diag_H_elements,dim_in,sze,N_st,Nint,convergence)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! CISD+SC2 method :: take off all the disconnected terms of a ROHF+1h1p (selected or not)
|
||||
!
|
||||
! 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
|
||||
END_DOC
|
||||
integer, intent(in) :: dim_in, sze, N_st, Nint
|
||||
integer(bit_kind), intent(in) :: dets_in(Nint,2,sze)
|
||||
double precision, intent(inout) :: u_in(dim_in,N_st)
|
||||
double precision, intent(out) :: diag_H_elements(0:dim_in)
|
||||
double precision, intent(in) :: convergence
|
||||
|
||||
integer :: i,j,k,l
|
||||
integer :: r,s,i0,j0,r0,s0
|
||||
integer :: n_singles
|
||||
integer :: index_singles(sze),hole_particles_singles(sze,3)
|
||||
integer :: n_doubles
|
||||
integer :: index_doubles(sze),hole_particles_doubles(sze,2)
|
||||
integer :: index_hf
|
||||
double precision :: e_corr_singles(mo_tot_num,2)
|
||||
double precision :: e_corr_doubles(mo_tot_num)
|
||||
double precision :: e_corr_singles_total(2)
|
||||
double precision :: e_corr_doubles_1h1p
|
||||
|
||||
integer :: exc(0:2,2,2),degree
|
||||
integer :: h1,h2,p1,p2,s1,s2
|
||||
integer :: other_spin(2)
|
||||
double precision :: phase
|
||||
integer(bit_kind) :: key_tmp(N_int,2)
|
||||
integer :: i_ok
|
||||
double precision :: phase_single_double,phase_double_hf,get_mo_bielec_integral
|
||||
double precision :: hij,c_ref,contrib
|
||||
integer :: iorb
|
||||
|
||||
other_spin(1) = 2
|
||||
other_spin(2) = 1
|
||||
|
||||
n_singles = 0
|
||||
n_doubles = 0
|
||||
do i = 1,sze
|
||||
call get_excitation(ref_bitmask,dets_in(1,1,i),exc,degree,phase,N_int)
|
||||
call decode_exc(exc,degree,h1,p1,h2,p2,s1,s2)
|
||||
call i_H_j(dets_in(1,1,i),dets_in(1,1,i),N_int,hij)
|
||||
diag_H_elements(i) = hij
|
||||
if(degree == 0)then
|
||||
index_hf = i
|
||||
else if (degree == 1)then
|
||||
n_singles +=1
|
||||
index_singles(n_singles) = i
|
||||
! h1 = inactive orbital of the hole
|
||||
hole_particles_singles(n_singles,1) = h1
|
||||
! p1 = virtual orbital of the particle
|
||||
hole_particles_singles(n_singles,2) = p1
|
||||
! s1 = spin of the electron excited
|
||||
hole_particles_singles(n_singles,3) = s1
|
||||
else if (degree == 2)then
|
||||
n_doubles +=1
|
||||
index_doubles(n_doubles) = i
|
||||
! h1 = inactive orbital of the hole (beta of course)
|
||||
hole_particles_doubles(n_doubles,1) = h1
|
||||
! p1 = virtual orbital of the particle (alpha of course)
|
||||
hole_particles_doubles(n_doubles,2) = p2
|
||||
else
|
||||
print*,'PB !! found out other thing than a single or double'
|
||||
print*,'stopping ..'
|
||||
stop
|
||||
endif
|
||||
enddo
|
||||
double precision :: delta_e
|
||||
double precision :: coef_ijrs
|
||||
diag_H_elements = 0.d0
|
||||
do i0 = 1, n_core_inact_orb
|
||||
i= list_core_inact(i0)
|
||||
do j0 = i0+1, n_core_inact_orb
|
||||
j = list_core_inact(j0)
|
||||
print*, i,j
|
||||
do r0 = 1, n_virt_orb
|
||||
r = list_virt(r0)
|
||||
do s0 = r0+1, n_virt_orb
|
||||
s = list_virt(s0)
|
||||
!!! alpha (i-->r) / beta (j-->s)
|
||||
s1 = 1
|
||||
s2 = 2
|
||||
key_tmp = ref_bitmask
|
||||
call do_mono_excitation(key_tmp,i,r,s1,i_ok)
|
||||
if(i_ok .ne.1)then
|
||||
print*, 'pb !!'
|
||||
stop
|
||||
endif
|
||||
call do_mono_excitation(key_tmp,j,s,s2,i_ok)
|
||||
if(i_ok .ne.1)then
|
||||
print*, 'pb !!'
|
||||
stop
|
||||
endif
|
||||
call i_H_j(ref_bitmask, key_tmp, N_int,hij)
|
||||
delta_e = Fock_matrix_diag_mo(i) + Fock_matrix_diag_mo(j) - Fock_matrix_diag_mo(r) - Fock_matrix_diag_mo(s)
|
||||
coef_ijrs = hij/delta_e
|
||||
do k = 1, n_singles
|
||||
l = index_singles(k)
|
||||
call i_H_j(dets_in(1,1,l), key_tmp, N_int,hij)
|
||||
diag_H_elements(l) += coef_ijrs * hij
|
||||
enddo
|
||||
!if(i>j.and.r>s)then
|
||||
!! alpha (i-->r) / alpha (j-->s)
|
||||
s1 = 1
|
||||
s2 = 1
|
||||
key_tmp = ref_bitmask
|
||||
call do_mono_excitation(key_tmp,i,r,s1,i_ok)
|
||||
if(i_ok .ne.1)then
|
||||
print*, 'pb !!'
|
||||
stop
|
||||
endif
|
||||
call do_mono_excitation(key_tmp,j,s,s2,i_ok)
|
||||
if(i_ok .ne.1)then
|
||||
print*, 'pb !!'
|
||||
stop
|
||||
endif
|
||||
call i_H_j(ref_bitmask, key_tmp, N_int,hij)
|
||||
delta_e = Fock_matrix_diag_mo(i) + Fock_matrix_diag_mo(j) - Fock_matrix_diag_mo(r) - Fock_matrix_diag_mo(s)
|
||||
coef_ijrs = hij/delta_e
|
||||
do k = 1, n_singles
|
||||
l = index_singles(k)
|
||||
call i_H_j(dets_in(1,1,l), key_tmp, N_int,hij)
|
||||
diag_H_elements(l) += coef_ijrs * hij
|
||||
enddo
|
||||
!! beta (i-->r) / beta (j-->s)
|
||||
s1 = 2
|
||||
s2 = 2
|
||||
key_tmp = ref_bitmask
|
||||
call do_mono_excitation(key_tmp,i,r,s1,i_ok)
|
||||
if(i_ok .ne.1)then
|
||||
print*, 'pb !!'
|
||||
stop
|
||||
endif
|
||||
call do_mono_excitation(key_tmp,j,s,s2,i_ok)
|
||||
if(i_ok .ne.1)then
|
||||
print*, 'pb !!'
|
||||
stop
|
||||
endif
|
||||
call i_H_j(ref_bitmask, key_tmp, N_int,hij)
|
||||
delta_e = Fock_matrix_diag_mo(i) + Fock_matrix_diag_mo(j) - Fock_matrix_diag_mo(r) - Fock_matrix_diag_mo(s)
|
||||
coef_ijrs = hij/delta_e
|
||||
do k = 1, n_singles
|
||||
l = index_singles(k)
|
||||
call i_H_j(dets_in(1,1,l), key_tmp, N_int,hij)
|
||||
diag_H_elements(l) += coef_ijrs * hij
|
||||
enddo
|
||||
!endif
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
c_ref = 1.d0/u_in(index_hf,1)
|
||||
do k = 1, n_singles
|
||||
l = index_singles(k)
|
||||
diag_H_elements(0) -= diag_H_elements(l)
|
||||
enddo
|
||||
! do k = 1, n_doubles
|
||||
! l = index_doubles(k)
|
||||
! diag_H_elements(0) += diag_H_elements(l)
|
||||
! enddo
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
subroutine dressing_1h1p_full(dets_in,u_in,H_matrix,dim_in,sze,N_st,Nint,convergence)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! CISD+SC2 method :: take off all the disconnected terms of a ROHF+1h1p (selected or not)
|
||||
!
|
||||
! 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
|
||||
END_DOC
|
||||
integer, intent(in) :: dim_in, sze, N_st, Nint
|
||||
integer(bit_kind), intent(in) :: dets_in(Nint,2,sze)
|
||||
double precision, intent(in) :: u_in(dim_in,N_st)
|
||||
double precision, intent(inout) :: H_matrix(sze,sze)
|
||||
double precision, intent(in) :: convergence
|
||||
|
||||
integer :: i,j,k,l
|
||||
integer :: n_singles
|
||||
integer :: index_singles(sze),hole_particles_singles(sze,3)
|
||||
integer :: n_doubles
|
||||
integer :: index_doubles(sze),hole_particles_doubles(sze,2)
|
||||
integer :: index_hf
|
||||
double precision :: e_corr_singles(mo_tot_num,2)
|
||||
double precision :: e_corr_doubles(mo_tot_num)
|
||||
double precision :: e_corr_singles_total(2)
|
||||
double precision :: e_corr_doubles_1h1p
|
||||
|
||||
integer :: exc(0:2,2,2),degree
|
||||
integer :: h1,h2,p1,p2,s1,s2
|
||||
integer :: other_spin(2)
|
||||
double precision :: phase
|
||||
integer(bit_kind) :: key_tmp(N_int,2)
|
||||
integer :: i_ok
|
||||
double precision :: phase_single_double,phase_double_hf,get_mo_bielec_integral
|
||||
double precision :: hij,c_ref,contrib
|
||||
integer :: iorb
|
||||
|
||||
other_spin(1) = 2
|
||||
other_spin(2) = 1
|
||||
|
||||
n_singles = 0
|
||||
n_doubles = 0
|
||||
do i = 1,sze
|
||||
call get_excitation(ref_bitmask,dets_in(1,1,i),exc,degree,phase,N_int)
|
||||
call decode_exc(exc,degree,h1,p1,h2,p2,s1,s2)
|
||||
if(degree == 0)then
|
||||
index_hf = i
|
||||
else if (degree == 1)then
|
||||
n_singles +=1
|
||||
index_singles(n_singles) = i
|
||||
! h1 = inactive orbital of the hole
|
||||
hole_particles_singles(n_singles,1) = h1
|
||||
! p1 = virtual orbital of the particle
|
||||
hole_particles_singles(n_singles,2) = p1
|
||||
! s1 = spin of the electron excited
|
||||
hole_particles_singles(n_singles,3) = s1
|
||||
else if (degree == 2)then
|
||||
n_doubles +=1
|
||||
index_doubles(n_doubles) = i
|
||||
! h1 = inactive orbital of the hole (beta of course)
|
||||
hole_particles_doubles(n_doubles,1) = h1
|
||||
! p1 = virtual orbital of the particle (alpha of course)
|
||||
hole_particles_doubles(n_doubles,2) = p2
|
||||
else
|
||||
print*,'PB !! found out other thing than a single or double'
|
||||
print*,'stopping ..'
|
||||
stop
|
||||
endif
|
||||
enddo
|
||||
double precision, allocatable :: dressing_H_mat_elem(:)
|
||||
allocate(dressing_H_mat_elem(N_det))
|
||||
logical :: lmct
|
||||
dressing_H_mat_elem = 0.d0
|
||||
call dress_diag_elem_2h2p(dressing_H_mat_elem,N_det)
|
||||
lmct = .False.
|
||||
call dress_diag_elem_2h1p(dressing_H_mat_elem,N_det,lmct,1000)
|
||||
lmct = .true.
|
||||
call dress_diag_elem_1h2p(dressing_H_mat_elem,N_det,lmct,1000)
|
||||
do i = 1, N_det
|
||||
H_matrix(i,i) += dressing_H_mat_elem(i)
|
||||
enddo
|
||||
|
||||
e_corr_singles = 0.d0
|
||||
e_corr_doubles = 0.d0
|
||||
e_corr_singles_total = 0.d0
|
||||
e_corr_doubles_1h1p = 0.d0
|
||||
c_ref = 1.d0/u_in(index_hf,1)
|
||||
print*,'c_ref = ',c_ref
|
||||
do i = 1,sze
|
||||
call get_excitation(ref_bitmask,dets_in(1,1,i),exc,degree,phase,N_int)
|
||||
call decode_exc(exc,degree,h1,p1,h2,p2,s1,s2)
|
||||
call i_H_j(ref_bitmask,dets_in(1,1,i),N_int,hij)
|
||||
contrib = hij * u_in(i,1) * c_ref
|
||||
if (degree == 1)then
|
||||
e_corr_singles(h1,s1) += contrib
|
||||
e_corr_singles(p1,s1) += contrib
|
||||
e_corr_singles_total(s1)+= contrib
|
||||
else if (degree == 2)then
|
||||
e_corr_doubles_1h1p += contrib
|
||||
e_corr_doubles(h1) += contrib
|
||||
e_corr_doubles(p2) += contrib
|
||||
endif
|
||||
enddo
|
||||
print*,'e_corr_singles alpha = ',e_corr_singles_total(1)
|
||||
print*,'e_corr_singles beta = ',e_corr_singles_total(2)
|
||||
print*,'e_corr_doubles_1h1p = ',e_corr_doubles_1h1p
|
||||
|
||||
|
||||
! repeat all the correlation energy on the singles
|
||||
! do i = 1,n_singles
|
||||
! ! you can repeat all the correlation energy of the single excitation of the other spin
|
||||
! H_matrix(index_singles(i),index_singles(i)) += e_corr_singles_total(other_spin(hole_particles_singles(i,3)))
|
||||
|
||||
! ! you can repeat all the correlation energy of the single excitation of the same spin
|
||||
! do j = 1, n_inact_orb
|
||||
! iorb = list_inact(j)
|
||||
! ! except the one of the hole
|
||||
! if(iorb == hole_particles_singles(i,1))cycle
|
||||
! ! ispin = hole_particles_singles(i,3)
|
||||
! H_matrix(index_singles(i),index_singles(i)) += e_corr_singles(iorb,hole_particles_singles(i,3))
|
||||
! enddo
|
||||
! ! also exclude all the energy coming from the virtual orbital
|
||||
! H_matrix(index_singles(i),index_singles(i)) -= e_corr_singles(hole_particles_singles(i,2),hole_particles_singles(i,3))
|
||||
!
|
||||
! ! If it is a single excitation alpha, you can repeat :
|
||||
! ! +) all the double excitation 1h1p, appart the part involving the virtual orbital "r"
|
||||
! ! If it is a single excitation alpha, you can repeat :
|
||||
! ! +) all the double excitation 1h1p, appart the part involving the inactive orbital "i"
|
||||
! H_matrix(index_singles(i),index_singles(i)) += e_corr_doubles_1h1p
|
||||
! if(hole_particles_singles(i,3) == 1)then ! alpha single excitation
|
||||
! H_matrix(index_singles(i),index_singles(i)) -= e_corr_doubles(hole_particles_singles(i,2))
|
||||
! else ! beta single exctitation
|
||||
! H_matrix(index_singles(i),index_singles(i)) -= e_corr_doubles(hole_particles_singles(i,1))
|
||||
! endif
|
||||
! enddo
|
||||
|
||||
! ! repeat all the correlation energy on the doubles
|
||||
! ! as all the doubles involve the active space, you cannot repeat any of them one on another
|
||||
! do i = 1, n_doubles
|
||||
! ! on a given double, you can repeat all the correlation energy of the singles alpha
|
||||
! do j = 1, n_inact_orb
|
||||
! iorb = list_inact(j)
|
||||
! ! ispin = hole_particles_singles(i,3)
|
||||
! H_matrix(index_doubles(i),index_doubles(i)) += e_corr_singles(iorb,1)
|
||||
! enddo
|
||||
! ! except the part involving the virtual orbital "hole_particles_doubles(i,2)"
|
||||
! H_matrix(index_doubles(i),index_doubles(i)) -= e_corr_singles(hole_particles_doubles(i,2),1)
|
||||
! ! on a given double, you can repeat all the correlation energy of the singles beta
|
||||
! do j = 1, n_inact_orb
|
||||
! iorb = list_inact(j)
|
||||
! ! except the one of the hole
|
||||
! if(iorb == hole_particles_doubles(i,1))cycle
|
||||
! ! ispin = hole_particles_singles(i,3)
|
||||
! H_matrix(index_doubles(i),index_doubles(i)) += e_corr_singles(iorb,2)
|
||||
! enddo
|
||||
! enddo
|
||||
|
||||
|
||||
! Taking into account the connected part of the 2h2p on the HF determinant
|
||||
! 1/2 \sum_{ir,js} c_{ir}^{sigma} c_{js}^{sigma}
|
||||
|
||||
! H_matrix(index_hf) += total_corr_e_2h2p
|
||||
print*,'H_matrix(index_hf,index_hf) = ',H_matrix(index_hf,index_hf)
|
||||
do i = 1, n_singles
|
||||
! start on the single excitation "|i>"
|
||||
h1 = hole_particles_singles(i,1)
|
||||
p1 = hole_particles_singles(i,2)
|
||||
print*,'i = ',i
|
||||
do j = i+1, n_singles
|
||||
do k = 1, N_int
|
||||
key_tmp(k,1) = dets_in(k,1,index_singles(i))
|
||||
key_tmp(k,2) = dets_in(k,2,index_singles(i))
|
||||
enddo
|
||||
h2 = hole_particles_singles(j,1)
|
||||
p2 = hole_particles_singles(j,2)
|
||||
call do_mono_excitation(key_tmp,h2,p2,hole_particles_singles(j,3),i_ok)
|
||||
! apply the excitation operator from the single excitation "|j>"
|
||||
if(i_ok .ne. 1)cycle
|
||||
double precision :: H_array(sze),diag_H_mat_elem,hjj
|
||||
do k = 1, sze
|
||||
call get_excitation_degree(dets_in(1,1,k),key_tmp,degree,N_int)
|
||||
H_array(k) = 0.d0
|
||||
if(degree > 2)cycle
|
||||
call i_H_j(dets_in(1,1,k),key_tmp,N_int,hij)
|
||||
H_array(k) = hij
|
||||
enddo
|
||||
hjj = 1.d0/(ref_bitmask_energy - diag_H_mat_elem(key_tmp,N_int))
|
||||
! contrib_e2 = 0.5d0 * (delta_e + dsqrt(delta_e * delta_e + 4.d0 * hij * hij))
|
||||
do l = 2, sze
|
||||
! pause
|
||||
H_matrix(l,l) += H_array(l) * H_array(l) * hjj
|
||||
! H_matrix(1,l) += H_array(1) * H_array(l) * hjj
|
||||
! H_matrix(l,1) += H_array(1) * H_array(l) * hjj
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
print*,'H_matrix(index_hf,index_hf) = ',H_matrix(index_hf,index_hf)
|
||||
|
||||
end
|
||||
|
||||
subroutine SC2_1h1p_full(dets_in,u_in,energies,H_matrix,dim_in,sze,N_st,Nint,convergence)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! CISD+SC2 method :: take off all the disconnected terms of a CISD (selected or not)
|
||||
!
|
||||
! 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
|
||||
END_DOC
|
||||
integer, intent(in) :: dim_in, sze, N_st, Nint
|
||||
integer(bit_kind), intent(in) :: dets_in(Nint,2,sze)
|
||||
double precision, intent(inout) :: u_in(dim_in,N_st)
|
||||
double precision, intent(out) :: energies(N_st)
|
||||
double precision, intent(out) :: H_matrix(sze,sze)
|
||||
double precision, intent(in) :: convergence
|
||||
integer :: i,j,iter
|
||||
print*,'sze = ',sze
|
||||
H_matrix = 0.d0
|
||||
do iter = 1, 1
|
||||
! if(sze<=N_det_max_jacobi)then
|
||||
double precision, allocatable :: eigenvectors(:,:), eigenvalues(:),H_matrix_tmp(:,:)
|
||||
allocate (H_matrix_tmp(size(H_matrix_all_dets,1),sze),eigenvalues(sze),eigenvectors(size(H_matrix_all_dets,1),sze))
|
||||
H_matrix_tmp = 0.d0
|
||||
call dressing_1h1p_full(dets_in,u_in,H_matrix_tmp,dim_in,sze,N_st,Nint,convergence)
|
||||
do j=1,sze
|
||||
do i=1,sze
|
||||
H_matrix_tmp(i,j) += H_matrix_all_dets(i,j)
|
||||
enddo
|
||||
enddo
|
||||
print*,'passed the dressing'
|
||||
call lapack_diag(eigenvalues,eigenvectors, &
|
||||
H_matrix_tmp,size(H_matrix_all_dets,1),sze)
|
||||
do j=1,min(N_states_diag,sze)
|
||||
do i=1,sze
|
||||
u_in(i,j) = eigenvectors(i,j)
|
||||
enddo
|
||||
energies(j) = eigenvalues(j)
|
||||
enddo
|
||||
deallocate (H_matrix_tmp, eigenvalues, eigenvectors)
|
||||
! else
|
||||
! call davidson_diag_hjj(dets_in,u_in,diag_H_elements,energies,dim_in,sze,N_st,Nint,output_determinants)
|
||||
! endif
|
||||
print*,'E = ',energies(1) + nuclear_repulsion
|
||||
|
||||
enddo
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
subroutine SC2_1h1p(dets_in,u_in,energies,diag_H_elements,dim_in,sze,N_st,Nint,convergence)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! CISD+SC2 method :: take off all the disconnected terms of a CISD (selected or not)
|
||||
!
|
||||
! 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
|
||||
END_DOC
|
||||
integer, intent(in) :: dim_in, sze, N_st, Nint
|
||||
integer(bit_kind), intent(in) :: dets_in(Nint,2,sze)
|
||||
double precision, intent(inout) :: u_in(dim_in,N_st)
|
||||
double precision, intent(out) :: energies(N_st)
|
||||
double precision, intent(out) :: diag_H_elements(dim_in)
|
||||
double precision :: extra_diag_H_elements(dim_in)
|
||||
double precision, intent(in) :: convergence
|
||||
integer :: i,j,iter
|
||||
DIAG_H_ELEMENTS = 0.d0
|
||||
do iter = 1, 1
|
||||
! call dressing_1h1p(dets_in,u_in,diag_H_elements,dim_in,sze,N_st,Nint,convergence)
|
||||
call dressing_1h1p_by_2h2p(dets_in,u_in,extra_diag_H_elements,dim_in,sze,N_st,Nint,convergence)
|
||||
! if(sze<=N_det_max_jacobi)then
|
||||
double precision, allocatable :: eigenvectors(:,:), eigenvalues(:),H_matrix_tmp(:,:)
|
||||
allocate (H_matrix_tmp(size(H_matrix_all_dets,1),sze),eigenvalues(sze),eigenvectors(size(H_matrix_all_dets,1),sze))
|
||||
do j=1,sze
|
||||
do i=1,sze
|
||||
H_matrix_tmp(i,j) = H_matrix_all_dets(i,j)
|
||||
enddo
|
||||
enddo
|
||||
H_matrix_tmp(1,1) += extra_diag_H_elements(1)
|
||||
do i = 2,sze
|
||||
H_matrix_tmp(1,i) += extra_diag_H_elements(i)
|
||||
H_matrix_tmp(i,1) += extra_diag_H_elements(i)
|
||||
enddo
|
||||
!do i = 1,sze
|
||||
! H_matrix_tmp(i,i) = diag_H_elements(i)
|
||||
!enddo
|
||||
call lapack_diag(eigenvalues,eigenvectors, &
|
||||
H_matrix_tmp,size(H_matrix_all_dets,1),sze)
|
||||
do j=1,min(N_states_diag,sze)
|
||||
do i=1,sze
|
||||
u_in(i,j) = eigenvectors(i,j)
|
||||
enddo
|
||||
energies(j) = eigenvalues(j)
|
||||
enddo
|
||||
deallocate (H_matrix_tmp, eigenvalues, eigenvectors)
|
||||
! else
|
||||
! call davidson_diag_hjj(dets_in,u_in,diag_H_elements,energies,dim_in,sze,N_st,Nint,output_determinants)
|
||||
! endif
|
||||
print*,'E = ',energies(1) + nuclear_repulsion
|
||||
|
||||
enddo
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
subroutine density_matrix_1h1p(dets_in,u_in,density_matrix_alpha,density_matrix_beta,norm,dim_in,sze,N_st,Nint)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! CISD+SC2 method :: take off all the disconnected terms of a ROHF+1h1p (selected or not)
|
||||
!
|
||||
! 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
|
||||
END_DOC
|
||||
integer, intent(in) :: dim_in, sze, N_st, Nint
|
||||
integer(bit_kind), intent(in) :: dets_in(Nint,2,sze)
|
||||
double precision, intent(inout) :: u_in(dim_in,N_st)
|
||||
double precision, intent(inout) :: density_matrix_alpha(mo_tot_num,mo_tot_num)
|
||||
double precision, intent(inout) :: density_matrix_beta(mo_tot_num,mo_tot_num)
|
||||
double precision, intent(inout) :: norm
|
||||
|
||||
integer :: i,j,k,l
|
||||
integer :: n_singles
|
||||
integer :: index_singles(sze),hole_particles_singles(sze,3)
|
||||
integer :: n_doubles
|
||||
integer :: index_doubles(sze),hole_particles_doubles(sze,2)
|
||||
integer :: index_hf
|
||||
|
||||
integer :: exc(0:2,2,2),degree
|
||||
integer :: h1,h2,p1,p2,s1,s2
|
||||
integer :: other_spin(2)
|
||||
double precision :: phase
|
||||
integer(bit_kind) :: key_tmp(N_int,2)
|
||||
integer :: i_ok
|
||||
double precision :: phase_single_double,phase_double_hf,get_mo_bielec_integral
|
||||
double precision :: hij,c_ref,contrib
|
||||
integer :: iorb
|
||||
|
||||
other_spin(1) = 2
|
||||
other_spin(2) = 1
|
||||
|
||||
n_singles = 0
|
||||
n_doubles = 0
|
||||
norm = 0.d0
|
||||
do i = 1,sze
|
||||
call get_excitation(ref_bitmask,dets_in(1,1,i),exc,degree,phase,N_int)
|
||||
call decode_exc(exc,degree,h1,p1,h2,p2,s1,s2)
|
||||
norm += u_in(i,1)* u_in(i,1)
|
||||
if(degree == 0)then
|
||||
index_hf = i
|
||||
c_ref = 1.d0/psi_coef(i,1)
|
||||
else if (degree == 1)then
|
||||
n_singles +=1
|
||||
index_singles(n_singles) = i
|
||||
! h1 = inactive orbital of the hole
|
||||
hole_particles_singles(n_singles,1) = h1
|
||||
! p1 = virtual orbital of the particle
|
||||
hole_particles_singles(n_singles,2) = p1
|
||||
! s1 = spin of the electron excited
|
||||
hole_particles_singles(n_singles,3) = s1
|
||||
else if (degree == 2)then
|
||||
n_doubles +=1
|
||||
index_doubles(n_doubles) = i
|
||||
! h1 = inactive orbital of the hole (beta of course)
|
||||
hole_particles_doubles(n_doubles,1) = h1
|
||||
! p1 = virtual orbital of the particle (alpha of course)
|
||||
hole_particles_doubles(n_doubles,2) = p2
|
||||
else
|
||||
print*,'PB !! found out other thing than a single or double'
|
||||
print*,'stopping ..'
|
||||
stop
|
||||
endif
|
||||
enddo
|
||||
print*,'norm = ',norm
|
||||
|
||||
! Taking into account the connected part of the 2h2p on the HF determinant
|
||||
! 1/2 \sum_{ir,js} c_{ir}^{sigma} c_{js}^{sigma}
|
||||
|
||||
do i = 1, n_singles
|
||||
! start on the single excitation "|i>"
|
||||
h1 = hole_particles_singles(i,1)
|
||||
p1 = hole_particles_singles(i,2)
|
||||
do j = 1, n_singles
|
||||
do k = 1, N_int
|
||||
key_tmp(k,1) = dets_in(k,1,index_singles(i))
|
||||
key_tmp(k,2) = dets_in(k,2,index_singles(i))
|
||||
enddo
|
||||
h2 = hole_particles_singles(j,1)
|
||||
p2 = hole_particles_singles(j,2)
|
||||
call do_mono_excitation(key_tmp,h2,p2,hole_particles_singles(j,3),i_ok)
|
||||
! apply the excitation operator from the single excitation "|j>"
|
||||
if(i_ok .ne. 1)cycle
|
||||
double precision :: coef_ijrs,phase_other_single_ref
|
||||
integer :: occ(N_int*bit_kind_size,2),n_occ(2)
|
||||
call get_excitation(key_tmp,dets_in(1,1,index_singles(i)),exc,degree,phase_single_double,N_int)
|
||||
call get_excitation(ref_bitmask,dets_in(1,1,index_singles(j)),exc,degree,phase_other_single_ref,N_int)
|
||||
call get_excitation(key_tmp,dets_in(1,1,index_singles(j)),exc,degree,phase_other_single_ref,N_int)
|
||||
coef_ijrs = u_in(index_singles(i),1) * u_in(index_singles(j),1) * c_ref * c_ref &
|
||||
* phase_single_double * phase_other_single_ref
|
||||
call bitstring_to_list_ab(key_tmp, occ, n_occ, N_int)
|
||||
do k=1,elec_alpha_num
|
||||
l = occ(k,1)
|
||||
density_matrix_alpha(l,l) += coef_ijrs*coef_ijrs
|
||||
enddo
|
||||
do k=1,elec_beta_num
|
||||
l = occ(k,1)
|
||||
density_matrix_beta(l,l) += coef_ijrs*coef_ijrs
|
||||
enddo
|
||||
norm += coef_ijrs* coef_ijrs
|
||||
if(hole_particles_singles(j,3) == 1)then ! single alpha
|
||||
density_matrix_alpha(h2,p2) += coef_ijrs * phase_single_double * u_in(index_singles(i),1) * c_ref
|
||||
density_matrix_alpha(p2,h2) += coef_ijrs * phase_single_double * u_in(index_singles(i),1) * c_ref
|
||||
else
|
||||
density_matrix_beta(h2,p2) += coef_ijrs * phase_single_double * u_in(index_singles(i),1) * c_ref
|
||||
density_matrix_beta(p2,h2) += coef_ijrs * phase_single_double * u_in(index_singles(i),1) * c_ref
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
|
||||
|
||||
do i = 1, n_doubles
|
||||
! start on the double excitation "|i>"
|
||||
h1 = hole_particles_doubles(i,1)
|
||||
p1 = hole_particles_doubles(i,2)
|
||||
do j = 1, n_singles
|
||||
do k = 1, N_int
|
||||
key_tmp(k,1) = dets_in(k,1,index_doubles(i))
|
||||
key_tmp(k,2) = dets_in(k,2,index_doubles(i))
|
||||
enddo
|
||||
h2 = hole_particles_singles(j,1)
|
||||
p2 = hole_particles_singles(j,2)
|
||||
call do_mono_excitation(key_tmp,h2,p2,hole_particles_singles(j,3),i_ok)
|
||||
! apply the excitation operator from the single excitation "|j>"
|
||||
if(i_ok .ne. 1)cycle
|
||||
double precision :: coef_ijrs_kv,phase_double_triple
|
||||
call get_excitation(key_tmp,dets_in(1,1,index_singles(i)),exc,degree,phase_double_triple,N_int)
|
||||
call get_excitation(ref_bitmask,dets_in(1,1,index_singles(j)),exc,degree,phase_other_single_ref,N_int)
|
||||
call get_excitation(key_tmp,dets_in(1,1,index_singles(j)),exc,degree,phase_other_single_ref,N_int)
|
||||
coef_ijrs_kv = u_in(index_doubles(i),1) * u_in(index_singles(j),1) * c_ref * c_ref &
|
||||
* phase_double_triple * phase_other_single_ref
|
||||
call bitstring_to_list_ab(key_tmp, occ, n_occ, N_int)
|
||||
do k=1,elec_alpha_num
|
||||
l = occ(k,1)
|
||||
density_matrix_alpha(l,l) += coef_ijrs_kv*coef_ijrs_kv
|
||||
enddo
|
||||
do k=1,elec_beta_num
|
||||
l = occ(k,1)
|
||||
density_matrix_beta(l,l) += coef_ijrs_kv*coef_ijrs_kv
|
||||
enddo
|
||||
norm += coef_ijrs_kv* coef_ijrs_kv
|
||||
if(hole_particles_singles(j,3) == 1)then ! single alpha
|
||||
density_matrix_alpha(h2,p2) += coef_ijrs_kv * phase_double_triple * u_in(index_doubles(i),1) * c_ref
|
||||
density_matrix_alpha(p2,h2) += coef_ijrs_kv * phase_double_triple * u_in(index_doubles(i),1) * c_ref
|
||||
else
|
||||
density_matrix_beta(h2,p2) += coef_ijrs_kv * phase_double_triple * u_in(index_doubles(i),1) * c_ref
|
||||
density_matrix_beta(p2,h2) += coef_ijrs_kv * phase_double_triple * u_in(index_doubles(i),1) * c_ref
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
|
||||
|
||||
|
||||
|
||||
print*,'norm = ',norm
|
||||
norm = 1.d0/norm
|
||||
do i = 1, mo_tot_num
|
||||
do j = 1, mo_tot_num
|
||||
density_matrix_alpha(i,j) *= norm
|
||||
density_matrix_beta(i,j) *= norm
|
||||
enddo
|
||||
enddo
|
||||
coef_ijrs = 0.d0
|
||||
do i = 1, mo_tot_num
|
||||
coef_ijrs += density_matrix_beta(i,i) + density_matrix_beta(i,i)
|
||||
enddo
|
||||
print*,'accu = ',coef_ijrs
|
||||
|
||||
end
|
||||
|
|
@ -1,542 +0,0 @@
|
|||
subroutine all_single(e_pt2)
|
||||
implicit none
|
||||
double precision, intent(in) :: e_pt2
|
||||
integer :: i,k
|
||||
double precision, allocatable :: pt2(:), norm_pert(:), H_pert_diag(:)
|
||||
integer :: N_st, degree
|
||||
double precision,allocatable :: E_before(:)
|
||||
N_st = N_states
|
||||
allocate (pt2(N_st), norm_pert(N_st),H_pert_diag(N_st),E_before(N_st))
|
||||
if(.not.selected_fobo_ci)then
|
||||
selection_criterion = 0.d0
|
||||
soft_touch selection_criterion
|
||||
else
|
||||
selection_criterion = 0.1d0
|
||||
selection_criterion_factor = 0.01d0
|
||||
selection_criterion_min = selection_criterion
|
||||
soft_touch selection_criterion
|
||||
endif
|
||||
print*, 'e_pt2 = ',e_pt2
|
||||
pt2_max = 0.15d0 * e_pt2
|
||||
soft_touch pt2_max
|
||||
print*, 'pt2_max = ',pt2_max
|
||||
threshold_davidson = 1.d-9
|
||||
soft_touch threshold_davidson davidson_criterion
|
||||
i = 0
|
||||
print*,'Doing all the mono excitations !'
|
||||
print*,'N_det = ',N_det
|
||||
print*,'n_det_max = ',n_det_max
|
||||
print*,'pt2_max = ',pt2_max
|
||||
print*,'N_det_generators = ',N_det_generators
|
||||
pt2=-1.d0
|
||||
print*, 'ref_bitmask_energy =',ref_bitmask_energy
|
||||
print*, 'CI_expectation_value =',psi_energy(1)
|
||||
E_before = ref_bitmask_energy
|
||||
|
||||
print*,'Initial Step '
|
||||
print*,'Inital determinants '
|
||||
print*,'N_det = ',N_det
|
||||
do i = 1, N_states_diag
|
||||
print*,''
|
||||
print*,'i = ',i
|
||||
print*,'E = ',CI_energy(i)
|
||||
print*,'S^2 = ',CI_eigenvectors_s2(i)
|
||||
enddo
|
||||
n_det_max = 100000
|
||||
do while (N_det < n_det_max.and.maxval(abs(pt2(1:N_st))) > dabs(pt2_max))
|
||||
i += 1
|
||||
print*,'-----------------------'
|
||||
print*,'i = ',i
|
||||
call H_apply_just_mono(pt2, norm_pert, H_pert_diag, N_st)
|
||||
call diagonalize_CI
|
||||
print*,'N_det = ',N_det
|
||||
print*,'E = ',CI_energy(1)
|
||||
print*,'pt2 = ',pt2(1)
|
||||
print*,'E+PT2 = ',E_before + pt2(1)
|
||||
print*,'pt2_max = ',pt2_max
|
||||
print*, maxval(abs(pt2(1:N_st))) > dabs(pt2_max)
|
||||
if(N_states_diag.gt.1)then
|
||||
print*,'Variational Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',CI_energy(i) - CI_energy(1)
|
||||
enddo
|
||||
endif
|
||||
if(N_states.gt.1)then
|
||||
print*,'Variational + perturbative Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',E_before(i)+ pt2(i) - (E_before(1) + pt2(1))
|
||||
enddo
|
||||
endif
|
||||
E_before = CI_energy
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!! DOING ONLY ONE ITERATION OF SELECTION AS THE SELECTION CRITERION IS SET TO ZERO
|
||||
enddo
|
||||
! threshold_davidson = 1.d-8
|
||||
! soft_touch threshold_davidson davidson_criterion
|
||||
! call diagonalize_CI
|
||||
print*,'Final Step '
|
||||
print*,'N_det = ',N_det
|
||||
do i = 1, N_states_diag
|
||||
print*,''
|
||||
print*,'i = ',i
|
||||
print*,'E = ',CI_energy(i)
|
||||
print*,'S^2 = ',CI_eigenvectors_s2(i)
|
||||
enddo
|
||||
do i = 1, max(2,N_det_generators)
|
||||
print*,'psi_coef = ',psi_coef(i,1)
|
||||
enddo
|
||||
deallocate(pt2,norm_pert,E_before)
|
||||
end
|
||||
|
||||
subroutine all_1h2p
|
||||
implicit none
|
||||
integer :: i,k
|
||||
double precision, allocatable :: pt2(:), norm_pert(:), H_pert_diag(:)
|
||||
integer :: N_st, degree
|
||||
double precision,allocatable :: E_before(:)
|
||||
N_st = N_states
|
||||
allocate (pt2(N_st), norm_pert(N_st),H_pert_diag(N_st),E_before(N_st))
|
||||
selection_criterion = 0.d0
|
||||
soft_touch selection_criterion
|
||||
threshold_davidson = 1.d-5
|
||||
soft_touch threshold_davidson davidson_criterion
|
||||
i = 0
|
||||
print*,''
|
||||
print*,''
|
||||
print*,''
|
||||
print*,''
|
||||
print*,''
|
||||
print*,'*****************************'
|
||||
print*,'Doing all the 1h2P excitations'
|
||||
print*,'*****************************'
|
||||
print*,''
|
||||
print*,''
|
||||
print*,'N_det = ',N_det
|
||||
print*,'n_det_max = ',n_det_max
|
||||
print*,'pt2_max = ',pt2_max
|
||||
print*,'N_det_generators = ',N_det_generators
|
||||
pt2=-1.d0
|
||||
E_before = ref_bitmask_energy
|
||||
|
||||
print*,'Initial Step '
|
||||
print*,'Inital determinants '
|
||||
print*,'N_det = ',N_det
|
||||
do i = 1, N_states_diag
|
||||
print*,''
|
||||
print*,'i = ',i
|
||||
print*,'E = ',CI_energy(i)
|
||||
print*,'S^2 = ',CI_eigenvectors_s2(i)
|
||||
enddo
|
||||
n_det_max = 100000
|
||||
i = 0
|
||||
do while (N_det < n_det_max.and.maxval(abs(pt2(1:N_st))) > pt2_max)
|
||||
i += 1
|
||||
print*,'-----------------------'
|
||||
print*,'i = ',i
|
||||
call H_apply_only_1h2p(pt2, norm_pert, H_pert_diag, N_st)
|
||||
call diagonalize_CI
|
||||
print*,'N_det = ',N_det
|
||||
print*,'E = ',CI_energy(1)
|
||||
print*,'pt2 = ',pt2(1)
|
||||
print*,'E+PT2 = ',E_before + pt2(1)
|
||||
if(N_states_diag.gt.1)then
|
||||
print*,'Variational Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',CI_energy(i) - CI_energy(1)
|
||||
enddo
|
||||
endif
|
||||
if(N_states.gt.1)then
|
||||
print*,'Variational + perturbative Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',E_before(i)+ pt2(i) - (E_before(1) + pt2(1))
|
||||
enddo
|
||||
endif
|
||||
E_before = CI_energy
|
||||
|
||||
enddo
|
||||
print*,'Final Step '
|
||||
print*,'N_det = ',N_det
|
||||
do i = 1, N_states_diag
|
||||
print*,''
|
||||
print*,'i = ',i
|
||||
print*,'E = ',CI_energy(i)
|
||||
print*,'S^2 = ',CI_eigenvectors_s2(i)
|
||||
enddo
|
||||
|
||||
do i = 1, 2
|
||||
print*,'psi_coef = ',psi_coef(i,1)
|
||||
enddo
|
||||
deallocate(pt2,norm_pert,E_before)
|
||||
end
|
||||
|
||||
subroutine all_2h2p
|
||||
implicit none
|
||||
integer :: i,k
|
||||
double precision, allocatable :: pt2(:), norm_pert(:), H_pert_diag(:)
|
||||
integer :: N_st, degree
|
||||
double precision,allocatable :: E_before(:)
|
||||
N_st = N_states
|
||||
allocate (pt2(N_st), norm_pert(N_st),H_pert_diag(N_st),E_before(N_st))
|
||||
selection_criterion = 0.d0
|
||||
soft_touch selection_criterion
|
||||
threshold_davidson = 1.d-5
|
||||
soft_touch threshold_davidson davidson_criterion
|
||||
i = 0
|
||||
print*,''
|
||||
print*,''
|
||||
print*,''
|
||||
print*,''
|
||||
print*,''
|
||||
print*,'*****************************'
|
||||
print*,'Doing all the 2h2P excitations'
|
||||
print*,'*****************************'
|
||||
print*,''
|
||||
print*,''
|
||||
print*,'N_det = ',N_det
|
||||
print*,'n_det_max = ',n_det_max
|
||||
print*,'pt2_max = ',pt2_max
|
||||
print*,'N_det_generators = ',N_det_generators
|
||||
pt2=-1.d0
|
||||
E_before = ref_bitmask_energy
|
||||
|
||||
print*,'Initial Step '
|
||||
print*,'Inital determinants '
|
||||
print*,'N_det = ',N_det
|
||||
do i = 1, N_states_diag
|
||||
print*,''
|
||||
print*,'i = ',i
|
||||
print*,'E = ',CI_energy(i)
|
||||
print*,'S^2 = ',CI_eigenvectors_s2(i)
|
||||
enddo
|
||||
n_det_max = 100000
|
||||
i = 0
|
||||
do while (N_det < n_det_max.and.maxval(abs(pt2(1:N_st))) > pt2_max)
|
||||
i += 1
|
||||
print*,'-----------------------'
|
||||
print*,'i = ',i
|
||||
call H_apply_only_2h2p(pt2, norm_pert, H_pert_diag, N_st)
|
||||
call diagonalize_CI
|
||||
print*,'N_det = ',N_det
|
||||
print*,'E = ',CI_energy(1)
|
||||
print*,'pt2 = ',pt2(1)
|
||||
print*,'E+PT2 = ',E_before + pt2(1)
|
||||
if(N_states_diag.gt.1)then
|
||||
print*,'Variational Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',CI_energy(i) - CI_energy(1)
|
||||
enddo
|
||||
endif
|
||||
if(N_states.gt.1)then
|
||||
print*,'Variational + perturbative Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',E_before(i)+ pt2(i) - (E_before(1) + pt2(1))
|
||||
enddo
|
||||
endif
|
||||
E_before = CI_energy
|
||||
|
||||
enddo
|
||||
print*,'Final Step '
|
||||
print*,'N_det = ',N_det
|
||||
do i = 1, N_states_diag
|
||||
print*,''
|
||||
print*,'i = ',i
|
||||
print*,'E = ',CI_energy(i)
|
||||
print*,'S^2 = ',CI_eigenvectors_s2(i)
|
||||
enddo
|
||||
do i = 1, 2
|
||||
print*,'psi_coef = ',psi_coef(i,1)
|
||||
enddo
|
||||
deallocate(pt2,norm_pert,E_before)
|
||||
end
|
||||
|
||||
subroutine all_2p
|
||||
implicit none
|
||||
integer :: i,k
|
||||
double precision, allocatable :: pt2(:), norm_pert(:), H_pert_diag(:)
|
||||
integer :: N_st, degree
|
||||
double precision,allocatable :: E_before(:)
|
||||
N_st = N_states
|
||||
allocate (pt2(N_st), norm_pert(N_st),H_pert_diag(N_st),E_before(N_st))
|
||||
selection_criterion = 0.d0
|
||||
soft_touch selection_criterion
|
||||
threshold_davidson = 1.d-5
|
||||
soft_touch threshold_davidson davidson_criterion
|
||||
i = 0
|
||||
print*,''
|
||||
print*,''
|
||||
print*,''
|
||||
print*,''
|
||||
print*,''
|
||||
print*,'*****************************'
|
||||
print*,'Doing all the 2P excitations'
|
||||
print*,'*****************************'
|
||||
print*,''
|
||||
print*,''
|
||||
print*,'N_det = ',N_det
|
||||
print*,'n_det_max = ',n_det_max
|
||||
print*,'pt2_max = ',pt2_max
|
||||
print*,'N_det_generators = ',N_det_generators
|
||||
pt2=-1.d0
|
||||
E_before = ref_bitmask_energy
|
||||
|
||||
print*,'Initial Step '
|
||||
print*,'Inital determinants '
|
||||
print*,'N_det = ',N_det
|
||||
do i = 1, N_states_diag
|
||||
print*,''
|
||||
print*,'i = ',i
|
||||
print*,'E = ',CI_energy(i)
|
||||
print*,'S^2 = ',CI_eigenvectors_s2(i)
|
||||
enddo
|
||||
n_det_max = 100000
|
||||
i = 0
|
||||
do while (N_det < n_det_max.and.maxval(abs(pt2(1:N_st))) > pt2_max)
|
||||
i += 1
|
||||
print*,'-----------------------'
|
||||
print*,'i = ',i
|
||||
call H_apply_only_2p(pt2, norm_pert, H_pert_diag, N_st)
|
||||
call diagonalize_CI
|
||||
print*,'N_det = ',N_det
|
||||
print*,'E = ',CI_energy(1)
|
||||
print*,'pt2 = ',pt2(1)
|
||||
print*,'E+PT2 = ',E_before + pt2(1)
|
||||
if(N_states_diag.gt.1)then
|
||||
print*,'Variational Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',CI_energy(i) - CI_energy(1)
|
||||
enddo
|
||||
endif
|
||||
if(N_states.gt.1)then
|
||||
print*,'Variational + perturbative Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',E_before(i)+ pt2(i) - (E_before(1) + pt2(1))
|
||||
enddo
|
||||
endif
|
||||
E_before = CI_energy
|
||||
|
||||
enddo
|
||||
print*,'Final Step '
|
||||
print*,'N_det = ',N_det
|
||||
do i = 1, N_states_diag
|
||||
print*,''
|
||||
print*,'i = ',i
|
||||
print*,'E = ',CI_energy(i)
|
||||
print*,'S^2 = ',CI_eigenvectors_s2(i)
|
||||
enddo
|
||||
deallocate(pt2,norm_pert,E_before)
|
||||
do i = 1, 2
|
||||
print*,'psi_coef = ',psi_coef(i,1)
|
||||
enddo
|
||||
end
|
||||
|
||||
subroutine all_single_no_1h_or_1p
|
||||
implicit none
|
||||
integer :: i,k
|
||||
double precision, allocatable :: pt2(:), norm_pert(:), H_pert_diag(:)
|
||||
integer :: N_st, degree
|
||||
double precision,allocatable :: E_before(:)
|
||||
N_st = N_states
|
||||
allocate (pt2(N_st), norm_pert(N_st),H_pert_diag(N_st),E_before(N_st))
|
||||
selection_criterion = 0.d0
|
||||
soft_touch selection_criterion
|
||||
threshold_davidson = 1.d-5
|
||||
soft_touch threshold_davidson davidson_criterion
|
||||
i = 0
|
||||
print*,'Doing all the mono excitations !'
|
||||
print*,'N_det = ',N_det
|
||||
print*,'n_det_max = ',n_det_max
|
||||
print*,'pt2_max = ',pt2_max
|
||||
print*,'N_det_generators = ',N_det_generators
|
||||
pt2=-1.d0
|
||||
E_before = ref_bitmask_energy
|
||||
|
||||
print*,'Initial Step '
|
||||
print*,'Inital determinants '
|
||||
print*,'N_det = ',N_det
|
||||
do i = 1, N_states_diag
|
||||
print*,''
|
||||
print*,'i = ',i
|
||||
print*,'E = ',CI_energy(i)
|
||||
print*,'S^2 = ',CI_eigenvectors_s2(i)
|
||||
enddo
|
||||
n_det_max = 100000
|
||||
do while (N_det < n_det_max.and.maxval(abs(pt2(1:N_st))) > pt2_max)
|
||||
i += 1
|
||||
print*,'-----------------------'
|
||||
print*,'i = ',i
|
||||
call H_apply_just_mono_no_1h_no_1p(pt2, norm_pert, H_pert_diag, N_st)
|
||||
call diagonalize_CI
|
||||
print*,'N_det = ',N_det
|
||||
print*,'E = ',CI_energy(1)
|
||||
print*,'pt2 = ',pt2(1)
|
||||
print*,'E+PT2 = ',E_before + pt2(1)
|
||||
if(N_states_diag.gt.1)then
|
||||
print*,'Variational Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',CI_energy(i) - CI_energy(1)
|
||||
enddo
|
||||
endif
|
||||
if(N_states.gt.1)then
|
||||
print*,'Variational + perturbative Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',E_before(i)+ pt2(i) - (E_before(1) + pt2(1))
|
||||
enddo
|
||||
endif
|
||||
E_before = CI_energy
|
||||
enddo
|
||||
threshold_davidson = 1.d-16
|
||||
soft_touch threshold_davidson davidson_criterion
|
||||
call diagonalize_CI
|
||||
print*,'Final Step '
|
||||
print*,'N_det = ',N_det
|
||||
do i = 1, N_states_diag
|
||||
print*,''
|
||||
print*,'i = ',i
|
||||
print*,'E = ',CI_energy(i)
|
||||
print*,'S^2 = ',CI_eigenvectors_s2(i)
|
||||
enddo
|
||||
do i = 1, 2
|
||||
print*,'psi_coef = ',psi_coef(i,1)
|
||||
enddo
|
||||
! call save_wavefunction
|
||||
deallocate(pt2,norm_pert,E_before)
|
||||
end
|
||||
|
||||
subroutine all_single_no_1h_or_1p_or_2p
|
||||
implicit none
|
||||
integer :: i,k
|
||||
double precision, allocatable :: pt2(:), norm_pert(:), H_pert_diag(:)
|
||||
integer :: N_st, degree
|
||||
double precision,allocatable :: E_before(:)
|
||||
N_st = N_states
|
||||
allocate (pt2(N_st), norm_pert(N_st),H_pert_diag(N_st),E_before(N_st))
|
||||
selection_criterion = 0.d0
|
||||
soft_touch selection_criterion
|
||||
threshold_davidson = 1.d-5
|
||||
soft_touch threshold_davidson davidson_criterion
|
||||
i = 0
|
||||
print*,'Doing all the mono excitations !'
|
||||
print*,'N_det = ',N_det
|
||||
print*,'n_det_max = ',n_det_max
|
||||
print*,'pt2_max = ',pt2_max
|
||||
print*,'N_det_generators = ',N_det_generators
|
||||
pt2=-1.d0
|
||||
E_before = ref_bitmask_energy
|
||||
|
||||
print*,'Initial Step '
|
||||
print*,'Inital determinants '
|
||||
print*,'N_det = ',N_det
|
||||
do i = 1, N_states_diag
|
||||
print*,''
|
||||
print*,'i = ',i
|
||||
print*,'E = ',CI_energy(i)
|
||||
print*,'S^2 = ',CI_eigenvectors_s2(i)
|
||||
enddo
|
||||
n_det_max = 100000
|
||||
do while (N_det < n_det_max.and.maxval(abs(pt2(1:N_st))) > pt2_max)
|
||||
i += 1
|
||||
print*,'-----------------------'
|
||||
print*,'i = ',i
|
||||
call H_apply_just_mono_no_1h_no_1p_no_2p(pt2, norm_pert, H_pert_diag, N_st)
|
||||
call diagonalize_CI
|
||||
print*,'N_det = ',N_det
|
||||
print*,'E = ',CI_energy(1)
|
||||
print*,'pt2 = ',pt2(1)
|
||||
print*,'E+PT2 = ',E_before + pt2(1)
|
||||
if(N_states_diag.gt.1)then
|
||||
print*,'Variational Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',CI_energy(i) - CI_energy(1)
|
||||
enddo
|
||||
endif
|
||||
if(N_states.gt.1)then
|
||||
print*,'Variational + perturbative Energy difference'
|
||||
do i = 2, N_st
|
||||
print*,'Delta E = ',E_before(i)+ pt2(i) - (E_before(1) + pt2(1))
|
||||
enddo
|
||||
endif
|
||||
E_before = CI_energy
|
||||
enddo
|
||||
threshold_davidson = 1.d-10
|
||||
soft_touch threshold_davidson davidson_criterion
|
||||
call diagonalize_CI
|
||||
print*,'Final Step '
|
||||
print*,'N_det = ',N_det
|
||||
do i = 1, N_states_diag
|
||||
print*,''
|
||||
print*,'i = ',i
|
||||
print*,'E = ',CI_energy(i)
|
||||
print*,'S^2 = ',CI_eigenvectors_s2(i)
|
||||
enddo
|
||||
do i = 1, 2
|
||||
print*,'psi_coef = ',psi_coef(i,1)
|
||||
enddo
|
||||
! call save_wavefunction
|
||||
deallocate(pt2,norm_pert,E_before)
|
||||
end
|
||||
|
||||
subroutine all_1h_1p_routine
|
||||
implicit none
|
||||
integer :: i,k
|
||||
double precision, allocatable :: pt2(:), norm_pert(:), H_pert_diag(:)
|
||||
integer :: N_st, degree
|
||||
double precision :: E_before
|
||||
integer :: n_det_before
|
||||
N_st = N_states
|
||||
allocate (pt2(N_st), norm_pert(N_st),H_pert_diag(N_st))
|
||||
i = 0
|
||||
print*,'N_det = ',N_det
|
||||
print*,'n_det_max = ',n_det_max
|
||||
print*,'pt2_max = ',pt2_max
|
||||
pt2=-1.d0
|
||||
E_before = ref_bitmask_energy
|
||||
do while (N_det < n_det_max.and.maxval(abs(pt2(1:N_st))) > pt2_max)
|
||||
n_det_before = N_det
|
||||
i += 1
|
||||
print*,'-----------------------'
|
||||
print*,'i = ',i
|
||||
call H_apply_just_1h_1p(pt2, norm_pert, H_pert_diag, N_st)
|
||||
call diagonalize_CI
|
||||
print*,'N_det = ',N_det
|
||||
print*,'E = ',CI_energy(1)
|
||||
print*,'pt2 = ',pt2(1)
|
||||
print*,'E+PT2 = ',E_before + pt2(1)
|
||||
E_before = CI_energy(1)
|
||||
if(n_det_before == N_det)then
|
||||
selection_criterion = selection_criterion * 0.5d0
|
||||
endif
|
||||
enddo
|
||||
deallocate(pt2,norm_pert)
|
||||
end
|
||||
subroutine all_but_1h_1p_routine
|
||||
implicit none
|
||||
integer :: i,k
|
||||
double precision, allocatable :: pt2(:), norm_pert(:), H_pert_diag(:)
|
||||
integer :: N_st, degree
|
||||
double precision :: E_before
|
||||
integer :: n_det_before
|
||||
N_st = N_states
|
||||
allocate (pt2(N_st), norm_pert(N_st),H_pert_diag(N_st))
|
||||
i = 0
|
||||
print*,'N_det = ',N_det
|
||||
print*,'n_det_max = ',n_det_max
|
||||
print*,'pt2_max = ',pt2_max
|
||||
pt2=-1.d0
|
||||
E_before = ref_bitmask_energy
|
||||
do while (N_det < n_det_max.and.maxval(abs(pt2(1:N_st))) > pt2_max)
|
||||
n_det_before = N_det
|
||||
i += 1
|
||||
print*,'-----------------------'
|
||||
print*,'i = ',i
|
||||
call H_apply_all_but_1h_and_1p(pt2, norm_pert, H_pert_diag, N_st)
|
||||
call diagonalize_CI
|
||||
print*,'N_det = ',N_det
|
||||
print*,'E = ',CI_energy(1)
|
||||
print*,'pt2 = ',pt2(1)
|
||||
print*,'E+PT2 = ',E_before + pt2(1)
|
||||
E_before = CI_energy(1)
|
||||
if(n_det_before == N_det)then
|
||||
selection_criterion = selection_criterion * 0.5d0
|
||||
endif
|
||||
enddo
|
||||
deallocate(pt2,norm_pert)
|
||||
end
|
|
@ -1,535 +0,0 @@
|
|||
subroutine all_single_split(psi_det_generators_input,psi_coef_generators_input,Ndet_generators_input,dressing_matrix)
|
||||
implicit none
|
||||
use bitmasks
|
||||
integer, intent(in) :: Ndet_generators_input
|
||||
integer(bit_kind), intent(in) :: psi_det_generators_input(N_int,2,Ndet_generators_input)
|
||||
double precision, intent(inout) :: dressing_matrix(Ndet_generators_input,Ndet_generators_input)
|
||||
double precision, intent(in) :: psi_coef_generators_input(ndet_generators_input,n_states)
|
||||
integer :: i,i_hole,j
|
||||
n_det_max_jacobi = 50
|
||||
soft_touch n_det_max_jacobi
|
||||
do i = 1, n_inact_orb
|
||||
i_hole = list_inact(i)
|
||||
print*,''
|
||||
print*,'Doing all the single excitations from the orbital '
|
||||
print*,i_hole
|
||||
print*,''
|
||||
print*,''
|
||||
threshold_davidson = 1.d-4
|
||||
soft_touch threshold_davidson davidson_criterion
|
||||
call modify_bitmasks_for_hole(i_hole)
|
||||
call set_bitmask_particl_as_input(reunion_of_bitmask)
|
||||
call set_generators_as_input_psi(ndet_generators_input,psi_det_generators_input,psi_coef_generators_input)
|
||||
call set_psi_det_as_input_psi(ndet_generators_input,psi_det_generators_input,psi_coef_generators_input)
|
||||
call all_single
|
||||
! call diagonalize_CI_SC2
|
||||
! call update_matrix_dressing_sc2(dressing_matrix,ndet_generators_input,psi_det_generators_input,Diag_H_elements_SC2)
|
||||
call provide_matrix_dressing(dressing_matrix,ndet_generators_input,psi_det_generators_input)
|
||||
enddo
|
||||
|
||||
do i = 1, n_act_orb
|
||||
i_hole = list_act(i)
|
||||
print*,''
|
||||
print*,'Doing all the single excitations from the orbital '
|
||||
print*,i_hole
|
||||
print*,''
|
||||
print*,''
|
||||
threshold_davidson = 1.d-4
|
||||
soft_touch threshold_davidson davidson_criterion
|
||||
call modify_bitmasks_for_hole(i_hole)
|
||||
call set_bitmask_particl_as_input(reunion_of_bitmask)
|
||||
call set_generators_as_input_psi(ndet_generators_input,psi_det_generators_input,psi_coef_generators_input)
|
||||
call set_psi_det_as_input_psi(ndet_generators_input,psi_det_generators_input,psi_coef_generators_input)
|
||||
call all_single
|
||||
! call diagonalize_CI_SC2
|
||||
! call update_matrix_dressing_sc2(dressing_matrix,ndet_generators_input,psi_det_generators_input,Diag_H_elements_SC2)
|
||||
call provide_matrix_dressing(dressing_matrix,ndet_generators_input,psi_det_generators_input)
|
||||
enddo
|
||||
|
||||
do i = 1, n_virt_orb
|
||||
i_hole = list_virt(i)
|
||||
print*,''
|
||||
print*,'Doing all the single excitations from the orbital '
|
||||
print*,i_hole
|
||||
print*,''
|
||||
print*,''
|
||||
threshold_davidson = 1.d-4
|
||||
soft_touch threshold_davidson davidson_criterion
|
||||
call modify_bitmasks_for_hole(i_hole)
|
||||
call set_bitmask_particl_as_input(reunion_of_bitmask)
|
||||
call set_generators_as_input_psi(ndet_generators_input,psi_det_generators_input,psi_coef_generators_input)
|
||||
call set_psi_det_as_input_psi(ndet_generators_input,psi_det_generators_input,psi_coef_generators_input)
|
||||
call all_single
|
||||
! call diagonalize_CI_SC2
|
||||
! call update_matrix_dressing_sc2(dressing_matrix,ndet_generators_input,psi_det_generators_input,Diag_H_elements_SC2)
|
||||
call provide_matrix_dressing(dressing_matrix,ndet_generators_input,psi_det_generators_input)
|
||||
enddo
|
||||
|
||||
n_det_max_jacobi = 1000
|
||||
soft_touch n_det_max_jacobi
|
||||
end
|
||||
|
||||
|
||||
|
||||
subroutine all_single_for_1p(i_particl,dressing_matrix_1h1p,dressing_matrix_1h2p,dressing_matrix_extra_1h_or_1p)
|
||||
implicit none
|
||||
use bitmasks
|
||||
integer, intent(in) :: i_particl
|
||||
double precision, intent(inout) :: dressing_matrix_1h1p(N_det_generators,N_det_generators)
|
||||
double precision, intent(inout) :: dressing_matrix_1h2p(N_det_generators,N_det_generators)
|
||||
double precision, intent(inout) :: dressing_matrix_extra_1h_or_1p(N_det_generators,N_det_generators)
|
||||
integer :: i,j
|
||||
n_det_max_jacobi = 50
|
||||
soft_touch n_det_max_jacobi
|
||||
|
||||
call all_single
|
||||
|
||||
threshold_davidson = 1.d-12
|
||||
soft_touch threshold_davidson davidson_criterion
|
||||
call diagonalize_CI
|
||||
|
||||
|
||||
|
||||
double precision, allocatable :: matrix_ref_1h_1p(:,:)
|
||||
double precision, allocatable :: matrix_ref_1h_1p_dressing_1h1p(:,:)
|
||||
double precision, allocatable :: matrix_ref_1h_1p_dressing_1h2p(:,:)
|
||||
double precision, allocatable :: psi_coef_ref_1h_1p(:,:)
|
||||
double precision, allocatable :: psi_coef_1h1p(:,:)
|
||||
double precision, allocatable :: psi_coef_1h2p(:,:)
|
||||
integer(bit_kind), allocatable :: psi_det_1h2p(:,:,:)
|
||||
integer(bit_kind), allocatable :: psi_det_ref_1h_1p(:,:,:)
|
||||
integer(bit_kind), allocatable :: psi_det_1h1p(:,:,:)
|
||||
integer :: n_det_ref_1h_1p,n_det_1h2p,n_det_1h1p
|
||||
double precision :: hka
|
||||
double precision,allocatable :: eigenvectors(:,:), eigenvalues(:)
|
||||
|
||||
|
||||
call give_n_ref_1h_1p_and_n_1h2p_1h1p_in_psi_det(n_det_ref_1h_1p,n_det_1h2p,n_det_1h1p)
|
||||
|
||||
allocate(matrix_ref_1h_1p(n_det_ref_1h_1p,n_det_ref_1h_1p))
|
||||
allocate(matrix_ref_1h_1p_dressing_1h1p(n_det_ref_1h_1p,n_det_ref_1h_1p))
|
||||
allocate(matrix_ref_1h_1p_dressing_1h2p(n_det_ref_1h_1p,n_det_ref_1h_1p))
|
||||
allocate(psi_det_ref_1h_1p(N_int,2,n_det_ref_1h_1p), psi_coef_ref_1h_1p(n_det_ref_1h_1p,N_states))
|
||||
allocate(psi_det_1h2p(N_int,2,n_det_1h2p), psi_coef_1h2p(n_det_1h2p,N_states))
|
||||
allocate(psi_det_1h1p(N_int,2,n_det_1h1p), psi_coef_1h1p(n_det_1h1p,N_states))
|
||||
|
||||
call give_wf_n_ref_1h_1p_and_n_1h2p_1h1p_in_psi_det(n_det_ref_1h_1p,n_det_1h2p,n_det_1h1p,psi_det_ref_1h_1p,psi_coef_ref_1h_1p,&
|
||||
psi_det_1h2p,psi_coef_1h2p,psi_det_1h1p,psi_coef_1h1p)
|
||||
|
||||
do i = 1, n_det_ref_1h_1p
|
||||
do j = 1, n_det_ref_1h_1p
|
||||
call i_h_j(psi_det_ref_1h_1p(1,1,i),psi_det_ref_1h_1p(1,1,j),N_int,hka)
|
||||
matrix_ref_1h_1p(i,j) = hka
|
||||
enddo
|
||||
enddo
|
||||
matrix_ref_1h_1p_dressing_1h1p = 0.d0
|
||||
matrix_ref_1h_1p_dressing_1h2p = 0.d0
|
||||
call provide_matrix_dressing_general(matrix_ref_1h_1p_dressing_1h2p,psi_det_ref_1h_1p,psi_coef_ref_1h_1p,n_det_ref_1h_1p, &
|
||||
psi_det_1h2p,psi_coef_1h2p,n_det_1h2p)
|
||||
call provide_matrix_dressing_general(matrix_ref_1h_1p_dressing_1h1p,psi_det_ref_1h_1p,psi_coef_ref_1h_1p,n_det_ref_1h_1p, &
|
||||
psi_det_1h1p,psi_coef_1h1p,n_det_1h1p)
|
||||
do i = 1, n_det_ref_1h_1p
|
||||
do j = 1, n_det_ref_1h_1p
|
||||
matrix_ref_1h_1p(i,j) += matrix_ref_1h_1p_dressing_1h2p(i,j) + matrix_ref_1h_1p_dressing_1h1p(i,j)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
allocate(eigenvectors(n_det_ref_1h_1p,n_det_ref_1h_1p), eigenvalues(n_det_ref_1h_1p))
|
||||
call lapack_diag(eigenvalues,eigenvectors,matrix_ref_1h_1p,n_det_ref_1h_1p,n_det_ref_1h_1p)
|
||||
!do j = 1, n_det_ref_1h_1p
|
||||
! print*,'coef = ',eigenvectors(j,1)
|
||||
!enddo
|
||||
print*,''
|
||||
print*,'-----------------------'
|
||||
print*,'-----------------------'
|
||||
print*,'e_dressed = ',eigenvalues(1)+nuclear_repulsion
|
||||
print*,'-----------------------'
|
||||
! Extract the
|
||||
integer, allocatable :: index_generator(:)
|
||||
integer :: n_det_generators_tmp,degree
|
||||
n_det_generators_tmp = 0
|
||||
allocate(index_generator(n_det_ref_1h_1p))
|
||||
do i = 1, n_det_ref_1h_1p
|
||||
do j = 1, N_det_generators
|
||||
call get_excitation_degree(psi_det_generators(1,1,j),psi_det_ref_1h_1p(1,1,i), degree, N_int)
|
||||
if(degree == 0)then
|
||||
n_det_generators_tmp +=1
|
||||
index_generator(n_det_generators_tmp) = i
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
if(n_det_generators_tmp .ne. n_det_generators)then
|
||||
print*,'PB !!!'
|
||||
print*,'if(n_det_generators_tmp .ne. n_det_genrators)then'
|
||||
stop
|
||||
endif
|
||||
do i = 1, N_det_generators
|
||||
print*,'psi_coef_dressed = ',eigenvectors(index_generator(i),1)
|
||||
do j = 1, N_det_generators
|
||||
dressing_matrix_1h1p(i,j) += matrix_ref_1h_1p_dressing_1h1p(index_generator(i),index_generator(j))
|
||||
dressing_matrix_1h2p(i,j) += matrix_ref_1h_1p_dressing_1h2p(index_generator(i),index_generator(j))
|
||||
enddo
|
||||
enddo
|
||||
print*,'-----------------------'
|
||||
print*,'-----------------------'
|
||||
|
||||
|
||||
deallocate(matrix_ref_1h_1p)
|
||||
deallocate(matrix_ref_1h_1p_dressing_1h1p)
|
||||
deallocate(matrix_ref_1h_1p_dressing_1h2p)
|
||||
deallocate(psi_det_ref_1h_1p, psi_coef_ref_1h_1p)
|
||||
deallocate(psi_det_1h2p, psi_coef_1h2p)
|
||||
deallocate(psi_det_1h1p, psi_coef_1h1p)
|
||||
deallocate(eigenvectors,eigenvalues)
|
||||
deallocate(index_generator)
|
||||
|
||||
|
||||
end
|
||||
|
||||
subroutine all_single_for_1h(i_hole,dressing_matrix_1h1p,dressing_matrix_2h1p,dressing_matrix_extra_1h_or_1p)
|
||||
implicit none
|
||||
use bitmasks
|
||||
integer, intent(in) :: i_hole
|
||||
double precision, intent(inout) :: dressing_matrix_1h1p(N_det_generators,N_det_generators)
|
||||
double precision, intent(inout) :: dressing_matrix_2h1p(N_det_generators,N_det_generators)
|
||||
double precision, intent(inout) :: dressing_matrix_extra_1h_or_1p(N_det_generators,N_det_generators)
|
||||
integer :: i,j
|
||||
n_det_max_jacobi = 50
|
||||
soft_touch n_det_max_jacobi
|
||||
|
||||
call all_single
|
||||
|
||||
threshold_davidson = 1.d-12
|
||||
soft_touch threshold_davidson davidson_criterion
|
||||
call diagonalize_CI
|
||||
|
||||
|
||||
|
||||
double precision, allocatable :: matrix_ref_1h_1p(:,:)
|
||||
double precision, allocatable :: matrix_ref_1h_1p_dressing_1h1p(:,:)
|
||||
double precision, allocatable :: matrix_ref_1h_1p_dressing_2h1p(:,:)
|
||||
double precision, allocatable :: psi_coef_ref_1h_1p(:,:)
|
||||
double precision, allocatable :: psi_coef_1h1p(:,:)
|
||||
double precision, allocatable :: psi_coef_2h1p(:,:)
|
||||
integer(bit_kind), allocatable :: psi_det_2h1p(:,:,:)
|
||||
integer(bit_kind), allocatable :: psi_det_ref_1h_1p(:,:,:)
|
||||
integer(bit_kind), allocatable :: psi_det_1h1p(:,:,:)
|
||||
integer :: n_det_ref_1h_1p,n_det_2h1p,n_det_1h1p
|
||||
double precision :: hka
|
||||
double precision,allocatable :: eigenvectors(:,:), eigenvalues(:)
|
||||
|
||||
|
||||
call give_n_ref_1h_1p_and_n_2h1p_1h1p_in_psi_det(n_det_ref_1h_1p,n_det_2h1p,n_det_1h1p)
|
||||
|
||||
allocate(matrix_ref_1h_1p(n_det_ref_1h_1p,n_det_ref_1h_1p))
|
||||
allocate(matrix_ref_1h_1p_dressing_1h1p(n_det_ref_1h_1p,n_det_ref_1h_1p))
|
||||
allocate(matrix_ref_1h_1p_dressing_2h1p(n_det_ref_1h_1p,n_det_ref_1h_1p))
|
||||
allocate(psi_det_ref_1h_1p(N_int,2,n_det_ref_1h_1p), psi_coef_ref_1h_1p(n_det_ref_1h_1p,N_states))
|
||||
allocate(psi_det_2h1p(N_int,2,n_det_2h1p), psi_coef_2h1p(n_det_2h1p,N_states))
|
||||
allocate(psi_det_1h1p(N_int,2,n_det_1h1p), psi_coef_1h1p(n_det_1h1p,N_states))
|
||||
|
||||
call give_wf_n_ref_1h_1p_and_n_2h1p_1h1p_in_psi_det(n_det_ref_1h_1p,n_det_2h1p,n_det_1h1p,psi_det_ref_1h_1p,psi_coef_ref_1h_1p,&
|
||||
psi_det_2h1p,psi_coef_2h1p,psi_det_1h1p,psi_coef_1h1p)
|
||||
|
||||
do i = 1, n_det_ref_1h_1p
|
||||
do j = 1, n_det_ref_1h_1p
|
||||
call i_h_j(psi_det_ref_1h_1p(1,1,i),psi_det_ref_1h_1p(1,1,j),N_int,hka)
|
||||
matrix_ref_1h_1p(i,j) = hka
|
||||
enddo
|
||||
enddo
|
||||
matrix_ref_1h_1p_dressing_1h1p = 0.d0
|
||||
matrix_ref_1h_1p_dressing_2h1p = 0.d0
|
||||
call provide_matrix_dressing_general(matrix_ref_1h_1p_dressing_2h1p,psi_det_ref_1h_1p,psi_coef_ref_1h_1p,n_det_ref_1h_1p, &
|
||||
psi_det_2h1p,psi_coef_2h1p,n_det_2h1p)
|
||||
call provide_matrix_dressing_general(matrix_ref_1h_1p_dressing_1h1p,psi_det_ref_1h_1p,psi_coef_ref_1h_1p,n_det_ref_1h_1p, &
|
||||
psi_det_1h1p,psi_coef_1h1p,n_det_1h1p)
|
||||
do i = 1, n_det_ref_1h_1p
|
||||
do j = 1, n_det_ref_1h_1p
|
||||
matrix_ref_1h_1p(i,j) += matrix_ref_1h_1p_dressing_2h1p(i,j) + matrix_ref_1h_1p_dressing_1h1p(i,j)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
allocate(eigenvectors(n_det_ref_1h_1p,n_det_ref_1h_1p), eigenvalues(n_det_ref_1h_1p))
|
||||
call lapack_diag(eigenvalues,eigenvectors,matrix_ref_1h_1p,n_det_ref_1h_1p,n_det_ref_1h_1p)
|
||||
!do j = 1, n_det_ref_1h_1p
|
||||
! print*,'coef = ',eigenvectors(j,1)
|
||||
!enddo
|
||||
print*,''
|
||||
print*,'-----------------------'
|
||||
print*,'-----------------------'
|
||||
print*,'e_dressed = ',eigenvalues(1)+nuclear_repulsion
|
||||
print*,'-----------------------'
|
||||
! Extract the
|
||||
integer, allocatable :: index_generator(:)
|
||||
integer :: n_det_generators_tmp,degree
|
||||
n_det_generators_tmp = 0
|
||||
allocate(index_generator(n_det_ref_1h_1p))
|
||||
do i = 1, n_det_ref_1h_1p
|
||||
do j = 1, N_det_generators
|
||||
call get_excitation_degree(psi_det_generators(1,1,j),psi_det_ref_1h_1p(1,1,i), degree, N_int)
|
||||
if(degree == 0)then
|
||||
n_det_generators_tmp +=1
|
||||
index_generator(n_det_generators_tmp) = i
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
if(n_det_generators_tmp .ne. n_det_generators)then
|
||||
print*,'PB !!!'
|
||||
print*,'if(n_det_generators_tmp .ne. n_det_genrators)then'
|
||||
stop
|
||||
endif
|
||||
do i = 1, N_det_generators
|
||||
print*,'psi_coef_dressed = ',eigenvectors(index_generator(i),1)
|
||||
do j = 1, N_det_generators
|
||||
dressing_matrix_1h1p(i,j) += matrix_ref_1h_1p_dressing_1h1p(index_generator(i),index_generator(j))
|
||||
dressing_matrix_2h1p(i,j) += matrix_ref_1h_1p_dressing_2h1p(index_generator(i),index_generator(j))
|
||||
enddo
|
||||
enddo
|
||||
print*,'-----------------------'
|
||||
print*,'-----------------------'
|
||||
|
||||
|
||||
deallocate(matrix_ref_1h_1p)
|
||||
deallocate(matrix_ref_1h_1p_dressing_1h1p)
|
||||
deallocate(matrix_ref_1h_1p_dressing_2h1p)
|
||||
deallocate(psi_det_ref_1h_1p, psi_coef_ref_1h_1p)
|
||||
deallocate(psi_det_2h1p, psi_coef_2h1p)
|
||||
deallocate(psi_det_1h1p, psi_coef_1h1p)
|
||||
deallocate(eigenvectors,eigenvalues)
|
||||
deallocate(index_generator)
|
||||
!return
|
||||
!
|
||||
|
||||
!integer(bit_kind), allocatable :: psi_ref_out(:,:,:)
|
||||
!integer(bit_kind), allocatable :: psi_1h1p(:,:,:)
|
||||
!integer(bit_kind), allocatable :: psi_2h1p(:,:,:)
|
||||
!integer(bit_kind), allocatable :: psi_extra_1h_or_1p(:,:,:)
|
||||
!double precision, allocatable :: psi_ref_coef_out(:,:)
|
||||
!double precision, allocatable :: psi_coef_extra_1h_or_1p(:,:)
|
||||
|
||||
!call all_single_no_1h_or_1p
|
||||
|
||||
!call give_n_1h1p_and_n_2h1p_in_psi_det(i_hole,n_det_extra_1h_or_1p,n_det_1h1p,n_det_2h1p)
|
||||
!allocate(psi_ref_out(N_int,2,N_det_generators))
|
||||
!allocate(psi_1h1p(N_int,2,n_det_1h1p))
|
||||
!allocate(psi_2h1p(N_int,2,n_det_2h1p))
|
||||
!allocate(psi_extra_1h_or_1p(N_int,2,n_det_extra_1h_or_1p))
|
||||
!allocate(psi_ref_coef_out(N_det_generators,N_states))
|
||||
!allocate(psi_coef_1h1p(n_det_1h1p,N_states))
|
||||
!allocate(psi_coef_2h1p(n_det_2h1p,N_states))
|
||||
!allocate(psi_coef_extra_1h_or_1p(n_det_extra_1h_or_1p,N_states))
|
||||
!call split_wf_generators_and_1h1p_and_2h1p(i_hole,n_det_extra_1h_or_1p,n_det_1h1p,n_det_2h1p,psi_ref_out,psi_ref_coef_out,psi_1h1p,psi_coef_1h1p,psi_2h1p,psi_coef_2h1p,psi_extra_1h_or_1p,psi_coef_extra_1h_or_1p)
|
||||
!do i = 1, n_det_extra_1h_or_1p
|
||||
! print*,'----'
|
||||
! print*,'c = ',psi_coef_extra_1h_or_1p(i,1)
|
||||
! call debug_det(psi_extra_1h_or_1p(1,1,i),N_int)
|
||||
! print*,'----'
|
||||
!enddo
|
||||
!call provide_matrix_dressing_general(dressing_matrix_1h1p,psi_ref_out,psi_ref_coef_out,N_det_generators, &
|
||||
! psi_1h1p,psi_coef_1h1p,n_det_1h1p)
|
||||
!print*,'Dressing 1h1p '
|
||||
!do j =1, N_det_generators
|
||||
! print*,' dressing ',dressing_matrix_1h1p(j,:)
|
||||
!enddo
|
||||
|
||||
!call provide_matrix_dressing_general(dressing_matrix_2h1p,psi_ref_out,psi_ref_coef_out,N_det_generators, &
|
||||
! psi_2h1p,psi_coef_2h1p,n_det_2h1p)
|
||||
!print*,'Dressing 2h1p '
|
||||
!do j =1, N_det_generators
|
||||
! print*,' dressing ',dressing_matrix_2h1p(j,:)
|
||||
!enddo
|
||||
|
||||
!call provide_matrix_dressing_for_extra_1h_or_1p(dressing_matrix_extra_1h_or_1p,psi_ref_out,psi_ref_coef_out,N_det_generators, &
|
||||
! psi_extra_1h_or_1p,psi_coef_extra_1h_or_1p,n_det_extra_1h_or_1p)
|
||||
!print*,',dressing_matrix_extra_1h_or_1p'
|
||||
!do j =1, N_det_generators
|
||||
! print*,' dressing ',dressing_matrix_extra_1h_or_1p(j,:)
|
||||
!enddo
|
||||
|
||||
|
||||
!deallocate(psi_ref_out)
|
||||
!deallocate(psi_1h1p)
|
||||
!deallocate(psi_2h1p)
|
||||
!deallocate(psi_extra_1h_or_1p)
|
||||
!deallocate(psi_ref_coef_out)
|
||||
!deallocate(psi_coef_1h1p)
|
||||
!deallocate(psi_coef_2h1p)
|
||||
!deallocate(psi_coef_extra_1h_or_1p)
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
subroutine all_single_split_for_1h(dressing_matrix_1h1p,dressing_matrix_2h1p)
|
||||
implicit none
|
||||
use bitmasks
|
||||
double precision, intent(inout) :: dressing_matrix_1h1p(N_det_generators,N_det_generators)
|
||||
double precision, intent(inout) :: dressing_matrix_2h1p(N_det_generators,N_det_generators)
|
||||
integer :: i,i_hole
|
||||
n_det_max_jacobi = 50
|
||||
soft_touch n_det_max_jacobi
|
||||
|
||||
integer :: n_det_1h1p,n_det_2h1p
|
||||
integer(bit_kind), allocatable :: psi_ref_out(:,:,:)
|
||||
integer(bit_kind), allocatable :: psi_1h1p(:,:,:)
|
||||
integer(bit_kind), allocatable :: psi_2h1p(:,:,:)
|
||||
double precision, allocatable :: psi_ref_coef_out(:,:)
|
||||
double precision, allocatable :: psi_coef_1h1p(:,:)
|
||||
double precision, allocatable :: psi_coef_2h1p(:,:)
|
||||
do i = 1, n_inact_orb
|
||||
i_hole = list_inact(i)
|
||||
print*,''
|
||||
print*,'Doing all the single excitations from the orbital '
|
||||
print*,i_hole
|
||||
print*,''
|
||||
print*,''
|
||||
threshold_davidson = 1.d-4
|
||||
soft_touch threshold_davidson davidson_criterion
|
||||
selection_criterion_factor = 1.d-4
|
||||
soft_touch selection_criterion_factor selection_criterion selection_criterion_min
|
||||
call modify_bitmasks_for_hole(i_hole)
|
||||
call set_bitmask_particl_as_input(reunion_of_bitmask)
|
||||
call set_generators_as_input_psi(n_det_generators,psi_det_generators,psi_coef_generators)
|
||||
call set_psi_det_as_input_psi(n_det_generators,psi_det_generators,psi_coef_generators)
|
||||
call all_single_no_1h_or_1p
|
||||
threshold_davidson = 1.d-10
|
||||
soft_touch threshold_davidson davidson_criterion
|
||||
call diagonalize_CI
|
||||
call give_n_1h1p_and_n_2h1p_in_psi_det(n_det_1h1p,n_det_2h1p)
|
||||
allocate(psi_ref_out(N_int,2,N_det_generators))
|
||||
allocate(psi_1h1p(N_int,2,n_det_1h1p))
|
||||
allocate(psi_2h1p(N_int,2,n_det_2h1p))
|
||||
allocate(psi_ref_coef_out(N_det_generators,N_states))
|
||||
allocate(psi_coef_1h1p(n_det_1h1p,N_states))
|
||||
allocate(psi_coef_2h1p(n_det_2h1p,N_states))
|
||||
call split_wf_generators_and_1h1p_and_2h1p(n_det_1h1p,n_det_2h1p,psi_ref_out,psi_ref_coef_out,psi_1h1p,psi_coef_1h1p,psi_2h1p,psi_coef_2h1p)
|
||||
call provide_matrix_dressing_general(dressing_matrix_1h1p,psi_ref_out,psi_ref_coef_out,N_det_generators, &
|
||||
psi_1h1p,psi_coef_1h1p,n_det_1h1p)
|
||||
call provide_matrix_dressing_general(dressing_matrix_2h1p,psi_ref_out,psi_ref_coef_out,N_det_generators, &
|
||||
psi_2h1p,psi_coef_2h1p,n_det_2h1p)
|
||||
|
||||
deallocate(psi_ref_out)
|
||||
deallocate(psi_1h1p)
|
||||
deallocate(psi_2h1p)
|
||||
deallocate(psi_ref_coef_out)
|
||||
deallocate(psi_coef_1h1p)
|
||||
deallocate(psi_coef_2h1p)
|
||||
enddo
|
||||
n_det_max_jacobi = 1000
|
||||
soft_touch n_det_max_jacobi
|
||||
end
|
||||
|
||||
|
||||
subroutine all_single_split_for_1p(dressing_matrix_1h1p,dressing_matrix_1h2p)
|
||||
implicit none
|
||||
use bitmasks
|
||||
double precision, intent(inout) :: dressing_matrix_1h1p(N_det_generators,N_det_generators)
|
||||
double precision, intent(inout) :: dressing_matrix_1h2p(N_det_generators,N_det_generators)
|
||||
integer :: i,i_hole
|
||||
n_det_max_jacobi = 50
|
||||
soft_touch n_det_max_jacobi
|
||||
|
||||
integer :: n_det_1h1p,n_det_1h2p
|
||||
integer(bit_kind), allocatable :: psi_ref_out(:,:,:)
|
||||
integer(bit_kind), allocatable :: psi_1h1p(:,:,:)
|
||||
integer(bit_kind), allocatable :: psi_1h2p(:,:,:)
|
||||
double precision, allocatable :: psi_ref_coef_out(:,:)
|
||||
double precision, allocatable :: psi_coef_1h1p(:,:)
|
||||
double precision, allocatable :: psi_coef_1h2p(:,:)
|
||||
do i = 1, n_inact_orb
|
||||
i_hole = list_inact(i)
|
||||
print*,''
|
||||
print*,'Doing all the single excitations from the orbital '
|
||||
print*,i_hole
|
||||
print*,''
|
||||
print*,''
|
||||
threshold_davidson = 1.d-4
|
||||
soft_touch threshold_davidson davidson_criterion
|
||||
selection_criterion_factor = 1.d-4
|
||||
soft_touch selection_criterion_factor selection_criterion selection_criterion_min
|
||||
call modify_bitmasks_for_hole(i_hole)
|
||||
call set_bitmask_particl_as_input(reunion_of_bitmask)
|
||||
call set_generators_as_input_psi(n_det_generators,psi_det_generators,psi_coef_generators)
|
||||
call set_psi_det_as_input_psi(n_det_generators,psi_det_generators,psi_coef_generators)
|
||||
call all_single_no_1h_or_1p
|
||||
threshold_davidson = 1.d-10
|
||||
soft_touch threshold_davidson davidson_criterion
|
||||
call diagonalize_CI
|
||||
call give_n_1h1p_and_n_1h2p_in_psi_det(n_det_1h1p,n_det_1h2p)
|
||||
allocate(psi_ref_out(N_int,2,N_det_generators))
|
||||
allocate(psi_1h1p(N_int,2,n_det_1h1p))
|
||||
allocate(psi_1h2p(N_int,2,n_det_1h2p))
|
||||
allocate(psi_ref_coef_out(N_det_generators,N_states))
|
||||
allocate(psi_coef_1h1p(n_det_1h1p,N_states))
|
||||
allocate(psi_coef_1h2p(n_det_1h2p,N_states))
|
||||
call split_wf_generators_and_1h1p_and_1h2p(n_det_1h1p,n_det_1h2p,psi_ref_out,psi_ref_coef_out,psi_1h1p,psi_coef_1h1p,psi_1h2p,psi_coef_1h2p)
|
||||
call provide_matrix_dressing_general(dressing_matrix_1h1p,psi_ref_out,psi_ref_coef_out,N_det_generators, &
|
||||
psi_1h1p,psi_coef_1h1p,n_det_1h1p)
|
||||
call provide_matrix_dressing_general(dressing_matrix_1h2p,psi_ref_out,psi_ref_coef_out,N_det_generators, &
|
||||
psi_1h2p,psi_coef_1h2p,n_det_1h2p)
|
||||
|
||||
deallocate(psi_ref_out)
|
||||
deallocate(psi_1h1p)
|
||||
deallocate(psi_1h2p)
|
||||
deallocate(psi_ref_coef_out)
|
||||
deallocate(psi_coef_1h1p)
|
||||
deallocate(psi_coef_1h2p)
|
||||
enddo
|
||||
n_det_max_jacobi = 1000
|
||||
soft_touch n_det_max_jacobi
|
||||
end
|
||||
|
||||
! subroutine all_single_for_1p(i_particl,dressing_matrix_1h1p,dressing_matrix_1h2p,dressing_matrix_extra_1h_or_1p)
|
||||
! implicit none
|
||||
! use bitmasks
|
||||
! integer, intent(in ) :: i_particl
|
||||
! double precision, intent(inout) :: dressing_matrix_1h1p(N_det_generators,N_det_generators)
|
||||
! double precision, intent(inout) :: dressing_matrix_1h2p(N_det_generators,N_det_generators)
|
||||
! double precision, intent(inout) :: dressing_matrix_extra_1h_or_1p(N_det_generators,N_det_generators)
|
||||
! integer :: i
|
||||
! n_det_max_jacobi = 50
|
||||
! soft_touch n_det_max_jacobi
|
||||
!
|
||||
! integer :: n_det_1h1p,n_det_1h2p,n_det_extra_1h_or_1p
|
||||
! integer(bit_kind), allocatable :: psi_ref_out(:,:,:)
|
||||
! integer(bit_kind), allocatable :: psi_1h1p(:,:,:)
|
||||
! integer(bit_kind), allocatable :: psi_1h2p(:,:,:)
|
||||
! integer(bit_kind), allocatable :: psi_extra_1h_or_1p(:,:,:)
|
||||
! double precision, allocatable :: psi_ref_coef_out(:,:)
|
||||
! double precision, allocatable :: psi_coef_1h1p(:,:)
|
||||
! double precision, allocatable :: psi_coef_1h2p(:,:)
|
||||
! double precision, allocatable :: psi_coef_extra_1h_or_1p(:,:)
|
||||
!!!!call all_single_no_1h_or_1p_or_2p
|
||||
! call all_single
|
||||
!
|
||||
! threshold_davidson = 1.d-12
|
||||
! soft_touch threshold_davidson davidson_criterion
|
||||
! call diagonalize_CI
|
||||
! call give_n_1h1p_and_n_1h2p_in_psi_det(i_particl,n_det_extra_1h_or_1p,n_det_1h1p,n_det_1h2p)
|
||||
! allocate(psi_ref_out(N_int,2,N_det_generators))
|
||||
! allocate(psi_1h1p(N_int,2,n_det_1h1p))
|
||||
! allocate(psi_1h2p(N_int,2,n_det_1h2p))
|
||||
! allocate(psi_extra_1h_or_1p(N_int,2,n_det_extra_1h_or_1p))
|
||||
! allocate(psi_ref_coef_out(N_det_generators,N_states))
|
||||
! allocate(psi_coef_1h1p(n_det_1h1p,N_states))
|
||||
! allocate(psi_coef_1h2p(n_det_1h2p,N_states))
|
||||
! allocate(psi_coef_extra_1h_or_1p(n_det_extra_1h_or_1p,N_states))
|
||||
! call split_wf_generators_and_1h1p_and_1h2p(i_particl,n_det_extra_1h_or_1p,n_det_1h1p,n_det_1h2p,psi_ref_out,psi_ref_coef_out,psi_1h1p,psi_coef_1h1p,psi_1h2p,psi_coef_1h2p,psi_extra_1h_or_1p,psi_coef_extra_1h_or_1p)
|
||||
! call provide_matrix_dressing_general(dressing_matrix_1h1p,psi_ref_out,psi_ref_coef_out,N_det_generators, &
|
||||
! psi_1h1p,psi_coef_1h1p,n_det_1h1p)
|
||||
! call provide_matrix_dressing_general(dressing_matrix_1h2p,psi_ref_out,psi_ref_coef_out,N_det_generators, &
|
||||
! psi_1h2p,psi_coef_1h2p,n_det_1h2p)
|
||||
! call provide_matrix_dressing_for_extra_1h_or_1p(dressing_matrix_extra_1h_or_1p,psi_ref_out,psi_ref_coef_out,N_det_generators, &
|
||||
! psi_extra_1h_or_1p,psi_coef_extra_1h_or_1p,n_det_extra_1h_or_1p)
|
||||
!
|
||||
! deallocate(psi_ref_out)
|
||||
! deallocate(psi_1h1p)
|
||||
! deallocate(psi_1h2p)
|
||||
! deallocate(psi_ref_coef_out)
|
||||
! deallocate(psi_coef_1h1p)
|
||||
! deallocate(psi_coef_1h2p)
|
||||
!
|
||||
! end
|
||||
|
||||
|
|
@ -1,436 +0,0 @@
|
|||
use bitmasks
|
||||
|
||||
subroutine collect_lmct(hole_particle,n_couples)
|
||||
implicit none
|
||||
integer, intent(out) :: hole_particle(1000,2), n_couples
|
||||
BEGIN_DOC
|
||||
! Collect all the couple holes/particles of the important LMCT
|
||||
! hole_particle(i,1) = ith hole
|
||||
! hole_particle(i,2) = ith particle
|
||||
! n_couples is the number of important excitations
|
||||
END_DOC
|
||||
print*,'COLLECTING THE PERTINENT LMCT (1h)'
|
||||
double precision, allocatable :: tmp(:,:)
|
||||
allocate(tmp(size(one_body_dm_mo_alpha_osoci,1),size(one_body_dm_mo_alpha_osoci,2)))
|
||||
tmp = one_body_dm_mo_alpha_osoci + one_body_dm_mo_beta_osoci
|
||||
integer :: i,j,iorb,jorb
|
||||
n_couples = 0
|
||||
do i = 1,n_act_orb
|
||||
iorb = list_act(i)
|
||||
do j = 1, n_inact_orb
|
||||
jorb = list_inact(j)
|
||||
if(dabs(tmp(iorb,jorb)).gt.1.d-2)then
|
||||
n_couples +=1
|
||||
hole_particle(n_couples,1) = jorb
|
||||
hole_particle(n_couples,2) = iorb
|
||||
print*,'DM'
|
||||
print*,hole_particle(n_couples,1),hole_particle(n_couples,2),tmp(iorb,jorb)
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
deallocate(tmp)
|
||||
print*,'number of meaning full couples of holes/particles '
|
||||
print*,'n_couples = ',n_couples
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
subroutine collect_mlct(hole_particle,n_couples)
|
||||
implicit none
|
||||
integer, intent(out) :: hole_particle(1000,2), n_couples
|
||||
BEGIN_DOC
|
||||
! Collect all the couple holes/particles of the important LMCT
|
||||
! hole_particle(i,1) = ith hole
|
||||
! hole_particle(i,2) = ith particle
|
||||
! n_couples is the number of important excitations
|
||||
END_DOC
|
||||
print*,'COLLECTING THE PERTINENT MLCT (1p)'
|
||||
double precision, allocatable :: tmp(:,:)
|
||||
allocate(tmp(size(one_body_dm_mo_alpha_osoci,1),size(one_body_dm_mo_alpha_osoci,2)))
|
||||
tmp = one_body_dm_mo_alpha_osoci + one_body_dm_mo_beta_osoci
|
||||
integer :: i,j,iorb,jorb
|
||||
n_couples = 0
|
||||
do i = 1,n_act_orb
|
||||
iorb = list_act(i)
|
||||
do j = 1, n_virt_orb
|
||||
jorb = list_virt(j)
|
||||
if(dabs(tmp(iorb,jorb)).gt.1.d-3)then
|
||||
n_couples +=1
|
||||
hole_particle(n_couples,1) = iorb
|
||||
hole_particle(n_couples,2) = jorb
|
||||
print*,'DM'
|
||||
print*,hole_particle(n_couples,1),hole_particle(n_couples,2),tmp(iorb,jorb)
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
deallocate(tmp)
|
||||
print*,'number of meaning full couples of holes/particles '
|
||||
print*,'n_couples = ',n_couples
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
subroutine collect_lmct_mlct(hole_particle,n_couples)
|
||||
implicit none
|
||||
integer, intent(out) :: hole_particle(1000,2), n_couples
|
||||
BEGIN_DOC
|
||||
! Collect all the couple holes/particles of the important LMCT
|
||||
! hole_particle(i,1) = ith hole
|
||||
! hole_particle(i,2) = ith particle
|
||||
! n_couples is the number of important excitations
|
||||
END_DOC
|
||||
double precision, allocatable :: tmp(:,:)
|
||||
print*,'COLLECTING THE PERTINENT LMCT (1h)'
|
||||
print*,'AND THE PERTINENT MLCT (1p)'
|
||||
allocate(tmp(size(one_body_dm_mo_alpha_osoci,1),size(one_body_dm_mo_alpha_osoci,2)))
|
||||
tmp = one_body_dm_mo_alpha_osoci + one_body_dm_mo_beta_osoci
|
||||
integer :: i,j,iorb,jorb
|
||||
n_couples = 0
|
||||
do i = 1,n_act_orb
|
||||
iorb = list_act(i)
|
||||
do j = 1, n_inact_orb
|
||||
jorb = list_inact(j)
|
||||
if(dabs(tmp(iorb,jorb)).gt.threshold_lmct)then
|
||||
n_couples +=1
|
||||
hole_particle(n_couples,1) = jorb
|
||||
hole_particle(n_couples,2) = iorb
|
||||
print*,'DM'
|
||||
print*,hole_particle(n_couples,1),hole_particle(n_couples,2),tmp(iorb,jorb)
|
||||
endif
|
||||
enddo
|
||||
do j = 1, n_virt_orb
|
||||
jorb = list_virt(j)
|
||||
if(dabs(tmp(iorb,jorb)).gt.threshold_mlct)then
|
||||
n_couples +=1
|
||||
hole_particle(n_couples,1) = iorb
|
||||
hole_particle(n_couples,2) = jorb
|
||||
print*,'DM'
|
||||
print*,hole_particle(n_couples,1),hole_particle(n_couples,2),tmp(iorb,jorb)
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
deallocate(tmp)
|
||||
print*,'number of meaning full couples of holes/particles '
|
||||
print*,'n_couples = ',n_couples
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
subroutine collect_1h1p(hole_particle,n_couples)
|
||||
implicit none
|
||||
integer, intent(out) :: hole_particle(1000,2), n_couples
|
||||
BEGIN_DOC
|
||||
! Collect all the couple holes/particles of the important LMCT
|
||||
! hole_particle(i,1) = ith hole
|
||||
! hole_particle(i,2) = ith particle
|
||||
! n_couples is the number of important excitations
|
||||
END_DOC
|
||||
double precision, allocatable :: tmp(:,:)
|
||||
print*,'COLLECTING THE PERTINENT 1h1p'
|
||||
allocate(tmp(size(one_body_dm_mo_alpha_osoci,1),size(one_body_dm_mo_alpha_osoci,2)))
|
||||
tmp = one_body_dm_mo_alpha_osoci + one_body_dm_mo_beta_osoci
|
||||
integer :: i,j,iorb,jorb
|
||||
n_couples = 0
|
||||
do i = 1,n_virt_orb
|
||||
iorb = list_virt(i)
|
||||
do j = 1, n_inact_orb
|
||||
jorb = list_inact(j)
|
||||
if(dabs(tmp(iorb,jorb)).gt.1.d-2)then
|
||||
n_couples +=1
|
||||
hole_particle(n_couples,1) = jorb
|
||||
hole_particle(n_couples,2) = iorb
|
||||
print*,'DM'
|
||||
print*,hole_particle(n_couples,1),hole_particle(n_couples,2),tmp(iorb,jorb)
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
deallocate(tmp)
|
||||
print*,'number of meaning full couples of holes/particles '
|
||||
print*,'n_couples = ',n_couples
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
subroutine set_lmct_to_generators_restart
|
||||
implicit none
|
||||
integer :: i,j,m,n,i_hole,i_particle
|
||||
integer :: hole_particle(1000,2), n_couples
|
||||
integer(bit_kind) :: key_tmp(N_int,2)
|
||||
integer :: N_det_total,i_ok
|
||||
|
||||
call collect_lmct(hole_particle,n_couples)
|
||||
call set_generators_to_generators_restart
|
||||
N_det_total = N_det_generators_restart
|
||||
do i = 1, n_couples
|
||||
i_hole = hole_particle(i,1)
|
||||
i_particle = hole_particle(i,2)
|
||||
do m = 1, N_det_cas
|
||||
do n = 1, N_int
|
||||
key_tmp(n,1) = psi_cas(n,1,m)
|
||||
key_tmp(n,2) = psi_cas(n,2,m)
|
||||
enddo
|
||||
! You excite the beta electron from i_hole to i_particle
|
||||
print*,'i_hole,i_particle 2 = ',i_hole,i_particle
|
||||
call do_mono_excitation(key_tmp,i_hole,i_particle,2,i_ok)
|
||||
print*,'i_ok = ',i_ok
|
||||
if(i_ok==1)then
|
||||
N_det_total +=1
|
||||
do n = 1, N_int
|
||||
psi_det_generators(n,1,N_det_total) = key_tmp(n,1)
|
||||
psi_det_generators(n,2,N_det_total) = key_tmp(n,2)
|
||||
enddo
|
||||
endif
|
||||
|
||||
do n = 1, N_int
|
||||
key_tmp(n,1) = psi_cas(n,1,m)
|
||||
key_tmp(n,2) = psi_cas(n,2,m)
|
||||
enddo
|
||||
|
||||
! You excite the alpha electron from i_hole to i_particle
|
||||
print*,'i_hole,i_particle 1 = ',i_hole,i_particle
|
||||
call do_mono_excitation(key_tmp,i_hole,i_particle,1,i_ok)
|
||||
print*,'i_ok = ',i_ok
|
||||
if(i_ok==1)then
|
||||
N_det_total +=1
|
||||
do n = 1, N_int
|
||||
psi_det_generators(n,1,N_det_total) = key_tmp(n,1)
|
||||
psi_det_generators(n,2,N_det_total) = key_tmp(n,2)
|
||||
enddo
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
N_det_generators = N_det_total
|
||||
do i = 1, N_det_generators
|
||||
psi_coef_generators(i,1) = 1.d0/dsqrt(dble(N_det_total))
|
||||
enddo
|
||||
print*,'number of generators in total = ',N_det_generators
|
||||
touch N_det_generators psi_coef_generators psi_det_generators
|
||||
end
|
||||
|
||||
subroutine set_mlct_to_generators_restart
|
||||
implicit none
|
||||
integer :: i,j,m,n,i_hole,i_particle
|
||||
integer :: hole_particle(1000,2), n_couples
|
||||
integer(bit_kind) :: key_tmp(N_int,2)
|
||||
integer :: N_det_total,i_ok
|
||||
|
||||
call collect_mlct(hole_particle,n_couples)
|
||||
call set_generators_to_generators_restart
|
||||
N_det_total = N_det_generators_restart
|
||||
do i = 1, n_couples
|
||||
i_hole = hole_particle(i,1)
|
||||
i_particle = hole_particle(i,2)
|
||||
do m = 1, N_det_cas
|
||||
do n = 1, N_int
|
||||
key_tmp(n,1) = psi_cas(n,1,m)
|
||||
key_tmp(n,2) = psi_cas(n,2,m)
|
||||
enddo
|
||||
! You excite the beta electron from i_hole to i_particle
|
||||
print*,'i_hole,i_particle 2 = ',i_hole,i_particle
|
||||
call do_mono_excitation(key_tmp,i_hole,i_particle,2,i_ok)
|
||||
print*,'i_ok = ',i_ok
|
||||
if(i_ok==1)then
|
||||
N_det_total +=1
|
||||
do n = 1, N_int
|
||||
psi_det_generators(n,1,N_det_total) = key_tmp(n,1)
|
||||
psi_det_generators(n,2,N_det_total) = key_tmp(n,2)
|
||||
enddo
|
||||
endif
|
||||
|
||||
do n = 1, N_int
|
||||
key_tmp(n,1) = psi_cas(n,1,m)
|
||||
key_tmp(n,2) = psi_cas(n,2,m)
|
||||
enddo
|
||||
|
||||
! You excite the alpha electron from i_hole to i_particle
|
||||
print*,'i_hole,i_particle 1 = ',i_hole,i_particle
|
||||
call do_mono_excitation(key_tmp,i_hole,i_particle,1,i_ok)
|
||||
print*,'i_ok = ',i_ok
|
||||
if(i_ok==1)then
|
||||
N_det_total +=1
|
||||
do n = 1, N_int
|
||||
psi_det_generators(n,1,N_det_total) = key_tmp(n,1)
|
||||
psi_det_generators(n,2,N_det_total) = key_tmp(n,2)
|
||||
enddo
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
N_det_generators = N_det_total
|
||||
do i = 1, N_det_generators
|
||||
psi_coef_generators(i,1) = 1.d0/dsqrt(dble(N_det_total))
|
||||
enddo
|
||||
print*,'number of generators in total = ',N_det_generators
|
||||
touch N_det_generators psi_coef_generators psi_det_generators
|
||||
end
|
||||
|
||||
subroutine set_lmct_mlct_to_generators_restart
|
||||
implicit none
|
||||
integer :: i,j,m,n,i_hole,i_particle
|
||||
integer :: hole_particle(1000,2), n_couples
|
||||
integer(bit_kind) :: key_tmp(N_int,2)
|
||||
integer :: N_det_total,i_ok
|
||||
|
||||
call collect_lmct_mlct(hole_particle,n_couples)
|
||||
call set_generators_to_generators_restart
|
||||
N_det_total = N_det_generators_restart
|
||||
do i = 1, n_couples
|
||||
i_hole = hole_particle(i,1)
|
||||
i_particle = hole_particle(i,2)
|
||||
do m = 1, N_det_cas
|
||||
do n = 1, N_int
|
||||
key_tmp(n,1) = psi_cas(n,1,m)
|
||||
key_tmp(n,2) = psi_cas(n,2,m)
|
||||
enddo
|
||||
! You excite the beta electron from i_hole to i_particle
|
||||
call do_mono_excitation(key_tmp,i_hole,i_particle,2,i_ok)
|
||||
if(i_ok==1)then
|
||||
N_det_total +=1
|
||||
do n = 1, N_int
|
||||
psi_det_generators(n,1,N_det_total) = key_tmp(n,1)
|
||||
psi_det_generators(n,2,N_det_total) = key_tmp(n,2)
|
||||
enddo
|
||||
endif
|
||||
|
||||
do n = 1, N_int
|
||||
key_tmp(n,1) = psi_cas(n,1,m)
|
||||
key_tmp(n,2) = psi_cas(n,2,m)
|
||||
enddo
|
||||
|
||||
! You excite the alpha electron from i_hole to i_particle
|
||||
call do_mono_excitation(key_tmp,i_hole,i_particle,1,i_ok)
|
||||
if(i_ok==1)then
|
||||
N_det_total +=1
|
||||
do n = 1, N_int
|
||||
psi_det_generators(n,1,N_det_total) = key_tmp(n,1)
|
||||
psi_det_generators(n,2,N_det_total) = key_tmp(n,2)
|
||||
enddo
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
N_det_generators = N_det_total
|
||||
do i = 1, N_det_generators
|
||||
psi_coef_generators(i,1) = 1.d0/dsqrt(dble(N_det_total))
|
||||
enddo
|
||||
print*,'number of generators in total = ',N_det_generators
|
||||
touch N_det_generators psi_coef_generators psi_det_generators
|
||||
end
|
||||
|
||||
subroutine set_lmct_mlct_to_psi_det
|
||||
implicit none
|
||||
integer :: i,j,m,n,i_hole,i_particle
|
||||
integer :: hole_particle(1000,2), n_couples
|
||||
integer(bit_kind) :: key_tmp(N_int,2)
|
||||
integer :: N_det_total,i_ok
|
||||
|
||||
call collect_lmct_mlct(hole_particle,n_couples)
|
||||
call set_psi_det_to_generators_restart
|
||||
N_det_total = N_det_generators_restart
|
||||
do i = 1, n_couples
|
||||
i_hole = hole_particle(i,1)
|
||||
i_particle = hole_particle(i,2)
|
||||
do m = 1, N_det_generators_restart
|
||||
do n = 1, N_int
|
||||
key_tmp(n,1) = psi_det_generators_restart(n,1,m)
|
||||
key_tmp(n,2) = psi_det_generators_restart(n,2,m)
|
||||
enddo
|
||||
! You excite the beta electron from i_hole to i_particle
|
||||
call do_mono_excitation(key_tmp,i_hole,i_particle,2,i_ok)
|
||||
if(i_ok==1)then
|
||||
N_det_total +=1
|
||||
do n = 1, N_int
|
||||
psi_det(n,1,N_det_total) = key_tmp(n,1)
|
||||
psi_det(n,2,N_det_total) = key_tmp(n,2)
|
||||
enddo
|
||||
endif
|
||||
|
||||
do n = 1, N_int
|
||||
key_tmp(n,1) = psi_det_generators_restart(n,1,m)
|
||||
key_tmp(n,2) = psi_det_generators_restart(n,2,m)
|
||||
enddo
|
||||
|
||||
! You excite the alpha electron from i_hole to i_particle
|
||||
call do_mono_excitation(key_tmp,i_hole,i_particle,1,i_ok)
|
||||
if(i_ok==1)then
|
||||
N_det_total +=1
|
||||
do n = 1, N_int
|
||||
psi_det(n,1,N_det_total) = key_tmp(n,1)
|
||||
psi_det(n,2,N_det_total) = key_tmp(n,2)
|
||||
enddo
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
|
||||
N_det = N_det_total
|
||||
integer :: k
|
||||
do k = 1, N_states
|
||||
do i = 1, N_det
|
||||
psi_coef(i,k) = 1.d0/dsqrt(dble(N_det_total))
|
||||
enddo
|
||||
enddo
|
||||
SOFT_TOUCH N_det psi_det psi_coef
|
||||
logical :: found_duplicates
|
||||
call remove_duplicates_in_psi_det(found_duplicates)
|
||||
end
|
||||
|
||||
subroutine set_1h1p_to_psi_det
|
||||
implicit none
|
||||
integer :: i,j,m,n,i_hole,i_particle
|
||||
integer :: hole_particle(1000,2), n_couples
|
||||
integer(bit_kind) :: key_tmp(N_int,2)
|
||||
integer :: N_det_total,i_ok
|
||||
|
||||
call collect_1h1p(hole_particle,n_couples)
|
||||
call set_psi_det_to_generators_restart
|
||||
N_det_total = N_det_generators_restart
|
||||
do i = 1, n_couples
|
||||
i_hole = hole_particle(i,1)
|
||||
i_particle = hole_particle(i,2)
|
||||
do m = 1, N_det_generators_restart
|
||||
do n = 1, N_int
|
||||
key_tmp(n,1) = psi_det_generators_restart(n,1,m)
|
||||
key_tmp(n,2) = psi_det_generators_restart(n,2,m)
|
||||
enddo
|
||||
! You excite the beta electron from i_hole to i_particle
|
||||
call do_mono_excitation(key_tmp,i_hole,i_particle,2,i_ok)
|
||||
if(i_ok==1)then
|
||||
N_det_total +=1
|
||||
do n = 1, N_int
|
||||
psi_det(n,1,N_det_total) = key_tmp(n,1)
|
||||
psi_det(n,2,N_det_total) = key_tmp(n,2)
|
||||
enddo
|
||||
endif
|
||||
|
||||
do n = 1, N_int
|
||||
key_tmp(n,1) = psi_det_generators_restart(n,1,m)
|
||||
key_tmp(n,2) = psi_det_generators_restart(n,2,m)
|
||||
enddo
|
||||
|
||||
! You excite the alpha electron from i_hole to i_particle
|
||||
call do_mono_excitation(key_tmp,i_hole,i_particle,1,i_ok)
|
||||
if(i_ok==1)then
|
||||
N_det_total +=1
|
||||
do n = 1, N_int
|
||||
psi_det(n,1,N_det_total) = key_tmp(n,1)
|
||||
psi_det(n,2,N_det_total) = key_tmp(n,2)
|
||||
enddo
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
|
||||
N_det = N_det_total
|
||||
integer :: k
|
||||
do k = 1, N_states
|
||||
do i = 1, N_det
|
||||
psi_coef(i,k) = 1.d0/dsqrt(dble(N_det_total))
|
||||
enddo
|
||||
enddo
|
||||
SOFT_TOUCH N_det psi_det psi_coef
|
||||
logical :: found_duplicates
|
||||
call remove_duplicates_in_psi_det(found_duplicates)
|
||||
end
|
||||
|
|
@ -1,425 +0,0 @@
|
|||
BEGIN_PROVIDER [double precision, corr_energy_2h2p_per_orb_ab, (mo_tot_num)]
|
||||
&BEGIN_PROVIDER [double precision, corr_energy_2h2p_ab_2_orb, (mo_tot_num,mo_tot_num)]
|
||||
&BEGIN_PROVIDER [double precision, corr_energy_2h2p_bb_2_orb, (mo_tot_num,mo_tot_num)]
|
||||
&BEGIN_PROVIDER [double precision, corr_energy_2h2p_for_1h1p_a, (mo_tot_num,mo_tot_num)]
|
||||
&BEGIN_PROVIDER [double precision, corr_energy_2h2p_for_1h1p_b, (mo_tot_num,mo_tot_num)]
|
||||
&BEGIN_PROVIDER [double precision, corr_energy_2h2p_for_1h1p_double, (mo_tot_num,mo_tot_num)]
|
||||
&BEGIN_PROVIDER [double precision, corr_energy_2h2p_per_orb_aa, (mo_tot_num)]
|
||||
&BEGIN_PROVIDER [double precision, corr_energy_2h2p_per_orb_bb, (mo_tot_num)]
|
||||
&BEGIN_PROVIDER [ double precision, total_corr_e_2h2p]
|
||||
use bitmasks
|
||||
print*,''
|
||||
print*,'Providing the 2h2p correlation energy'
|
||||
print*,''
|
||||
implicit none
|
||||
integer(bit_kind) :: key_tmp(N_int,2)
|
||||
integer :: i,j,k,l
|
||||
integer :: i_hole,j_hole,k_part,l_part
|
||||
double precision :: get_mo_bielec_integral,hij,delta_e,exc,contrib
|
||||
double precision :: diag_H_mat_elem
|
||||
integer :: i_ok,ispin
|
||||
! Alpha - Beta correlation energy
|
||||
total_corr_e_2h2p = 0.d0
|
||||
corr_energy_2h2p_ab_2_orb = 0.d0
|
||||
corr_energy_2h2p_bb_2_orb = 0.d0
|
||||
corr_energy_2h2p_per_orb_ab = 0.d0
|
||||
corr_energy_2h2p_per_orb_aa = 0.d0
|
||||
corr_energy_2h2p_per_orb_bb = 0.d0
|
||||
corr_energy_2h2p_for_1h1p_a = 0.d0
|
||||
corr_energy_2h2p_for_1h1p_b = 0.d0
|
||||
corr_energy_2h2p_for_1h1p_double = 0.d0
|
||||
do i = 1, n_inact_orb ! beta
|
||||
i_hole = list_inact(i)
|
||||
do k = 1, n_virt_orb ! beta
|
||||
k_part = list_virt(k)
|
||||
do j = 1, n_inact_orb ! alpha
|
||||
j_hole = list_inact(j)
|
||||
do l = 1, n_virt_orb ! alpha
|
||||
l_part = list_virt(l)
|
||||
|
||||
key_tmp = ref_bitmask
|
||||
ispin = 2
|
||||
call do_mono_excitation(key_tmp,i_hole,k_part,ispin,i_ok)
|
||||
if(i_ok .ne.1)cycle
|
||||
ispin = 1
|
||||
call do_mono_excitation(key_tmp,j_hole,l_part,ispin,i_ok)
|
||||
if(i_ok .ne.1)cycle
|
||||
delta_e = (ref_bitmask_energy - diag_H_mat_elem(key_tmp,N_int))
|
||||
|
||||
hij = get_mo_bielec_integral(i_hole,j_hole,k_part,l_part,mo_integrals_map)
|
||||
contrib = hij*hij/delta_e
|
||||
total_corr_e_2h2p += contrib
|
||||
! Single orbital contribution
|
||||
corr_energy_2h2p_per_orb_ab(i_hole) += contrib
|
||||
corr_energy_2h2p_per_orb_ab(k_part) += contrib
|
||||
! Couple of orbital contribution for the single 1h1p
|
||||
corr_energy_2h2p_for_1h1p_a(j_hole,l_part) += contrib
|
||||
corr_energy_2h2p_for_1h1p_a(l_part,j_hole) += contrib
|
||||
corr_energy_2h2p_for_1h1p_b(j_hole,l_part) += contrib
|
||||
corr_energy_2h2p_for_1h1p_b(l_part,j_hole) += contrib
|
||||
! Couple of orbital contribution for the double 1h1p
|
||||
corr_energy_2h2p_for_1h1p_double(i_hole,l_part) += contrib
|
||||
corr_energy_2h2p_for_1h1p_double(l_part,i_hole) += contrib
|
||||
|
||||
corr_energy_2h2p_ab_2_orb(i_hole,j_hole) += contrib
|
||||
corr_energy_2h2p_ab_2_orb(j_hole,i_hole) += contrib
|
||||
corr_energy_2h2p_ab_2_orb(i_hole,k_part) += contrib
|
||||
corr_energy_2h2p_ab_2_orb(k_part,i_hole) += contrib
|
||||
corr_energy_2h2p_ab_2_orb(k_part,l_part) += contrib
|
||||
corr_energy_2h2p_ab_2_orb(l_part,k_part) += contrib
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
! alpha alpha correlation energy
|
||||
do i = 1, n_inact_orb
|
||||
i_hole = list_inact(i)
|
||||
do j = i+1, n_inact_orb
|
||||
j_hole = list_inact(j)
|
||||
do k = 1, n_virt_orb
|
||||
k_part = list_virt(k)
|
||||
do l = k+1,n_virt_orb
|
||||
l_part = list_virt(l)
|
||||
hij = get_mo_bielec_integral(i_hole,j_hole,k_part,l_part,mo_integrals_map)
|
||||
exc = get_mo_bielec_integral(i_hole,j_hole,l_part,k_part,mo_integrals_map)
|
||||
key_tmp = ref_bitmask
|
||||
ispin = 1
|
||||
call do_mono_excitation(key_tmp,i_hole,k_part,ispin,i_ok)
|
||||
if(i_ok .ne.1)cycle
|
||||
ispin = 1
|
||||
call do_mono_excitation(key_tmp,j_hole,l_part,ispin,i_ok)
|
||||
if(i_ok .ne.1)cycle
|
||||
delta_e = -(ref_bitmask_energy - diag_H_mat_elem(key_tmp,N_int))
|
||||
hij = hij - exc
|
||||
contrib = 0.5d0 * (delta_e - dsqrt(delta_e * delta_e + 4.d0 * hij*hij))
|
||||
total_corr_e_2h2p += contrib
|
||||
! Single orbital contribution
|
||||
corr_energy_2h2p_per_orb_aa(i_hole) += contrib
|
||||
corr_energy_2h2p_per_orb_aa(k_part) += contrib
|
||||
! Couple of orbital contribution for the single 1h1p
|
||||
corr_energy_2h2p_for_1h1p_a(i_hole,k_part) += contrib
|
||||
corr_energy_2h2p_for_1h1p_a(k_part,i_hole) += contrib
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
! beta beta correlation energy
|
||||
do i = 1, n_inact_orb
|
||||
i_hole = list_inact(i)
|
||||
do j = i+1, n_inact_orb
|
||||
j_hole = list_inact(j)
|
||||
do k = 1, n_virt_orb
|
||||
k_part = list_virt(k)
|
||||
do l = k+1,n_virt_orb
|
||||
l_part = list_virt(l)
|
||||
hij = get_mo_bielec_integral(i_hole,j_hole,k_part,l_part,mo_integrals_map)
|
||||
exc = get_mo_bielec_integral(i_hole,j_hole,l_part,k_part,mo_integrals_map)
|
||||
key_tmp = ref_bitmask
|
||||
ispin = 2
|
||||
call do_mono_excitation(key_tmp,i_hole,k_part,ispin,i_ok)
|
||||
if(i_ok .ne.1)cycle
|
||||
ispin = 2
|
||||
call do_mono_excitation(key_tmp,j_hole,l_part,ispin,i_ok)
|
||||
if(i_ok .ne.1)cycle
|
||||
delta_e = -(ref_bitmask_energy - diag_H_mat_elem(key_tmp,N_int))
|
||||
hij = hij - exc
|
||||
contrib = 0.5d0 * (delta_e - dsqrt(delta_e * delta_e + 4.d0 * hij*hij))
|
||||
total_corr_e_2h2p += contrib
|
||||
! Single orbital contribution
|
||||
corr_energy_2h2p_per_orb_bb(i_hole) += contrib
|
||||
corr_energy_2h2p_per_orb_bb(k_part) += contrib
|
||||
corr_energy_2h2p_for_1h1p_b(i_hole,k_part) += contrib
|
||||
corr_energy_2h2p_for_1h1p_b(k_part,i_hole) += contrib
|
||||
|
||||
! Two particle correlation energy
|
||||
corr_energy_2h2p_bb_2_orb(i_hole,j_hole) += contrib
|
||||
corr_energy_2h2p_bb_2_orb(j_hole,i_hole) += contrib
|
||||
corr_energy_2h2p_bb_2_orb(i_hole,k_part) += contrib
|
||||
corr_energy_2h2p_bb_2_orb(k_part,i_hole) += contrib
|
||||
corr_energy_2h2p_bb_2_orb(k_part,l_part) += contrib
|
||||
corr_energy_2h2p_bb_2_orb(l_part,k_part) += contrib
|
||||
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [double precision, corr_energy_2h1p_ab_bb_per_2_orb, (mo_tot_num,mo_tot_num)]
|
||||
&BEGIN_PROVIDER [double precision, corr_energy_2h1p_for_1h1p_a, (mo_tot_num,mo_tot_num)]
|
||||
&BEGIN_PROVIDER [double precision, corr_energy_2h1p_for_1h1p_b, (mo_tot_num,mo_tot_num)]
|
||||
&BEGIN_PROVIDER [double precision, corr_energy_2h1p_for_1h1p_double, (mo_tot_num,mo_tot_num)]
|
||||
&BEGIN_PROVIDER [double precision, corr_energy_2h1p_per_orb_ab, (mo_tot_num)]
|
||||
&BEGIN_PROVIDER [double precision, corr_energy_2h1p_per_orb_aa, (mo_tot_num)]
|
||||
&BEGIN_PROVIDER [double precision, corr_energy_2h1p_per_orb_bb, (mo_tot_num)]
|
||||
&BEGIN_PROVIDER [ double precision, total_corr_e_2h1p]
|
||||
use bitmasks
|
||||
implicit none
|
||||
integer(bit_kind) :: key_tmp(N_int,2)
|
||||
integer :: i,j,k,l
|
||||
integer :: i_hole,j_hole,k_part,l_part
|
||||
double precision :: get_mo_bielec_integral,hij,delta_e,exc,contrib
|
||||
double precision :: diag_H_mat_elem
|
||||
integer :: i_ok,ispin
|
||||
! Alpha - Beta correlation energy
|
||||
total_corr_e_2h1p = 0.d0
|
||||
corr_energy_2h1p_per_orb_ab = 0.d0
|
||||
corr_energy_2h1p_per_orb_aa = 0.d0
|
||||
corr_energy_2h1p_per_orb_bb = 0.d0
|
||||
corr_energy_2h1p_ab_bb_per_2_orb = 0.d0
|
||||
corr_energy_2h1p_for_1h1p_a = 0.d0
|
||||
corr_energy_2h1p_for_1h1p_b = 0.d0
|
||||
corr_energy_2h1p_for_1h1p_double = 0.d0
|
||||
do i = 1, n_inact_orb
|
||||
i_hole = list_inact(i)
|
||||
do k = 1, n_act_orb
|
||||
k_part = list_act(k)
|
||||
do j = 1, n_inact_orb
|
||||
j_hole = list_inact(j)
|
||||
do l = 1, n_virt_orb
|
||||
l_part = list_virt(l)
|
||||
|
||||
key_tmp = ref_bitmask
|
||||
ispin = 2
|
||||
call do_mono_excitation(key_tmp,i_hole,k_part,ispin,i_ok)
|
||||
if(i_ok .ne.1)cycle
|
||||
ispin = 1
|
||||
call do_mono_excitation(key_tmp,j_hole,l_part,ispin,i_ok)
|
||||
if(i_ok .ne.1)cycle
|
||||
delta_e = -(ref_bitmask_energy - diag_H_mat_elem(key_tmp,N_int))
|
||||
|
||||
hij = get_mo_bielec_integral(i_hole,j_hole,k_part,l_part,mo_integrals_map)
|
||||
contrib = 0.5d0 * (delta_e - dsqrt(delta_e * delta_e + 4.d0 * hij*hij))
|
||||
total_corr_e_2h1p += contrib
|
||||
corr_energy_2h1p_ab_bb_per_2_orb(i_hole,j_hole) += contrib
|
||||
corr_energy_2h1p_per_orb_ab(i_hole) += contrib
|
||||
corr_energy_2h1p_per_orb_ab(l_part) += contrib
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
! Alpha Alpha spin correlation energy
|
||||
do i = 1, n_inact_orb
|
||||
i_hole = list_inact(i)
|
||||
do j = i+1, n_inact_orb
|
||||
j_hole = list_inact(j)
|
||||
do k = 1, n_act_orb
|
||||
k_part = list_act(k)
|
||||
do l = 1,n_virt_orb
|
||||
l_part = list_virt(l)
|
||||
hij = get_mo_bielec_integral(i_hole,j_hole,k_part,l_part,mo_integrals_map)
|
||||
exc = get_mo_bielec_integral(i_hole,j_hole,l_part,k_part,mo_integrals_map)
|
||||
key_tmp = ref_bitmask
|
||||
ispin = 1
|
||||
call do_mono_excitation(key_tmp,i_hole,k_part,ispin,i_ok)
|
||||
if(i_ok .ne.1)cycle
|
||||
ispin = 1
|
||||
call do_mono_excitation(key_tmp,j_hole,l_part,ispin,i_ok)
|
||||
if(i_ok .ne.1)cycle
|
||||
delta_e = -(ref_bitmask_energy - diag_H_mat_elem(key_tmp,N_int))
|
||||
hij = hij - exc
|
||||
contrib = 0.5d0 * (delta_e - dsqrt(delta_e * delta_e + 4.d0 * hij*hij))
|
||||
|
||||
total_corr_e_2h1p += contrib
|
||||
corr_energy_2h1p_per_orb_aa(i_hole) += contrib
|
||||
corr_energy_2h1p_per_orb_aa(l_part) += contrib
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
! Beta Beta correlation energy
|
||||
do i = 1, n_inact_orb
|
||||
i_hole = list_inact(i)
|
||||
do j = i+1, n_inact_orb
|
||||
j_hole = list_inact(j)
|
||||
do k = 1, n_act_orb
|
||||
k_part = list_act(k)
|
||||
do l = 1,n_virt_orb
|
||||
l_part = list_virt(l)
|
||||
hij = get_mo_bielec_integral(i_hole,j_hole,k_part,l_part,mo_integrals_map)
|
||||
exc = get_mo_bielec_integral(i_hole,j_hole,l_part,k_part,mo_integrals_map)
|
||||
key_tmp = ref_bitmask
|
||||
ispin = 2
|
||||
call do_mono_excitation(key_tmp,i_hole,k_part,ispin,i_ok)
|
||||
if(i_ok .ne.1)cycle
|
||||
ispin = 2
|
||||
call do_mono_excitation(key_tmp,j_hole,l_part,ispin,i_ok)
|
||||
if(i_ok .ne.1)cycle
|
||||
delta_e = -(ref_bitmask_energy - diag_H_mat_elem(key_tmp,N_int))
|
||||
hij = hij - exc
|
||||
contrib = 0.5d0 * (delta_e - dsqrt(delta_e * delta_e + 4.d0 * hij*hij))
|
||||
corr_energy_2h1p_ab_bb_per_2_orb(i_hole,j_hole) += contrib
|
||||
|
||||
total_corr_e_2h1p += contrib
|
||||
corr_energy_2h1p_per_orb_bb(i_hole) += contrib
|
||||
corr_energy_2h1p_per_orb_aa(l_part) += contrib
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [double precision, corr_energy_1h2p_per_orb_ab, (mo_tot_num)]
|
||||
&BEGIN_PROVIDER [double precision, corr_energy_1h2p_two_orb, (mo_tot_num,mo_tot_num)]
|
||||
&BEGIN_PROVIDER [double precision, corr_energy_1h2p_per_orb_aa, (mo_tot_num)]
|
||||
&BEGIN_PROVIDER [double precision, corr_energy_1h2p_per_orb_bb, (mo_tot_num)]
|
||||
&BEGIN_PROVIDER [ double precision, total_corr_e_1h2p]
|
||||
use bitmasks
|
||||
implicit none
|
||||
integer(bit_kind) :: key_tmp(N_int,2)
|
||||
integer :: i,j,k,l
|
||||
integer :: i_hole,j_hole,k_part,l_part
|
||||
double precision :: get_mo_bielec_integral,hij,delta_e,exc,contrib
|
||||
double precision :: diag_H_mat_elem
|
||||
integer :: i_ok,ispin
|
||||
! Alpha - Beta correlation energy
|
||||
total_corr_e_1h2p = 0.d0
|
||||
corr_energy_1h2p_per_orb_ab = 0.d0
|
||||
corr_energy_1h2p_per_orb_aa = 0.d0
|
||||
corr_energy_1h2p_per_orb_bb = 0.d0
|
||||
do i = 1, n_virt_orb
|
||||
i_hole = list_virt(i)
|
||||
do k = 1, n_act_orb
|
||||
k_part = list_act(k)
|
||||
do j = 1, n_inact_orb
|
||||
j_hole = list_inact(j)
|
||||
do l = 1, n_virt_orb
|
||||
l_part = list_virt(l)
|
||||
|
||||
key_tmp = ref_bitmask
|
||||
ispin = 2
|
||||
call do_mono_excitation(key_tmp,i_hole,k_part,ispin,i_ok)
|
||||
if(i_ok .ne.1)cycle
|
||||
ispin = 1
|
||||
call do_mono_excitation(key_tmp,j_hole,l_part,ispin,i_ok)
|
||||
if(i_ok .ne.1)cycle
|
||||
delta_e = -(ref_bitmask_energy - diag_H_mat_elem(key_tmp,N_int))
|
||||
|
||||
hij = get_mo_bielec_integral(i_hole,j_hole,k_part,l_part,mo_integrals_map)
|
||||
contrib = 0.5d0 * (delta_e - dsqrt(delta_e * delta_e + 4.d0 * hij*hij))
|
||||
|
||||
total_corr_e_1h2p += contrib
|
||||
corr_energy_1h2p_per_orb_ab(i_hole) += contrib
|
||||
corr_energy_1h2p_per_orb_ab(j_hole) += contrib
|
||||
corr_energy_1h2p_two_orb(k_part,l_part) += contrib
|
||||
corr_energy_1h2p_two_orb(l_part,k_part) += contrib
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
! Alpha Alpha correlation energy
|
||||
do i = 1, n_virt_orb
|
||||
i_hole = list_virt(i)
|
||||
do j = 1, n_inact_orb
|
||||
j_hole = list_inact(j)
|
||||
do k = 1, n_act_orb
|
||||
k_part = list_act(k)
|
||||
do l = i+1,n_virt_orb
|
||||
l_part = list_virt(l)
|
||||
hij = get_mo_bielec_integral(i_hole,j_hole,k_part,l_part,mo_integrals_map)
|
||||
exc = get_mo_bielec_integral(i_hole,j_hole,l_part,k_part,mo_integrals_map)
|
||||
|
||||
key_tmp = ref_bitmask
|
||||
ispin = 1
|
||||
call do_mono_excitation(key_tmp,i_hole,k_part,ispin,i_ok)
|
||||
if(i_ok .ne.1)cycle
|
||||
ispin = 1
|
||||
call do_mono_excitation(key_tmp,j_hole,l_part,ispin,i_ok)
|
||||
if(i_ok .ne.1)cycle
|
||||
delta_e = -(ref_bitmask_energy - diag_H_mat_elem(key_tmp,N_int))
|
||||
hij = hij - exc
|
||||
contrib = 0.5d0 * (delta_e - dsqrt(delta_e * delta_e + 4.d0 * hij*hij))
|
||||
total_corr_e_1h2p += contrib
|
||||
corr_energy_1h2p_per_orb_aa(i_hole) += contrib
|
||||
corr_energy_1h2p_per_orb_ab(j_hole) += contrib
|
||||
corr_energy_1h2p_two_orb(k_part,l_part) += contrib
|
||||
corr_energy_1h2p_two_orb(l_part,k_part) += contrib
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
! Beta Beta correlation energy
|
||||
do i = 1, n_virt_orb
|
||||
i_hole = list_virt(i)
|
||||
do j = 1, n_inact_orb
|
||||
j_hole = list_inact(j)
|
||||
do k = 1, n_act_orb
|
||||
k_part = list_act(k)
|
||||
do l = i+1,n_virt_orb
|
||||
l_part = list_virt(l)
|
||||
hij = get_mo_bielec_integral(i_hole,j_hole,k_part,l_part,mo_integrals_map)
|
||||
exc = get_mo_bielec_integral(i_hole,j_hole,l_part,k_part,mo_integrals_map)
|
||||
|
||||
key_tmp = ref_bitmask
|
||||
ispin = 2
|
||||
call do_mono_excitation(key_tmp,i_hole,k_part,ispin,i_ok)
|
||||
if(i_ok .ne.1)cycle
|
||||
ispin = 2
|
||||
call do_mono_excitation(key_tmp,j_hole,l_part,ispin,i_ok)
|
||||
if(i_ok .ne.1)cycle
|
||||
delta_e = -(ref_bitmask_energy - diag_H_mat_elem(key_tmp,N_int))
|
||||
hij = hij - exc
|
||||
contrib = 0.5d0 * (delta_e - dsqrt(delta_e * delta_e + 4.d0 * hij*hij))
|
||||
total_corr_e_1h2p += contrib
|
||||
corr_energy_1h2p_per_orb_bb(i_hole) += contrib
|
||||
corr_energy_1h2p_per_orb_ab(j_hole) += contrib
|
||||
corr_energy_1h2p_two_orb(k_part,l_part) += contrib
|
||||
corr_energy_1h2p_two_orb(l_part,k_part) += contrib
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [double precision, corr_energy_1h1p_spin_flip_per_orb, (mo_tot_num)]
|
||||
&BEGIN_PROVIDER [ double precision, total_corr_e_1h1p_spin_flip]
|
||||
use bitmasks
|
||||
implicit none
|
||||
integer(bit_kind) :: key_tmp(N_int,2)
|
||||
integer :: i,j,k,l
|
||||
integer :: i_hole,j_hole,k_part,l_part
|
||||
double precision :: get_mo_bielec_integral,hij,delta_e,exc,contrib
|
||||
double precision :: diag_H_mat_elem
|
||||
integer :: i_ok,ispin
|
||||
! Alpha - Beta correlation energy
|
||||
total_corr_e_1h1p_spin_flip = 0.d0
|
||||
corr_energy_1h1p_spin_flip_per_orb = 0.d0
|
||||
do i = 1, n_inact_orb
|
||||
i_hole = list_inact(i)
|
||||
do k = 1, n_act_orb
|
||||
k_part = list_act(k)
|
||||
do j = 1, n_act_orb
|
||||
j_hole = list_act(j)
|
||||
do l = 1, n_virt_orb
|
||||
l_part = list_virt(l)
|
||||
|
||||
key_tmp = ref_bitmask
|
||||
ispin = 2
|
||||
call do_mono_excitation(key_tmp,i_hole,k_part,ispin,i_ok)
|
||||
if(i_ok .ne.1)cycle
|
||||
ispin = 1
|
||||
call do_mono_excitation(key_tmp,j_hole,l_part,ispin,i_ok)
|
||||
if(i_ok .ne.1)cycle
|
||||
delta_e = -(ref_bitmask_energy - diag_H_mat_elem(key_tmp,N_int))
|
||||
|
||||
hij = get_mo_bielec_integral(i_hole,j_hole,k_part,l_part,mo_integrals_map)
|
||||
contrib = 0.5d0 * (delta_e - dsqrt(delta_e * delta_e + 4.d0 * hij*hij))
|
||||
|
||||
total_corr_e_1h1p_spin_flip += contrib
|
||||
corr_energy_1h1p_spin_flip_per_orb(i_hole) += contrib
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
|
@ -1,222 +0,0 @@
|
|||
subroutine create_restart_and_1h(i_hole)
|
||||
implicit none
|
||||
use bitmasks
|
||||
integer, intent(in) :: i_hole
|
||||
integer(bit_kind) :: key_tmp(N_int,2)
|
||||
integer :: i,j,i_part_act,ispin,k,l,i_ok
|
||||
integer :: n_new_det
|
||||
integer(bit_kind), allocatable :: new_det(:,:,:)
|
||||
integer(bit_kind), allocatable :: old_psi_det(:,:,:)
|
||||
allocate (old_psi_det(N_int,2,n_det))
|
||||
do i = 1, N_det
|
||||
do j = 1, N_int
|
||||
old_psi_det(j,1,i) = psi_det(j,1,i)
|
||||
old_psi_det(j,2,i) = psi_det(j,2,i)
|
||||
enddo
|
||||
enddo
|
||||
n_new_det = 0
|
||||
do j = 1, n_act_orb
|
||||
i_part_act = list_act(j) ! index of the particle in the active space
|
||||
do i = 1, N_det
|
||||
do ispin = 1,2
|
||||
do k = 1, N_int
|
||||
key_tmp(k,1) = psi_det(k,1,i)
|
||||
key_tmp(k,2) = psi_det(k,2,i)
|
||||
enddo
|
||||
call do_mono_excitation(key_tmp,i_hole,i_part_act,ispin,i_ok)
|
||||
if(i_ok .ne. 1)cycle
|
||||
n_new_det +=1
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
integer :: N_det_old
|
||||
N_det_old = N_det
|
||||
N_det += n_new_det
|
||||
allocate (new_det(N_int,2,n_new_det))
|
||||
if (psi_det_size < N_det) then
|
||||
psi_det_size = N_det
|
||||
TOUCH psi_det_size
|
||||
endif
|
||||
do i = 1, N_det_old
|
||||
do k = 1, N_int
|
||||
psi_det(k,1,i) = old_psi_det(k,1,i)
|
||||
psi_det(k,2,i) = old_psi_det(k,2,i)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
n_new_det = 0
|
||||
do j = 1, n_act_orb
|
||||
i_part_act = list_act(j) ! index of the particle in the active space
|
||||
do i = 1, N_det_old
|
||||
do ispin = 1,2
|
||||
do k = 1, N_int
|
||||
key_tmp(k,1) = psi_det(k,1,i)
|
||||
key_tmp(k,2) = psi_det(k,2,i)
|
||||
enddo
|
||||
call do_mono_excitation(key_tmp,i_hole,i_part_act,ispin,i_ok)
|
||||
if(i_ok .ne. 1)cycle
|
||||
n_new_det +=1
|
||||
do k = 1, N_int
|
||||
psi_det(k,1,n_det_old+n_new_det) = key_tmp(k,1)
|
||||
psi_det(k,2,n_det_old+n_new_det) = key_tmp(k,2)
|
||||
enddo
|
||||
psi_coef(n_det_old+n_new_det,:) = 0.d0
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
SOFT_TOUCH N_det psi_det psi_coef
|
||||
logical :: found_duplicates
|
||||
if(n_act_orb.gt.1)then
|
||||
call remove_duplicates_in_psi_det(found_duplicates)
|
||||
endif
|
||||
end
|
||||
|
||||
subroutine create_restart_and_1p(i_particle)
|
||||
implicit none
|
||||
integer, intent(in) :: i_particle
|
||||
use bitmasks
|
||||
integer(bit_kind) :: key_tmp(N_int,2)
|
||||
integer :: i,j,i_hole_act,ispin,k,l,i_ok
|
||||
integer :: n_new_det
|
||||
integer(bit_kind), allocatable :: new_det(:,:,:)
|
||||
integer(bit_kind), allocatable :: old_psi_det(:,:,:)
|
||||
allocate (old_psi_det(N_int,2,n_det))
|
||||
do i = 1, N_det
|
||||
do j = 1, N_int
|
||||
old_psi_det(j,1,i) = psi_det(j,1,i)
|
||||
old_psi_det(j,2,i) = psi_det(j,2,i)
|
||||
enddo
|
||||
enddo
|
||||
n_new_det = 0
|
||||
do j = 1, n_act_orb
|
||||
i_hole_act = list_act(j) ! index of the particle in the active space
|
||||
do i = 1, N_det
|
||||
do ispin = 1,2
|
||||
do k = 1, N_int
|
||||
key_tmp(k,1) = psi_det(k,1,i)
|
||||
key_tmp(k,2) = psi_det(k,2,i)
|
||||
enddo
|
||||
call do_mono_excitation(key_tmp,i_hole_act,i_particle,ispin,i_ok)
|
||||
if(i_ok .ne. 1)cycle
|
||||
n_new_det +=1
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
integer :: N_det_old
|
||||
N_det_old = N_det
|
||||
N_det += n_new_det
|
||||
allocate (new_det(N_int,2,n_new_det))
|
||||
if (psi_det_size < N_det) then
|
||||
psi_det_size = N_det
|
||||
TOUCH psi_det_size
|
||||
endif
|
||||
do i = 1, N_det_old
|
||||
do k = 1, N_int
|
||||
psi_det(k,1,i) = old_psi_det(k,1,i)
|
||||
psi_det(k,2,i) = old_psi_det(k,2,i)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
n_new_det = 0
|
||||
do j = 1, n_act_orb
|
||||
i_hole_act = list_act(j) ! index of the particle in the active space
|
||||
do i = 1, N_det_old
|
||||
do ispin = 1,2
|
||||
do k = 1, N_int
|
||||
key_tmp(k,1) = psi_det(k,1,i)
|
||||
key_tmp(k,2) = psi_det(k,2,i)
|
||||
enddo
|
||||
call do_mono_excitation(key_tmp,i_hole_act,i_particle,ispin,i_ok)
|
||||
if(i_ok .ne. 1)cycle
|
||||
n_new_det +=1
|
||||
do k = 1, N_int
|
||||
psi_det(k,1,n_det_old+n_new_det) = key_tmp(k,1)
|
||||
psi_det(k,2,n_det_old+n_new_det) = key_tmp(k,2)
|
||||
enddo
|
||||
psi_coef(n_det_old+n_new_det,:) = 0.d0
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
SOFT_TOUCH N_det psi_det psi_coef
|
||||
logical :: found_duplicates
|
||||
call remove_duplicates_in_psi_det(found_duplicates)
|
||||
end
|
||||
|
||||
subroutine create_restart_1h_1p(i_hole,i_part)
|
||||
implicit none
|
||||
use bitmasks
|
||||
integer, intent(in) :: i_hole
|
||||
integer, intent(in) :: i_part
|
||||
|
||||
integer :: i,j,i_part_act,ispin,k,l,i_ok
|
||||
integer(bit_kind) :: key_tmp(N_int,2)
|
||||
integer :: n_new_det
|
||||
integer(bit_kind), allocatable :: new_det(:,:,:)
|
||||
integer(bit_kind), allocatable :: old_psi_det(:,:,:)
|
||||
|
||||
allocate (old_psi_det(N_int,2,n_det))
|
||||
do i = 1, N_det
|
||||
do j = 1, N_int
|
||||
old_psi_det(j,1,i) = psi_det(j,1,i)
|
||||
old_psi_det(j,2,i) = psi_det(j,2,i)
|
||||
enddo
|
||||
enddo
|
||||
n_new_det = 0
|
||||
i_part_act = i_part ! index of the particle in the active space
|
||||
do i = 1, N_det
|
||||
do ispin = 1,2
|
||||
do k = 1, N_int
|
||||
key_tmp(k,1) = psi_det(k,1,i)
|
||||
key_tmp(k,2) = psi_det(k,2,i)
|
||||
enddo
|
||||
call do_mono_excitation(key_tmp,i_hole,i_part_act,ispin,i_ok)
|
||||
if(i_ok .ne. 1)cycle
|
||||
n_new_det +=1
|
||||
enddo
|
||||
enddo
|
||||
|
||||
integer :: N_det_old
|
||||
N_det_old = N_det
|
||||
N_det += n_new_det
|
||||
allocate (new_det(N_int,2,n_new_det))
|
||||
if (psi_det_size < N_det) then
|
||||
psi_det_size = N_det
|
||||
TOUCH psi_det_size
|
||||
endif
|
||||
do i = 1, N_det_old
|
||||
do k = 1, N_int
|
||||
psi_det(k,1,i) = old_psi_det(k,1,i)
|
||||
psi_det(k,2,i) = old_psi_det(k,2,i)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
n_new_det = 0
|
||||
i_part_act = i_part ! index of the particle in the active space
|
||||
do i = 1, N_det_old
|
||||
do ispin = 1,2
|
||||
do k = 1, N_int
|
||||
key_tmp(k,1) = psi_det(k,1,i)
|
||||
key_tmp(k,2) = psi_det(k,2,i)
|
||||
enddo
|
||||
call do_mono_excitation(key_tmp,i_hole,i_part_act,ispin,i_ok)
|
||||
if(i_ok .ne. 1)cycle
|
||||
n_new_det +=1
|
||||
do k = 1, N_int
|
||||
psi_det(k,1,n_det_old+n_new_det) = key_tmp(k,1)
|
||||
psi_det(k,2,n_det_old+n_new_det) = key_tmp(k,2)
|
||||
enddo
|
||||
psi_coef(n_det_old+n_new_det,:) = 0.d0
|
||||
enddo
|
||||
enddo
|
||||
|
||||
SOFT_TOUCH N_det psi_det psi_coef
|
||||
logical :: found_duplicates
|
||||
if(n_act_orb.gt.1)then
|
||||
call remove_duplicates_in_psi_det(found_duplicates)
|
||||
endif
|
||||
|
||||
end
|
|
@ -1,133 +0,0 @@
|
|||
BEGIN_PROVIDER [ double precision, one_body_dm_mo_alpha_generators_restart, (mo_tot_num,mo_tot_num) ]
|
||||
&BEGIN_PROVIDER [ double precision, one_body_dm_mo_beta_generators_restart, (mo_tot_num,mo_tot_num) ]
|
||||
&BEGIN_PROVIDER [ double precision, norm_generators_restart]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Alpha and beta one-body density matrix for the generators restart
|
||||
END_DOC
|
||||
|
||||
integer :: j,k,l,m
|
||||
integer :: occ(N_int*bit_kind_size,2)
|
||||
double precision :: ck, cl, ckl
|
||||
double precision :: phase
|
||||
integer :: h1,h2,p1,p2,s1,s2, degree
|
||||
integer :: exc(0:2,2,2),n_occ_alpha
|
||||
double precision, allocatable :: tmp_a(:,:), tmp_b(:,:)
|
||||
integer :: degree_respect_to_HF_k
|
||||
integer :: degree_respect_to_HF_l,index_ref_generators_restart
|
||||
double precision :: inv_coef_ref_generators_restart
|
||||
integer :: i
|
||||
|
||||
do i = 1, N_det_generators_restart
|
||||
! Find the reference determinant for intermediate normalization
|
||||
call get_excitation_degree(ref_generators_restart,psi_det_generators_restart(1,1,i),degree,N_int)
|
||||
if(degree == 0)then
|
||||
index_ref_generators_restart = i
|
||||
inv_coef_ref_generators_restart = 1.d0/psi_coef_generators_restart(i,1)
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
norm_generators_restart = 0.d0
|
||||
do i = 1, N_det_generators_restart
|
||||
psi_coef_generators_restart(i,1) = psi_coef_generators_restart(i,1) * inv_coef_ref_generators_restart
|
||||
norm_generators_restart += psi_coef_generators_restart(i,1)**2
|
||||
enddo
|
||||
|
||||
|
||||
one_body_dm_mo_alpha_generators_restart = 0.d0
|
||||
one_body_dm_mo_beta_generators_restart = 0.d0
|
||||
!$OMP PARALLEL DEFAULT(NONE) &
|
||||
!$OMP PRIVATE(j,k,l,m,occ,ck, cl, ckl,phase,h1,h2,p1,p2,s1,s2, degree,exc, &
|
||||
!$OMP tmp_a, tmp_b, n_occ_alpha)&
|
||||
!$OMP SHARED(psi_det_generators_restart,psi_coef_generators_restart,N_int,elec_alpha_num,&
|
||||
!$OMP elec_beta_num,one_body_dm_mo_alpha_generators_restart,one_body_dm_mo_beta_generators_restart,N_det_generators_restart,&
|
||||
!$OMP mo_tot_num,N_states, state_average_weight)
|
||||
allocate(tmp_a(mo_tot_num,mo_tot_num), tmp_b(mo_tot_num,mo_tot_num) )
|
||||
tmp_a = 0.d0
|
||||
tmp_b = 0.d0
|
||||
!$OMP DO SCHEDULE(dynamic)
|
||||
do k=1,N_det_generators_restart
|
||||
call bitstring_to_list(psi_det_generators_restart(1,1,k), occ(1,1), n_occ_alpha, N_int)
|
||||
call bitstring_to_list(psi_det_generators_restart(1,2,k), occ(1,2), n_occ_alpha, N_int)
|
||||
do m=1,N_states
|
||||
ck = psi_coef_generators_restart(k,m)*psi_coef_generators_restart(k,m) * state_average_weight(m)
|
||||
do l=1,elec_alpha_num
|
||||
j = occ(l,1)
|
||||
tmp_a(j,j) += ck
|
||||
enddo
|
||||
do l=1,elec_beta_num
|
||||
j = occ(l,2)
|
||||
tmp_b(j,j) += ck
|
||||
enddo
|
||||
enddo
|
||||
do l=1,k-1
|
||||
call get_excitation_degree(psi_det_generators_restart(1,1,k),psi_det_generators_restart(1,1,l),degree,N_int)
|
||||
if (degree /= 1) then
|
||||
cycle
|
||||
endif
|
||||
call get_mono_excitation(psi_det_generators_restart(1,1,k),psi_det_generators_restart(1,1,l),exc,phase,N_int)
|
||||
call decode_exc(exc,degree,h1,p1,h2,p2,s1,s2)
|
||||
do m=1,N_states
|
||||
ckl = psi_coef_generators_restart(k,m) * psi_coef_generators_restart(l,m) * phase * state_average_weight(m)
|
||||
if (s1==1) then
|
||||
tmp_a(h1,p1) += ckl
|
||||
tmp_a(p1,h1) += ckl
|
||||
else
|
||||
tmp_b(h1,p1) += ckl
|
||||
tmp_b(p1,h1) += ckl
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
!$OMP END DO NOWAIT
|
||||
!$OMP CRITICAL
|
||||
one_body_dm_mo_alpha_generators_restart = one_body_dm_mo_alpha_generators_restart + tmp_a
|
||||
!$OMP END CRITICAL
|
||||
!$OMP CRITICAL
|
||||
one_body_dm_mo_beta_generators_restart = one_body_dm_mo_beta_generators_restart + tmp_b
|
||||
!$OMP END CRITICAL
|
||||
deallocate(tmp_a,tmp_b)
|
||||
!$OMP BARRIER
|
||||
!$OMP END PARALLEL
|
||||
|
||||
do i = 1, mo_tot_num
|
||||
print*,'DM restat',i,one_body_dm_mo_beta_generators_restart(i,i) + one_body_dm_mo_alpha_generators_restart(i,i)
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, one_body_dm_mo_generators_restart, (mo_tot_num,mo_tot_num) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! One-body density matrix for the generators_restart
|
||||
END_DOC
|
||||
one_body_dm_mo_generators_restart = one_body_dm_mo_alpha_generators_restart + one_body_dm_mo_beta_generators_restart
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, one_body_spin_density_mo_generators_restart, (mo_tot_num,mo_tot_num) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! rho(alpha) - rho(beta)
|
||||
END_DOC
|
||||
one_body_spin_density_mo_generators_restart = one_body_dm_mo_alpha_generators_restart - one_body_dm_mo_beta_generators_restart
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, one_body_dm_mo_alpha_osoci, (mo_tot_num,mo_tot_num) ]
|
||||
&BEGIN_PROVIDER [ double precision, one_body_dm_mo_beta_osoci, (mo_tot_num,mo_tot_num) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Alpha and beta one-body density matrix that will be used for the OSOCI approach
|
||||
END_DOC
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, one_body_dm_mo_alpha_1h1p, (mo_tot_num,mo_tot_num) ]
|
||||
&BEGIN_PROVIDER [ double precision, one_body_dm_mo_beta_1h1p, (mo_tot_num,mo_tot_num) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Alpha and beta one-body density matrix that will be used for the 1h1p approach
|
||||
END_DOC
|
||||
END_PROVIDER
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
subroutine diag_inactive_virt_and_update_mos
|
||||
implicit none
|
||||
integer :: i,j,i_inact,j_inact,i_virt,j_virt
|
||||
double precision :: tmp(mo_tot_num,mo_tot_num)
|
||||
character*(64) :: label
|
||||
print*,'Diagonalizing the occ and virt Fock operator'
|
||||
tmp = 0.d0
|
||||
do i = 1, mo_tot_num
|
||||
tmp(i,i) = Fock_matrix_mo(i,i)
|
||||
enddo
|
||||
|
||||
do i = 1, n_inact_orb
|
||||
i_inact = list_inact(i)
|
||||
do j = i+1, n_inact_orb
|
||||
j_inact = list_inact(j)
|
||||
tmp(i_inact,j_inact) = Fock_matrix_mo(i_inact,j_inact)
|
||||
tmp(j_inact,i_inact) = Fock_matrix_mo(j_inact,i_inact)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
do i = 1, n_virt_orb
|
||||
i_virt = list_virt(i)
|
||||
do j = i+1, n_virt_orb
|
||||
j_virt = list_virt(j)
|
||||
tmp(i_virt,j_virt) = Fock_matrix_mo(i_virt,j_virt)
|
||||
tmp(j_virt,i_virt) = Fock_matrix_mo(j_virt,i_virt)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
|
||||
label = "Canonical"
|
||||
call mo_as_eigvectors_of_mo_matrix(tmp,size(tmp,1),size(tmp,2),label,1,.false.)
|
||||
soft_touch mo_coef
|
||||
|
||||
|
||||
end
|
||||
|
||||
subroutine diag_inactive_virt_new_and_update_mos
|
||||
implicit none
|
||||
integer :: i,j,i_inact,j_inact,i_virt,j_virt,k,k_act
|
||||
double precision :: tmp(mo_tot_num,mo_tot_num),accu,get_mo_bielec_integral
|
||||
character*(64) :: label
|
||||
tmp = 0.d0
|
||||
do i = 1, mo_tot_num
|
||||
tmp(i,i) = Fock_matrix_mo(i,i)
|
||||
enddo
|
||||
|
||||
do i = 1, n_inact_orb
|
||||
i_inact = list_inact(i)
|
||||
do j = i+1, n_inact_orb
|
||||
j_inact = list_inact(j)
|
||||
accu =0.d0
|
||||
do k = 1, n_act_orb
|
||||
k_act = list_act(k)
|
||||
accu += get_mo_bielec_integral(i_inact,k_act,j_inact,k_act,mo_integrals_map)
|
||||
accu -= get_mo_bielec_integral(i_inact,k_act,k_act,j_inact,mo_integrals_map)
|
||||
enddo
|
||||
tmp(i_inact,j_inact) = Fock_matrix_mo(i_inact,j_inact) + accu
|
||||
tmp(j_inact,i_inact) = Fock_matrix_mo(j_inact,i_inact) + accu
|
||||
enddo
|
||||
enddo
|
||||
|
||||
do i = 1, n_virt_orb
|
||||
i_virt = list_virt(i)
|
||||
do j = i+1, n_virt_orb
|
||||
j_virt = list_virt(j)
|
||||
accu =0.d0
|
||||
do k = 1, n_act_orb
|
||||
k_act = list_act(k)
|
||||
accu += get_mo_bielec_integral(i_virt,k_act,j_virt,k_act,mo_integrals_map)
|
||||
enddo
|
||||
tmp(i_virt,j_virt) = Fock_matrix_mo(i_virt,j_virt) - accu
|
||||
tmp(j_virt,i_virt) = Fock_matrix_mo(j_virt,i_virt) - accu
|
||||
enddo
|
||||
enddo
|
||||
|
||||
|
||||
label = "Canonical"
|
||||
call mo_as_eigvectors_of_mo_matrix(tmp,size(tmp,1),size(tmp,2),label,1,.false.)
|
||||
soft_touch mo_coef
|
||||
|
||||
|
||||
end
|
|
@ -1,451 +0,0 @@
|
|||
|
||||
subroutine standard_dress(delta_ij_generators_,size_buffer,Ndet_generators,i_generator,n_selected,det_buffer,Nint,iproc,psi_det_generators_input,E_ref)
|
||||
use bitmasks
|
||||
implicit none
|
||||
|
||||
integer, intent(in) :: i_generator,n_selected, Nint, iproc
|
||||
integer, intent(in) :: Ndet_generators,size_buffer
|
||||
double precision, intent(inout) :: delta_ij_generators_(Ndet_generators,Ndet_generators),E_ref
|
||||
|
||||
integer(bit_kind), intent(in) :: det_buffer(Nint,2,size_buffer)
|
||||
integer(bit_kind), intent(in) :: psi_det_generators_input(N_int,2,Ndet_generators)
|
||||
integer :: i,j,k,m
|
||||
integer :: new_size
|
||||
integer :: degree(Ndet_generators)
|
||||
integer :: idx(0:Ndet_generators)
|
||||
logical :: good
|
||||
|
||||
integer :: c_ref
|
||||
integer :: connected_to_ref
|
||||
|
||||
|
||||
double precision :: hka, haa
|
||||
double precision :: haj
|
||||
double precision :: f
|
||||
integer :: connected_to_ref_by_mono
|
||||
logical :: is_in_wavefunction
|
||||
double precision :: H_array(Ndet_generators)
|
||||
double precision :: H_matrix_tmp(Ndet_generators+1,Ndet_generators+1)
|
||||
double precision :: eigenvectors(Ndet_generators+1,Ndet_generators+1), eigenvalues(Ndet_generators+1)
|
||||
double precision :: contrib,lambda_i,accu
|
||||
|
||||
do k = 1, Ndet_generators
|
||||
call i_h_j(psi_det_generators_input(1,1,k),psi_det_generators_input(1,1,k),Nint,hka)
|
||||
H_matrix_tmp(k,k) = hka
|
||||
do j = k+1, Ndet_generators
|
||||
call i_h_j(psi_det_generators_input(1,1,k),psi_det_generators_input(1,1,j),Nint,hka)
|
||||
H_matrix_tmp(k,j) = hka
|
||||
H_matrix_tmp(j,k) = hka
|
||||
enddo
|
||||
H_matrix_tmp(k,Ndet_generators+1) = 0.d0
|
||||
enddo
|
||||
|
||||
do i=1,n_selected
|
||||
c_ref = connected_to_ref_by_mono(det_buffer(1,1,i),psi_det_generators_input,N_int,i_generator,Ndet_generators)
|
||||
if (c_ref /= 0) then
|
||||
cycle
|
||||
endif
|
||||
if (is_in_wavefunction(det_buffer(1,1,i),Nint)) then
|
||||
cycle
|
||||
endif
|
||||
call get_excitation_degree_vector(psi_det_generators_input,det_buffer(1,1,i),degree,N_int,Ndet_generators,idx)
|
||||
H_array = 0.d0
|
||||
do k=1,idx(0)
|
||||
call i_h_j(det_buffer(1,1,i),psi_det_generators_input(1,1,idx(k)),Nint,hka)
|
||||
H_array(idx(k)) = hka
|
||||
enddo
|
||||
|
||||
call i_h_j(det_buffer(1,1,i),det_buffer(1,1,i),Nint,haa)
|
||||
f = 1.d0/(E_ref-haa)
|
||||
|
||||
lambda_i = f
|
||||
do k=1,idx(0)
|
||||
contrib = H_array(idx(k)) * H_array(idx(k)) * lambda_i
|
||||
delta_ij_generators_(idx(k), idx(k)) += contrib
|
||||
do j=k+1,idx(0)
|
||||
contrib = H_array(idx(k)) * H_array(idx(j)) * lambda_i
|
||||
delta_ij_generators_(idx(k), idx(j)) += contrib
|
||||
delta_ij_generators_(idx(j), idx(k)) += contrib
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
end
|
||||
|
||||
|
||||
subroutine is_a_good_candidate(threshold,is_ok,e_pt2,verbose,exit_loop,is_ok_perturbative)
|
||||
use bitmasks
|
||||
implicit none
|
||||
double precision, intent(in) :: threshold
|
||||
double precision, intent(out):: e_pt2
|
||||
logical, intent(out) :: is_ok,exit_loop,is_ok_perturbative
|
||||
logical, intent(in) :: verbose
|
||||
|
||||
integer :: l,k,m
|
||||
double precision,allocatable :: dressed_H_matrix(:,:)
|
||||
double precision, allocatable :: psi_coef_diagonalized_tmp(:,:)
|
||||
integer(bit_kind), allocatable :: psi_det_generators_input(:,:,:)
|
||||
double precision :: hij
|
||||
|
||||
allocate(psi_det_generators_input(N_int,2,N_det_generators),dressed_H_matrix(N_det_generators,N_det_generators),psi_coef_diagonalized_tmp(N_det_generators,N_states))
|
||||
dressed_H_matrix = 0.d0
|
||||
do k = 1, N_det_generators
|
||||
do l = 1, N_int
|
||||
psi_det_generators_input(l,1,k) = psi_det_generators(l,1,k)
|
||||
psi_det_generators_input(l,2,k) = psi_det_generators(l,2,k)
|
||||
enddo
|
||||
enddo
|
||||
!call H_apply_dressed_pert(dressed_H_matrix,N_det_generators,psi_det_generators_input)
|
||||
call dress_H_matrix_from_psi_det_input(psi_det_generators_input,N_det_generators,is_ok,psi_coef_diagonalized_tmp, dressed_H_matrix,threshold,verbose,exit_loop,is_ok_perturbative)
|
||||
!do m = 1, N_states
|
||||
! do k = 1, N_det_generators
|
||||
! do l = 1, N_int
|
||||
! psi_selectors(l,1,k) = psi_det_generators_input(l,1,k)
|
||||
! psi_selectors(l,2,k) = psi_det_generators_input(l,2,k)
|
||||
! enddo
|
||||
! psi_selectors_coef(k,m) = psi_coef_diagonalized_tmp(k,m)
|
||||
! enddo
|
||||
!enddo
|
||||
!soft_touch psi_selectors psi_selectors_coef
|
||||
!if(do_it_perturbative)then
|
||||
print*, 'is_ok_perturbative',is_ok_perturbative
|
||||
if(is_ok.or.is_ok_perturbative)then
|
||||
N_det = N_det_generators
|
||||
do m = 1, N_states
|
||||
do k = 1, N_det_generators
|
||||
do l = 1, N_int
|
||||
psi_det(l,1,k) = psi_det_generators_input(l,1,k)
|
||||
psi_det(l,2,k) = psi_det_generators_input(l,2,k)
|
||||
enddo
|
||||
psi_coef(k,m) = psi_coef_diagonalized_tmp(k,m)
|
||||
print*, 'psi_coef(k,m)',psi_coef(k,m)
|
||||
enddo
|
||||
enddo
|
||||
soft_touch psi_det psi_coef N_det
|
||||
e_pt2 = 0.d0
|
||||
do m =1, N_det_generators
|
||||
do l = 1, N_det_generators
|
||||
call i_h_j(psi_det_generators_input(1,1,m),psi_det_generators_input(1,1,l),N_int,hij) ! Fill the zeroth order H matrix
|
||||
e_pt2 += (dressed_H_matrix(m,l) - hij)* psi_coef_diagonalized_tmp(m,1)* psi_coef_diagonalized_tmp(l,1)
|
||||
enddo
|
||||
enddo
|
||||
endif
|
||||
!endif
|
||||
|
||||
deallocate(psi_det_generators_input,dressed_H_matrix,psi_coef_diagonalized_tmp)
|
||||
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
subroutine dress_H_matrix_from_psi_det_input(psi_det_generators_input,Ndet_generators,is_ok,psi_coef_diagonalized_tmp, dressed_H_matrix,threshold,verbose,exit_loop,is_ok_perturbative)
|
||||
use bitmasks
|
||||
implicit none
|
||||
integer(bit_kind), intent(in) :: psi_det_generators_input(N_int,2,Ndet_generators)
|
||||
integer, intent(in) :: Ndet_generators
|
||||
double precision, intent(in) :: threshold
|
||||
logical, intent(in) :: verbose
|
||||
logical, intent(out) :: is_ok,exit_loop,is_ok_perturbative
|
||||
double precision, intent(out) :: psi_coef_diagonalized_tmp(Ndet_generators,N_states)
|
||||
double precision, intent(inout) :: dressed_H_matrix(Ndet_generators, Ndet_generators)
|
||||
|
||||
|
||||
integer :: i,j,degree,index_ref_generators_restart,i_count,k,i_det_no_ref
|
||||
double precision :: eigvalues(Ndet_generators), eigvectors(Ndet_generators,Ndet_generators),hij
|
||||
double precision :: psi_coef_ref(Ndet_generators,N_states),diag_h_mat_average,diag_h_mat_no_ref_average
|
||||
logical :: is_a_ref_det(Ndet_generators)
|
||||
exit_loop = .False.
|
||||
|
||||
is_a_ref_det = .False.
|
||||
do i = 1, N_det_generators
|
||||
do j = 1, N_det_generators_restart
|
||||
call get_excitation_degree(psi_det_generators_input(1,1,i),psi_det_generators_restart(1,1,j),degree,N_int)
|
||||
if(degree == 0)then
|
||||
is_a_ref_det(i) = .True.
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
|
||||
|
||||
do i = 1, Ndet_generators
|
||||
call get_excitation_degree(ref_generators_restart,psi_det_generators_input(1,1,i),degree,N_int)
|
||||
if(degree == 0)then
|
||||
index_ref_generators_restart = i
|
||||
endif
|
||||
do j = 1, Ndet_generators
|
||||
call i_h_j(psi_det_generators_input(1,1,j),psi_det_generators_input(1,1,i),N_int,hij) ! Fill the zeroth order H matrix
|
||||
dressed_H_matrix(i,j) = hij
|
||||
enddo
|
||||
enddo
|
||||
i_det_no_ref = 0
|
||||
diag_h_mat_average = 0.d0
|
||||
do i = 1, Ndet_generators
|
||||
if(is_a_ref_det(i))cycle
|
||||
i_det_no_ref +=1
|
||||
diag_h_mat_average+=dressed_H_matrix(i,i)
|
||||
enddo
|
||||
diag_h_mat_average = diag_h_mat_average/dble(i_det_no_ref)
|
||||
print*,'diag_h_mat_average = ',diag_h_mat_average
|
||||
print*,'ref h_mat = ',dressed_H_matrix(index_ref_generators_restart,index_ref_generators_restart)
|
||||
integer :: number_of_particles, number_of_holes
|
||||
! Filter the the MLCT that are higher than 27.2 eV in energy with respect to the reference determinant
|
||||
do i = 1, Ndet_generators
|
||||
if(is_a_ref_det(i))cycle
|
||||
if(number_of_holes(psi_det_generators_input(1,1,i)).eq.0 .and. number_of_particles(psi_det_generators_input(1,1,i)).eq.1)then
|
||||
if(diag_h_mat_average - dressed_H_matrix(index_ref_generators_restart,index_ref_generators_restart) .gt.2.d0)then
|
||||
is_ok = .False.
|
||||
exit_loop = .True.
|
||||
return
|
||||
endif
|
||||
endif
|
||||
|
||||
! Filter the the LMCT that are higher than 54.4 eV in energy with respect to the reference determinant
|
||||
if(number_of_holes(psi_det_generators_input(1,1,i)).eq.1 .and. number_of_particles(psi_det_generators_input(1,1,i)).eq.0)then
|
||||
if(diag_h_mat_average - dressed_H_matrix(index_ref_generators_restart,index_ref_generators_restart) .gt.2.d0)then
|
||||
is_ok = .False.
|
||||
return
|
||||
endif
|
||||
endif
|
||||
exit
|
||||
enddo
|
||||
|
||||
call lapack_diagd(eigvalues,eigvectors,dressed_H_matrix,Ndet_generators,Ndet_generators) ! Diagonalize the Dressed_H_matrix
|
||||
|
||||
double precision :: s2(N_det_generators),E_ref(N_states)
|
||||
integer :: i_state(N_states)
|
||||
integer :: n_state_good
|
||||
n_state_good = 0
|
||||
if(s2_eig)then
|
||||
call u_0_S2_u_0(s2,eigvectors,Ndet_generators,psi_det_generators_input,N_int,N_det_generators,size(eigvectors,1))
|
||||
do i = 1, Ndet_generators
|
||||
print*,'s2 = ',s2(i)
|
||||
print*,dabs(s2(i)-expected_s2)
|
||||
if(dabs(s2(i)-expected_s2).le.0.3d0)then
|
||||
n_state_good +=1
|
||||
i_state(n_state_good) = i
|
||||
E_ref(n_state_good) = eigvalues(i)
|
||||
endif
|
||||
if(n_state_good==N_states)then
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
else
|
||||
do i = 1, N_states
|
||||
i_state(i) = i
|
||||
E_ref(i) = eigvalues(i)
|
||||
enddo
|
||||
endif
|
||||
do i = 1,N_states
|
||||
print*,'i_state = ',i_state(i)
|
||||
enddo
|
||||
do k = 1, N_states
|
||||
print*,'state ',k
|
||||
do i = 1, Ndet_generators
|
||||
psi_coef_diagonalized_tmp(i,k) = eigvectors(i,i_state(k)) / eigvectors(index_ref_generators_restart,i_state(k))
|
||||
psi_coef_ref(i,k) = eigvectors(i,i_state(k))
|
||||
print*,'psi_coef_ref(i) = ',psi_coef_ref(i,k)
|
||||
enddo
|
||||
enddo
|
||||
if(verbose)then
|
||||
print*,'Zeroth order space :'
|
||||
do i = 1, Ndet_generators
|
||||
write(*,'(10(F16.8),X)')dressed_H_matrix(i,:)
|
||||
enddo
|
||||
print*,''
|
||||
print*,'Zeroth order space Diagonalized :'
|
||||
do k = 1, N_states
|
||||
print*,'state ',k
|
||||
do i = 1, Ndet_generators
|
||||
print*,'coef, <I|H|I> = ',psi_coef_diagonalized_tmp(i,k),dressed_H_matrix(i,i)-dressed_H_matrix(index_ref_generators_restart,index_ref_generators_restart),is_a_ref_det(i)
|
||||
enddo
|
||||
enddo
|
||||
endif
|
||||
double precision :: E_ref_average
|
||||
E_ref_average = 0.d0
|
||||
do i = 1, N_states
|
||||
E_ref_average += E_ref(i)
|
||||
enddo
|
||||
E_ref_average = E_ref_average / dble(N_states)
|
||||
|
||||
call H_apply_dressed_pert(dressed_H_matrix,Ndet_generators,psi_det_generators_input,E_ref_average) ! Calculate the dressing of the H matrix
|
||||
if(verbose)then
|
||||
print*,'Zeroth order space Dressed by outer space:'
|
||||
do i = 1, Ndet_generators
|
||||
write(*,'(10(F16.8),X)')dressed_H_matrix(i,:)
|
||||
enddo
|
||||
endif
|
||||
call lapack_diagd(eigvalues,eigvectors,dressed_H_matrix,Ndet_generators,Ndet_generators) ! Diagonalize the Dressed_H_matrix
|
||||
integer :: i_good_state(0:N_states)
|
||||
i_good_state(0) = 0
|
||||
do i = 1, Ndet_generators
|
||||
! State following
|
||||
do k = 1, N_states
|
||||
accu = 0.d0
|
||||
do j =1, Ndet_generators
|
||||
print*,'',eigvectors(j,i) , psi_coef_ref(j,k)
|
||||
accu += eigvectors(j,i) * psi_coef_ref(j,k)
|
||||
enddo
|
||||
print*,'accu = ',accu
|
||||
if(dabs(accu).ge.0.72d0)then
|
||||
i_good_state(0) +=1
|
||||
i_good_state(i_good_state(0)) = i
|
||||
endif
|
||||
enddo
|
||||
if(i_good_state(0)==N_states)then
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
do i = 1, N_states
|
||||
i_state(i) = i_good_state(i)
|
||||
E_ref(i) = eigvalues(i_good_state(i))
|
||||
enddo
|
||||
double precision :: accu
|
||||
accu = 0.d0
|
||||
do k = 1, N_states
|
||||
do i = 1, Ndet_generators
|
||||
psi_coef_diagonalized_tmp(i,k) = eigvectors(i,i_state(k)) / eigvectors(index_ref_generators_restart,i_state(k))
|
||||
enddo
|
||||
enddo
|
||||
if(verbose)then
|
||||
do k = 1, N_states
|
||||
print*,'state ',k
|
||||
do i = 1, Ndet_generators
|
||||
print*,'coef, <I|H+Delta H|I> = ',psi_coef_diagonalized_tmp(i,k),dressed_H_matrix(i,i)-dressed_H_matrix(index_ref_generators_restart,index_ref_generators_restart),is_a_ref_det(i)
|
||||
enddo
|
||||
enddo
|
||||
endif
|
||||
is_ok = .False.
|
||||
do i = 1, Ndet_generators
|
||||
if(is_a_ref_det(i))cycle
|
||||
do k = 1, N_states
|
||||
if(dabs(psi_coef_diagonalized_tmp(i,k)) .gt.threshold)then
|
||||
is_ok = .True.
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
if(is_ok)then
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
if(.not.is_ok)then
|
||||
is_ok_perturbative = .True.
|
||||
do i = 1, Ndet_generators
|
||||
if(is_a_ref_det(i))cycle
|
||||
do k = 1, N_states
|
||||
print*, psi_coef_diagonalized_tmp(i,k),threshold_perturbative
|
||||
if(dabs(psi_coef_diagonalized_tmp(i,k)) .gt.threshold_perturbative)then
|
||||
is_ok_perturbative = .False.
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
if(.not.is_ok_perturbative)then
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
endif
|
||||
if(verbose)then
|
||||
print*,'is_ok = ',is_ok
|
||||
print*,'is_ok_perturbative = ',is_ok_perturbative
|
||||
endif
|
||||
|
||||
|
||||
end
|
||||
|
||||
subroutine fill_H_apply_buffer_no_selection_first_order_coef(n_selected,det_buffer,Nint,iproc)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Fill the H_apply buffer with determiants for CISD
|
||||
END_DOC
|
||||
|
||||
integer, intent(in) :: n_selected, Nint, iproc
|
||||
integer(bit_kind), intent(in) :: det_buffer(Nint,2,n_selected)
|
||||
integer :: i,j,k
|
||||
integer :: new_size
|
||||
PROVIDE H_apply_buffer_allocated
|
||||
call omp_set_lock(H_apply_buffer_lock(1,iproc))
|
||||
new_size = H_apply_buffer(iproc)%N_det + n_selected
|
||||
if (new_size > H_apply_buffer(iproc)%sze) then
|
||||
call resize_h_apply_buffer(max(2*H_apply_buffer(iproc)%sze,new_size),iproc)
|
||||
endif
|
||||
do i=1,H_apply_buffer(iproc)%N_det
|
||||
ASSERT (sum(popcnt(H_apply_buffer(iproc)%det(:,1,i)) )== elec_alpha_num)
|
||||
ASSERT (sum(popcnt(H_apply_buffer(iproc)%det(:,2,i))) == elec_beta_num)
|
||||
enddo
|
||||
do i=1,n_selected
|
||||
do j=1,N_int
|
||||
H_apply_buffer(iproc)%det(j,1,i+H_apply_buffer(iproc)%N_det) = det_buffer(j,1,i)
|
||||
H_apply_buffer(iproc)%det(j,2,i+H_apply_buffer(iproc)%N_det) = det_buffer(j,2,i)
|
||||
enddo
|
||||
ASSERT (sum(popcnt(H_apply_buffer(iproc)%det(:,1,i+H_apply_buffer(iproc)%N_det)) )== elec_alpha_num)
|
||||
ASSERT (sum(popcnt(H_apply_buffer(iproc)%det(:,2,i+H_apply_buffer(iproc)%N_det))) == elec_beta_num)
|
||||
enddo
|
||||
double precision :: i_H_psi_array(N_states),h,diag_H_mat_elem_fock,delta_e
|
||||
do i=1,N_selected
|
||||
call i_H_psi(det_buffer(1,1,i),psi_selectors,psi_selectors_coef,N_int,N_det_selectors,psi_selectors_size,N_states,i_H_psi_array)
|
||||
call i_H_j(det_buffer(1,1,i),det_buffer(1,1,i),N_int,h)
|
||||
do j=1,N_states
|
||||
delta_e = -1.d0 /(h - psi_energy(j))
|
||||
H_apply_buffer(iproc)%coef(i+H_apply_buffer(iproc)%N_det,j) = i_H_psi_array(j) * delta_e
|
||||
enddo
|
||||
enddo
|
||||
H_apply_buffer(iproc)%N_det = new_size
|
||||
do i=1,H_apply_buffer(iproc)%N_det
|
||||
ASSERT (sum(popcnt(H_apply_buffer(iproc)%det(:,1,i)) )== elec_alpha_num)
|
||||
ASSERT (sum(popcnt(H_apply_buffer(iproc)%det(:,2,i))) == elec_beta_num)
|
||||
enddo
|
||||
call omp_unset_lock(H_apply_buffer_lock(1,iproc))
|
||||
end
|
||||
|
||||
|
||||
|
||||
subroutine make_s2_eigenfunction_first_order
|
||||
implicit none
|
||||
integer :: i,j,k
|
||||
integer :: smax, s
|
||||
integer(bit_kind), allocatable :: d(:,:,:), det_buffer(:,:,:)
|
||||
integer :: N_det_new
|
||||
integer, parameter :: bufsze = 1000
|
||||
logical, external :: is_in_wavefunction
|
||||
|
||||
allocate (d(N_int,2,1), det_buffer(N_int,2,bufsze) )
|
||||
smax = 1
|
||||
N_det_new = 0
|
||||
|
||||
do i=1,N_occ_pattern
|
||||
call occ_pattern_to_dets_size(psi_occ_pattern(1,1,i),s,elec_alpha_num,N_int)
|
||||
s += 1
|
||||
if (s > smax) then
|
||||
deallocate(d)
|
||||
allocate ( d(N_int,2,s) )
|
||||
smax = s
|
||||
endif
|
||||
call occ_pattern_to_dets(psi_occ_pattern(1,1,i),d,s,elec_alpha_num,N_int)
|
||||
do j=1,s
|
||||
if (.not. is_in_wavefunction(d(1,1,j), N_int) ) then
|
||||
N_det_new += 1
|
||||
do k=1,N_int
|
||||
det_buffer(k,1,N_det_new) = d(k,1,j)
|
||||
det_buffer(k,2,N_det_new) = d(k,2,j)
|
||||
enddo
|
||||
if (N_det_new == bufsze) then
|
||||
call fill_H_apply_buffer_no_selection(bufsze,det_buffer,N_int,0)
|
||||
N_det_new = 0
|
||||
endif
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
|
||||
if (N_det_new > 0) then
|
||||
call fill_H_apply_buffer_no_selection_first_order_coef(N_det_new,det_buffer,N_int,0)
|
||||
call copy_H_apply_buffer_to_wf
|
||||
SOFT_TOUCH N_det psi_coef psi_det
|
||||
endif
|
||||
|
||||
deallocate(d,det_buffer)
|
||||
|
||||
call write_int(output_determinants,N_det_new, 'Added deteminants for S^2')
|
||||
|
||||
end
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
program osoci_program
|
||||
implicit none
|
||||
call new_approach
|
||||
! call save_natural_mos
|
||||
end
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user